Permalink
Browse files

firing up a gem with gem this

  • Loading branch information...
1 parent cf6dfb1 commit dd5910f8b08c9facf2be6ca0f7c2ef824d69fb08 @qrush qrush committed Oct 12, 2010
Showing with 76 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +34 −0 Rakefile
  3. +40 −0 paul_revere.gemspec
View
@@ -2,3 +2,5 @@
.swo
*~
log/
+pkg
+rdoc
View
@@ -1,6 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
+require "rake/gempackagetask"
desc 'Default: run unit tests.'
task :default => :test
@@ -21,3 +22,36 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
+
+spec = Gem::Specification.new do |s|
+ s.name = "paul_revere"
+ s.version = "0.1.0"
+ s.summary = "Simple announcement plugin to include 'one off' style announcements in Rails web apps."
+ s.author = "Thoughtbot"
+ s.email = "support@thoughtbot.com"
+ s.homepage = "http://thoughtbot.com/community"
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = %w(README.textile)
+ s.rdoc_options = %w(--main README.textile)
+
+ s.files = %w(init.rb install.rb MIT-LICENSE Rakefile README.textile uninstall.rb) + Dir.glob("{test,lib/**/*}")
+ s.require_paths = ["lib"]
+
+ s.add_dependency("rails", "~> 3.0.0")
+ s.add_development_dependency("bourne")
+ s.add_development_dependency("shoulda")
+ s.add_development_dependency("redgreen")
+end
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+desc "Build the gemspec file #{spec.name}.gemspec"
+task :gemspec do
+ file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
+ File.open(file, "w") {|f| f << spec.to_ruby }
+end
+
+task :package => :gemspec
View
@@ -0,0 +1,40 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{paul_revere}
+ s.version = "0.1.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Thoughtbot"]
+ s.date = %q{2010-10-12}
+ s.email = %q{support@thoughtbot.com}
+ s.extra_rdoc_files = ["README.textile"]
+ s.files = ["init.rb", "install.rb", "MIT-LICENSE", "Rakefile", "README.textile", "uninstall.rb", "lib/paul_revere.rb"]
+ s.homepage = %q{http://thoughtbot.com/community}
+ s.rdoc_options = ["--main", "README.textile"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{Simple announcement plugin to include 'one off' style announcements in Rails web apps.}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
+ s.add_development_dependency(%q<bourne>, [">= 0"])
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
+ s.add_development_dependency(%q<redgreen>, [">= 0"])
+ else
+ s.add_dependency(%q<rails>, ["~> 3.0.0"])
+ s.add_dependency(%q<bourne>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<redgreen>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<rails>, ["~> 3.0.0"])
+ s.add_dependency(%q<bourne>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<redgreen>, [">= 0"])
+ end
+end

0 comments on commit dd5910f

Please sign in to comment.