Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | 3 | "2017-05-14", |
| 4 | − "New documentations: <a href=\"/jest/\">Jest</a> and <a href=\"/liquid/\">Liquid</a>" | |
| 4 | + "New documentations: <a href=\"/jest/\">Jest</a>, <a href=\"/jasmine/\">Jasmine</a> and <a href=\"/liquid/\">Liquid</a>" | |
| 5 | 5 | ], [ |
| 6 | 6 | "2017-04-30", |
| 7 | 7 | "New documentation: <a href=\"/openjdk/\">OpenJDK</a>" |
| @@ -283,6 +283,11 @@ credits = [ · 282 unmodified lines | ||
| 283 | 283 | '2015 InfluxData, Inc.', |
| 284 | 284 | 'MIT', |
| 285 | 285 | 'https://github.com/influxdata/docs.influxdata.com/blob/master/LICENSE' |
| 286 | + ], [ | |
| 287 | + 'Jasmine', | |
| 288 | + '2008-2017 Pivotal Labs', | |
| 289 | + 'MIT', | |
| 290 | + 'https://raw.githubusercontent.com/jasmine/jasmine/master/MIT.LICENSE' | |
| 286 | 291 | ], [ |
| 287 | 292 | 'Jest', |
| 288 | 293 | '2014-present Facebook Inc.', |
| @@ -28,6 +28,7 @@ app.views.ExpressPage = · 27 unmodified lines | ||
| 28 | 28 | app.views.GoPage = |
| 29 | 29 | app.views.ImmutablePage = |
| 30 | 30 | app.views.InfluxdataPage = |
| 31 | +app.views.JasminePage = | |
| 31 | 32 | app.views.JestPage = |
| 32 | 33 | app.views.KnockoutPage = |
| 33 | 34 | app.views.KotlinPage = |
| @@ -171,3 +171,4 @@ · 170 unmodified lines | ||
| 171 | 171 | ._icon-padrino:before { background-position: -7rem -1rem; @extend %doc-icon-2; } |
| 172 | 172 | ._icon-angular:before { background-position: -8rem -1rem; @extend %doc-icon-2; } |
| 173 | 173 | ._icon-love:before { background-position: -9rem -1rem; @extend %doc-icon-2; } |
| 174 | +._icon-jasmine:before { background-position: 0 -2rem; @extend %doc-icon-2; } | |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | ._haxe, |
| 29 | 29 | ._immutable, |
| 30 | 30 | ._influxdata, |
| 31 | +._jasmine, | |
| 31 | 32 | ._jest, |
| 32 | 33 | ._less, |
| 33 | 34 | ._lodash, |
| @@ -0,0 +1,30 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jasmine | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + @doc = at_css('.docs') | |
| 6 | + | |
| 7 | + at_css('h1').content = 'Jasmine' if root_page? | |
| 8 | + | |
| 9 | + css('header', 'article', 'section:not([class])', 'div.description').each do |node| | |
| 10 | + node.before(node.children).remove | |
| 11 | + end | |
| 12 | + | |
| 13 | + css('h3.subsection-title').each do |node| | |
| 14 | + node.name = 'h2' | |
| 15 | + end | |
| 16 | + | |
| 17 | + css('h4.name').each do |node| | |
| 18 | + node.name = 'h3' | |
| 19 | + end | |
| 20 | + | |
| 21 | + css('pre').each do |node| | |
| 22 | + node.content = node.content | |
| 23 | + node['data-language'] = 'javascript' | |
| 24 | + end | |
| 25 | + | |
| 26 | + doc | |
| 27 | + end | |
| 28 | + end | |
| 29 | + end | |
| 30 | +end | |
| @@ -0,0 +1,27 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jasmine | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + name = at_css('h1').content.strip | |
| 6 | + name.remove! %r{\A\w+:\s} | |
| 7 | + name | |
| 8 | + end | |
| 9 | + | |
| 10 | + def get_type | |
| 11 | + at_css('h1').content.strip | |
| 12 | + end | |
| 13 | + | |
| 14 | + def additional_entries | |
| 15 | + css('h3[id]').each_with_object [] do |node, entries| | |
| 16 | + name = node.content.strip | |
| 17 | + next if name.start_with?('new ') | |
| 18 | + static = name.sub! '(static) ', '' | |
| 19 | + name.sub! %r{\(.*\)}, '()' | |
| 20 | + name.remove! %r{\s.*} | |
| 21 | + name.prepend "#{self.name}#{static ? '.' : '#'}" unless slug == 'global' | |
| 22 | + entries << [name, node['id']] | |
| 23 | + end | |
| 24 | + end | |
| 25 | + end | |
| 26 | + end | |
| 27 | +end | |
| @@ -0,0 +1,21 @@ | ||
| 1 | +module Docs | |
| 2 | + class Jasmine < UrlScraper | |
| 3 | + self.type = 'jasmine' | |
| 4 | + self.release = '2.6.1' | |
| 5 | + self.base_url = 'https://jasmine.github.io/api/2.6/' | |
| 6 | + self.root_path = 'index.html' | |
| 7 | + self.links = { | |
| 8 | + home: 'https://jasmine.github.io/', | |
| 9 | + code: 'https://github.com/jasmine/jasmine' | |
| 10 | + } | |
| 11 | + | |
| 12 | + html_filters.push 'jasmine/clean_html', 'jasmine/entries' | |
| 13 | + | |
| 14 | + options[:container] = '.main-content' | |
| 15 | + | |
| 16 | + options[:attribution] = <<-HTML | |
| 17 | + © 2008–2017 Pivotal Labs<br> | |
| 18 | + Licensed under the MIT License. | |
| 19 | + HTML | |
| 20 | + end | |
| 21 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +https://github.com/jasmine/jasmine.github.io/tree/master/images | |