Ver Fonte

Update jQuery Mobile documentation to 1.4.0

Thibaut há 12 anos atrás
pai
commit
d50a87e37a

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -115,7 +115,7 @@ credits = [
     'https://raw.github.com/jquery/api.jquery.com/master/LICENSE-MIT.txt'
   ], [
     'jQuery Mobile',
-    '2013 jQuery Foundation',
+    '2014 jQuery Foundation',
     'MIT',
     'https://raw.github.com/jquery/api.jquerymobile.com/master/LICENSE-MIT.txt'
   ], [

+ 2 - 2
lib/docs/filters/jquery_mobile/entries.rb

@@ -2,12 +2,12 @@ module Docs
   class JqueryMobile
     class EntriesFilter < Docs::EntriesFilter
       # Ordered by precedence
-      TYPES = %w(Widgets Events Methods)
+      TYPES = %w(Widgets Events Properties Methods)
 
       def get_name
         name = at_css('h1').content.strip
         name.sub! ' Widget', ''
-        name.gsub!(/ [A-Z]/) { |str| str.downcase! }
+        name.prepend '.' if name.start_with? 'jqm'
         name << ' event' if type == 'Events' && !name.end_with?(' event')
         name
       end

+ 3 - 7
lib/docs/scrapers/jquery/jquery_mobile.rb

@@ -2,19 +2,15 @@ module Docs
   class JqueryMobile < Jquery
     self.name = 'jQuery Mobile'
     self.slug = 'jquerymobile'
-    self.version = '1.3.2'
+    self.version = '1.4.0'
     self.base_url = 'http://local.api.jquerymobile.com'
     self.root_path = '/category/all'
 
     html_filters.insert_before 'jquery/clean_html', 'jquery_mobile/entries'
 
     options[:root_title] = 'jQuery Mobile'
+    options[:skip] = %w(/tabs /theme)
     options[:skip_patterns].concat [/\A\/icons/]
-    options[:replace_paths] = {
-      '/select/'            => '/selectmenu',
-      '/forms/selects'      => '/selectmenu',
-      '/forms/checkboxes'   => '/checkboxradio',
-      '/forms/radiobuttons' => '/checkboxradio',
-      '/forms/slider/'      => '/slider' }
+    options[:replace_paths] = { '/select/' => '/selectmenu' }
   end
 end