Skip to content

Commit 42861d5

Browse files
authored
Merge pull request #106 from maschwenk/master
Support Rails 5.1
2 parents 177936e + f067b34 commit 42861d5

9 files changed

+29
-5
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ gemfile:
1313
- gemfiles/rails_4.1.gemfile
1414
- gemfiles/rails_4.2.gemfile
1515
- gemfiles/rails_5.0.gemfile
16+
- gemfiles/rails_5.1.gemfile
1617
- gemfiles/rails_edge.gemfile
1718
matrix:
1819
fast_finish: true
@@ -23,6 +24,12 @@ matrix:
2324
gemfile: gemfiles/rails_5.0.gemfile
2425
- rvm: 2.1.10
2526
gemfile: gemfiles/rails_5.0.gemfile
27+
- rvm: 1.9.3
28+
gemfile: gemfiles/rails_5.1.gemfile
29+
- rvm: 2.0.0
30+
gemfile: gemfiles/rails_5.1.gemfile
31+
- rvm: 2.1.10
32+
gemfile: gemfiles/rails_5.1.gemfile
2633
- rvm: 1.9.3
2734
gemfile: gemfiles/rails_edge.gemfile
2835
- rvm: 2.0.0

Appraisals

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
[ '4.0', '4.1', '4.2' , '5.0' ].each do |ver|
1+
[ '4.0', '4.1', '4.2' , '5.0', '5.1' ].each do |ver|
2+
nokogiri_ver = ver.to_i < 5 ? '1.6' : '1.7'
23
appraise "rails-#{ver}" do
34
gem 'actionpack', "~> #{ver}.0"
45
gem 'activerecord', "~> #{ver}.0"
56
gem 'railties', "~> #{ver}.0"
7+
gem 'nokogiri', "~> #{nokogiri_ver}.0"
68
end
79
end
810

activerecord-session_store.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Gem::Specification.new do |s|
1919
s.extra_rdoc_files = %w( README.md )
2020
s.rdoc_options.concat ['--main', 'README.md']
2121

22-
s.add_dependency('activerecord', '>= 4.0', '< 5.1')
23-
s.add_dependency('actionpack', '>= 4.0', '< 5.1')
24-
s.add_dependency('railties', '>= 4.0', '< 5.1')
22+
s.add_dependency('activerecord', '>= 4.0', '< 5.2')
23+
s.add_dependency('actionpack', '>= 4.0', '< 5.2')
24+
s.add_dependency('railties', '>= 4.0', '< 5.2')
2525
s.add_dependency('rack', '>= 1.5.2', '< 3')
2626
s.add_dependency('multi_json', '~> 1.11', '>= 1.11.2')
2727

gemfiles/rails_4.0.gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ source "https://rubygems.org"
55
gem "actionpack", "~> 4.0.0"
66
gem "activerecord", "~> 4.0.0"
77
gem "railties", "~> 4.0.0"
8+
gem "nokogiri", "~> 1.6.0"
89

910
gemspec :path => "../"

gemfiles/rails_4.1.gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ source "https://rubygems.org"
55
gem "actionpack", "~> 4.1.0"
66
gem "activerecord", "~> 4.1.0"
77
gem "railties", "~> 4.1.0"
8+
gem "nokogiri", "~> 1.6.0"
89

910
gemspec :path => "../"

gemfiles/rails_4.2.gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ source "https://rubygems.org"
55
gem "actionpack", "~> 4.2.0"
66
gem "activerecord", "~> 4.2.0"
77
gem "railties", "~> 4.2.0"
8+
gem "nokogiri", "~> 1.6.0"
89

910
gemspec :path => "../"

gemfiles/rails_5.0.gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ source "https://rubygems.org"
55
gem "actionpack", "~> 5.0.0"
66
gem "activerecord", "~> 5.0.0"
77
gem "railties", "~> 5.0.0"
8+
gem "nokogiri", "~> 1.7.0"
89

910
gemspec :path => "../"

gemfiles/rails_5.1.gemfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "actionpack", "~> 5.1.0"
6+
gem "activerecord", "~> 5.1.0"
7+
gem "railties", "~> 5.1.0"
8+
gem "nokogiri", "~> 1.7.0"
9+
10+
gemspec :path => "../"

test/tasks/database_rake_test.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
module ActiveRecord
55
module SessionStore
66
class DatabaseRakeTest < ActiveSupport::TestCase
7-
class AddTimestampsToSession < ActiveRecord::Migration
7+
migration_class = ActiveRecord::VERSION::MAJOR < 5 ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
8+
class AddTimestampsToSession < migration_class
89
self.verbose = false
910

1011
def change

0 commit comments

Comments
 (0)