Skip to content

Commit 0c730d8

Browse files
committed
Rename gemfiles
By naming the gemfiles with a .rb extension, we automatically get syntax highlighting, but more importantly, we get linting.
1 parent 9b314fa commit 0c730d8

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pkg/*
77
coverage/*
88
benchmarks/*
99
.rvmrc
10-
gemfiles/Gemfile*.lock
10+
gemfiles/*.lock
1111
.bundle
1212
Gemfile.lock
1313
.ruby-gemset

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ rvm:
1515
# We only test living versions of rails, per the [rails maintenance
1616
# policy](http://guides.rubyonrails.org/maintenance_policy.html)
1717
gemfile:
18-
- gemfiles/Gemfile.rails-5.2.x
19-
- gemfiles/Gemfile.rails-6.0.x
18+
- gemfiles/rails-5.2.rb
19+
- gemfiles/rails-6.0.rb
2020

2121
matrix:
2222
exclude:
2323
# rails 6 will not support ruby < 2.4.1
2424
- rvm: 2.3.8
25-
gemfile: gemfiles/Gemfile.rails-6.0.x
25+
gemfile: gemfiles/rails-6.0.rb
2626
# optimization: don't test intermediate rubies (see above)
2727
- rvm: 2.4.4
28-
gemfile: gemfiles/Gemfile.rails-5.2.x
28+
gemfile: gemfiles/rails-5.2.rb
2929
fast_finish: true
3030

3131
# We want to use `sudo: false` because the container infrastructure is supposed

CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
```
1010
Ben Johnson <[email protected]>,
11-
Tieg Zaharia <[email protected]>
11+
Tieg Zaharia <[email protected]>,
1212
Jared Beck <[email protected]>
1313
```
1414

@@ -33,14 +33,14 @@ ruby. See `required_ruby_version` in the gemspec.
3333
Tests can be run against different versions of Rails:
3434

3535
```
36-
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle install
37-
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake
36+
BUNDLE_GEMFILE=gemfiles/rails-6.0.rb bundle install
37+
BUNDLE_GEMFILE=gemfiles/rails-6.0.rb bundle exec rake
3838
```
3939

4040
To run a single test:
4141

4242
```
43-
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x \
43+
BUNDLE_GEMFILE=gemfiles/rails-6.0.rb \
4444
bundle exec ruby -I test path/to/test.rb
4545
```
4646

@@ -57,13 +57,13 @@ Running `rake` also runs a linter, rubocop. Contributions must pass both
5757
the linter and the tests. The linter can be run on its own.
5858

5959
```
60-
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rubocop
60+
BUNDLE_GEMFILE=gemfiles/rails-6.0.rb bundle exec rubocop
6161
```
6262

6363
To run the tests without linting, use `rake test`.
6464

6565
```
66-
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake test
66+
BUNDLE_GEMFILE=gemfiles/rails-6.0.rb bundle exec rake test
6767
```
6868

6969
### Version Control Branches

gemfiles/Gemfile.rails-6.0.x

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# frozen_string_literal: true
2+
13
source "https://rubygems.org"
2-
gemspec :path => ".."
4+
gemspec path: ".."
35

46
gem "activerecord", "~> 5.2.1"
57
gem "activesupport", "~> 5.2.1"
6-
gem 'sqlite3', :platforms => :ruby
8+
gem "sqlite3", platforms: :ruby

gemfiles/rails-6.0.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
gemspec path: ".."
5+
6+
# TODO: Use actual version number
7+
gem "activerecord", github: "rails/rails"
8+
gem "activesupport", github: "rails/rails"
9+
gem "sqlite3", platforms: :ruby

0 commit comments

Comments
 (0)