mirror of https://github.com/freeCodeCamp/devdocs
parent
71bbf4994b
commit
5f7005729c
@ -1,7 +0,0 @@
|
|||||||
#= require views/pages/base
|
|
||||||
|
|
||||||
class app.views.MeteorPage extends app.views.BasePage
|
|
||||||
prepare: ->
|
|
||||||
@highlightCode @findAll('pre.js, pre.javascript'), 'javascript'
|
|
||||||
@highlightCode @findAll('pre.html'), 'markup'
|
|
||||||
return
|
|
@ -1,33 +1,36 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Meteor < UrlScraper
|
class Meteor < UrlScraper
|
||||||
include StubRootPage
|
|
||||||
|
|
||||||
self.type = 'meteor'
|
self.type = 'meteor'
|
||||||
self.release = '1.2.0'
|
self.release = '1.3.0'
|
||||||
self.base_url = 'http://docs.meteor.com'
|
self.base_url = 'http://guide.meteor.com/v1.3/'
|
||||||
self.root_path = '/#/full/'
|
self.initial_paths = %w(guide)
|
||||||
self.links = {
|
self.links = {
|
||||||
home: 'https://www.meteor.com/',
|
home: 'https://www.meteor.com/',
|
||||||
code: 'https://github.com/meteor/meteor/'
|
code: 'https://github.com/meteor/meteor/'
|
||||||
}
|
}
|
||||||
|
|
||||||
html_filters.push 'meteor/entries', 'meteor/clean_html', 'title'
|
html_filters.push 'meteor/entries', 'meteor/clean_html'
|
||||||
|
|
||||||
options[:title] = 'Meteor'
|
options[:skip_links] = ->(filter) { filter.root_page? }
|
||||||
options[:skip_links] = true
|
|
||||||
|
|
||||||
options[:attribution] = <<-HTML
|
options[:attribution] = <<-HTML
|
||||||
© 2011–2015 Meteor Development Group<br>
|
© 2011–2016 Meteor Development Group<br>
|
||||||
Licensed under the MIT License.
|
Licensed under the MIT License.
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
private
|
stub '' do
|
||||||
|
require 'capybara/dsl'
|
||||||
def root_page_body
|
|
||||||
require 'capybara'
|
|
||||||
Capybara.current_driver = :selenium
|
Capybara.current_driver = :selenium
|
||||||
Capybara.visit(root_url.to_s)
|
Capybara.run_server = false
|
||||||
|
Capybara.app_host = 'https://docs.meteor.com'
|
||||||
|
Capybara.visit('/#/full/')
|
||||||
Capybara.find('.body')['innerHTML']
|
Capybara.find('.body')['innerHTML']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
stub 'guide' do
|
||||||
|
request_one(url_for('index.html')).body
|
||||||
|
end
|
||||||
|
|
||||||
|
options[:replace_paths] = { 'index.html' => 'guide' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue