Skip to content

Commit

Permalink
Removing old rubies from travis, adding rails4 to Appraisal, fixing d…
Browse files Browse the repository at this point in the history
…eprecation warnings in spec and setup_database, fixing imports and dependencies because rails has changed which repo holds railties.
  • Loading branch information
lgoldstein committed Aug 5, 2015
1 parent a3609e9 commit 3dc499b
Show file tree
Hide file tree
Showing 14 changed files with 203 additions and 86 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sudo: false
rvm:
- ree
- 1.9.2
- 1.9.3
- 2.1.5
- 2.2.2
14 changes: 9 additions & 5 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
appraise "rails2" do
gem "activerecord", "~>2.3.14"
end

appraise "rails3" do
gem "activerecord", "~>3.2.7"
if RUBY_VERSION =~ /2.1.\d/
gem "activerecord", "~>3.2.7"
else
gem "activerecord", "~>3.2.8"
end
gem 'railties'
end

appraise "rails4" do
gem "activerecord", "~>4.2.3"
end
102 changes: 73 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,85 @@ PATH
specs:
ar_after_transaction (0.4.0)
activerecord
rack
railties

GEM
remote: https://rubygems.org/
specs:
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
appraisal (0.5.1)
actionpack (4.2.3)
actionview (= 4.2.3)
activesupport (= 4.2.3)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.3)
activesupport (= 4.2.3)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activemodel (4.2.3)
activesupport (= 4.2.3)
builder (~> 3.1)
activerecord (4.2.3)
activemodel (= 4.2.3)
activesupport (= 4.2.3)
arel (~> 6.0)
activesupport (4.2.3)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
appraisal (2.0.2)
bundler
rake
arel (3.0.2)
builder (3.0.4)
bump (0.3.5)
diff-lcs (1.1.3)
i18n (0.6.1)
multi_json (1.7.7)
rake (10.0.2)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.0)
rspec-expectations (2.12.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.0)
sqlite3 (1.3.6)
tzinfo (0.3.37)
thor (>= 0.14.0)
arel (6.0.3)
builder (3.2.2)
bump (0.5.2)
diff-lcs (1.2.5)
erubis (2.7.0)
i18n (0.7.0)
json (1.8.3)
loofah (2.0.2)
nokogiri (>= 1.5.9)
mini_portile (0.6.2)
minitest (5.7.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.3)
actionpack (= 4.2.3)
activesupport (= 4.2.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.4)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby
Expand Down
4 changes: 4 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Gem Version](https://badge.fury.io/rb/ar_after_transaction.png)](http://badge.fury.io/rb/ar_after_transaction)
[![Travis Build Status](https://secure.travis-ci.org/evolve75/RubyTree.png)](http://travis-ci.org/grosser/ar_after_transaction)
[![Dependency Status](https://gemnasium.com/evolve75/ar_after_transaction.png)](https://gemnasium.com/grosser/ar_after_transaction)

Do something only after the currently open transactions have finished.

Normally everything gets rolled back when a transaction fails, but you cannot roll back sending an email or adding a job to Resque.
Expand Down
2 changes: 2 additions & 0 deletions ar_after_transaction.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ Gem::Specification.new "ar_after_transaction", ARAfterTransaction::VERSION do |s
s.homepage = "http://github.com/grosser/ar_after_transaction"
s.files = `git ls-files`.split("\n")
s.add_runtime_dependency "activerecord"
s.add_runtime_dependency "rack"
s.add_runtime_dependency "railties"
s.license = "MIT"
end
39 changes: 0 additions & 39 deletions gemfiles/rails2.gemfile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions gemfiles/rails3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "bump"
gem "rake"
gem "rspec", "~>2"
gem "sqlite3"
gem "activerecord", "~>3.2.7"
gem "activerecord", "~>3.2.8"
gem "railties"

gemspec :path=>"../"
gemspec :path => "../"
6 changes: 4 additions & 2 deletions gemfiles/rails3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
PATH
remote: /Users/mgrosser/code/tools/ar_after_transaction
remote: ../
specs:
ar_after_transaction (0.3.0)
ar_after_transaction (0.4.0)
activerecord
rack
railties

GEM
remote: https://rubygems.org/
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails2.gemfile → gemfiles/rails4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ gem "bump"
gem "rake"
gem "rspec", "~>2"
gem "sqlite3"
gem "activerecord", "~>2.3.14"
gem "activerecord", "~>4.2.3"

gemspec :path=>"../"
gemspec :path => "../"
96 changes: 96 additions & 0 deletions gemfiles/rails4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
PATH
remote: ../
specs:
ar_after_transaction (0.4.0)
activerecord
rack
railties

GEM
remote: https://rubygems.org/
specs:
actionpack (4.2.3)
actionview (= 4.2.3)
activesupport (= 4.2.3)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.3)
activesupport (= 4.2.3)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activemodel (4.2.3)
activesupport (= 4.2.3)
builder (~> 3.1)
activerecord (4.2.3)
activemodel (= 4.2.3)
activesupport (= 4.2.3)
arel (~> 6.0)
activesupport (4.2.3)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
appraisal (2.0.2)
bundler
rake
thor (>= 0.14.0)
arel (6.0.3)
builder (3.2.2)
bump (0.5.2)
diff-lcs (1.2.5)
erubis (2.7.0)
i18n (0.7.0)
json (1.8.3)
loofah (2.0.2)
nokogiri (>= 1.5.9)
mini_portile (0.6.2)
minitest (5.7.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.3)
actionpack (= 4.2.3)
activesupport (= 4.2.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.4)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 4.2.3)
appraisal
ar_after_transaction!
bump
rake
rspec (~> 2)
sqlite3
5 changes: 4 additions & 1 deletion spec/after_initialize_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
require 'active_record'
require'rails'
require File.expand_path '../setup_database', __FILE__

if ActiveRecord::VERSION::MAJOR > 2
require 'action_controller/railtie'
if ActiveRecord::VERSION::MAJOR < 4
require 'action_controller/railtie'
end

Rack::Session::Cookie

Expand Down
4 changes: 2 additions & 2 deletions spec/ar_after_transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def raise_rollback

describe "A normal ActiveRecord subclass" do
it "does not get polluted" do
User.const_defined?(:VERSION).should be_false
User.const_defined?(:Version).should be_false
User.const_defined?(:VERSION).should be false
User.const_defined?(:Version).should be false
end
end
2 changes: 1 addition & 1 deletion spec/setup_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ActiveRecord::Schema.define(:version => 1) do
create_table :users do |t|
t.string :name
t.timestamps
t.timestamps null: false
end
end

Expand Down

0 comments on commit 3dc499b

Please sign in to comment.