You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
module Docs
|
|
|
|
class Meteor < UrlScraper
|
|
|
|
include StubRootPage
|
|
|
|
|
|
|
|
self.type = 'meteor'
|
|
|
|
self.version = '1.2.0'
|
|
|
|
self.base_url = 'http://docs.meteor.com'
|
|
|
|
self.root_path = '/#/full/'
|
|
|
|
self.links = {
|
|
|
|
home: 'https://www.meteor.com/',
|
|
|
|
code: 'https://github.com/meteor/meteor/'
|
|
|
|
}
|
|
|
|
|
|
|
|
html_filters.push 'meteor/entries', 'meteor/clean_html', 'title'
|
|
|
|
|
|
|
|
options[:title] = 'Meteor'
|
|
|
|
options[:skip_links] = true
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
© 2011–2015 Meteor Development Group<br>
|
|
|
|
Licensed under the MIT License.
|
|
|
|
HTML
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def root_page_body
|
|
|
|
require 'capybara'
|
|
|
|
Capybara.current_driver = :selenium
|
|
|
|
Capybara.visit(root_url.to_s)
|
|
|
|
Capybara.find('.body')['innerHTML']
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|