diff --git a/.travis.yml b/.travis.yml index 651e65d..4875d32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ rvm: - 2.1.8 - 2.0.0 - rbx-2 +- 2.5.1 before_install: - gem install bundler -v '~> 1.11' gemfile: @@ -20,5 +21,11 @@ matrix: gemfile: gemfiles/50.gemfile - rvm: rbx-2 gemfile: gemfiles/50.gemfile + - rvm: 2.5.1 + gemfile: gemfiles/40.gemfile + - rvm: 2.5.1 + gemfile: gemfiles/41.gemfile + - rvm: 2.5.1 + gemfile: gemfiles/42.gemfile cache: - bundler diff --git a/gemfiles/40.gemfile.lock b/gemfiles/40.gemfile.lock index b4f128d..e69de29 100644 --- a/gemfiles/40.gemfile.lock +++ b/gemfiles/40.gemfile.lock @@ -1,126 +0,0 @@ -PATH - remote: ../ - specs: - activesorting (0.7.1) - activerecord (>= 4.0.0) - railties (>= 4.0.0) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.0.13) - actionpack (= 4.0.13) - mail (~> 2.5, >= 2.5.4) - actionpack (4.0.13) - activesupport (= 4.0.13) - builder (~> 3.1.0) - erubis (~> 2.7.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - activemodel (4.0.13) - activesupport (= 4.0.13) - builder (~> 3.1.0) - activerecord (4.0.13) - activemodel (= 4.0.13) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.13) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.4) - activesupport (4.0.13) - i18n (~> 0.6, >= 0.6.9) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - appraisal (2.1.0) - bundler - rake - thor (>= 0.14.0) - arel (4.0.2) - builder (3.1.4) - concurrent-ruby (1.0.1) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) - term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) - database_cleaner (1.5.1) - diff-lcs (1.2.5) - docile (1.1.5) - erubis (2.7.0) - i18n (0.7.0) - json (1.8.3) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - minitest (4.7.5) - multi_json (1.11.2) - rack (1.5.5) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.0.13) - actionmailer (= 4.0.13) - actionpack (= 4.0.13) - activerecord (= 4.0.13) - activesupport (= 4.0.13) - bundler (>= 1.3.0, < 2.0) - railties (= 4.0.13) - sprockets-rails (~> 2.0) - railties (4.0.13) - actionpack (= 4.0.13) - activesupport (= 4.0.13) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.5.0) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sprockets (3.5.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.11) - term-ansicolor (1.3.2) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) - tins (1.6.0) - tzinfo (0.3.48) - -PLATFORMS - ruby - -DEPENDENCIES - activesorting! - appraisal - bundler (~> 1.11) - coveralls - database_cleaner - rails (~> 4.0.0) - rake (~> 10.0) - rspec - sqlite3 - -BUNDLED WITH - 1.11.2 diff --git a/gemfiles/41.gemfile.lock b/gemfiles/41.gemfile.lock index 25762bd..e69de29 100644 --- a/gemfiles/41.gemfile.lock +++ b/gemfiles/41.gemfile.lock @@ -1,130 +0,0 @@ -PATH - remote: ../ - specs: - activesorting (0.7.1) - activerecord (>= 4.0.0) - railties (>= 4.0.0) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.1.15) - actionpack (= 4.1.15) - actionview (= 4.1.15) - mail (~> 2.5, >= 2.5.4) - actionpack (4.1.15) - actionview (= 4.1.15) - activesupport (= 4.1.15) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.15) - activesupport (= 4.1.15) - builder (~> 3.1) - erubis (~> 2.7.0) - activemodel (4.1.15) - activesupport (= 4.1.15) - builder (~> 3.1) - activerecord (4.1.15) - activemodel (= 4.1.15) - activesupport (= 4.1.15) - arel (~> 5.0.0) - activesupport (4.1.15) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - appraisal (2.1.0) - bundler - rake - thor (>= 0.14.0) - arel (5.0.1.20140414130214) - builder (3.2.2) - concurrent-ruby (1.0.1) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) - term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) - database_cleaner (1.5.1) - diff-lcs (1.2.5) - docile (1.1.5) - erubis (2.7.0) - i18n (0.7.0) - json (1.8.3) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - minitest (5.8.4) - rack (1.5.5) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.1.15) - actionmailer (= 4.1.15) - actionpack (= 4.1.15) - actionview (= 4.1.15) - activemodel (= 4.1.15) - activerecord (= 4.1.15) - activesupport (= 4.1.15) - bundler (>= 1.3.0, < 2.0) - railties (= 4.1.15) - sprockets-rails (~> 2.0) - railties (4.1.15) - actionpack (= 4.1.15) - activesupport (= 4.1.15) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.5.0) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sprockets (3.5.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.11) - term-ansicolor (1.3.2) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) - tins (1.6.0) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - activesorting! - appraisal - bundler (~> 1.11) - coveralls - database_cleaner - rails (~> 4.1.0) - rake (~> 10.0) - rspec - sqlite3 - -BUNDLED WITH - 1.11.2 diff --git a/gemfiles/42.gemfile.lock b/gemfiles/42.gemfile.lock index b2f42ef..e69de29 100644 --- a/gemfiles/42.gemfile.lock +++ b/gemfiles/42.gemfile.lock @@ -1,155 +0,0 @@ -PATH - remote: ../ - specs: - activesorting (0.7.1) - activerecord (>= 4.0.0) - railties (>= 4.0.0) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - appraisal (2.1.0) - bundler - rake - thor (>= 0.14.0) - arel (6.0.3) - builder (3.2.2) - concurrent-ruby (1.0.1) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) - term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) - database_cleaner (1.5.1) - diff-lcs (1.2.5) - docile (1.1.5) - erubis (2.7.0) - globalid (0.3.6) - activesupport (>= 4.1.0) - i18n (0.7.0) - json (1.8.3) - loofah (2.0.3) - nokogiri (>= 1.5.9) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - mini_portile2 (2.0.0) - minitest (5.8.4) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - rack (1.6.4) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.5.0) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sprockets (3.5.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.0.4) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.3.11) - term-ansicolor (1.3.2) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) - tins (1.6.0) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - activesorting! - appraisal - bundler (~> 1.11) - coveralls - database_cleaner - rails (~> 4.2.0) - rake (~> 10.0) - rspec - sqlite3 - -BUNDLED WITH - 1.11.2 diff --git a/gemfiles/50.gemfile.lock b/gemfiles/50.gemfile.lock index b1bf016..e69de29 100644 --- a/gemfiles/50.gemfile.lock +++ b/gemfiles/50.gemfile.lock @@ -1,165 +0,0 @@ -PATH - remote: ../ - specs: - activesorting (0.7.1) - activerecord (>= 4.0.0) - railties (>= 4.0.0) - -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.0.0.beta3) - actionpack (= 5.0.0.beta3) - nio4r (~> 1.2) - websocket-driver (~> 0.6.1) - actionmailer (5.0.0.beta3) - actionpack (= 5.0.0.beta3) - actionview (= 5.0.0.beta3) - activejob (= 5.0.0.beta3) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (5.0.0.beta3) - actionview (= 5.0.0.beta3) - activesupport (= 5.0.0.beta3) - rack (~> 2.x) - rack-test (~> 0.6.3) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.0.beta3) - activesupport (= 5.0.0.beta3) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (5.0.0.beta3) - activesupport (= 5.0.0.beta3) - globalid (>= 0.3.6) - activemodel (5.0.0.beta3) - activesupport (= 5.0.0.beta3) - activerecord (5.0.0.beta3) - activemodel (= 5.0.0.beta3) - activesupport (= 5.0.0.beta3) - arel (~> 7.0) - activesupport (5.0.0.beta3) - concurrent-ruby (~> 1.0) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - appraisal (2.1.0) - bundler - rake - thor (>= 0.14.0) - arel (7.0.0) - builder (3.2.2) - concurrent-ruby (1.0.1) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) - term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) - database_cleaner (1.5.1) - diff-lcs (1.2.5) - docile (1.1.5) - erubis (2.7.0) - globalid (0.3.6) - activesupport (>= 4.1.0) - i18n (0.7.0) - json (1.8.3) - loofah (2.0.3) - nokogiri (>= 1.5.9) - mail (2.6.4) - mime-types (>= 1.16, < 4) - method_source (0.8.2) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - mini_portile2 (2.0.0) - minitest (5.8.4) - nio4r (1.2.1) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - rack (2.0.0.alpha) - json - rack-test (0.6.3) - rack (>= 1.0) - rails (5.0.0.beta3) - actioncable (= 5.0.0.beta3) - actionmailer (= 5.0.0.beta3) - actionpack (= 5.0.0.beta3) - actionview (= 5.0.0.beta3) - activejob (= 5.0.0.beta3) - activemodel (= 5.0.0.beta3) - activerecord (= 5.0.0.beta3) - activesupport (= 5.0.0.beta3) - bundler (>= 1.3.0, < 2.0) - railties (= 5.0.0.beta3) - sprockets-rails (>= 2.0.0) - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (5.0.0.beta3) - actionpack (= 5.0.0.beta3) - activesupport (= 5.0.0.beta3) - method_source - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.5.0) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sprockets (3.5.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.0.4) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.3.11) - term-ansicolor (1.3.2) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) - tins (1.6.0) - tzinfo (1.2.2) - thread_safe (~> 0.1) - websocket-driver (0.6.3) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - -PLATFORMS - ruby - -DEPENDENCIES - activesorting! - appraisal - bundler (~> 1.11) - coveralls - database_cleaner - rails (= 5.0.0.beta3) - rake (~> 10.0) - rspec - sqlite3 - -BUNDLED WITH - 1.11.2 diff --git a/lib/active_sorting/model.rb b/lib/active_sorting/model.rb index 43b383b..d8e58a9 100644 --- a/lib/active_sorting/model.rb +++ b/lib/active_sorting/model.rb @@ -75,8 +75,8 @@ def active_sorting_check_options # unless field_type == :integer # raise ArgumentError, "Sortable field should be of type Integer, #{field_type} where given" # end - unless active_sorting_step.is_a?(Fixnum) - raise ArgumentError, "Sortable step should be of type Fixnum, #{active_sorting_step.class.name} where given" + unless active_sorting_step.is_a?(Integer) + raise ArgumentError, "Sortable step should be of type Integer, #{active_sorting_step.class.name} where given" end unless active_sorting_scope.respond_to?(:each) raise ArgumentError, "Sortable step should be of type Enumerable, #{active_sorting_scope.class.name} where given"