rakefile in ezcrypto-0.3 vs rakefile in ezcrypto-0.5
- old
+ new
@@ -6,11 +6,11 @@
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'ezcrypto'
-PKG_VERSION = '0.3' + PKG_BUILD
+PKG_VERSION = '0.5' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
RUBY_FORGE_PROJECT = "ezcrypto"
@@ -57,34 +57,35 @@
s.has_rdoc = true
s.requirements << 'none'
s.require_path = 'lib'
s.files = [ "rakefile", "README", "README_ACTIVE_CRYPTO", "MIT-LICENSE","CHANGELOG","init.rb" ]
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "CVS" )||item.include?("\.DS_Store")||item.include?("/\._") }
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "CVS" )||item.include?("\.DS_Store")||item.include?("/\._") }
+ ["lib","test"].each do |dir|
+ s.files = s.files + Dir.glob( "#{dir}/*" )
+ end
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_tar = true
p.need_zip = true
end
-desc "Publish the API documentation"
+desc "Publish the GEM"
task :pgem => [:package] do
Rake::SshFilePublisher.new("pelleb@rubyforge.org", "/var/www/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
Rake::SshDirPublisher.new("pelleb@rubyforge.org", "/var/www/gforge-projects/ezcrypto", "doc").upload
end
desc "Publish the release files to RubyForge."
-task :release => [:package] do
- files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
+task :rubyforge_upload => :package do
+ files = %w(gem tgz zip).map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
if RUBY_FORGE_PROJECT then
require 'net/http'
require 'open-uri'
@@ -142,10 +143,10 @@
query_hash = if first_file then
{
"group_id" => group_id,
"package_id" => package_id,
- "release_name" => RELEASE_NAME,
+ "release_name" => PKG_FILE_NAME,
"release_date" => release_date,
"type_id" => type,
"processor_id" => "8000", # Any
"release_notes" => "",
"release_changes" => "",