remove warnings to ensure compatibility with Ruby 2.4
Didier Lafforgue
committed Mar 02, 2018
commit da3eb82b45a59e4362d1b9f2b12a4c32b586d666
Showing 8
changed files with
32 additions
and 35 deletions
.gitignore
+1
-0
| @@ | @@ -26,3 +26,4 @@ spec/fixtures/default/log/* |
| log | |
| dragonfly.log | |
| + | .byebug_history |
Gemfile
+2
-2
| @@ | @@ -27,7 +27,7 @@ group :test do |
| gem 'timecop', '~> 0.9.1' | |
| - | gem 'pry-byebug', '~> 3.3.0' |
| + | # gem 'pry-byebug', '~> 3.3.0' |
| gem 'rack-test', '~> 0.8.2' | |
| @@ | @@ -36,5 +36,5 @@ group :test do |
| end | |
| platform :ruby do | |
| - | ruby '2.3.3' |
| + | ruby '2.4.3' |
| end | |
Gemfile.lock
+16
-26
| @@ | @@ -1,9 +1,9 @@ |
| PATH | |
| remote: . | |
| specs: | |
| - | locomotivecms_steam (1.3.0) |
| + | locomotivecms_steam (1.4.0.pre.alpha) |
| RedCloth (~> 4.3.2) | |
| - | autoprefixer-rails (~> 6.7.2) |
| + | autoprefixer-rails (~> 8.0.0) |
| bcrypt (~> 3.1.11) | |
| chronic (~> 0.10.2) | |
| coffee-script (~> 2.4.1) | |
| @@ | @@ -40,16 +40,14 @@ GEM |
| addressable (2.5.2) | |
| public_suffix (>= 2.0.2, < 4.0) | |
| attr_extras (4.4.0) | |
| - | autoprefixer-rails (6.7.7.2) |
| + | autoprefixer-rails (8.0.0) |
| execjs | |
| bcrypt (3.1.11) | |
| bson (4.3.0) | |
| - | byebug (8.2.5) |
| chronic (0.10.2) | |
| - | chunky_png (1.3.8) |
| + | chunky_png (1.3.10) |
| codeclimate-test-reporter (0.4.8) | |
| simplecov (>= 0.7.1, < 1.0.0) | |
| - | coderay (1.1.2) |
| coffee-script (2.4.1) | |
| coffee-script-source | |
| execjs | |
| @@ | @@ -83,12 +81,12 @@ GEM |
| rack (>= 1.3) | |
| duktape (1.6.1.0) | |
| execjs (2.7.0) | |
| - | ffi (1.9.18) |
| + | ffi (1.9.23) |
| flamegraph (0.9.5) | |
| haml (5.0.4) | |
| temple (>= 0.8.0) | |
| tilt | |
| - | httparty (0.15.6) |
| + | httparty (0.15.7) |
| multi_xml (>= 0.5.2) | |
| i18n (0.9.1) | |
| concurrent-ruby (~> 1.0) | |
| @@ | @@ -112,34 +110,27 @@ GEM |
| mail (2.7.0) | |
| mini_mime (>= 0.1.1) | |
| memory_profiler (0.9.8) | |
| - | method_source (0.9.0) |
| mime-types (3.1) | |
| mime-types-data (~> 3.2015) | |
| mime-types-data (3.2016.0521) | |
| mimetype-fu (0.1.2) | |
| mini_mime (1.0.0) | |
| mini_portile2 (2.3.0) | |
| - | minitest (5.11.1) |
| + | minitest (5.11.3) |
| moneta (1.0.0) | |
| - | mongo (2.4.3) |
| - | bson (>= 4.2.1, < 5.0.0) |
| + | mongo (2.5.1) |
| + | bson (>= 4.3.0, < 5.0.0) |
| morphine (0.1.1) | |
| multi_json (1.13.1) | |
| multi_xml (0.6.0) | |
| - | nokogiri (1.8.1) |
| + | nokogiri (1.8.2) |
| mini_portile2 (~> 2.3.0) | |
| nokogumbo (1.4.13) | |
| nokogiri | |
| origin (2.3.1) | |
| pony (1.12) | |
| mail (>= 2.0) | |
| - | pry (0.11.3) |
| - | coderay (~> 1.1.0) |
| - | method_source (~> 0.9.0) |
| - | pry-byebug (3.3.0) |
| - | byebug (~> 8.0) |
| - | pry (~> 0.10) |
| - | public_suffix (3.0.1) |
| + | public_suffix (3.0.2) |
| puma (3.11.2) | |
| rack (2.0.3) | |
| rack-cache (1.7.1) | |
| @@ | @@ -191,9 +182,9 @@ GEM |
| tilt (2.0.8) | |
| timecop (0.9.1) | |
| tins (1.16.3) | |
| - | tzinfo (1.2.4) |
| + | tzinfo (1.2.5) |
| thread_safe (~> 0.1) | |
| - | uglifier (4.1.3) |
| + | uglifier (4.1.6) |
| execjs (>= 0.3.0, < 3) | |
| PLATFORMS | |
| @@ | @@ -209,9 +200,8 @@ DEPENDENCIES |
| json_spec (~> 1.1.5) | |
| locomotivecms_steam! | |
| memory_profiler | |
| - | mongo (~> 2.4.3) |
| + | mongo (~> 2.5.1) |
| origin (~> 2.3.1) | |
| - | pry-byebug (~> 3.3.0) |
| puma | |
| rack-mini-profiler (~> 0.10.1) | |
| rack-test (~> 0.8.2) | |
| @@ | @@ -221,7 +211,7 @@ DEPENDENCIES |
| timecop (~> 0.9.1) | |
| RUBY VERSION | |
| - | ruby 2.3.3p222 |
| + | ruby 2.4.3p205 |
| BUNDLED WITH | |
| - | 1.16.0 |
| + | 1.16.1 |
locomotive/steam/models/associations/embedded.rb b/lib/locomotive/steam/models/associations/embedded.rb
+4
-0
| @@ | @@ -41,6 +41,10 @@ module Locomotive::Steam |
| @repository.send(name, *args, &block) | |
| end | |
| + | def respond_to_missing?(name, include_private = false) |
| + | @repository.respond_to?(name) || super |
| + | end |
| + | |
| end | |
| end | |
locomotive/steam/repositories.rb b/lib/locomotive/steam/repositories.rb
+3
-1
| @@ | @@ -45,8 +45,10 @@ module Locomotive |
| name = ((options || {})[:name] || :filesystem).to_s | |
| begin | |
| require_relative "adapters/#{name.downcase}" | |
| - | rescue LoadError |
| + | rescue LoadError => e |
| puts 'Not a Steam built-in adapter' | |
| + | puts e.inspect |
| + | puts e.backtrace |
| end | |
| klass = "Locomotive::Steam::#{name.camelize}Adapter".constantize | |
| klass.new(options) | |
locomotive/steam/version.rb b/lib/locomotive/steam/version.rb
+1
-1
| @@ | @@ -3,6 +3,6 @@ |
| # 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0 | |
| module Locomotive | |
| module Steam | |
| - | VERSION = '1.3.0' |
| + | VERSION = '1.4.0-alpha' |
| end | |
| end | |
locomotivecms_steam.gemspec
+2
-2
| @@ | @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| |
| spec.add_development_dependency 'bundler', '~> 1.7' | |
| spec.add_development_dependency 'rake', '~> 10.4.2' | |
| - | spec.add_development_dependency 'mongo', '~> 2.4.3' |
| + | spec.add_development_dependency 'mongo', '~> 2.5.1' |
| spec.add_development_dependency 'origin', '~> 2.3.1' | |
| spec.add_dependency 'nokogiri', '~> 1.8.1' | |
| @@ | @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| |
| spec.add_dependency 'uglifier', '~> 4.1.3' | |
| spec.add_dependency 'coffee-script', '~> 2.4.1' | |
| spec.add_dependency 'compass', '~> 1.0.3' | |
| - | spec.add_dependency 'autoprefixer-rails', '~> 6.7.2' |
| + | spec.add_dependency 'autoprefixer-rails', '~> 8.0.0' |
| spec.add_dependency 'kramdown', '~> 1.16.2' | |
| spec.add_dependency 'RedCloth', '~> 4.3.2' | |
spec/unit/liquid/filters/misc_spec.rb
+3
-3
| @@ | @@ -53,7 +53,7 @@ describe Locomotive::Steam::Liquid::Filters::Misc do |
| context 'from an integer' do | |
| subject { random(4) } | |
| - | it { is_expected.to be_a_kind_of(Fixnum) } |
| + | it { is_expected.to be_a_kind_of(Integer) } |
| it { is_expected.to satisfy { |n| n >=0 && n < 4 } } | |
| end | |
| @@ | @@ -61,7 +61,7 @@ describe Locomotive::Steam::Liquid::Filters::Misc do |
| context 'from a string' do | |
| subject { random('4') } | |
| - | it { is_expected.to be_a_kind_of(Fixnum) } |
| + | it { is_expected.to be_a_kind_of(Integer) } |
| it { is_expected.to satisfy { |n| n >=0 && n < 4 } } | |
| end | |
| @@ | @@ -70,7 +70,7 @@ describe Locomotive::Steam::Liquid::Filters::Misc do |
| it 'returns a random number' do | |
| random_number = random(4) | |
| - | expect(random_number.class).to eq Fixnum |
| + | expect(random_number.class).to eq Integer |
| end | |
| describe '#map' do | |