summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelano <delano.mandelbaum@gmail.com>2013-02-06 05:45:16 -0800
committerdelano <delano.mandelbaum@gmail.com>2013-02-06 05:45:16 -0800
commitdc6e4172ab7080caae30687b3463367ea005551e (patch)
tree03f78dd724d8e35a97fbee2dc4b193d8e9f6ce76
parent799afd64415b8cf78909a6d4a73d3fe6e558eef0 (diff)
downloadnet-ssh-dc6e4172ab7080caae30687b3463367ea005551e.tar.gz
Updated Rakefile; Renamed some project files
-rw-r--r--CHANGES.txt (renamed from CHANGELOG.rdoc)0
-rw-r--r--LICENSE.txt (renamed from LICENSE.rdoc)0
-rw-r--r--Rakefile127
-rw-r--r--THANKS.txt (renamed from THANKS.rdoc)0
4 files changed, 49 insertions, 78 deletions
diff --git a/CHANGELOG.rdoc b/CHANGES.txt
index 797869e..797869e 100644
--- a/CHANGELOG.rdoc
+++ b/CHANGES.txt
diff --git a/LICENSE.rdoc b/LICENSE.txt
index 1ce3dc8..1ce3dc8 100644
--- a/LICENSE.rdoc
+++ b/LICENSE.txt
diff --git a/Rakefile b/Rakefile
index 90fc85b..cf001d1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,84 +1,55 @@
-require 'rubygems'
-require 'rubygems/package_task'
-require 'rake/clean'
-require 'fileutils'
-include FileUtils
-
-require 'rdoc/task'
-
-
-task :default => :package
-
-# CONFIG =============================================================
-
-# Change the following according to your needs
-README = "README.rdoc"
-CHANGES = "CHANGELOG.rdoc"
-THANKS = 'THANKS.rdoc'
-LICENSE = "LICENSE.rdoc"
-
-# Files and directories to be deleted when you run "rake clean"
-CLEAN.include [ 'pkg', '*.gem', '.config', 'doc']
-
-# Virginia assumes your project and gemspec have the same name
-name = 'net-ssh'
-load "#{name}.gemspec"
-version = @spec.version
-
-# That's it! The following defaults should allow you to get started
-# on other things.
-
-
-# TESTS/SPECS =========================================================
-
-
-
-# INSTALL =============================================================
-
-Gem::PackageTask.new(@spec) do |p|
- p.need_tar = true if RUBY_PLATFORM !~ /mswin/
-end
-
-task :build => [ :package ]
-task :release => [ :rdoc, :package ]
-task :install => [ :rdoc, :package ] do
- sh %{sudo gem install pkg/#{name}-#{version}.gem}
-end
-task :uninstall => [ :clean ] do
- sh %{sudo gem uninstall #{name}}
-end
-
+require "rubygems"
+require "rake"
+require "rake/clean"
+require "rdoc/task"
+
+task :default => ["build"]
+CLEAN.include [ 'pkg', 'rdoc' ]
+name = "net-ssh"
+
+$:.unshift File.join(File.dirname(__FILE__), 'lib')
+require name
+version = Net::SSH::VERSION.to_s
+
+begin
+ require "jeweler"
+ Jeweler::Tasks.new do |s|
+ s.version = version
+ s.name = name
+ s.rubyforge_project = s.name
+ s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
+ s.description = s.summary + " It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
+ s.email = "net-ssh@solutious.com"
+ s.homepage = "https://github.com/net-ssh/net-ssh"
+ s.authors = ["Jamis Buck", "Delano Mandelbaum"]
+
+ # Note: this is run at package time not install time so if you are
+ # running on jruby, you need to install jruby-pageant manually.
+ if RUBY_PLATFORM == "java"
+ s.add_dependency 'jruby-pageant', ">=1.1.1"
+ end
-# RUBYFORGE RELEASE / PUBLISH TASKS ==================================
+ s.add_development_dependency 'test-unit'
+ s.add_development_dependency 'mocha'
-if @spec.rubyforge_project
- desc 'Publish website to rubyforge'
- task 'publish:rdoc' => 'doc/index.html' do
- sh "scp -r doc/* rubyforge.org:/var/www/gforge-projects/#{name}/ssh/v2/api/"
- end
-
- desc 'Public release to rubyforge'
- task 'publish:gem' => [:package] do |t|
- sh <<-end
- rubyforge add_release -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.gem &&
- rubyforge add_file -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.tgz
- end
+ s.signing_key = File.join('/mnt/gem/', 'gem-private_key.pem')
+ s.cert_chain = ['gem-public_cert.pem']
end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
-
-
-# RUBY DOCS TASK ==================================
-
-RDoc::Task.new do |t|
- # this only works with RDoc 3.1 or greater
- t.generator = 'hanna' # gem install hanna-nouveau
- t.rdoc_dir = 'doc'
- t.title = @spec.summary
- t.main = README
- t.rdoc_files.include(README)
- t.rdoc_files.include(CHANGES)
- t.rdoc_files.include(THANKS)
- t.rdoc_files.include(LICENSE)
- t.rdoc_files.include('lib/**/*.rb')
+RDoc::Task.new do |rdoc|
+ rdoc.rdoc_dir = "rdoc"
+ rdoc.title = "#{name} #{version}"
+ rdoc.generator = 'hanna' # gem install hanna-nouveau
+ rdoc.main = 'README.rdoc'
+ rdoc.rdoc_files.include("README*")
+ rdoc.rdoc_files.include("LICENSE.txt")
+ rdoc.rdoc_files.include("THANKS.txt")
+ rdoc.rdoc_files.include("CHANGES.txt")
+ rdoc.rdoc_files.include("bin/*.rb")
+ rdoc.rdoc_files.include("lib/**/*.rb")
end
+
diff --git a/THANKS.rdoc b/THANKS.txt
index 10ccb41..10ccb41 100644
--- a/THANKS.rdoc
+++ b/THANKS.txt