Skip to content

Commit

Permalink
Use jeweler to generate a gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Aug 17, 2009
1 parent c36be7c commit 39a92d8
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 3 deletions.
21 changes: 21 additions & 0 deletions Rakefile
@@ -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
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
1.0.0
4 changes: 1 addition & 3 deletions init.rb
@@ -1,3 +1 @@
if "test" == RAILS_ENV
ActiveRecord::Observer.send :include, NoPeepingToms
end
require 'no_peeping_toms' if "test" == RAILS_ENV
2 changes: 2 additions & 0 deletions lib/no_peeping_toms.rb
Expand Up @@ -27,3 +27,5 @@ def with_observers(*observer_syms)
end
end
end

ActiveRecord::Observer.send :include, NoPeepingToms
52 changes: 52 additions & 0 deletions no_peeping_toms.gemspec
@@ -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

0 comments on commit 39a92d8

Please sign in to comment.