From 958b07c57509c728419fd195a2ca3b60373e12d0 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 27 Dec 2016 22:57:54 +1030 Subject: [PATCH 01/11] Allow Nokogiri 1.7 --- rails-dom-testing.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rails-dom-testing.gemspec b/rails-dom-testing.gemspec index 885de19..5627162 100644 --- a/rails-dom-testing.gemspec +++ b/rails-dom-testing.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.test_files = Dir["test/**/*"] spec.require_paths = ["lib"] - spec.add_dependency "nokogiri", "~> 1.6.0" + spec.add_dependency "nokogiri", "~> 1.6" spec.add_dependency "activesupport", ">= 4.2.0.beta", "< 5.0" spec.add_dependency "rails-deprecated_sanitizer", '>= 1.0.1' From 86c7fb19e5346b192b8a3ffcf8e289f5d96eac0e Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Wed, 28 Dec 2016 00:09:58 +1030 Subject: [PATCH 02/11] Release 1.0.8 --- lib/rails/dom/testing/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rails/dom/testing/version.rb b/lib/rails/dom/testing/version.rb index cb7f6dc..b464085 100644 --- a/lib/rails/dom/testing/version.rb +++ b/lib/rails/dom/testing/version.rb @@ -1,7 +1,7 @@ module Rails module Dom module Testing - VERSION = "1.0.7" + VERSION = "1.0.8" end end end From d813d89520c2b271c426ec5e0179a240c6f5801e Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 28 Dec 2016 16:46:00 +0900 Subject: [PATCH 03/11] This tries to bundle activesupport 5.0.0.rc2 where we actually need 4.2.x --- rails-dom-testing.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rails-dom-testing.gemspec b/rails-dom-testing.gemspec index 5627162..a61342a 100644 --- a/rails-dom-testing.gemspec +++ b/rails-dom-testing.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_dependency "nokogiri", "~> 1.6" - spec.add_dependency "activesupport", ">= 4.2.0.beta", "< 5.0" + spec.add_dependency "activesupport", ">= 4.2.0", "< 5.0" spec.add_dependency "rails-deprecated_sanitizer", '>= 1.0.1' spec.add_development_dependency "bundler", "~> 1.3" From 8594b29bff1dcc2bd8a03902f9364fe69820c3f6 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 28 Dec 2016 19:10:41 +0900 Subject: [PATCH 04/11] It's because bundler is too old that bundler tries to bundle AS 5.0.0.rc2 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 75cc2a0..39e1713 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ sudo: false cache: bundler +before_install: gem update bundler --no-document + rvm: - 1.9.3 - 2.0.0 From 81d601dc251100bf654f4ad823d52da7cbafb8c2 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 29 Dec 2016 00:02:16 +0900 Subject: [PATCH 05/11] nokogiri 1.7 requires ruby version >= 2.1.0 --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 0243083..44323a5 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,5 @@ source 'https://rubygems.org' # Specify your gem's dependencies in rails-dom-testing.gemspec gemspec + +gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7" From 52d250fec4428ed07fc03cbdd0fe9aead6b002e5 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 29 Dec 2016 00:31:19 +0900 Subject: [PATCH 06/11] CI against ruby 2.3 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 39e1713..c28b34c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ rvm: - 2.0.0 - 2.1 - 2.2 + - 2.3 - jruby - ruby-head matrix: From 6287c9abc20857ae138c8cd0c8db5236eacf0f36 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 29 Dec 2016 00:31:34 +0900 Subject: [PATCH 07/11] Current rails 4.2 doesn't support ruby 2.4 and 2.5 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index c28b34c..184e0b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,12 @@ rvm: - 2.3 - jruby - ruby-head + matrix: fast_finish: true + allow_failures: + - rvm: ruby-head + notifications: email: false irc: From 12c6a4df8e8fcf05844624e426d47a5d906754f8 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 29 Dec 2016 00:56:28 +0900 Subject: [PATCH 08/11] "2.3" seems too fuzzy "Requested binary installation but no rubies are available to download" --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 184e0b2..2e286a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rvm: - 2.0.0 - 2.1 - 2.2 - - 2.3 + - 2.3.3 - jruby - ruby-head From fbc5a7c30282c3e174c91c115b9c16c2dfa5318e Mon Sep 17 00:00:00 2001 From: eileencodes Date: Mon, 18 Dec 2017 14:19:33 -0500 Subject: [PATCH 09/11] Fix jruby on travis Rails is running against jruby-9.1.15.0 and travis is failing because it can't seem to install the version it's looking for: Ref: https://travis-ci.org/rails/rails-dom-testing/jobs/317542357 Since Rails is set to a specific version, this sets rails-dom-testing to the same version. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e286a9..f10dbee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ rvm: - 2.1 - 2.2 - 2.3.3 - - jruby + - jruby-9.1.15.0 - ruby-head matrix: From 388f583f5aa0724618ccefb4eec4047013ad7a73 Mon Sep 17 00:00:00 2001 From: Leo Correa Date: Sat, 16 Dec 2017 20:34:18 -0500 Subject: [PATCH 10/11] Dup selector string when extracting in case it's frozen Looking forward to Ruby 3 where strings will be immutable by default and Ruby 2 with `# frozen_string_literal: true`, this prevents raising modification of frozen string errors --- .../testing/assertions/selector_assertions/html_selector.rb | 1 + test/selector_assertions_test.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb b/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb index 185ef0f..eb30f94 100644 --- a/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb +++ b/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb @@ -74,6 +74,7 @@ def extract_selector raise ArgumentError, "Expecting a selector as the first argument" end + selector = selector.dup context.substitute!(selector, @values) selector end diff --git a/test/selector_assertions_test.rb b/test/selector_assertions_test.rb index 7ac472a..74ccbb3 100644 --- a/test/selector_assertions_test.rb +++ b/test/selector_assertions_test.rb @@ -18,6 +18,11 @@ def assert_failure(message, &block) # Test assert select. # + def test_frozen_selector_substitution + render_html %Q{
foo
foo
} + assert_select "div:match('id', ?)".freeze, /\d+/ + end + def test_assert_select render_html %Q{
} assert_select "div", 2 From 6ce2cdf6cd16f4a2ad2488521e7027971f0aad76 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Mon, 18 Dec 2017 15:59:29 -0500 Subject: [PATCH 11/11] Bump gem version to prep for release --- lib/rails/dom/testing/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rails/dom/testing/version.rb b/lib/rails/dom/testing/version.rb index b464085..757d6b6 100644 --- a/lib/rails/dom/testing/version.rb +++ b/lib/rails/dom/testing/version.rb @@ -1,7 +1,7 @@ module Rails module Dom module Testing - VERSION = "1.0.8" + VERSION = "1.0.9" end end end