Permalink
Browse files

updated to using jeweler for packaging my gem

  • Loading branch information...
1 parent d1bb1ab commit ca883b5ffd02cd36351130538947e361d7b37430 @nesquena committed Feb 3, 2009
Showing with 84 additions and 51 deletions.
  1. +20 −0 LICENSE
  2. +35 −40 Rakefile
  3. +4 −0 VERSION.yml
  4. +8 −6 cap-recipes.gemspec
  5. +0 −5 spec/cap-recipes-spec.rb
  6. +7 −0 test/cap_recipes_test.rb
  7. +10 −0 test/test_helper.rb
View
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2008 Nathan Esquenazi
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,48 +1,43 @@
-require 'rubygems'
-require 'rubygems/specification'
require 'rake'
-require 'rake/gempackagetask'
-require 'spec/rake/spectask'
-
-GEM = "cap-recipes"
-GEM_VERSION = "0.2.8"
-SUMMARY = "Collection of capistrano recipes for apache, passenger, memcache, juggernaut and backgroundrb"
-AUTHOR = "Nathan Esquenazi"
-EMAIL = "nesquena@gmail.com"
-HOMEPAGE = "http://caprecipes.rubyforge.org"
+require 'rake/testtask'
+require 'rake/rdoctask'
-spec = Gem::Specification.new do |s|
- s.name = GEM
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.summary = SUMMARY
- s.require_paths = ['lib']
- s.files = FileList['[A-Z]*', 'lib/**/*.rb', 'spec/**/*'].to_a
-
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- s.rubyforge_project = GEM # GitHub bug, gem isn't being build when this miss
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = "cap-recipes"
+ s.summary = %Q{Battle-tested capistrano recipes for passenger, apache, and more}
+ s.email = "nesquena@gmail.com"
+ s.homepage = "http://github.com/nesquena/cap-recipes"
+ s.description = "Battle-tested capistrano recipes for passenger, apache, and more"
+ s.authors = ["Nathan Esquenazi"]
+ end
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
-Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = %w(-fs --color)
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
+Rake::TestTask.new do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = false
end
-
-desc "Install the gem locally"
-task :install => [:package] do
- sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
+
+Rake::RDocTask.new do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'cap-recipes'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end
-
-desc "Create a gemspec file"
-task :make_spec do
- File.open("#{GEM}.gemspec", "w") do |file|
- file.puts spec.to_ruby
+
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |t|
+ t.libs << 'test'
+ t.test_files = FileList['test/**/*_test.rb']
+ t.verbose = true
end
+rescue LoadError
end
+
+task :default => :test
View
@@ -0,0 +1,4 @@
+---
+:major: 0
+:minor: 2
+:patch: 9
View
@@ -2,18 +2,20 @@
Gem::Specification.new do |s|
s.name = %q{cap-recipes}
- s.version = "0.2.8"
+ s.version = "0.2.9"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nathan Esquenazi"]
- s.date = %q{2009-01-25}
+ s.date = %q{2009-02-03}
+ s.description = %q{Battle-tested capistrano recipes for passenger, apache, and more}
s.email = %q{nesquena@gmail.com}
- s.files = ["Rakefile", "README.textile", "lib/cap_recipes/tasks/apache.rb", "lib/cap_recipes/tasks/backgroundrb.rb", "lib/cap_recipes/tasks/juggernaut.rb", "lib/cap_recipes/tasks/memcache.rb", "lib/cap_recipes/tasks/passenger.rb", "lib/cap_recipes/tasks/with_scope.rb", "lib/cap_recipes.rb", "spec/cap-recipes-spec.rb"]
- s.homepage = %q{http://caprecipes.rubyforge.org}
+ s.files = ["README.textile", "VERSION.yml", "lib/cap_recipes", "lib/cap_recipes/tasks", "lib/cap_recipes/tasks/apache.rb", "lib/cap_recipes/tasks/backgroundrb.rb", "lib/cap_recipes/tasks/juggernaut.rb", "lib/cap_recipes/tasks/memcache.rb", "lib/cap_recipes/tasks/passenger.rb", "lib/cap_recipes/tasks/with_scope.rb", "lib/cap_recipes.rb", "test/cap_recipes_test.rb", "test/test_helper.rb"]
+ s.has_rdoc = true
+ s.homepage = %q{http://github.com/nesquena/cap-recipes}
+ s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubyforge_project = %q{cap-recipes}
s.rubygems_version = %q{1.3.1}
- s.summary = %q{Collection of capistrano recipes for apache, passenger, memcache, juggernaut and backgroundrb}
+ s.summary = %q{Battle-tested capistrano recipes for passenger, apache, and more}
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
View
@@ -1,5 +0,0 @@
-describe "Cap recipes" do
- it "should have real tests eventually" do
- true.should eql(true)
- end
-end
View
@@ -0,0 +1,7 @@
+require File.dirname(__FILE__) + '/test_helper'
+
+class CapRecipesTest < Test::Unit::TestCase
+ should "probably rename this file and start testing for real" do
+ flunk "hey buddy, you should probably rename this file and start testing for real"
+ end
+end
View
@@ -0,0 +1,10 @@
+require 'rubygems'
+require 'test/unit'
+require 'shoulda'
+require 'mocha'
+
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'cap_recipes'
+
+class Test::Unit::TestCase
+end

0 comments on commit ca883b5

Please sign in to comment.