diff --git a/Gemfile b/Gemfile index 4e34292d3f..afd36b242a 100644 --- a/Gemfile +++ b/Gemfile @@ -48,7 +48,7 @@ group :test do gem 'rack-test', require: false end -if ENV['SELENIUM'] == '1' +#if ENV['SELENIUM'] == '1' gem 'capybara' gem 'selenium-webdriver' -end +#end diff --git a/Gemfile.lock b/Gemfile.lock index 9792f3f442..ade5494801 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,12 +6,24 @@ GEM i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) backports (3.11.4) better_errors (2.5.0) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) browser (2.5.3) + capybara (3.12.0) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) + childprocess (0.9.0) + ffi (~> 1.0, >= 1.0.11) coderay (1.1.2) coffee-script (2.4.1) coffee-script-source @@ -23,9 +35,11 @@ GEM ethon (0.11.0) ffi (>= 1.3.0) eventmachine (1.2.7) + eventmachine (1.2.7-x64-mingw32) execjs (2.7.0) exifr (1.3.5) ffi (1.9.25) + ffi (1.9.25-x64-mingw32) fspath (3.1.0) highline (2.0.0) html-pipeline (2.9.1) @@ -45,6 +59,7 @@ GEM image_size (2.0.0) in_threads (1.5.0) method_source (0.9.2) + mini_mime (1.0.1) mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.13.1) @@ -55,6 +70,8 @@ GEM newrelic_rpm (5.6.0.349) nokogiri (1.9.0) mini_portile2 (~> 2.4.0) + nokogiri (1.9.0-x64-mingw32) + mini_portile2 (~> 2.4.0) options (2.3.2) progress (3.5.0) progress_bar (1.3.0) @@ -63,6 +80,7 @@ GEM pry (0.12.2) coderay (~> 1.1.0) method_source (~> 0.9.0) + public_suffix (3.0.3) rack (2.0.6) rack-protection (2.0.4) rack @@ -73,12 +91,17 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) + regexp_parser (1.3.0) rr (1.2.1) + rubyzip (1.2.2) sass (3.7.2) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) + selenium-webdriver (3.141.0) + childprocess (~> 0.5) + rubyzip (~> 1.2, >= 1.2.2) sinatra (2.0.4) mustermann (~> 1.0) rack (~> 2.0) @@ -124,15 +147,19 @@ GEM unicode-display_width (1.4.0) unicode_utils (1.4.0) unix_utils (0.0.15) + xpath (3.2.0) + nokogiri (~> 1.8) yajl-ruby (1.4.1) PLATFORMS ruby + x64-mingw32 DEPENDENCIES activesupport (~> 5.2) better_errors browser + capybara coffee-script erubi html-pipeline @@ -150,6 +177,7 @@ DEPENDENCIES rake rr sass + selenium-webdriver sinatra sinatra-contrib sprockets @@ -166,4 +194,4 @@ RUBY VERSION ruby 2.5.3p105 BUNDLED WITH - 1.17.2 + 1.17.3 diff --git a/assets/javascripts/app/config.coffee.erb b/assets/javascripts/app/config.coffee.erb index ec26b69737..ea8506d0ae 100644 --- a/assets/javascripts/app/config.coffee.erb +++ b/assets/javascripts/app/config.coffee.erb @@ -7,7 +7,7 @@ app.config = index_filename: 'index.json' index_path: '/<%= App.docs_prefix %>' max_results: 50 - production_host: 'devdocs.io' + production_host: 'devdocs.cndochub.com' search_param: 'q' sentry_dsn: '<%= App.sentry_dsn %>' version: <%= Time.now.to_i %> diff --git a/assets/javascripts/templates/notice_tmpl.coffee b/assets/javascripts/templates/notice_tmpl.coffee index 10cc534eb0..b88323a256 100644 --- a/assets/javascripts/templates/notice_tmpl.coffee +++ b/assets/javascripts/templates/notice_tmpl.coffee @@ -1,8 +1,8 @@ notice = (text) -> """

#{text}

""" app.templates.singleDocNotice = (doc) -> - notice """ You're browsing the #{doc.fullName} documentation. To browse all docs, go to - #{app.config.production_host} (or press esc). """ + notice """ 你正在浏览 #{doc.fullName} 文档. 到 + #{app.config.production_host}浏览所有文档 (或者按 esc). """ app.templates.disabledDocNotice = -> notice """ This documentation is disabled. diff --git a/assets/javascripts/templates/notif_tmpl.coffee b/assets/javascripts/templates/notif_tmpl.coffee index 93611a5c12..2de841eb0e 100644 --- a/assets/javascripts/templates/notif_tmpl.coffee +++ b/assets/javascripts/templates/notif_tmpl.coffee @@ -58,13 +58,3 @@ app.templates.notifUpdates = (docs, disabledDocs) -> html += '' notif 'Updates', "#{html}" - -app.templates.notifShare = -> - textNotif """ Hi there! """, - """ Like DevDocs? Help us reach more developers by sharing the link with your friends on - Twitter, Facebook, - Reddit, etc.
Thanks :) """ - -app.templates.notifUpdateDocs = -> - textNotif """ Documentation updates available. """, - """ Install them as soon as possible to avoid broken pages. """ diff --git a/assets/javascripts/templates/pages/offline_tmpl.coffee b/assets/javascripts/templates/pages/offline_tmpl.coffee index a9a3c21ce2..80a91dbc27 100644 --- a/assets/javascripts/templates/pages/offline_tmpl.coffee +++ b/assets/javascripts/templates/pages/offline_tmpl.coffee @@ -1,9 +1,9 @@ app.templates.offlinePage = (docs) -> """ -

Offline Documentation

+

离线文档