Skip to content

Commit

Permalink
add support for Rails 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sskirby committed Oct 5, 2018
1 parent 88ab851 commit 7930f7f
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ appraise "rails-5-1" do
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"
end

appraise "rails-5-2" do
ruby ">= 2.2.2"
gem "activerecord", "~> 5.2.0"
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"
end
11 changes: 11 additions & 0 deletions gemfiles/rails_5_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated by Appraisal

source "https://rubygems.org"

ruby ">= 2.2.2"

gem "activerecord", "~> 5.2.0"
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"

gemspec path: "../"
88 changes: 88 additions & 0 deletions gemfiles/rails_5_2.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
PATH
remote: ..
specs:
vorpal (1.0.0)
activesupport
equalizer
simple_serializer (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (5.2.1)
activesupport (= 5.2.1)
activerecord (5.2.1)
activemodel (= 5.2.1)
activesupport (= 5.2.1)
arel (>= 9.0)
activerecord-import (0.13.0)
activerecord (>= 3.0)
activesupport (5.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.2.0)
bundler
rake
thor (>= 0.14.0)
arel (9.0.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.5)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
equalizer (0.0.11)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
minitest (5.11.3)
pg (0.18.4)
rake (10.5.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
simple_serializer (1.0.2)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 5.2.0)
activerecord-import (= 0.13.0)
appraisal (~> 2.2)
pg (~> 0.18.0)
rake (~> 10.0)
rspec (~> 3.0)
virtus (~> 1.0)
vorpal!

RUBY VERSION
ruby 2.3.3p222

BUNDLED WITH
1.16.2
3 changes: 2 additions & 1 deletion spec/helpers/db_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def table_name_is_free?(table_name)
!db_connection.table_exists?(table_name)
elsif (ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR == 2) ||
(ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 0) ||
(ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 1)
(ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 1) ||
(ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 2)
!db_connection.data_source_exists?(table_name)
else
raise "ActiveRecord Version #{ActiveRecord::VERSION::STRING} is not supported!"
Expand Down
6 changes: 6 additions & 0 deletions spec/vorpal/performance/performance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ def add_branch(branch_options)
# update 3.030000 0.290000 3.320000 ( 3.839557)
# load 1.340000 0.010000 1.350000 ( 1.509182)
# destroy 0.950000 0.010000 0.960000 ( 1.155866)
#
# Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 5.1.6, AR:Import 0.13.0
# create 0.920000 0.120000 1.040000 ( 1.534410)
# update 3.010000 0.290000 3.300000 ( 3.850101)
# load 1.380000 0.010000 1.390000 ( 1.561047)
# destroy 1.050000 0.010000 1.060000 ( 1.260379)
it 'benchmarks all operations' do
trees = build_trees(1000)
Benchmark.bm(7) do |x|
Expand Down

0 comments on commit 7930f7f

Please sign in to comment.