Skip to content

Commit 16aa0d0

Browse files
author
Kyle d'Oliveira
authored
Merge pull request #28 from mctaylorpants/test-all-rails-versions
Add a Rake task to run specs for multiple versions of Rails
2 parents d2b2b31 + 6fb709b commit 16aa0d0

9 files changed

Lines changed: 307 additions & 0 deletions

Rakefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ require "bundler/gem_tasks"
22
require "yaml"
33
require "active_record"
44

5+
namespace :test do
6+
task :all do
7+
Dir.glob("./gemfiles/Gemfile*").each do |gemfile|
8+
next if gemfile.end_with?(".lock")
9+
puts "Running specs for #{Pathname.new(gemfile).basename}"
10+
system("BUNDLE_GEMFILE=#{gemfile} bundle install > /dev/null && BUNDLE_GEMFILE=#{gemfile} bundle exec rspec")
11+
puts ""
12+
end
13+
end
14+
end
15+
516
namespace :db do
617
database_config = YAML.load(File.open("./spec/support/database.yml"))
718
admin_database_config = database_config.merge(database: "mysql")

gemfiles/Gemfile.rails-4.2-stable

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec path: ".."
6+
7+
gem "activerecord", github: "rails/rails", branch: "4-2-stable"
8+
gem "sqlite3", "~> 1.3.6"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
GIT
2+
remote: git://github.com/rails/rails.git
3+
revision: e9d6b85f3e834ceea2aeabe4cbaa96a7c73eb896
4+
branch: 4-2-stable
5+
specs:
6+
activemodel (4.2.11.1)
7+
activesupport (= 4.2.11.1)
8+
builder (~> 3.1)
9+
activerecord (4.2.11.1)
10+
activemodel (= 4.2.11.1)
11+
activesupport (= 4.2.11.1)
12+
arel (~> 6.0)
13+
activesupport (4.2.11.1)
14+
i18n (~> 0.7)
15+
minitest (~> 5.1)
16+
thread_safe (~> 0.3, >= 0.3.4)
17+
tzinfo (~> 1.1)
18+
19+
PATH
20+
remote: ..
21+
specs:
22+
polymorphic_integer_type (2.2.4)
23+
activerecord
24+
25+
GEM
26+
remote: https://rubygems.org/
27+
specs:
28+
arel (6.0.4)
29+
builder (3.2.4)
30+
byebug (11.0.1)
31+
concurrent-ruby (1.1.5)
32+
diff-lcs (1.3)
33+
i18n (0.9.5)
34+
concurrent-ruby (~> 1.0)
35+
minitest (5.13.0)
36+
rake (13.0.1)
37+
rspec (3.9.0)
38+
rspec-core (~> 3.9.0)
39+
rspec-expectations (~> 3.9.0)
40+
rspec-mocks (~> 3.9.0)
41+
rspec-core (3.9.0)
42+
rspec-support (~> 3.9.0)
43+
rspec-expectations (3.9.0)
44+
diff-lcs (>= 1.2.0, < 2.0)
45+
rspec-support (~> 3.9.0)
46+
rspec-mocks (3.9.0)
47+
diff-lcs (>= 1.2.0, < 2.0)
48+
rspec-support (~> 3.9.0)
49+
rspec-support (3.9.0)
50+
sqlite3 (1.3.13)
51+
thread_safe (0.3.6)
52+
tzinfo (1.2.5)
53+
thread_safe (~> 0.1)
54+
55+
PLATFORMS
56+
ruby
57+
58+
DEPENDENCIES
59+
activerecord!
60+
bundler
61+
byebug
62+
polymorphic_integer_type!
63+
rake
64+
rspec
65+
sqlite3 (~> 1.3.6)
66+
67+
BUNDLED WITH
68+
1.16.1

gemfiles/Gemfile.rails-5.0-stable

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec path: ".."
6+
7+
gem "activerecord", github: "rails/rails", branch: "5-0-stable"
8+
gem "sqlite3", "~> 1.3.6"
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
GIT
2+
remote: git://github.com/rails/rails.git
3+
revision: ac6aa32f7cf66264ba87eabed7c042bb60bcf3a2
4+
branch: 5-0-stable
5+
specs:
6+
activemodel (5.0.7.2)
7+
activesupport (= 5.0.7.2)
8+
activerecord (5.0.7.2)
9+
activemodel (= 5.0.7.2)
10+
activesupport (= 5.0.7.2)
11+
arel (~> 7.0)
12+
activesupport (5.0.7.2)
13+
concurrent-ruby (~> 1.0, >= 1.0.2)
14+
i18n (>= 0.7, < 2)
15+
minitest (~> 5.1)
16+
tzinfo (~> 1.1)
17+
18+
PATH
19+
remote: ..
20+
specs:
21+
polymorphic_integer_type (2.2.4)
22+
activerecord
23+
24+
GEM
25+
remote: https://rubygems.org/
26+
specs:
27+
arel (7.1.4)
28+
byebug (11.0.1)
29+
concurrent-ruby (1.1.5)
30+
diff-lcs (1.3)
31+
i18n (1.7.0)
32+
concurrent-ruby (~> 1.0)
33+
minitest (5.13.0)
34+
rake (13.0.1)
35+
rspec (3.9.0)
36+
rspec-core (~> 3.9.0)
37+
rspec-expectations (~> 3.9.0)
38+
rspec-mocks (~> 3.9.0)
39+
rspec-core (3.9.0)
40+
rspec-support (~> 3.9.0)
41+
rspec-expectations (3.9.0)
42+
diff-lcs (>= 1.2.0, < 2.0)
43+
rspec-support (~> 3.9.0)
44+
rspec-mocks (3.9.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.9.0)
47+
rspec-support (3.9.0)
48+
sqlite3 (1.3.13)
49+
thread_safe (0.3.6)
50+
tzinfo (1.2.5)
51+
thread_safe (~> 0.1)
52+
53+
PLATFORMS
54+
ruby
55+
56+
DEPENDENCIES
57+
activerecord!
58+
bundler
59+
byebug
60+
polymorphic_integer_type!
61+
rake
62+
rspec
63+
sqlite3 (~> 1.3.6)
64+
65+
BUNDLED WITH
66+
1.16.1

gemfiles/Gemfile.rails-5.1-stable

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec path: ".."
6+
7+
gem "activerecord", github: "rails/rails", branch: "5-1-stable"
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
GIT
2+
remote: git://github.com/rails/rails.git
3+
revision: 663206d20aec374a28a24bb43bc7b1233042ed9b
4+
branch: 5-1-stable
5+
specs:
6+
activemodel (5.1.7)
7+
activesupport (= 5.1.7)
8+
activerecord (5.1.7)
9+
activemodel (= 5.1.7)
10+
activesupport (= 5.1.7)
11+
arel (~> 8.0)
12+
activesupport (5.1.7)
13+
concurrent-ruby (~> 1.0, >= 1.0.2)
14+
i18n (>= 0.7, < 2)
15+
minitest (~> 5.1)
16+
tzinfo (~> 1.1)
17+
18+
PATH
19+
remote: ..
20+
specs:
21+
polymorphic_integer_type (2.2.4)
22+
activerecord
23+
24+
GEM
25+
remote: https://rubygems.org/
26+
specs:
27+
arel (8.0.0)
28+
byebug (11.0.1)
29+
concurrent-ruby (1.1.5)
30+
diff-lcs (1.3)
31+
i18n (1.7.0)
32+
concurrent-ruby (~> 1.0)
33+
minitest (5.13.0)
34+
rake (13.0.1)
35+
rspec (3.9.0)
36+
rspec-core (~> 3.9.0)
37+
rspec-expectations (~> 3.9.0)
38+
rspec-mocks (~> 3.9.0)
39+
rspec-core (3.9.0)
40+
rspec-support (~> 3.9.0)
41+
rspec-expectations (3.9.0)
42+
diff-lcs (>= 1.2.0, < 2.0)
43+
rspec-support (~> 3.9.0)
44+
rspec-mocks (3.9.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.9.0)
47+
rspec-support (3.9.0)
48+
sqlite3 (1.4.2)
49+
thread_safe (0.3.6)
50+
tzinfo (1.2.5)
51+
thread_safe (~> 0.1)
52+
53+
PLATFORMS
54+
ruby
55+
56+
DEPENDENCIES
57+
activerecord!
58+
bundler
59+
byebug
60+
polymorphic_integer_type!
61+
rake
62+
rspec
63+
sqlite3
64+
65+
BUNDLED WITH
66+
1.16.1

gemfiles/Gemfile.rails-5.2-stable

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec path: ".."
6+
7+
gem "activerecord", github: "rails/rails", branch: "5-2-stable"
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
GIT
2+
remote: git://github.com/rails/rails.git
3+
revision: 892eab777c418135ce0646e91bc9ebb08a29ab9b
4+
branch: 5-2-stable
5+
specs:
6+
activemodel (5.2.4.1)
7+
activesupport (= 5.2.4.1)
8+
activerecord (5.2.4.1)
9+
activemodel (= 5.2.4.1)
10+
activesupport (= 5.2.4.1)
11+
arel (>= 9.0)
12+
activesupport (5.2.4.1)
13+
concurrent-ruby (~> 1.0, >= 1.0.2)
14+
i18n (>= 0.7, < 2)
15+
minitest (~> 5.1)
16+
tzinfo (~> 1.1)
17+
18+
PATH
19+
remote: ..
20+
specs:
21+
polymorphic_integer_type (2.2.4)
22+
activerecord
23+
24+
GEM
25+
remote: https://rubygems.org/
26+
specs:
27+
arel (9.0.0)
28+
byebug (11.0.1)
29+
concurrent-ruby (1.1.5)
30+
diff-lcs (1.3)
31+
i18n (1.7.0)
32+
concurrent-ruby (~> 1.0)
33+
minitest (5.13.0)
34+
rake (13.0.1)
35+
rspec (3.9.0)
36+
rspec-core (~> 3.9.0)
37+
rspec-expectations (~> 3.9.0)
38+
rspec-mocks (~> 3.9.0)
39+
rspec-core (3.9.0)
40+
rspec-support (~> 3.9.0)
41+
rspec-expectations (3.9.0)
42+
diff-lcs (>= 1.2.0, < 2.0)
43+
rspec-support (~> 3.9.0)
44+
rspec-mocks (3.9.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.9.0)
47+
rspec-support (3.9.0)
48+
sqlite3 (1.4.2)
49+
thread_safe (0.3.6)
50+
tzinfo (1.2.5)
51+
thread_safe (~> 0.1)
52+
53+
PLATFORMS
54+
ruby
55+
56+
DEPENDENCIES
57+
activerecord!
58+
bundler
59+
byebug
60+
polymorphic_integer_type!
61+
rake
62+
rspec
63+
sqlite3
64+
65+
BUNDLED WITH
66+
1.16.1

0 commit comments

Comments
 (0)