Skip to content

Commit

Permalink
Fixed gem-plugin initialization. Also bumped version to 0.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Yip committed Sep 1, 2009
1 parent b64cba2 commit 70ee170
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0
0.0.1
3 changes: 2 additions & 1 deletion after_commit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Gem::Specification.new do |s|
s.name = %q{after_commit}
s.version = "0.0.0"
s.version = "0.0.1"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Muerdter", "David Yip"]
Expand All @@ -22,6 +22,7 @@ Gem::Specification.new do |s|
"README",
"Rakefile",
"VERSION",
"after_commit.gemspec",
"init.rb",
"lib/after_commit.rb",
"lib/after_commit/active_record.rb",
Expand Down
6 changes: 1 addition & 5 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
ActiveRecord::Base.send(:include, AfterCommit::ActiveRecord)

Object.subclasses_of(ActiveRecord::ConnectionAdapters::AbstractAdapter).each do |klass|
klass.send(:include, AfterCommit::ConnectionAdapters)
end
require 'after_commit'
9 changes: 9 additions & 0 deletions lib/after_commit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ def self.committed_records_on_destroy=(committed_records)
@@committed_records_on_destroy = committed_records
end
end

require 'after_commit/active_record'
require 'after_commit/connection_adapters'

ActiveRecord::Base.send(:include, AfterCommit::ActiveRecord)

Object.subclasses_of(ActiveRecord::ConnectionAdapters::AbstractAdapter).each do |klass|
klass.send(:include, AfterCommit::ConnectionAdapters)
end
5 changes: 1 addition & 4 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
require 'test/unit'
require 'rubygems'
require 'activerecord'
require 'after_commit'
require 'after_commit/active_record'
require 'after_commit/connection_adapters'

begin
require 'sqlite3'
Expand All @@ -20,4 +17,4 @@
end
ActiveRecord::Base.connection.execute("create table mock_records(id int)");

require File.dirname(__FILE__) + '/../init.rb'
require 'after_commit'

0 comments on commit 70ee170

Please sign in to comment.