diff --git a/assets/javascripts/models/doc.coffee b/assets/javascripts/models/doc.coffee index ef7508c2..5f2adea1 100644 --- a/assets/javascripts/models/doc.coffee +++ b/assets/javascripts/models/doc.coffee @@ -1,5 +1,5 @@ class app.models.Doc extends app.Model - # Attributes: name, slug, type, version, index_path, db_path, db_size, mtime, links + # Attributes: name, slug, type, release, index_path, db_path, db_size, mtime, links constructor: -> super diff --git a/assets/javascripts/templates/sidebar_tmpl.coffee b/assets/javascripts/templates/sidebar_tmpl.coffee index 12c162d4..41c7038e 100644 --- a/assets/javascripts/templates/sidebar_tmpl.coffee +++ b/assets/javascripts/templates/sidebar_tmpl.coffee @@ -8,7 +8,7 @@ templates.sidebarDoc = (doc, options = {}) -> link += """Enable""" else link += """""" - link += """#{doc.version}""" if doc.version + link += """#{doc.release}""" if doc.release link + "#{doc.name}" templates.sidebarType = (type) -> diff --git a/lib/docs/core/doc.rb b/lib/docs/core/doc.rb index 1b4ce1cb..25822bc6 100644 --- a/lib/docs/core/doc.rb +++ b/lib/docs/core/doc.rb @@ -6,7 +6,7 @@ module Docs class << self include Instrumentable - attr_accessor :name, :slug, :type, :version, :abstract, :links + attr_accessor :name, :slug, :type, :release, :abstract, :links def inherited(subclass) subclass.type = type @@ -36,7 +36,7 @@ module Docs { name: name, slug: slug, type: type, - version: version, + release: release, index_path: index_path, db_path: db_path, links: links } diff --git a/lib/docs/filters/angular/clean_urls.rb b/lib/docs/filters/angular/clean_urls.rb index 4b187882..3603b73a 100644 --- a/lib/docs/filters/angular/clean_urls.rb +++ b/lib/docs/filters/angular/clean_urls.rb @@ -2,8 +2,8 @@ module Docs class Angular class CleanUrlsFilter < Filter def call - html.gsub! "angularjs.org/#{Angular.version}/docs/partials/api/", "angularjs.org/#{Angular.version}/docs/api/" - html.gsub! %r{angularjs.org/#{Angular.version}/docs/api/(.+?)\.html}, "angularjs.org/#{Angular.version}/docs/api/\1" + html.gsub! "angularjs.org/#{Angular.release}/docs/partials/api/", "angularjs.org/#{Angular.release}/docs/api/" + html.gsub! %r{angularjs.org/#{Angular.release}/docs/api/(.+?)\.html}, "angularjs.org/#{Angular.release}/docs/api/\1" html end end diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index f9225681..cc7c553e 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -5,8 +5,8 @@ module Docs self.name = 'Angular.js' self.slug = 'angular' self.type = 'angular' - self.version = '1.4.8' - self.base_url = "https://code.angularjs.org/#{version}/docs/partials/api/" + self.release = '1.4.8' + self.base_url = "https://code.angularjs.org/#{release}/docs/partials/api/" html_filters.push 'angular/clean_html', 'angular/entries', 'title' text_filters.push 'angular/clean_urls' @@ -33,7 +33,7 @@ module Docs def root_page_body require 'capybara' Capybara.current_driver = :selenium - Capybara.visit("https://code.angularjs.org/#{self.class.version}/docs/api") + Capybara.visit("https://code.angularjs.org/#{self.class.release}/docs/api") Capybara.find('.side-navigation')['innerHTML'] end end diff --git a/lib/docs/scrapers/apache.rb b/lib/docs/scrapers/apache.rb index 955ab3fb..7a047e44 100644 --- a/lib/docs/scrapers/apache.rb +++ b/lib/docs/scrapers/apache.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Apache HTTP Server' self.slug = 'apache_http_server' self.type = 'apache' - self.version = '2.4.18' + self.release = '2.4.18' self.base_url = 'http://httpd.apache.org/docs/2.4/en/' self.links = { home: 'http://httpd.apache.org/' diff --git a/lib/docs/scrapers/backbone.rb b/lib/docs/scrapers/backbone.rb index ede70c54..70ee747b 100644 --- a/lib/docs/scrapers/backbone.rb +++ b/lib/docs/scrapers/backbone.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Backbone.js' self.slug = 'backbone' self.type = 'underscore' - self.version = '1.2.3' + self.release = '1.2.3' self.base_url = 'http://backbonejs.org' self.links = { home: 'http://backbonejs.org/', diff --git a/lib/docs/scrapers/bower.rb b/lib/docs/scrapers/bower.rb index cd638798..be3d1dfa 100644 --- a/lib/docs/scrapers/bower.rb +++ b/lib/docs/scrapers/bower.rb @@ -2,7 +2,7 @@ module Docs class Bower < UrlScraper self.name = 'Bower' self.type = 'bower' - self.version = '1.7.1' + self.release = '1.7.1' self.base_url = 'http://bower.io/docs/' self.root_path = 'api' self.links = { diff --git a/lib/docs/scrapers/chai.rb b/lib/docs/scrapers/chai.rb index 61359c40..4030563d 100644 --- a/lib/docs/scrapers/chai.rb +++ b/lib/docs/scrapers/chai.rb @@ -2,7 +2,7 @@ module Docs class Chai < UrlScraper self.name = 'Chai' self.type = 'chai' - self.version = '3.4.2' + self.release = '3.4.2' self.base_url = 'http://chaijs.com' self.root_path = '/api/' self.initial_paths = %w(/guide/installation/) diff --git a/lib/docs/scrapers/clojure.rb b/lib/docs/scrapers/clojure.rb index 8af22d10..14ae4958 100644 --- a/lib/docs/scrapers/clojure.rb +++ b/lib/docs/scrapers/clojure.rb @@ -1,7 +1,7 @@ module Docs class Clojure < UrlScraper self.type = 'clojure' - self.version = '1.7' + self.release = '1.7' self.base_url = 'http://clojure.github.io/clojure/' self.root_path = 'api-index.html' diff --git a/lib/docs/scrapers/coffeescript.rb b/lib/docs/scrapers/coffeescript.rb index 5eb80590..50ec7995 100644 --- a/lib/docs/scrapers/coffeescript.rb +++ b/lib/docs/scrapers/coffeescript.rb @@ -2,7 +2,7 @@ module Docs class Coffeescript < UrlScraper self.name = 'CoffeeScript' self.type = 'coffeescript' - self.version = '1.10.0' + self.release = '1.10.0' self.base_url = 'http://coffeescript.org' self.links = { home: 'http://coffeescript.org', diff --git a/lib/docs/scrapers/cordova.rb b/lib/docs/scrapers/cordova.rb index f1dfa17c..d28cf64e 100644 --- a/lib/docs/scrapers/cordova.rb +++ b/lib/docs/scrapers/cordova.rb @@ -2,8 +2,8 @@ module Docs class Cordova < UrlScraper self.name = 'Cordova' self.type = 'cordova' - self.version = '5.4.0' - self.base_url = "http://cordova.apache.org/docs/en/#{version}/" + self.release = '5.4.0' + self.base_url = "http://cordova.apache.org/docs/en/#{release}/" self.root_path = 'index.html' self.links = { home: 'http://cordova.apache.org/' diff --git a/lib/docs/scrapers/d3.rb b/lib/docs/scrapers/d3.rb index 5114abc2..2091c5eb 100644 --- a/lib/docs/scrapers/d3.rb +++ b/lib/docs/scrapers/d3.rb @@ -3,7 +3,7 @@ module Docs self.name = 'D3.js' self.slug = 'd3' self.type = 'd3' - self.version = '3.5.12' + self.release = '3.5.12' self.base_url = 'https://github.com/mbostock/d3/wiki/' self.root_path = 'API-Reference' self.links = { diff --git a/lib/docs/scrapers/django.rb b/lib/docs/scrapers/django.rb index 55b7888d..85504ed6 100644 --- a/lib/docs/scrapers/django.rb +++ b/lib/docs/scrapers/django.rb @@ -2,7 +2,7 @@ module Docs class Django < FileScraper self.name = 'Django' self.type = 'sphinx' - self.version = '1.8.6' + self.release = '1.8.6' self.dir = '/Users/Thibaut/DevDocs/Docs/Django' self.base_url = 'https://docs.djangoproject.com/en/1.8/' self.root_path = 'index.html' diff --git a/lib/docs/scrapers/dojo.rb b/lib/docs/scrapers/dojo.rb index 62157482..e1542091 100644 --- a/lib/docs/scrapers/dojo.rb +++ b/lib/docs/scrapers/dojo.rb @@ -5,8 +5,8 @@ module Docs include StubRootPage self.type = 'dojo' - self.version = '1.10' - self.base_url = "http://dojotoolkit.org/api/#{version}/" + self.release = '1.10' + self.base_url = "http://dojotoolkit.org/api/#{release}/" # Dojo expects all the requests to be xhrs or it redirects you back to the docs home page # where it uses js to call the backend based on the URL so you get the appropriate documentation diff --git a/lib/docs/scrapers/drupal.rb b/lib/docs/scrapers/drupal.rb index 471aae14..7efdd616 100644 --- a/lib/docs/scrapers/drupal.rb +++ b/lib/docs/scrapers/drupal.rb @@ -1,7 +1,7 @@ module Docs class Drupal < UrlScraper self.type = 'drupal' - self.version = '7.40' + self.release = '7.40' self.base_url = 'https://api.drupal.org/api/drupal/' self.initial_paths = %w(groups groups?page=1) self.links = { diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index 5b054d20..b2ba6fde 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/lib/docs/scrapers/elixir.rb @@ -2,7 +2,7 @@ module Docs class Elixir < UrlScraper self.name = 'Elixir' self.type = 'elixir' - self.version = '1.2.0' + self.release = '1.2.0' self.base_url = 'http://elixir-lang.org/docs/stable/' self.root_path = 'elixir/api-reference.html' self.initial_paths = %w( diff --git a/lib/docs/scrapers/ember.rb b/lib/docs/scrapers/ember.rb index 2c612342..dec86a3f 100644 --- a/lib/docs/scrapers/ember.rb +++ b/lib/docs/scrapers/ember.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Ember.js' self.slug = 'ember' self.type = 'ember' - self.version = '2.2.0' + self.release = '2.2.0' self.base_url = 'http://emberjs.com/api/' self.links = { home: 'http://emberjs.com/', diff --git a/lib/docs/scrapers/express.rb b/lib/docs/scrapers/express.rb index a5374474..3eeed77f 100644 --- a/lib/docs/scrapers/express.rb +++ b/lib/docs/scrapers/express.rb @@ -2,7 +2,7 @@ module Docs class Express < UrlScraper self.name = 'Express' self.type = 'express' - self.version = '4.13.0' + self.release = '4.13.0' self.base_url = 'http://expressjs.com/' self.root_path = '4x/api.html' self.links = { diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb index e54828e0..ba65a676 100644 --- a/lib/docs/scrapers/flow.rb +++ b/lib/docs/scrapers/flow.rb @@ -1,7 +1,7 @@ module Docs class Flow < React self.type = 'react' - self.version = '0.20' + self.release = '0.20' self.base_url = 'http://flowtype.org/docs/' self.root_path = 'about-flow.html' self.links = { diff --git a/lib/docs/scrapers/git.rb b/lib/docs/scrapers/git.rb index c7f08b6c..aeddb388 100644 --- a/lib/docs/scrapers/git.rb +++ b/lib/docs/scrapers/git.rb @@ -1,7 +1,7 @@ module Docs class Git < UrlScraper self.type = 'git' - self.version = '2.7.0' + self.release = '2.7.0' self.base_url = 'http://git-scm.com/docs' self.initial_paths = %w(/git.html) self.links = { diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb index 77a95654..35ea4ee0 100644 --- a/lib/docs/scrapers/go.rb +++ b/lib/docs/scrapers/go.rb @@ -1,7 +1,7 @@ module Docs class Go < UrlScraper self.type = 'go' - self.version = '1.5.2' + self.release = '1.5.2' self.base_url = 'https://golang.org/pkg/' self.links = { home: 'https://golang.org/', diff --git a/lib/docs/scrapers/grunt.rb b/lib/docs/scrapers/grunt.rb index 11ca52ef..dd30f69e 100644 --- a/lib/docs/scrapers/grunt.rb +++ b/lib/docs/scrapers/grunt.rb @@ -2,7 +2,7 @@ module Docs class Grunt < UrlScraper self.name = 'Grunt' self.type = 'grunt' - self.version = '0.4.5' + self.release = '0.4.5' self.base_url = 'http://gruntjs.com/' self.root_path = 'getting-started' self.initial_paths = %w(api/grunt) diff --git a/lib/docs/scrapers/haskell.rb b/lib/docs/scrapers/haskell.rb index 4e598452..0e4d0abf 100755 --- a/lib/docs/scrapers/haskell.rb +++ b/lib/docs/scrapers/haskell.rb @@ -2,8 +2,8 @@ module Docs class Haskell < UrlScraper self.name = 'Haskell' self.type = 'haskell' - self.version = '7.10.3' - self.base_url = "https://downloads.haskell.org/~ghc/#{version}/docs/html/libraries/" + self.release = '7.10.3' + self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/libraries/" self.root_path = 'index.html' html_filters.push 'haskell/entries', 'haskell/clean_html' diff --git a/lib/docs/scrapers/iojs.rb b/lib/docs/scrapers/iojs.rb index ebfd1eb1..94aac066 100644 --- a/lib/docs/scrapers/iojs.rb +++ b/lib/docs/scrapers/iojs.rb @@ -3,7 +3,7 @@ module Docs self.name = 'io.js' self.slug = 'iojs' self.type = 'node' - self.version = '3.3.1' + self.release = '3.3.1' self.base_url = 'https://iojs.org/api/' self.links = { home: 'https://iojs.org/en/index.html', diff --git a/lib/docs/scrapers/jquery/jquery_core.rb b/lib/docs/scrapers/jquery/jquery_core.rb index ea4e9a54..67da4101 100644 --- a/lib/docs/scrapers/jquery/jquery_core.rb +++ b/lib/docs/scrapers/jquery/jquery_core.rb @@ -1,7 +1,7 @@ module Docs class JqueryCore < Jquery self.name = 'jQuery' - self.version = 'up to 2.1.0' + self.release = 'up to 2.1.0' self.base_url = 'http://local.api.jquery.com' html_filters.insert_before 'jquery/clean_html', 'jquery_core/entries' diff --git a/lib/docs/scrapers/jquery/jquery_mobile.rb b/lib/docs/scrapers/jquery/jquery_mobile.rb index 26e6329d..d2e6162a 100644 --- a/lib/docs/scrapers/jquery/jquery_mobile.rb +++ b/lib/docs/scrapers/jquery/jquery_mobile.rb @@ -2,7 +2,7 @@ module Docs class JqueryMobile < Jquery self.name = 'jQuery Mobile' self.slug = 'jquerymobile' - self.version = '1.4.0' + self.release = '1.4.0' self.base_url = 'http://local.api.jquerymobile.com' self.root_path = '/category/all' diff --git a/lib/docs/scrapers/jquery/jquery_ui.rb b/lib/docs/scrapers/jquery/jquery_ui.rb index d7f41583..4b298c42 100644 --- a/lib/docs/scrapers/jquery/jquery_ui.rb +++ b/lib/docs/scrapers/jquery/jquery_ui.rb @@ -2,7 +2,7 @@ module Docs class JqueryUi < Jquery self.name = 'jQuery UI' self.slug = 'jqueryui' - self.version = '1.10.4' + self.release = '1.10.4' self.base_url = 'http://local.api.jqueryui.com' self.root_path = '/category/all' diff --git a/lib/docs/scrapers/knockout.rb b/lib/docs/scrapers/knockout.rb index 17e664be..6ddca807 100644 --- a/lib/docs/scrapers/knockout.rb +++ b/lib/docs/scrapers/knockout.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Knockout.js' self.slug = 'knockout' self.type = 'knockout' - self.version = '3.4.0' + self.release = '3.4.0' self.base_url = 'http://knockoutjs.com/documentation/' self.root_path = 'introduction.html' diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index ece25031..0c4daead 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Laravel' self.slug = 'laravel' self.type = 'laravel' - self.version = '5.2.0' + self.release = '5.2.0' self.base_url = 'https://laravel.com' self.root_path = '/api/5.2/index.html' self.initial_paths = %w(/docs/5.2/installation /api/5.2/classes.html) diff --git a/lib/docs/scrapers/less.rb b/lib/docs/scrapers/less.rb index c1aa542d..810724f6 100644 --- a/lib/docs/scrapers/less.rb +++ b/lib/docs/scrapers/less.rb @@ -1,7 +1,7 @@ module Docs class Less < UrlScraper self.type = 'less' - self.version = '2.5.3' + self.release = '2.5.3' self.base_url = 'http://lesscss.org' self.root_path = '/features' self.initial_paths = %w(/functions) diff --git a/lib/docs/scrapers/lodash.rb b/lib/docs/scrapers/lodash.rb index e60a7302..ddb03296 100644 --- a/lib/docs/scrapers/lodash.rb +++ b/lib/docs/scrapers/lodash.rb @@ -3,7 +3,7 @@ module Docs self.name = 'lodash' self.slug = 'lodash' self.type = 'lodash' - self.version = '3.10.0' + self.release = '3.10.0' self.base_url = 'https://lodash.com/docs' self.links = { home: 'https://lodash.com/', diff --git a/lib/docs/scrapers/lua.rb b/lib/docs/scrapers/lua.rb index 81ad81c5..5fb4f070 100644 --- a/lib/docs/scrapers/lua.rb +++ b/lib/docs/scrapers/lua.rb @@ -1,7 +1,7 @@ module Docs class Lua < UrlScraper self.type = 'lua' - self.version = '5.3' + self.release = '5.3' self.base_url = 'http://www.lua.org/manual/5.3/' self.root_path = 'manual.html' diff --git a/lib/docs/scrapers/marionette.rb b/lib/docs/scrapers/marionette.rb index 499d860f..f0bb12ec 100644 --- a/lib/docs/scrapers/marionette.rb +++ b/lib/docs/scrapers/marionette.rb @@ -3,8 +3,8 @@ module Docs self.name = 'Marionette.js' self.slug = 'marionette' self.type = 'marionette' - self.version = '2.4.3' - self.base_url = "http://marionettejs.com/docs/v#{version}/" + self.release = '2.4.3' + self.base_url = "http://marionettejs.com/docs/v#{release}/" self.root_path = 'index' self.links = { home: 'http://marionettejs.com/', diff --git a/lib/docs/scrapers/meteor.rb b/lib/docs/scrapers/meteor.rb index 466235ec..24276f75 100644 --- a/lib/docs/scrapers/meteor.rb +++ b/lib/docs/scrapers/meteor.rb @@ -3,7 +3,7 @@ module Docs include StubRootPage self.type = 'meteor' - self.version = '1.2.0' + self.release = '1.2.0' self.base_url = 'http://docs.meteor.com' self.root_path = '/#/full/' self.links = { diff --git a/lib/docs/scrapers/mocha.rb b/lib/docs/scrapers/mocha.rb index 171ff77a..130aa54e 100644 --- a/lib/docs/scrapers/mocha.rb +++ b/lib/docs/scrapers/mocha.rb @@ -2,7 +2,7 @@ module Docs class Mocha < UrlScraper self.name = 'mocha' self.type = 'mocha' - self.version = '2.3.3' + self.release = '2.3.3' self.base_url = 'http://mochajs.org/' self.links = { home: 'http://mochajs.org/', diff --git a/lib/docs/scrapers/modernizr.rb b/lib/docs/scrapers/modernizr.rb index b1e76ddd..d288c4ff 100644 --- a/lib/docs/scrapers/modernizr.rb +++ b/lib/docs/scrapers/modernizr.rb @@ -2,7 +2,7 @@ module Docs class Modernizr < UrlScraper self.name = 'Modernizr' self.type = 'modernizr' - self.version = '3.2.0' + self.release = '3.2.0' self.base_url = 'https://modernizr.com/docs/' html_filters.push 'modernizr/entries', 'modernizr/clean_html', 'title' diff --git a/lib/docs/scrapers/moment.rb b/lib/docs/scrapers/moment.rb index 91b83562..52271e15 100644 --- a/lib/docs/scrapers/moment.rb +++ b/lib/docs/scrapers/moment.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Moment.js' self.slug = 'moment' self.type = 'moment' - self.version = '2.11.1' + self.release = '2.11.1' self.base_url = 'http://momentjs.com/docs/' html_filters.push 'moment/clean_html', 'moment/entries', 'title' diff --git a/lib/docs/scrapers/mongoose.rb b/lib/docs/scrapers/mongoose.rb index b26832c1..63281862 100644 --- a/lib/docs/scrapers/mongoose.rb +++ b/lib/docs/scrapers/mongoose.rb @@ -2,7 +2,7 @@ module Docs class Mongoose < UrlScraper self.name = 'Mongoose' self.type = 'mongoose' - self.version = '4.3.5' + self.release = '4.3.5' self.base_url = 'http://mongoosejs.com/docs/' self.root_path = 'index.html' self.initial_paths = %w(guide.html api.html) diff --git a/lib/docs/scrapers/nginx.rb b/lib/docs/scrapers/nginx.rb index 8e53716b..9c3f7370 100644 --- a/lib/docs/scrapers/nginx.rb +++ b/lib/docs/scrapers/nginx.rb @@ -2,7 +2,7 @@ module Docs class Nginx < UrlScraper self.name = 'nginx' self.type = 'nginx' - self.version = '1.9.9' + self.release = '1.9.9' self.base_url = 'http://nginx.org/en/docs/' self.links = { home: 'http://nginx.org/', diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index 0f97f0df..ec6328cf 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Node.js' self.slug = 'node' self.type = 'node' - self.version = '5.4.0' + self.release = '5.4.0' self.base_url = 'https://nodejs.org/api/' self.links = { home: 'https://nodejs.org/', diff --git a/lib/docs/scrapers/node_lts.rb b/lib/docs/scrapers/node_lts.rb index ebfd54b0..bec5d1b2 100644 --- a/lib/docs/scrapers/node_lts.rb +++ b/lib/docs/scrapers/node_lts.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Node.js (LTS)' self.slug = 'node_lts' self.type = 'node' - self.version = '4.2.4' - self.base_url = "https://nodejs.org/dist/v#{version}/docs/api/" + self.release = '4.2.4' + self.base_url = "https://nodejs.org/dist/v#{release}/docs/api/" end end diff --git a/lib/docs/scrapers/nokogiri2.rb b/lib/docs/scrapers/nokogiri2.rb index 21f1f8fe..6aca8ef4 100644 --- a/lib/docs/scrapers/nokogiri2.rb +++ b/lib/docs/scrapers/nokogiri2.rb @@ -2,7 +2,7 @@ module Docs class Nokogiri2 < Rdoc self.name = 'Nokogiri' self.slug = 'nokogiri' - self.version = '1.6.4' + self.release = '1.6.4' self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Nokogiri' html_filters.replace 'rdoc/entries', 'nokogiri2/entries' diff --git a/lib/docs/scrapers/npm.rb b/lib/docs/scrapers/npm.rb index 60f6f205..48aef28a 100644 --- a/lib/docs/scrapers/npm.rb +++ b/lib/docs/scrapers/npm.rb @@ -2,7 +2,7 @@ module Docs class Npm < UrlScraper self.name = 'npm' self.type = 'npm' - self.version = '3.5.3' + self.release = '3.5.3' self.base_url = 'https://docs.npmjs.com/' self.links = { home: 'https://www.npmjs.com/', diff --git a/lib/docs/scrapers/opentsdb.rb b/lib/docs/scrapers/opentsdb.rb index 7b9f4e76..d27cab42 100644 --- a/lib/docs/scrapers/opentsdb.rb +++ b/lib/docs/scrapers/opentsdb.rb @@ -2,7 +2,7 @@ module Docs class Opentsdb < UrlScraper self.name = 'OpenTSDB' self.type = 'opentsdb' - self.version = '2.1.0' + self.release = '2.1.0' self.base_url = 'http://opentsdb.net/docs/build/html/' self.root_path = 'index.html' self.links = { diff --git a/lib/docs/scrapers/phalcon.rb b/lib/docs/scrapers/phalcon.rb index 1eb992e7..1cd70592 100644 --- a/lib/docs/scrapers/phalcon.rb +++ b/lib/docs/scrapers/phalcon.rb @@ -1,7 +1,7 @@ module Docs class Phalcon < UrlScraper self.type = 'phalcon' - self.version = '2.0.6' + self.release = '2.0.6' self.base_url = 'https://docs.phalconphp.com/en/latest/' self.root_path = 'index.html' self.links = { diff --git a/lib/docs/scrapers/phaser.rb b/lib/docs/scrapers/phaser.rb index 5bd7e012..b5ce865f 100644 --- a/lib/docs/scrapers/phaser.rb +++ b/lib/docs/scrapers/phaser.rb @@ -1,8 +1,8 @@ module Docs class Phaser < UrlScraper self.type = 'phaser' - self.version = '2.4.1' - self.base_url = "http://phaser.io/docs/#{version}" + self.release = '2.4.1' + self.base_url = "http://phaser.io/docs/#{release}" self.links = { home: 'http://phaser.io/', code: 'https://github.com/photonstorm/phaser' diff --git a/lib/docs/scrapers/phoenix.rb b/lib/docs/scrapers/phoenix.rb index 44d8886a..b0c6d97f 100644 --- a/lib/docs/scrapers/phoenix.rb +++ b/lib/docs/scrapers/phoenix.rb @@ -1,7 +1,7 @@ module Docs class Phoenix < Elixir self.type = 'elixir' - self.version = '1.1.2' + self.release = '1.1.2' self.base_url = 'http://hexdocs.pm/' self.root_path = 'phoenix/Phoenix.html' self.initial_paths = %w( diff --git a/lib/docs/scrapers/php.rb b/lib/docs/scrapers/php.rb index d311eae9..6f0eba76 100644 --- a/lib/docs/scrapers/php.rb +++ b/lib/docs/scrapers/php.rb @@ -2,7 +2,7 @@ module Docs class Php < FileScraper self.name = 'PHP' self.type = 'php' - self.version = 'up to 5.6.13' + self.release = 'up to 5.6.13' self.base_url = 'http://www.php.net/manual/en/' self.root_path = 'index.html' self.initial_paths = %w( diff --git a/lib/docs/scrapers/phpunit.rb b/lib/docs/scrapers/phpunit.rb index 5f5afcc6..4f7b27d2 100644 --- a/lib/docs/scrapers/phpunit.rb +++ b/lib/docs/scrapers/phpunit.rb @@ -2,8 +2,8 @@ module Docs class Phpunit < UrlScraper self.name = 'PHPUnit' self.type = 'phpunit' - self.version = '5.1' - self.base_url = "https://phpunit.de/manual/#{version}/en/" + self.release = '5.1' + self.base_url = "https://phpunit.de/manual/#{release}/en/" self.root_path = 'index.html' self.links = { home: 'https://phpunit.de/', diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index fdfe07b8..a6d967e3 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -2,8 +2,8 @@ module Docs class Postgresql < UrlScraper self.name = 'PostgreSQL' self.type = 'postgres' - self.version = '9.4' - self.base_url = "http://www.postgresql.org/docs/#{version}/static/" + self.release = '9.4' + self.base_url = "http://www.postgresql.org/docs/#{release}/static/" self.root_path = 'reference.html' self.initial_paths = %w(sql.html admin.html) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 31b7e821..877f4161 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -1,6 +1,6 @@ module Docs class Python < FileScraper - self.version = '3.5.1' + self.release = '3.5.1' self.type = 'sphinx' self.dir = '/Users/Thibaut/DevDocs/Docs/Python' # downloaded from docs.python.org/3/download.html self.base_url = 'http://docs.python.org/3/' diff --git a/lib/docs/scrapers/python2.rb b/lib/docs/scrapers/python2.rb index 31000bf7..d36452e9 100644 --- a/lib/docs/scrapers/python2.rb +++ b/lib/docs/scrapers/python2.rb @@ -2,7 +2,7 @@ module Docs class Python2 < FileScraper self.name = 'Python 2' self.slug = 'python2' - self.version = '2.7.10' + self.release = '2.7.10' self.type = 'sphinx' self.dir = '/Users/Thibaut/DevDocs/Docs/Python2' # downloaded from docs.python.org/2.7/download.html self.base_url = 'http://docs.python.org/2.7/' diff --git a/lib/docs/scrapers/q.rb b/lib/docs/scrapers/q.rb index 26545b53..87fefd5f 100644 --- a/lib/docs/scrapers/q.rb +++ b/lib/docs/scrapers/q.rb @@ -2,7 +2,7 @@ module Docs class Q < UrlScraper self.name = 'Q' self.type = 'q' - self.version = '1.4.1' + self.release = '1.4.1' self.base_url = 'https://github.com/kriskowal/q/wiki/' self.root_path = 'API-Reference' self.links = { diff --git a/lib/docs/scrapers/rdoc/minitest.rb b/lib/docs/scrapers/rdoc/minitest.rb index 4ea50b68..4675a617 100644 --- a/lib/docs/scrapers/rdoc/minitest.rb +++ b/lib/docs/scrapers/rdoc/minitest.rb @@ -2,7 +2,7 @@ module Docs class Minitest < Rdoc self.name = 'Ruby / Minitest' self.slug = 'minitest' - self.version = '5.8.1' + self.release = '5.8.1' self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Minitest' # rake docs self.links = { code: 'https://github.com/seattlerb/minitest' diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb index 66d83f07..e2e2117c 100644 --- a/lib/docs/scrapers/rdoc/rails.rb +++ b/lib/docs/scrapers/rdoc/rails.rb @@ -2,7 +2,7 @@ module Docs class Rails < Rdoc self.name = 'Ruby on Rails' self.slug = 'rails' - self.version = '4.2.3' + self.release = '4.2.3' self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails' self.links = { home: 'http://rubyonrails.org/', diff --git a/lib/docs/scrapers/rdoc/ruby.rb b/lib/docs/scrapers/rdoc/ruby.rb index d493669e..6eb1a1f9 100644 --- a/lib/docs/scrapers/rdoc/ruby.rb +++ b/lib/docs/scrapers/rdoc/ruby.rb @@ -10,7 +10,7 @@ module Docs # --no-line-numbers \ # --op html . - self.version = '2.2.1' + self.release = '2.2.1' self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby' self.links = { home: 'https://www.ruby-lang.org/', diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb index fe741a96..089e13c1 100644 --- a/lib/docs/scrapers/react.rb +++ b/lib/docs/scrapers/react.rb @@ -2,7 +2,7 @@ module Docs class React < UrlScraper self.name = 'React' self.type = 'react' - self.version = '0.14.6' + self.release = '0.14.6' self.base_url = 'https://facebook.github.io/react/' self.root_path = 'docs/getting-started.html' self.links = { diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb index d42764a5..ec3a6d91 100644 --- a/lib/docs/scrapers/react_native.rb +++ b/lib/docs/scrapers/react_native.rb @@ -3,7 +3,7 @@ module Docs self.name = 'React Native' self.slug = 'react_native' self.type = 'react' - self.version = '0.18' + self.release = '0.18' self.base_url = 'https://facebook.github.io/react-native/docs/' self.root_path = 'getting-started.html' self.links = { diff --git a/lib/docs/scrapers/redis.rb b/lib/docs/scrapers/redis.rb index 1ce34941..710d58fb 100644 --- a/lib/docs/scrapers/redis.rb +++ b/lib/docs/scrapers/redis.rb @@ -1,7 +1,7 @@ module Docs class Redis < UrlScraper self.type = 'redis' - self.version = 'up to 3.0.6' + self.release = 'up to 3.0.6' self.base_url = 'http://redis.io/commands' self.links = { home: 'http://redis.io/', diff --git a/lib/docs/scrapers/relay.rb b/lib/docs/scrapers/relay.rb index 7c6026a3..3c199d9b 100644 --- a/lib/docs/scrapers/relay.rb +++ b/lib/docs/scrapers/relay.rb @@ -1,7 +1,7 @@ module Docs class Relay < React self.type = 'react' - self.version = '0.6' + self.release = '0.6' self.base_url = 'https://facebook.github.io/relay/docs/' self.root_path = 'getting-started.html' self.links = { diff --git a/lib/docs/scrapers/requirejs.rb b/lib/docs/scrapers/requirejs.rb index 428bb4cb..85fd5f4d 100644 --- a/lib/docs/scrapers/requirejs.rb +++ b/lib/docs/scrapers/requirejs.rb @@ -2,7 +2,7 @@ module Docs class Requirejs < UrlScraper self.name = 'RequireJS' self.type = 'requirejs' - self.version = '2.1.22' + self.release = '2.1.22' self.base_url = 'http://requirejs.org/docs/' self.links = { home: 'http://requirejs.org/', diff --git a/lib/docs/scrapers/rethinkdb.rb b/lib/docs/scrapers/rethinkdb.rb index 4cf1d26a..164aefab 100644 --- a/lib/docs/scrapers/rethinkdb.rb +++ b/lib/docs/scrapers/rethinkdb.rb @@ -2,7 +2,7 @@ module Docs class Rethinkdb < UrlScraper self.name = 'RethinkDB' self.type = 'rethinkdb' - self.version = '2.2.1' + self.release = '2.2.1' self.base_url = 'http://rethinkdb.com/api/javascript/' self.links = { home: 'http://rethinkdb.com/', diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb index 6dd6fa0a..b155147a 100644 --- a/lib/docs/scrapers/rust.rb +++ b/lib/docs/scrapers/rust.rb @@ -1,7 +1,7 @@ module Docs class Rust < UrlScraper self.type = 'rust' - self.version = '1.5.0' + self.release = '1.5.0' self.base_url = 'http://doc.rust-lang.org/' self.root_path = 'book/index.html' self.initial_paths = %w( diff --git a/lib/docs/scrapers/sass.rb b/lib/docs/scrapers/sass.rb index ba272730..e4b1263c 100644 --- a/lib/docs/scrapers/sass.rb +++ b/lib/docs/scrapers/sass.rb @@ -1,7 +1,7 @@ module Docs class Sass < UrlScraper self.type = 'yard' - self.version = '3.4.17' + self.release = '3.4.17' self.base_url = 'http://sass-lang.com/documentation/' self.root_path = 'file.SASS_REFERENCE.html' diff --git a/lib/docs/scrapers/sinon.rb b/lib/docs/scrapers/sinon.rb index 61cf8006..e9858d0f 100644 --- a/lib/docs/scrapers/sinon.rb +++ b/lib/docs/scrapers/sinon.rb @@ -2,7 +2,7 @@ module Docs class Sinon < UrlScraper self.name = 'Sinon' self.type = 'sinon' - self.version = '1.17.1' + self.release = '1.17.1' self.base_url = 'http://sinonjs.org/docs/' self.links = { home: 'http://sinonjs.org/', diff --git a/lib/docs/scrapers/socketio.rb b/lib/docs/scrapers/socketio.rb index 7e8470da..50e7d5ad 100644 --- a/lib/docs/scrapers/socketio.rb +++ b/lib/docs/scrapers/socketio.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Socket.IO' self.slug = 'socketio' self.type = 'socketio' - self.version = '1.4.3' + self.release = '1.4.3' self.base_url = 'http://socket.io/docs/' self.links = { home: 'http://socket.io/', diff --git a/lib/docs/scrapers/symfony.rb b/lib/docs/scrapers/symfony.rb index 7f602f95..19685b33 100644 --- a/lib/docs/scrapers/symfony.rb +++ b/lib/docs/scrapers/symfony.rb @@ -3,8 +3,8 @@ module Docs self.name = 'Symfony' self.slug = 'symfony' self.type = 'laravel' - self.version = '2.7' - self.base_url = "http://api.symfony.com/#{version}/" + self.release = '2.7' + self.base_url = "http://api.symfony.com/#{release}/" self.root_path = 'namespaces.html' self.initial_paths = %w(classes.html) self.links = { diff --git a/lib/docs/scrapers/underscore.rb b/lib/docs/scrapers/underscore.rb index 88c1912b..9652b10d 100644 --- a/lib/docs/scrapers/underscore.rb +++ b/lib/docs/scrapers/underscore.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Underscore.js' self.slug = 'underscore' self.type = 'underscore' - self.version = '1.8.3' + self.release = '1.8.3' self.base_url = 'http://underscorejs.org' html_filters.push 'underscore/clean_html', 'underscore/entries', 'title' diff --git a/lib/docs/scrapers/vagrant.rb b/lib/docs/scrapers/vagrant.rb index 7c5bdf71..7a3b2e14 100644 --- a/lib/docs/scrapers/vagrant.rb +++ b/lib/docs/scrapers/vagrant.rb @@ -2,7 +2,7 @@ module Docs class Vagrant < UrlScraper self.name = 'Vagrant' self.type = 'vagrant' - self.version = '1.8.1' + self.release = '1.8.1' self.base_url = 'https://docs.vagrantup.com/v2/' self.links = { home: 'https://www.vagrantup.com/', diff --git a/lib/docs/scrapers/vue.rb b/lib/docs/scrapers/vue.rb index c4875307..83000173 100644 --- a/lib/docs/scrapers/vue.rb +++ b/lib/docs/scrapers/vue.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Vue.js' self.slug = 'vue' self.type = 'vue' - self.version = '1.0.13' + self.release = '1.0.13' self.base_url = 'http://vuejs.org' self.root_path = '/guide/index.html' self.initial_paths = %w(/api/index.html) diff --git a/lib/docs/scrapers/webpack.rb b/lib/docs/scrapers/webpack.rb index 314b2c57..3bb2c79a 100644 --- a/lib/docs/scrapers/webpack.rb +++ b/lib/docs/scrapers/webpack.rb @@ -2,7 +2,7 @@ module Docs class Webpack < UrlScraper self.name = 'webpack' self.type = 'webpack' - self.version = '1.12' + self.release = '1.12' self.base_url = 'https://webpack.github.io/docs/' self.links = { home: 'https://webpack.github.io/', diff --git a/lib/docs/scrapers/yii.rb b/lib/docs/scrapers/yii.rb index b6cead72..4ff83d44 100755 --- a/lib/docs/scrapers/yii.rb +++ b/lib/docs/scrapers/yii.rb @@ -1,7 +1,7 @@ module Docs class Yii < UrlScraper self.type = 'yii' - self.version = '2.0.2' + self.release = '2.0.2' self.base_url = 'http://www.yiiframework.com/doc-2.0/' self.root_path = 'index.html' diff --git a/lib/docs/scrapers/yii1.rb b/lib/docs/scrapers/yii1.rb index 1f655753..e7327527 100644 --- a/lib/docs/scrapers/yii1.rb +++ b/lib/docs/scrapers/yii1.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Yii 1' self.slug = 'yii1' self.type = 'yii' - self.version = '1.1.16' + self.release = '1.1.16' self.base_url = 'http://www.yiiframework.com/doc/api/1.1/' html_filters.push 'yii1/clean_html', 'yii1/entries' diff --git a/test/lib/docs/core/doc_test.rb b/test/lib/docs/core/doc_test.rb index 40aebcad..34bea691 100644 --- a/test/lib/docs/core/doc_test.rb +++ b/test/lib/docs/core/doc_test.rb @@ -53,10 +53,10 @@ class DocsDocTest < MiniTest::Spec end end - describe ".version=" do - it "stores .version" do - doc.version = '1' - assert_equal '1', doc.version + describe ".release=" do + it "stores .release" do + doc.release = '1' + assert_equal '1', doc.release end end @@ -115,8 +115,8 @@ class DocsDocTest < MiniTest::Spec assert_instance_of Hash, doc.as_json end - it "includes the doc's name, slug, type, version, index_path and db_path" do - %w(name slug type version index_path db_path links).each do |attribute| + it "includes the doc's name, slug, type, release, index_path and db_path" do + %w(name slug type release index_path db_path links).each do |attribute| eval "stub(doc).#{attribute} { attribute }" assert_equal attribute, doc.as_json[attribute.to_sym] end