Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Release gems via rake-gemcutter instead of rubyforge

  • Loading branch information...
commit 9ebc958d37137944f92ccdc772b8ea8366e4359d 1 parent 51653a3
Aaron Pfeifer obrie authored

Showing 2 changed files with 8 additions and 13 deletions. Show diff stats Hide diff stats

  1. +1 0  CHANGELOG.rdoc
  2. +7 13 Rakefile
1  CHANGELOG.rdoc
Source Rendered
... ... @@ -1,5 +1,6 @@
1 1 == master
2 2
  3 +* Release gems via rake-gemcutter instead of rubyforge
3 4 * Add a generator for db migration to make installation a bit easier [Tim Lowrimore]
4 5 * Add named scopes: #with_preferences and #without_preferences
5 6
20 Rakefile
... ... @@ -1,7 +1,8 @@
  1 +require 'rubygems'
  2 +require 'rake'
1 3 require 'rake/testtask'
2 4 require 'rake/rdoctask'
3 5 require 'rake/gempackagetask'
4   -require 'rake/contrib/sshpublisher'
5 6
6 7 spec = Gem::Specification.new do |s|
7 8 s.name = 'preferences'
@@ -63,17 +64,17 @@ end
63 64
64 65 Rake::GemPackageTask.new(spec) do |p|
65 66 p.gem_spec = spec
66   - p.need_tar = true
67   - p.need_zip = true
68 67 end
69 68
70 69 desc 'Publish the beta gem.'
71 70 task :pgem => [:package] do
  71 + require 'rake/contrib/sshpublisher'
72 72 Rake::SshFilePublisher.new('aaron@pluginaweek.org', '/home/aaron/gems.pluginaweek.org/public/gems', 'pkg', "#{spec.name}-#{spec.version}.gem").upload
73 73 end
74 74
75 75 desc 'Publish the API documentation.'
76 76 task :pdoc => [:rdoc] do
  77 + require 'rake/contrib/sshpublisher'
77 78 Rake::SshDirPublisher.new('aaron@pluginaweek.org', "/home/aaron/api.pluginaweek.org/public/#{spec.name}", 'rdoc').upload
78 79 end
79 80
@@ -82,15 +83,8 @@ task :publish => [:pgem, :pdoc, :release]
82 83
83 84 desc 'Publish the release files to RubyForge.'
84 85 task :release => [:gem, :package] do
85   - require 'rubyforge'
  86 + require 'rake/gemcutter'
86 87
87   - ruby_forge = RubyForge.new.configure
88   - ruby_forge.login
89   -
90   - %w(gem tgz zip).each do |ext|
91   - file = "pkg/#{spec.name}-#{spec.version}.#{ext}"
92   - puts "Releasing #{File.basename(file)}..."
93   -
94   - ruby_forge.add_release(spec.rubyforge_project, spec.name, spec.version, file)
95   - end
  88 + Rake::Gemcutter::Tasks.new(spec).define
  89 + Rake::Task['gem:push'].invoke
96 90 end

0 comments on commit 9ebc958

Please sign in to comment.
Something went wrong with that request. Please try again.