From 87cd4da19a1d59a2fe285155d8c2cd62932c60e9 Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Wed, 30 Mar 2011 18:36:16 +0100 Subject: [PATCH] Use gemspec/Gemfile setup recommended by Bundler --- Gemfile | 19 ++--------- Rakefile | 25 ++------------ capistrano.gemspec | 82 ++++++++++------------------------------------ 3 files changed, 24 insertions(+), 102 deletions(-) diff --git a/Gemfile b/Gemfile index 496665a8..a76ebe6d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,17 +1,4 @@ -# -# This is the gemfile for local development -# these are the requirements for running -# the test suite. -# +source "http://rubygems.org" -source :gemcutter - -gem 'net-ssh' -gem 'net-ssh-gateway' -gem 'net-sftp' -gem 'net-scp' -gem 'highline' - -group :test do - gem "mocha" -end +# Specify your gem's dependencies in capistrano.gemspec +gemspec diff --git a/Rakefile b/Rakefile index be59754f..cf815c3b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,6 @@ +require 'bundler' +Bundler::GemHelper.install_tasks + require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' @@ -6,25 +9,3 @@ Rake::TestTask.new(:test) do |test| end task :default => :test - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.version - gem.name = "capistrano" - gem.executables = %W(capify cap) - gem.summary = %Q{Capistrano - Welcome to easy deployment with Ruby over SSH} - gem.description = %Q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.} - gem.homepage = "http://github.com/capistrano/capistrano" - gem.email = [ "jamis@jamisbuck.org", "lee.hambley@gmail.com" ] - gem.authors = [ "Jamis Buck", "Lee Hambley" ] - gem.add_dependency "net-ssh", ">=2.0.14" - gem.add_dependency "net-sftp", ">=2.0.0" - gem.add_dependency "net-scp", ">=1.0.0" - gem.add_dependency "net-ssh-gateway", ">=1.0.0" - gem.add_dependency "highline" - gem.add_development_dependency "mocha", ">= 0" - end -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" -end \ No newline at end of file diff --git a/capistrano.gemspec b/capistrano.gemspec index 70da05fa..429ee468 100644 --- a/capistrano.gemspec +++ b/capistrano.gemspec @@ -1,72 +1,27 @@ -# encoding: utf-8 +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +require "capistrano/version" Gem::Specification.new do |s| - s.name = %q{capistrano} - s.version = "2.5.20" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Jamis Buck", "Lee Hambley"] - s.date = %q{2011-03-22} + s.name = "capistrano" + s.version = Capistrano::Version.to_s + s.platform = Gem::Platform::RUBY + s.authors = ["Jamis Buck", "Lee Hambley"] + s.email = ["jamis@jamisbuck.org", "lee.hambley@gmail.com"] + s.homepage = "http://github.com/capistrano/capistrano" + s.summary = %q{Capistrano - Welcome to easy deployment with Ruby over SSH} s.description = %q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.} - s.email = ["jamis@jamisbuck.org", "lee.hambley@gmail.com"] - s.executables = ["capify", "cap"] + s.date = %q{2011-03-22} + + s.rubyforge_project = "testgem" + + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + s.require_paths = ["lib"] s.extra_rdoc_files = [ "README.mdown" ] - s.files = [ - "CHANGELOG", - "Gemfile", - "README.mdown", - "Rakefile", - "VERSION", - ] + Dir.glob('bin/*') + Dir.glob('lib/**/*.rb') - s.homepage = %q{http://github.com/capistrano/capistrano} - s.require_paths = ["lib"] - s.rubygems_version = %q{1.5.3} - s.summary = %q{Capistrano - Welcome to easy deployment with Ruby over SSH} - s.test_files = [ - "test/cli/execute_test.rb", - "test/cli/help_test.rb", - "test/cli/options_test.rb", - "test/cli/ui_test.rb", - "test/cli_test.rb", - "test/command_test.rb", - "test/configuration/actions/file_transfer_test.rb", - "test/configuration/actions/inspect_test.rb", - "test/configuration/actions/invocation_test.rb", - "test/configuration/callbacks_test.rb", - "test/configuration/connections_test.rb", - "test/configuration/execution_test.rb", - "test/configuration/loading_test.rb", - "test/configuration/namespace_dsl_test.rb", - "test/configuration/roles_test.rb", - "test/configuration/servers_test.rb", - "test/configuration/variables_test.rb", - "test/configuration_test.rb", - "test/deploy/local_dependency_test.rb", - "test/deploy/remote_dependency_test.rb", - "test/deploy/scm/accurev_test.rb", - "test/deploy/scm/base_test.rb", - "test/deploy/scm/bzr_test.rb", - "test/deploy/scm/darcs_test.rb", - "test/deploy/scm/git_test.rb", - "test/deploy/scm/mercurial_test.rb", - "test/deploy/scm/none_test.rb", - "test/deploy/scm/subversion_test.rb", - "test/deploy/strategy/copy_test.rb", - "test/extensions_test.rb", - "test/fixtures/cli_integration.rb", - "test/fixtures/config.rb", - "test/fixtures/custom.rb", - "test/logger_test.rb", - "test/role_test.rb", - "test/server_definition_test.rb", - "test/shell_test.rb", - "test/ssh_test.rb", - "test/task_definition_test.rb", - "test/transfer_test.rb", - "test/utils.rb" - ] if s.respond_to? :specification_version then s.specification_version = 3 @@ -94,4 +49,3 @@ Gem::Specification.new do |s| s.add_dependency(%q, [">= 0"]) end end -