diff --git a/CHANGELOG.md b/CHANGELOG.md index bd635bdef..95c70fa99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ Changes since last non-beta release. - Any failure in webpack to build test files quits tests. - CI Improvements: - Switched to yarn link and removed relative path install of react-on-rails + - Removed testing of Turbolinks 2 + - All tests run against Rails 5.1.1 - [#862](https://github.com/shakacode/react_on_rails/pull/862) by [justin808](https://github.com/justin808) ## [8.0.1] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a48d21384..551aa8cb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -215,7 +215,7 @@ If you run `rspec` at the top level, you'll see this message: `require': cannot After running a test, you can view the coverage results SimpleCov reports by opening `coverage/index.html`. -To test `spec/dummy` against Turbolinks 2, install the gem by running `ENABLE_TURBOLINKS_2=TRUE bundle install` in the `spec/dummy` directory before running `rake`. Turbolinks 5 is the default. +Turbolinks 5 is included in the test app, unless "DISABLE_TURBOLINKS" is set to YES in the environment. Run `rake -T` or `rake -D` to see testing options. diff --git a/Gemfile b/Gemfile index f1d1357f3..8190947b7 100644 --- a/Gemfile +++ b/Gemfile @@ -23,13 +23,7 @@ gem "scss_lint", require: false gem "sdoc", group: :doc gem "spring" gem "sqlite3" -if ENV["ENABLE_TURBOLINKS_2"].nil? || ENV["ENABLE_TURBOLINKS_2"].strip.empty? - gem "turbolinks", "~> 5.0" -else - # rubocop:disable Bundler/DuplicatedGem - gem "turbolinks", "2.5.3" - # rubocop:enable Bundler/DuplicatedGem -end +gem "turbolinks", "~> 5.0" gem "uglifier" gem "web-console", group: :development diff --git a/rakelib/dummy_apps.rake b/rakelib/dummy_apps.rake index a72f9635f..ba7f778ac 100644 --- a/rakelib/dummy_apps.rake +++ b/rakelib/dummy_apps.rake @@ -14,11 +14,6 @@ namespace :dummy_apps do bundle_install_in(dummy_app_dir) end - task dummy_app_with_turbolinks_2: [:yarn_install] do - dummy_app_dir = File.join(gem_root, "spec/dummy") - bundle_install_with_turbolinks_2_in(dummy_app_dir) - end - task dummy_apps: %i[dummy_app node_package] do puts "Prepared all Dummy Apps" end diff --git a/rakelib/run_rspec.rake b/rakelib/run_rspec.rake index 77a4a1e56..841c37ff2 100644 --- a/rakelib/run_rspec.rake +++ b/rakelib/run_rspec.rake @@ -33,13 +33,6 @@ namespace :run_rspec do bundle_install_in(dummy_app_dir) end - desc "Runs dummy respec with turbolinks 2" - task dummy_turbolinks_2: ["dummy_apps:dummy_app_with_turbolinks_2"] do - clean_gen_assets(spec_dummy_dir) - run_tests_in(spec_dummy_dir, env_vars: - "ENABLE_TURBOLINKS_2=TRUE BUNDLE_GEMFILE=#{dummy_app_dir}/Gemfile") - end - # Dynamically define Rake tasks for each example app found in the examples directory ExampleType.all.each do |example_type| desc "Runs RSpec for #{example_type.name_pretty} only" @@ -61,7 +54,7 @@ namespace :run_rspec do Coveralls::RakeTask.new if ENV["USE_COVERALLS"] == "TRUE" desc "run all tests no examples" - task all_but_examples: %i[gem dummy_no_turbolinks dummy_turbolinks_2 dummy empty js_tests] do + task all_but_examples: %i[gem dummy_no_turbolinks dummy empty js_tests] do puts "Completed all RSpec tests" end diff --git a/rakelib/task_helpers.rb b/rakelib/task_helpers.rb index 7203e9b40..019cb2da3 100644 --- a/rakelib/task_helpers.rb +++ b/rakelib/task_helpers.rb @@ -30,10 +30,6 @@ def bundle_install_in_no_turbolinks(dir) sh_in_dir(dir, "DISABLE_TURBOLINKS=TRUE bundle install") end - def bundle_install_with_turbolinks_2_in(dir) - sh_in_dir(dir, "ENABLE_TURBOLINKS_2=TRUE BUNDLE_GEMFILE=#{dir}/Gemfile bundle install") - end - # Runs bundle exec using that directory's Gemfile def bundle_exec(dir: nil, args: nil, env_vars: "") sh_in_dir(dir, "#{env_vars} #{args}") diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index a8e0d2f88..3973d1549 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -22,13 +22,7 @@ gem "puma" # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks if ENV["DISABLE_TURBOLINKS"].nil? || ENV["DISABLE_TURBOLINKS"].strip.empty? - if ENV["ENABLE_TURBOLINKS_2"].nil? || ENV["ENABLE_TURBOLINKS_2"].strip.empty? - gem "turbolinks", "~> 5.0" - else - # rubocop:disable Bundler/DuplicatedGem - gem "turbolinks", "2.5.3" - # rubocop:enable Bundler/DuplicatedGem - end + gem "turbolinks", "~> 5.0" end # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index ae9613f09..960e4aa55 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -272,8 +272,9 @@ GEM thread_safe (0.3.6) tilt (2.0.7) tins (1.14.0) - turbolinks (2.5.3) - coffee-rails + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.3) tzinfo (1.2.3) thread_safe (~> 0.1) uglifier (3.2.0) @@ -328,7 +329,7 @@ DEPENDENCIES selenium-webdriver spring sqlite3 - turbolinks (= 2.5.3) + turbolinks (~> 5.0) uglifier webpacker_lite (= 2.0.4)