From e573d3508b89fcf324db6b484249032fe4f420d7 Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 25 Dec 2016 17:13:43 +0900 Subject: [PATCH 1/4] Add ruby 2.4.0 build --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fc265de..7e94580 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ sudo: false rvm: - 2.2 - 2.3.0 + - 2.4.0 - ruby-head gemfile: From 665ab6fb372b13e43961bb088471384a12fca5dc Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 25 Dec 2016 17:27:44 +0900 Subject: [PATCH 2/4] Add test case with Bignum --- spec/parametarized_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/parametarized_spec.rb b/spec/parametarized_spec.rb index 211cfa1..ccd2176 100644 --- a/spec/parametarized_spec.rb +++ b/spec/parametarized_spec.rb @@ -74,6 +74,7 @@ 1 | 2 | 3 "hello " | "world" | "hello world" [1, 2, 3] | [4, 5, 6] | [1, 2, 3, 4, 5, 6] + 100000000000000000000 | 100000000000000000000 | 200000000000000000000 end with_them do @@ -90,6 +91,7 @@ 1 | 2 | -> { eq(3) } "hello " | "world" | -> { eq("hello world") } [1, 2, 3] | [4, 5, 6] | -> { be_a(Array) } + 100000000000000000000 | 100000000000000000000 | -> { eq(200000000000000000000) } end with_them do From 78661466bf46f26d088e49e7e873f2a250b3fb41 Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 25 Dec 2016 17:33:34 +0900 Subject: [PATCH 3/4] Fix deprecation warning on ruby 2.4.0 lib/rspec/parameterized/table_syntax.rb:30: warning: constant ::Fixnum is deprecated lib/rspec/parameterized/table_syntax.rb:34: warning: constant ::Bignum is deprecated --- lib/rspec/parameterized/table_syntax.rb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/rspec/parameterized/table_syntax.rb b/lib/rspec/parameterized/table_syntax.rb index f7bd45e..4e65ade 100644 --- a/lib/rspec/parameterized/table_syntax.rb +++ b/lib/rspec/parameterized/table_syntax.rb @@ -27,12 +27,18 @@ module TableSyntax include TableSyntaxImplement end - refine Fixnum do - include TableSyntaxImplement - end + if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("2.4.0") + refine Integer do + include TableSyntaxImplement + end + else + refine Fixnum do + include TableSyntaxImplement + end - refine Bignum do - include TableSyntaxImplement + refine Bignum do + include TableSyntaxImplement + end end refine Array do From ab432c7916ec0eebd0e27e68eef4c0a3673b3a73 Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 25 Dec 2016 17:50:28 +0900 Subject: [PATCH 4/4] Fix build error with latest rake last_comment is removed since rake 12.0.0 $ bundle exec rake rake aborted! NoMethodError: undefined method `last_comment' for # /home/travis/build/tomykaira/rspec-parameterized/gemfiles/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb:82:in `define' /home/travis/build/tomykaira/rspec-parameterized/gemfiles/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb:62:in `initialize' /home/travis/build/tomykaira/rspec-parameterized/Rakefile:7:in `new' /home/travis/build/tomykaira/rspec-parameterized/Rakefile:7:in `' /home/travis/build/tomykaira/rspec-parameterized/gemfiles/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `' (See full trace by running task with --trace) --- rspec-parameterized.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rspec-parameterized.gemspec b/rspec-parameterized.gemspec index 8e2bd37..f524bc5 100644 --- a/rspec-parameterized.gemspec +++ b/rspec-parameterized.gemspec @@ -14,7 +14,7 @@ I was inspired by [udzura's mock](https://gist.github.com/1881139).} gem.add_dependency('unparser') gem.add_dependency('proc_to_ast') gem.add_dependency('binding_of_caller') - gem.add_development_dependency('rake') + gem.add_development_dependency('rake', '< 12.0.0') gem.files = `git ls-files`.split($\) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }