Update jQuery documentation (3.2.1)

Closes #548.
pull/605/head
Thibaut Courouble 8 years ago
parent 2fe374a5f2
commit ad5b6dbc09

@ -18,6 +18,10 @@ module Docs
end
end
css('.page-header', 'h1 span').each do |node|
node.before(node.children).remove
end
# Remove useless <header>
css('.entry-header > .entry-title', 'header > .underline', 'header > h2:only-child').to_a.uniq.each do |node|
node.parent.replace node

@ -8,12 +8,13 @@ module Docs
def get_name
name = at_css('h1').content.strip
name.gsub!(/ [A-Z]/) { |str| str.downcase! }
name.gsub!(/ [A-Z]/) { |str| str.downcase! } unless name.start_with?('Category')
name.gsub! %r{[“”]}, '"'
name
end
def get_type
return 'Categories' if slug.start_with?('category')
return 'Ajax' if slug == 'Ajax_Events'
categories = css 'span.category'
types = categories.map { |node| node.at_css('a').content.strip }

@ -8,7 +8,7 @@ module Docs
options[:title] = false
options[:container] = '#content'
options[:trailing_slash] = false
options[:skip_patterns] = [/category/]
options[:skip_patterns] = [/deprecated/, /category\/version/]
options[:attribution] = <<-HTML
&copy; The jQuery Foundation and other contributors<br>

@ -1,7 +1,7 @@
module Docs
class JqueryCore < Jquery
self.name = 'jQuery'
self.release = 'up to 3.1.1'
self.release = 'up to 3.2.1'
self.base_url = 'https://api.jquery.com/'
self.initial_paths = %w(/index/index)

@ -10,7 +10,7 @@ module Docs
options[:root_title] = 'jQuery Mobile'
options[:skip] = %w(/tabs /theme)
options[:skip_patterns].concat [/\A\/icons/, /cdn-cgi/i]
options[:skip_patterns] += [/\A\/icons/, /cdn-cgi/i]
options[:replace_paths] = { '/select/' => '/selectmenu' }
options[:fix_urls] = ->(url) do

Loading…
Cancel
Save