Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 140 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
._sinon {
|
||||||
|
@extend %simple;
|
||||||
|
|
||||||
|
h4 { @extend %block-label;}
|
||||||
|
}
|
@ -1,47 +1,28 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Sinon
|
class Sinon
|
||||||
class EntriesFilter < Docs::EntriesFilter
|
class EntriesFilter < Docs::EntriesFilter
|
||||||
def additional_entries
|
def get_name
|
||||||
entries = []
|
at_css('h1').content.strip
|
||||||
type = config = nil
|
end
|
||||||
|
|
||||||
css('*').each do |node|
|
|
||||||
if node.name == 'h2'
|
|
||||||
config = false
|
|
||||||
type = node.content.strip
|
|
||||||
type.remove! 'Test '
|
|
||||||
type.remove! 'Sinon.JS '
|
|
||||||
type = type[0].upcase + type.from(1)
|
|
||||||
|
|
||||||
id = type.parameterize
|
def get_type
|
||||||
node['id'] = id
|
name
|
||||||
|
end
|
||||||
|
|
||||||
entries << [type, id, 'Sections']
|
def additional_entries
|
||||||
elsif node.name == 'h3' && node.content.include?('sinon.config')
|
css('h4 > code').each_with_object [] do |node, entries|
|
||||||
config = true
|
name = node.content.strip
|
||||||
elsif node.name == 'dl'
|
name.sub! %r{\s*\(.*\);?}, '()'
|
||||||
node.css('dt > code').each do |code|
|
name.sub! %r{\A(\w+\.\w+)\s+\=.*}, '\1'
|
||||||
name = code.content.strip
|
|
||||||
name.sub! %r{\(.*\);?}, '()'
|
|
||||||
name.sub! %r{\Aserver.(\w+)\s=.*\z}, 'server.\1'
|
|
||||||
name.remove! '`'
|
|
||||||
name.remove! %r{\A.+?\=\s+}
|
name.remove! %r{\A.+?\=\s+}
|
||||||
name.remove! %r{\A\w+?\s}
|
name.remove! %r{\A\w+?\s}
|
||||||
name.prepend 'sinon.config.' if config
|
name.remove! %r{;\z}
|
||||||
|
|
||||||
next if name =~ /\s/
|
|
||||||
next if entries.any? { |entry| entry[0].casecmp(name) == 0 }
|
next if entries.any? { |entry| entry[0].casecmp(name) == 0 }
|
||||||
|
|
||||||
id = name.parameterize
|
entries << [name, node.parent['id']]
|
||||||
code.parent['id'] = id
|
|
||||||
|
|
||||||
entries << [name, id, type]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
entries
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,23 +1,31 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Sinon < UrlScraper
|
class Sinon < UrlScraper
|
||||||
self.name = 'Sinon'
|
self.name = 'Sinon.JS'
|
||||||
|
self.slug = 'sinon'
|
||||||
self.type = 'sinon'
|
self.type = 'sinon'
|
||||||
self.release = '1.17.5'
|
|
||||||
self.base_url = 'http://sinonjs.org/docs/'
|
|
||||||
self.links = {
|
self.links = {
|
||||||
home: 'http://sinonjs.org/',
|
home: 'http://sinonjs.org/',
|
||||||
code: 'https://github.com/cjohansen/Sinon.JS'
|
code: 'https://github.com/sinonjs/sinon'
|
||||||
}
|
}
|
||||||
|
|
||||||
html_filters.push 'sinon/clean_html', 'sinon/entries', 'title'
|
html_filters.push 'sinon/clean_html', 'sinon/entries'
|
||||||
|
|
||||||
options[:title] = 'Sinon.JS'
|
options[:title] = 'Sinon.JS'
|
||||||
options[:container] = '.docs'
|
options[:container] = '.content .container'
|
||||||
options[:skip_links] = true
|
|
||||||
|
|
||||||
options[:attribution] = <<-HTML
|
options[:attribution] = <<-HTML
|
||||||
© 2010–2016 Christian Johansen<br>
|
© 2010–2017 Christian Johansen<br>
|
||||||
Licensed under the BSD License.
|
Licensed under the BSD License.
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
|
version '2' do
|
||||||
|
self.release = '2.1.0'
|
||||||
|
self.base_url = "http://sinonjs.org/releases/v#{release}/"
|
||||||
|
end
|
||||||
|
|
||||||
|
version '1' do
|
||||||
|
self.release = '1.17.7'
|
||||||
|
self.base_url = "http://sinonjs.org/releases/v#{release}/"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 1.7 KiB |
@ -1 +1 @@
|
|||||||
https://github.com/Kapeli/Dash-X-Platform-Resources/blob/master/docset_icons/sinon%402x.png
|
https://github.com/sinonjs/sinon/blob/master/docs/assets/images/logo.png
|
||||||
|