Skip to content

Commit dbf7cbb

Browse files
authored
Merge pull request #18 from zendesk/pschambacher/rails5.1
Compatibility with Rails 5.1
2 parents feb606c + 5bb5416 commit dbf7cbb

File tree

10 files changed

+81
-25
lines changed

10 files changed

+81
-25
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ gemfile:
1212
- gemfiles/rails3.2.gemfile
1313
- gemfiles/rails4.2.gemfile
1414
- gemfiles/rails5.0.gemfile
15+
- gemfiles/rails5.1.gemfile
1516
matrix:
1617
exclude:
1718
- rvm: 2.4.1

Gemfile.lock

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,27 @@ PATH
22
remote: .
33
specs:
44
migration_tools (1.3.1)
5-
activerecord (>= 3.2.6, < 5.1)
5+
activerecord (>= 3.2.6, < 5.2)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
activemodel (4.2.5)
11-
activesupport (= 4.2.5)
12-
builder (~> 3.1)
13-
activerecord (4.2.5)
14-
activemodel (= 4.2.5)
15-
activesupport (= 4.2.5)
16-
arel (~> 6.0)
17-
activesupport (4.2.5)
10+
activemodel (5.1.0)
11+
activesupport (= 5.1.0)
12+
activerecord (5.1.0)
13+
activemodel (= 5.1.0)
14+
activesupport (= 5.1.0)
15+
arel (~> 8.0)
16+
activesupport (5.1.0)
17+
concurrent-ruby (~> 1.0, >= 1.0.2)
1818
i18n (~> 0.7)
19-
json (~> 1.7, >= 1.7.7)
2019
minitest (~> 5.1)
21-
thread_safe (~> 0.3, >= 0.3.4)
2220
tzinfo (~> 1.1)
23-
arel (6.0.3)
24-
builder (3.2.2)
21+
arel (8.0.0)
2522
bump (0.5.3)
26-
i18n (0.7.0)
23+
concurrent-ruby (1.0.5)
24+
i18n (0.8.1)
2725
iconv (1.0.4)
28-
json (1.8.3)
2926
metaclass (0.0.4)
3027
minitest (5.8.3)
3128
minitest-rg (5.2.0)
@@ -34,8 +31,8 @@ GEM
3431
metaclass (~> 0.0.1)
3532
rake (10.4.2)
3633
sqlite3 (1.3.11)
37-
thread_safe (0.3.5)
38-
tzinfo (1.2.2)
34+
thread_safe (0.3.6)
35+
tzinfo (1.2.3)
3936
thread_safe (~> 0.1)
4037
wwtd (1.3.0)
4138

@@ -54,4 +51,4 @@ DEPENDENCIES
5451
wwtd
5552

5653
BUNDLED WITH
57-
1.11.2
54+
1.14.6

gemfiles/rails3.2.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
migration_tools (1.3.1)
5-
activerecord (>= 3.2.6, < 5.1)
5+
activerecord (>= 3.2.6, < 5.2)
66

77
GEM
88
remote: https://rubygems.org/

gemfiles/rails4.2.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
migration_tools (1.3.1)
5-
activerecord (>= 3.2.6, < 5.1)
5+
activerecord (>= 3.2.6, < 5.2)
66

77
GEM
88
remote: https://rubygems.org/

gemfiles/rails5.0.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
migration_tools (1.3.1)
5-
activerecord (>= 3.2.6, < 5.1)
5+
activerecord (>= 3.2.6, < 5.2)
66

77
GEM
88
remote: https://rubygems.org/

gemfiles/rails5.1.gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source "https://rubygems.org"
2+
3+
gem "activerecord", "~> 5.1.0"
4+
5+
gemspec path: "../"

gemfiles/rails5.1.gemfile.lock

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
PATH
2+
remote: ..
3+
specs:
4+
migration_tools (1.3.1)
5+
activerecord (>= 3.2.6, < 5.2)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
activemodel (5.1.0)
11+
activesupport (= 5.1.0)
12+
activerecord (5.1.0)
13+
activemodel (= 5.1.0)
14+
activesupport (= 5.1.0)
15+
arel (~> 8.0)
16+
activesupport (5.1.0)
17+
concurrent-ruby (~> 1.0, >= 1.0.2)
18+
i18n (~> 0.7)
19+
minitest (~> 5.1)
20+
tzinfo (~> 1.1)
21+
arel (8.0.0)
22+
bump (0.5.3)
23+
concurrent-ruby (1.0.5)
24+
i18n (0.8.1)
25+
metaclass (0.0.4)
26+
minitest (5.10.1)
27+
minitest-rg (5.2.0)
28+
minitest (~> 5.0)
29+
mocha (1.2.1)
30+
metaclass (~> 0.0.1)
31+
rake (12.0.0)
32+
sqlite3 (1.3.13)
33+
thread_safe (0.3.6)
34+
tzinfo (1.2.3)
35+
thread_safe (~> 0.1)
36+
wwtd (1.3.0)
37+
38+
PLATFORMS
39+
ruby
40+
41+
DEPENDENCIES
42+
activerecord (~> 5.1.0)
43+
bump
44+
migration_tools!
45+
minitest
46+
minitest-rg
47+
mocha
48+
rake
49+
sqlite3
50+
wwtd
51+
52+
BUNDLED WITH
53+
1.14.6

lib/migration_tools.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
module MigrationTools
1010
def self.forced?
11-
!!@forced
11+
defined?(@forced) && !!@forced
1212
end
1313

1414
def self.forced!

lib/migration_tools/tasks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def initialize
1010
end
1111

1212
def group
13-
return @group if @group
13+
return @group if defined?(@group) && @group
1414

1515
@group = ENV['GROUP'].to_s
1616
raise "Invalid group \"#{@group}\"" if !@group.empty? && !MIGRATION_GROUPS.member?(@group)
@@ -36,7 +36,7 @@ def migrator(target_version = nil)
3636
end
3737

3838
def pending_migrations
39-
return @pending_migrations if @pending_migrations
39+
return @pending_migrations if defined?(@pending_migrations) && @pending_migrations
4040
@pending_migrations = migrator.pending_migrations
4141
@pending_migrations = @pending_migrations.select { |proxy| group.empty? || proxy.migration_group == group }
4242

migration_tools.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new "migration_tools", "1.3.1" do |s|
77
s.files = `git ls-files lib`.split("\n")
88
s.license = "Apache License Version 2.0"
99

10-
s.add_runtime_dependency "activerecord", '>= 3.2.6', '< 5.1'
10+
s.add_runtime_dependency "activerecord", '>= 3.2.6', '< 5.2'
1111

1212
s.add_development_dependency "rake"
1313
s.add_development_dependency "bump"

0 commit comments

Comments
 (0)