diff options
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | guides/rails_guides/markdown/renderer.rb | 22 | ||||
-rw-r--r-- | railties/lib/rails/tasks/yarn.rake | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 049d7320b8..867a69a4a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -189,6 +189,8 @@ GEM eventmachine (>= 0.12.0) websocket-driver (>= 0.5.1) ffi (1.9.17) + ffi (1.9.17-x64-mingw32) + ffi (1.9.17-x86-mingw32) globalid (0.3.7) activesupport (>= 4.1.0) hiredis (0.6.1) @@ -234,7 +236,7 @@ GEM mini_portile2 (~> 2.1.0) nokogiri (1.7.0.1-x86-mingw32) mini_portile2 (~> 2.1.0) - parser (2.3.3.1) + parser (2.4.0.0) ast (~> 2.2) pg (0.19.0) pg (0.19.0-x64-mingw32) diff --git a/guides/rails_guides/markdown/renderer.rb b/guides/rails_guides/markdown/renderer.rb index 97df6f0559..8723ee0b4e 100644 --- a/guides/rails_guides/markdown/renderer.rb +++ b/guides/rails_guides/markdown/renderer.rb @@ -16,7 +16,7 @@ HTML end def link(url, title, content) - if url.start_with?('http://api.rubyonrails.org') + if url.start_with?("http://api.rubyonrails.org") %(<a href="#{api_link(url)}">#{content}</a>) elsif title %(<a href="#{url}" title="#{title}">#{content}</a>) @@ -93,29 +93,29 @@ HTML end def github_file_url(file_path) - root, rest = file_path.split('/', 2) + root, rest = file_path.split("/", 2) case root - when 'abstract_controller', 'action_controller', 'action_dispatch' - path = ['actionpack', 'lib', root, rest].join('/') - when 'active_support', 'active_record', 'active_model', 'action_view', - 'action_cable', 'action_mailer', 'action_pack', 'active_job' - path = [root.sub('_', ''), 'lib', root, rest].join('/') + when "abstract_controller", "action_controller", "action_dispatch" + path = ["actionpack", "lib", root, rest].join("/") + when "active_support", "active_record", "active_model", "action_view", + "action_cable", "action_mailer", "action_pack", "active_job" + path = [root.sub("_", ""), "lib", root, rest].join("/") else path = file_path end - ["https://github.com/rails/rails/tree", version || 'master', path].join('/') + ["https://github.com/rails/rails/tree", version || "master", path].join("/") end def version - ENV['RAILS_VERSION'] + ENV["RAILS_VERSION"] end def api_link(url) if version && !url.match(/v\d\.\d\.\d/) - url.insert(url.index('.org')+4, "/#{version}") - url.sub('http://edgeapi', 'http://api') if url.include?('edgeapi') + url.insert(url.index(".org") + 4, "/#{version}") + url.sub("http://edgeapi", "http://api") if url.include?("edgeapi") end url diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 2097b7ffef..87476b1b8c 100644 --- a/railties/lib/rails/tasks/yarn.rake +++ b/railties/lib/rails/tasks/yarn.rake @@ -1,7 +1,7 @@ namespace :yarn do desc "Install all JavaScript dependencies as specified via Yarn" task :install do - system('./bin/yarn install --no-progress') + system("./bin/yarn install --no-progress") end end |