forked from patmaddox/no-peeping-toms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
begin | ||
require 'jeweler' | ||
rescue LoadError | ||
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com" | ||
exit 1 | ||
end | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
require 'rcov/rcovtask' | ||
require "load_multi_rails_rake_tasks" | ||
|
||
Jeweler::Tasks.new do |s| | ||
s.name = "no_peeping_toms" | ||
s.summary = "Disables observers during testing, allowing you to write model tests that are completely decoupled from the observer." | ||
s.description = s.summary | ||
s.email = "pat.maddox@gmail.com" | ||
s.homepage = "http://github.com/pat-maddox" | ||
s.authors = ["Pat Maddox", "Brandon Keepers"] | ||
s.add_dependency "activerecord", ['>= 1.1'] | ||
s.test_files = Dir['spec/**/*'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
if "test" == RAILS_ENV | ||
ActiveRecord::Observer.send :include, NoPeepingToms | ||
end | ||
require 'no_peeping_toms' if "test" == RAILS_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,5 @@ def with_observers(*observer_syms) | |
end | ||
end | ||
end | ||
|
||
ActiveRecord::Observer.send :include, NoPeepingToms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{no_peeping_toms} | ||
s.version = "0.1.0" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Pat Maddox", "Brandon Keepers"] | ||
s.date = %q{2009-08-17} | ||
s.description = %q{Disables observers during testing, allowing you to write model tests that are completely decoupled from the observer.} | ||
s.email = %q{pat.maddox@gmail.com} | ||
s.extra_rdoc_files = [ | ||
"README" | ||
] | ||
s.files = [ | ||
"README", | ||
"init.rb", | ||
"install.rb", | ||
"lib/no_peeping_toms.rb", | ||
"spec/db/database.yml", | ||
"spec/db/schema.rb", | ||
"spec/no_peeping_toms_spec.rb", | ||
"spec/spec_helper.rb", | ||
"tasks/no_peeping_toms_tasks.rake", | ||
"uninstall.rb" | ||
] | ||
s.homepage = %q{http://github.com/pat-maddox} | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.3.3} | ||
s.summary = %q{Disables observers during testing, allowing you to write model tests that are completely decoupled from the observer.} | ||
s.test_files = [ | ||
"spec/db", | ||
"spec/db/database.yml", | ||
"spec/db/schema.rb", | ||
"spec/no_peeping_toms_spec.rb", | ||
"spec/spec_helper.rb" | ||
] | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<activerecord>, [">= 1.1"]) | ||
else | ||
s.add_dependency(%q<activerecord>, [">= 1.1"]) | ||
end | ||
else | ||
s.add_dependency(%q<activerecord>, [">= 1.1"]) | ||
end | ||
end |