Skip to content

Commit

Permalink
Merge branch 'add-support-for-more-versions-of-activerecord'
Browse files Browse the repository at this point in the history
  • Loading branch information
sskirby committed Oct 5, 2018
2 parents b3728e1 + 7930f7f commit 89e3199
Show file tree
Hide file tree
Showing 20 changed files with 720 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#@IgnoreInspection BashAddShebang
# Configuration for direnv (see https://github.com/direnv/direnv)

PATH_add bin
34 changes: 34 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
appraise "rails-4-1" do
ruby ">= 2.1.6"
gem "activerecord", "~> 4.1.0"
gem "pg", "~> 0.17.0"
gem "activerecord-import", "~> 0.10.0"
end

appraise "rails-4-2" do
ruby ">= 2.1.6"
gem "activerecord", "~> 4.2.0"
gem "pg", "~> 0.17.0"
gem "activerecord-import", "~> 0.10.0"
end

appraise "rails-5-0" do
ruby ">= 2.2.2"
gem "activerecord", "~> 5.0.0"
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"
end

appraise "rails-5-1" do
ruby ">= 2.2.2"
gem "activerecord", "~> 5.1.0"
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"
end

appraise "rails-5-2" do
ruby ">= 2.2.2"
gem "activerecord", "~> 5.2.0"
gem "pg", "~> 0.18.0"
gem "activerecord-import", "= 0.13.0"
end
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,24 +231,44 @@ For example:

**A.** You can use [ActiveModel::Serialization](http://api.rubyonrails.org/classes/ActiveModel/Serialization.html) or [ActiveModel::Serializers](https://github.com/rails-api/active_model_serializers) but they are not heartily recommended. The former is too coupled to the model and the latter is too coupled to Rails controllers. Vorpal uses [SimpleSerializer](https://github.com/nulogy/simple_serializer) for this purpose.

## Running Tests
## Contributing

1. Fork it ( https://github.com/nulogy/vorpal/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

### Setup DirEnv

Using this gem's bin stubs (contained in the `bin` dir) is much easier if [DirEnv](https://github.com/direnv/direnv) is installed.

On OSX using ZSH DirEnv can be installed like so:

1. `brew install direnv`
2. `echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc`

Please see the [DirEnv docs](https://direnv.net/) if your environment is different.

### Running Tests

1. Start a PostgreSQL server.
2. Either:
* Create a DB user called `vorpal` with password `pass`. OR:
* Modify `spec/helpers/db_helpers.rb`.
3. Run `rake` from the terminal.

## Contributors
### Running Tests for the non-default versions of Rails

* [Sean Kirby](https://github.com/sskirby)
* [Paul Sobocinski](https://github.com/psobocinski)
* [Jason Cheong-Kee-You](https://github.com/jchunky)
1. Start a PostgreSQL server.
2. Either:
* Create a DB user called `vorpal` with password `pass`. OR:
* Modify `spec/helpers/db_helpers.rb`.
3. Run `appraisal <rails version> rake` from the terminal.
* Where `<rails version>` is one of the options defined in the `./Appraisal` file.

## Contributing
Please see the [Appraisal gem docs](https://github.com/thoughtbot/appraisal) for more information.

1. Fork it ( https://github.com/nulogy/vorpal/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors

See who's [contributed](https://github.com/nulogy/vorpal/graphs/contributors)!
29 changes: 29 additions & 0 deletions bin/appraisal
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'appraisal' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("appraisal", "appraisal")
29 changes: 29 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rake", "rake")
29 changes: 29 additions & 0 deletions bin/rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rspec-core", "rspec")
11 changes: 11 additions & 0 deletions gemfiles/rails_4_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated by Appraisal

source "https://rubygems.org"

ruby ">= 2.1.6"

gem "activerecord", "~> 4.1.0"
gem "pg", "~> 0.17.0"
gem "activerecord-import", "~> 0.10.0"

gemspec path: "../"
92 changes: 92 additions & 0 deletions gemfiles/rails_4_1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
PATH
remote: ..
specs:
vorpal (1.0.0)
activesupport
equalizer
simple_serializer (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (4.1.16)
activesupport (= 4.1.16)
builder (~> 3.1)
activerecord (4.1.16)
activemodel (= 4.1.16)
activesupport (= 4.1.16)
arel (~> 5.0.0)
activerecord-import (0.10.0)
activerecord (>= 3.0)
activesupport (4.1.16)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
appraisal (2.2.0)
bundler
rake
thor (>= 0.14.0)
arel (5.0.1.20140414130214)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.5)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
equalizer (0.0.11)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
json (1.8.6)
minitest (5.11.3)
pg (0.17.1)
rake (10.5.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
simple_serializer (1.0.2)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 4.1.0)
activerecord-import (~> 0.10.0)
appraisal (~> 2.2)
pg (~> 0.17.0)
rake (~> 10.0)
rspec (~> 3.0)
virtus (~> 1.0)
vorpal!

RUBY VERSION
ruby 2.3.3p222

BUNDLED WITH
1.16.2
11 changes: 11 additions & 0 deletions gemfiles/rails_4_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated by Appraisal

source "https://rubygems.org"

ruby ">= 2.1.6"

gem "activerecord", "~> 4.2.0"
gem "pg", "~> 0.17.0"
gem "activerecord-import", "~> 0.10.0"

gemspec path: "../"
90 changes: 90 additions & 0 deletions gemfiles/rails_4_2.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
PATH
remote: ..
specs:
vorpal (1.0.0)
activesupport
equalizer
simple_serializer (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
activerecord (4.2.10)
activemodel (= 4.2.10)
activesupport (= 4.2.10)
arel (~> 6.0)
activerecord-import (0.10.0)
activerecord (>= 3.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
appraisal (2.2.0)
bundler
rake
thor (>= 0.14.0)
arel (6.0.4)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.5)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
equalizer (0.0.11)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
minitest (5.11.3)
pg (0.17.1)
rake (10.5.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
simple_serializer (1.0.2)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 4.2.0)
activerecord-import (~> 0.10.0)
appraisal (~> 2.2)
pg (~> 0.17.0)
rake (~> 10.0)
rspec (~> 3.0)
virtus (~> 1.0)
vorpal!

RUBY VERSION
ruby 2.3.3p222

BUNDLED WITH
1.16.2
Loading

0 comments on commit 89e3199

Please sign in to comment.