1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #30015 from larskanis/use-duktake-on-mingw

Use duktape gem as default JS engine on Windows-MINGW
This commit is contained in:
Guillermo Iguaran 2017-08-01 14:54:42 -05:00 committed by GitHub
commit f9a43f28c0
2 changed files with 4 additions and 0 deletions

View file

@ -348,6 +348,8 @@ module Rails
comment = "See https://github.com/rails/execjs#readme for more supported runtimes"
if defined?(JRUBY_VERSION)
GemfileEntry.version "therubyrhino", nil, comment
elsif RUBY_PLATFORM =~ /mingw|mswin/
GemfileEntry.version "duktape", nil, comment
else
GemfileEntry.new "mini_racer", nil, comment, { platforms: :ruby }, true
end

View file

@ -522,6 +522,8 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator
if defined?(JRUBY_VERSION)
assert_gem "therubyrhino"
elsif RUBY_PLATFORM =~ /mingw|mswin/
assert_gem "duktape"
else
assert_file "Gemfile", /# gem 'mini_racer', platforms: :ruby/
end