Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding better gem management tools to Raketask

  • Loading branch information...
commit eecb0a346829e83c4895b0834308f492116b70ab 1 parent 6d9be1c
@railsjedi authored
Showing with 24 additions and 13 deletions.
  1. +3 −1 Gemfile
  2. +3 −1 Gemfile.lock
  3. +17 −10 Rakefile
  4. +1 −1  jammit-s3.gemspec
View
4 Gemfile
@@ -1,6 +1,8 @@
source :rubygems
gemspec
+gem "rake"
+
gem "rspec", ">= 2.0.0.beta"
-gem "ruby-debug"
+gem "ruby-debug"
View
4 Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- jammit-s3 (0.5.3.0)
+ jammit-s3 (0.5.3.1)
jammit (>= 0.5.3)
mimemagic (>= 0.1.7)
s3 (>= 0.3.4)
@@ -18,6 +18,7 @@ GEM
linecache (0.43)
mimemagic (0.1.7)
proxies (0.2.1)
+ rake (0.8.7)
rspec (2.0.0.beta.22)
rspec-core (= 2.0.0.beta.22)
rspec-expectations (= 2.0.0.beta.22)
@@ -44,6 +45,7 @@ DEPENDENCIES
jammit (>= 0.5.3)
jammit-s3!
mimemagic (>= 0.1.7)
+ rake
rspec (>= 2.0.0.beta)
ruby-debug
s3 (>= 0.3.4)
View
27 Rakefile
@@ -1,15 +1,22 @@
-require 'rake/testtask'
+require 'rubygems'
-task :gem => "gem:build"
-
-
-namespace :gem do
- desc "Build the jammit gem"
- task :build do
- sh "mkdir -p pkg"
- sh "gem build jammit-s3.gemspec"
- end
+require "bundler"
+Bundler.setup
+require 'rake'
+require 'rake/gempackagetask'
+gemspec = eval(File.read('jammit-s3.gemspec'))
+Rake::GemPackageTask.new(gemspec) do |pkg|
+ pkg.gem_spec = gemspec
end
+desc "build the gem and release it to rubygems.org"
+task :release => :gem do
+ puts "Tagging #{gemspec.version}..."
+ system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
+ puts "Pushing to Github..."
+ system "git push --tags"
+ puts "Pushing to rubygems.org..."
+ system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
+end
View
2  jammit-s3.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'jammit-s3'
- s.version = '0.5.3.0'
+ s.version = '0.5.3.1'
s.homepage = "http://documentcloud.github.com/jammit/"
s.summary = "Asset Packaging for Rails with Deployment to S3/Cloudfront"
Please sign in to comment.
Something went wrong with that request. Please try again.