Skip to content

Commit

Permalink
Set up appraisal
Browse files Browse the repository at this point in the history
and move build-specific dependencies to the Appraisals.
  • Loading branch information
RobinDaugherty committed Aug 17, 2017
1 parent 02a1785 commit 4cbf3b4
Show file tree
Hide file tree
Showing 18 changed files with 202 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
/doc
/.bundle
/vendor/gems

/gemfiles/*.gemfile.lock
/gemfiles/.bundle
63 changes: 63 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
appraise "rails42" do
gem 'rails', '~> 4.2.0'
end

appraise "rails50" do
gem 'rails', '~> 5.0.0'
end

appraise "rails51" do
gem 'rails', '~> 5.1.0'
end

appraise "rails42_haml" do
gem 'rails', '~> 4.2.0'
gem 'haml'
end

appraise "rails50_haml" do
gem 'rails', '~> 5.0.0'
gem 'haml'
end

appraise "rails51_haml" do
gem 'rails', '~> 5.1.0'
gem 'haml'
end

appraise "rails42_boc" do
gem 'rails', '~> 4.2.0'
gem "binding_of_caller", platforms: :ruby
end

appraise "rails50_boc" do
gem 'rails', '~> 5.0.0'
gem "binding_of_caller", platforms: :ruby
end

appraise "rails51_boc" do
gem 'rails', '~> 5.1.0'
gem "binding_of_caller", platforms: :ruby
end

appraise 'rack' do
end

appraise 'rack_boc' do
gem 'binding_of_caller'
end

# To be removed in the future once the Pry REPL is extracted from this project.
appraise "pry09" do
gem "pry", "~> 0.9.12"
end

# To be removed in the future once the Pry REPL is extracted from this project.
appraise "pry010" do
gem "pry", "~> 0.10.0"
end

# To be removed in the future once the Pry REPL is extracted from this project.
appraise "pry011" do
gem "pry", "~> 0.11.0pre"
end
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source 'https://rubygems.org'

gemspec

gem "rack", "1.6.4"
gem "binding_of_caller", platforms: :ruby
gem "pry", "0.9.12"
# gem "pry-byebug"

# Allows us to generate multiple Gemfiles to run tests against multiple versions of dependencies.
gem "appraisal"
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ See [the wiki for instructions on configuring the editor](https://github.com/cha

If you're using better_errors, I'd love to hear from you. Drop me a line and tell me what you think!

## Development

After checking out the repo, run `bundle install` to install the basic dependencies.

You can run the tests with the most recent version of Rails running `bundle exec rake`.

To run the tests against the other sets of dependencies, though, you will need to use Appraisal.
Run `appraisal install` to run install the dependencies for each of the possible combinations.

Then you can run `appraisal rake` to run all tests, or (for example) `appraisal rails_42_boc rake` to only run the specs with Rails 4.2 and binding_of_caller.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

On CI, the specs are run against each major release of Ruby in addition to each Appraisal gemfile.

## Contributing

1. Fork it
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/pry010.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "pry", "~> 0.10.0"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/pry011.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "pry", "~> 0.11.0pre"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/pry09.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "pry", "~> 0.9.12"

gemspec path: "../"
7 changes: 7 additions & 0 deletions gemfiles/rack.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/rack_boc.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "binding_of_caller"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/rails42.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 4.2.0"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails42_boc.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 4.2.0"
gem "binding_of_caller", platforms: :ruby

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails42_haml.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 4.2.0"
gem "haml"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/rails50.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.0.0"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails50_boc.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.0.0"
gem "binding_of_caller", platforms: :ruby

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails50_haml.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.0.0"
gem "haml"

gemspec path: "../"
8 changes: 8 additions & 0 deletions gemfiles/rails51.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.1.0"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails51_boc.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.1.0"
gem "binding_of_caller", platforms: :ruby

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails51_haml.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "~> 5.1.0"
gem "haml"

gemspec path: "../"

0 comments on commit 4cbf3b4

Please sign in to comment.