Permalink
Browse files

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

Use duktape gem as default JS engine on Windows-MINGW
  • Loading branch information...
guilleiguaran committed Aug 1, 2017
2 parents 38a7912 + dd439bf commit f9a43f28c087f8ffd35ff7c33a60c938b60f2be2
Showing with 4 additions and 0 deletions.
  1. +2 −0 railties/lib/rails/generators/app_base.rb
  2. +2 −0 railties/test/generators/app_generator_test.rb
@@ -348,6 +348,8 @@ def javascript_runtime_gemfile_entry
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
@@ -522,6 +522,8 @@ def test_inclusion_of_javascript_runtime
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

3 comments on commit f9a43f2

@MSP-Greg

This comment has been minimized.

Show comment
Hide comment
@MSP-Greg

MSP-Greg Aug 3, 2017

Contributor

@guilleiguaran

Might this (or something similar) be backported?

I'm not familiar with how that works in Rails...

Contributor

MSP-Greg replied Aug 3, 2017

@guilleiguaran

Might this (or something similar) be backported?

I'm not familiar with how that works in Rails...

@sgrif

This comment has been minimized.

Show comment
Hide comment
@sgrif

sgrif Aug 3, 2017

Member

Only bug fixes are backported.

Member

sgrif replied Aug 3, 2017

Only bug fixes are backported.

@MSP-Greg

This comment has been minimized.

Show comment
Hide comment
@MSP-Greg

MSP-Greg Aug 3, 2017

Contributor

stable seems to be using therubyracer, which isn't tested on Appveyor, Both duktape gem and duktape are.

Maybe we define 'bug' a bit differently...

Contributor

MSP-Greg replied Aug 3, 2017

stable seems to be using therubyracer, which isn't tested on Appveyor, Both duktape gem and duktape are.

Maybe we define 'bug' a bit differently...

Please sign in to comment.