mirror of https://github.com/freeCodeCamp/devdocs
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.
37 lines
956 B
37 lines
956 B
module Docs
|
|
class Meteor < UrlScraper
|
|
self.type = 'meteor'
|
|
self.release = '1.3.2'
|
|
self.base_url = 'https://guide.meteor.com/v1.3/'
|
|
self.initial_paths = %w(guide)
|
|
self.links = {
|
|
home: 'https://www.meteor.com/',
|
|
code: 'https://github.com/meteor/meteor/'
|
|
}
|
|
|
|
html_filters.push 'meteor/entries', 'meteor/clean_html'
|
|
|
|
options[:skip_links] = ->(filter) { filter.root_page? }
|
|
|
|
options[:attribution] = <<-HTML
|
|
© 2011–2016 Meteor Development Group<br>
|
|
Licensed under the MIT License.
|
|
HTML
|
|
|
|
stub '' do
|
|
require 'capybara/dsl'
|
|
Capybara.current_driver = :selenium
|
|
Capybara.run_server = false
|
|
Capybara.app_host = 'https://docs.meteor.com'
|
|
Capybara.visit('/#/full/')
|
|
Capybara.find('.body')['innerHTML']
|
|
end
|
|
|
|
stub 'guide' do
|
|
request_one(url_for('index.html')).body
|
|
end
|
|
|
|
options[:replace_paths] = { 'index.html' => 'guide' }
|
|
end
|
|
end
|