diff --git a/lib/docs/filters/rails/entries.rb b/lib/docs/filters/rails/entries.rb index ef6beb0f..2bf46685 100644 --- a/lib/docs/filters/rails/entries.rb +++ b/lib/docs/filters/rails/entries.rb @@ -3,14 +3,19 @@ module Docs class EntriesFilter < Docs::Rdoc::EntriesFilter TYPE_BY_NAME_MATCHES = { /Assertions|::Test|Fixture/ => 'Testing', + /\AActiveRecord.+mysql/i => 'ActiveRecord/MySQL', + /\AActiveRecord.+postgresql/i => 'ActiveRecord/PostgreSQL', + /\AActiveRecord.+sqlite/i => 'ActiveRecord/SQLite', /\AActiveRecord.+Assoc/ => 'ActiveRecord/Associations', /\AActiveRecord.+Attribute/ => 'ActiveRecord/Attributes', - /\AActiveRecord.+(Migration|Schema|Adapters::Table)/ => 'ActiveRecord/Migrations', + /\AActiveRecord.+ConnectionAdapters/ => 'ActiveRecord/Connection', /\AActiveSupport.+(Subscriber|Notifications)/ => 'ActiveSupport/Instrumentation', /\A(False|Nil|True)Class/ => 'Boolean' } TYPE_BY_NAME_STARTS_WITH = { 'ActionDispatch::Integration' => 'Testing', + 'ActionDispatch::Request' => 'ActionDispatch/Request', + 'ActionDispatch::Response' => 'ActionDispatch/Response', 'ActionDispatch::Routing' => 'ActionDispatch/Routing', 'ActionView::Helpers' => 'ActionView/Helpers', 'ActiveModel::Errors' => 'ActiveModel/Validation', @@ -25,20 +30,12 @@ module Docs 'ActiveRecord::Scoping' => 'ActiveModel/Query', 'ActiveRecord::SpawnMethods' => 'ActiveModel/Query', 'ActiveSupport::Cach' => 'ActiveSupport/Caching', - 'ActiveSupport::Hash' => 'ActiveSupport/Hash', 'ActiveSupport::Inflector' => 'ActiveSupport/Inflector', - 'ActiveSupport::Ordered' => 'ActiveSupport/Hash', 'ActiveSupport::Time' => 'ActiveSupport/TimeZones', 'Rails::Application' => 'Rails/Application', 'Rails::Engine' => 'Rails/Engine', 'Rails::Railtie' => 'Rails/Railtie' } - def get_name - name = super - name.sub! 'HashWithIndifferentAccess::HashWithIndifferentAccess', 'HashWithIndifferentAccess' - name - end - def get_type parent = at_css('.meta-parent').try(:content).to_s diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb index 61f77613..3ebb95a0 100644 --- a/lib/docs/scrapers/rdoc/rails.rb +++ b/lib/docs/scrapers/rdoc/rails.rb @@ -6,6 +6,7 @@ module Docs # actionpack \ # actionview \ # activemodel \ + # activejob \ # activerecord \ # activesupport \ # railties \ @@ -19,7 +20,7 @@ module Docs self.name = 'Ruby on Rails' self.slug = 'rails' - self.version = '4.1.8' + self.version = '4.2.0' self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails' html_filters.replace 'rdoc/entries', 'rails/entries' @@ -29,55 +30,40 @@ module Docs options[:skip] += %w( AbstractController/Callbacks.html AbstractController/UrlFor.html - ActionController.html ActionController/Instrumentation.html - ActionController/ModelNaming.html ActionController/Rendering.html - ActionController/Rescue.html - ActionController/UrlFor.html - ActionDispatch/DebugExceptions.htnl + ActionDispatch/DebugExceptions.html ActionDispatch/Http/URL.html - ActionDispatch/Integration/Runner.html - ActionDispatch/Integration/Session.html + ActionDispatch/Journey/Parser.html ActionDispatch/Reloader.html ActionDispatch/RequestId.html ActionDispatch/Routing/HtmlTableFormatter.html ActionDispatch/Routing/Mapper.html + ActionDispatch/Routing/RouteSet.html ActionDispatch/ShowExceptions.html - ActionView.html - ActionView/Context.html ActionView/FileSystemResolver.html ActionView/FixtureResolver.html ActionView/LogSubscriber.html - ActionView/ModelNaming.html ActionView/Template/Handlers/Erubis.html - ActiveModel.html - ActiveRecord.html + ActionView/TestCase/Behavior/RenderedViewsCollection.html ActiveRecord/DynamicMatchers/Finder.html ActiveRecord/Sanitization.html ActiveRecord/Tasks/DatabaseTasks.html - ActiveSupport.html ActiveSupport/Configurable/Configuration.html ActiveSupport/Dependencies/WatchStack.html ActiveSupport/DescendantsTracker.html ActiveSupport/FileUpdateChecker.html ActiveSupport/Notifications/Fanout.html - ActiveSupport/Testing/ConstantLookup.html - ActiveSupport/Testing/Declarative.html ActiveSupport/Testing/Isolation/Subprocess.html Rails/API/Task.html) options[:skip_patterns] = [ - /\AAbstractController\/ViewPaths/, /\AActionController\/Caching(?!\/Fragments|\.)/, - /\AActionController\/HideActions/, /\AActionController\/RequestForgeryProtection\/ProtectionMethods/, /\AActionController\/Testing/, /\AActionDispatch\/RemoteIp/, /\AActionView\/LookupContext/, /\AActionView\/Resolver/, - /\AActiveRecord\/ConnectionAdapters\/(?!DatabaseStatements|SchemaStatements|Table)/, - /\AActiveSupport\/JSON\//, /\AActiveSupport\/Multibyte\/Unicode\//, /\AActiveSupport\/XML/i, /\ASourceAnnotationExtractor/]