summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelano <delano@solutious.com>2009-06-19 08:33:54 -0400
committerdelano <delano@solutious.com>2009-06-19 08:33:54 -0400
commitb6c9c79286f744113324135e7ab87cc4daff95fe (patch)
tree1feb19f38dca139375409b5c782226aeb6fb1f13
parent588947682890a2c8559525f4c89d821b0ed730a3 (diff)
downloadnet-ssh-b6c9c79286f744113324135e7ab87cc4daff95fe.tar.gz
Added Rakefile and gemspecv2.0.12
-rw-r--r--Manifest18
-rw-r--r--Rakefile87
-rw-r--r--net-ssh.gemspec128
3 files changed, 207 insertions, 26 deletions
diff --git a/Manifest b/Manifest
index 2e9d4a7..01d5044 100644
--- a/Manifest
+++ b/Manifest
@@ -1,4 +1,9 @@
CHANGELOG.rdoc
+Manifest
+README.rdoc
+Rakefile
+THANKS.rdoc
+lib/net/ssh.rb
lib/net/ssh/authentication/agent.rb
lib/net/ssh/authentication/constants.rb
lib/net/ssh/authentication/key_manager.rb
@@ -28,6 +33,7 @@ lib/net/ssh/proxy/socks4.rb
lib/net/ssh/proxy/socks5.rb
lib/net/ssh/ruby_compat.rb
lib/net/ssh/service/forward.rb
+lib/net/ssh/test.rb
lib/net/ssh/test/channel.rb
lib/net/ssh/test/extensions.rb
lib/net/ssh/test/kex.rb
@@ -36,21 +42,20 @@ lib/net/ssh/test/packet.rb
lib/net/ssh/test/remote_packet.rb
lib/net/ssh/test/script.rb
lib/net/ssh/test/socket.rb
-lib/net/ssh/test.rb
lib/net/ssh/transport/algorithms.rb
lib/net/ssh/transport/cipher_factory.rb
lib/net/ssh/transport/constants.rb
+lib/net/ssh/transport/hmac.rb
lib/net/ssh/transport/hmac/abstract.rb
lib/net/ssh/transport/hmac/md5.rb
lib/net/ssh/transport/hmac/md5_96.rb
lib/net/ssh/transport/hmac/none.rb
lib/net/ssh/transport/hmac/sha1.rb
lib/net/ssh/transport/hmac/sha1_96.rb
-lib/net/ssh/transport/hmac.rb
lib/net/ssh/transport/identity_cipher.rb
+lib/net/ssh/transport/kex.rb
lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
-lib/net/ssh/transport/kex.rb
lib/net/ssh/transport/openssl.rb
lib/net/ssh/transport/packet_stream.rb
lib/net/ssh/transport/server_version.rb
@@ -60,11 +65,7 @@ lib/net/ssh/verifiers/lenient.rb
lib/net/ssh/verifiers/null.rb
lib/net/ssh/verifiers/strict.rb
lib/net/ssh/version.rb
-lib/net/ssh.rb
-Manifest
net-ssh.gemspec
-Rakefile
-README.rdoc
setup.rb
test/authentication/methods/common.rb
test/authentication/methods/test_abstract.rb
@@ -100,5 +101,4 @@ test/transport/test_identity_cipher.rb
test/transport/test_packet_stream.rb
test/transport/test_server_version.rb
test/transport/test_session.rb
-test/transport/test_state.rb
-THANKS.rdoc
+test/transport/test_state.rb \ No newline at end of file
diff --git a/Rakefile b/Rakefile
index 054d49c..e329055 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,26 +1,79 @@
-require './lib/net/ssh/version'
+require 'rubygems'
+require 'rake/clean'
+require 'rake/gempackagetask'
+require 'hanna/rdoctask'
+require 'fileutils'
+include FileUtils
+
+task :default => :package
+
+# CONFIG =============================================================
-begin
- require 'echoe'
-rescue LoadError
- abort "You'll need to have `echoe' installed to use Net::SSH's Rakefile"
+# Change the following according to your needs
+README = "README.rdoc"
+CHANGES = "CHANGELOG.rdoc"
+THANKS = 'THANKS.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 =============================================================
+
+Rake::GemPackageTask.new(@spec) do |p|
+ p.need_tar = true if RUBY_PLATFORM !~ /mswin/
+end
+
+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
-version = Net::SSH::Version::STRING.dup
-if ENV['SNAPSHOT'].to_i == 1
- version << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
+
+# RUBYFORGE RELEASE / PUBLISH TASKS ==================================
+
+if @spec.rubyforge_project
+ desc 'Publish website to rubyforge'
+ task 'publish:rdoc' => 'doc/index.html' do
+ sh "scp -rp doc/* rubyforge.org:/var/www/gforge-projects/#{name}/"
+ 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
+ end
end
-Echoe.new('net-ssh', version) do |p|
- p.changelog = "CHANGELOG.rdoc"
- p.author = "Jamis Buck"
- p.email = "jamis@jamisbuck.org"
- p.summary = "a pure-Ruby implementation of the SSH2 client protocol"
- p.url = "http://net-ssh.rubyforge.org/ssh"
- p.need_zip = true
- p.include_rakefile = true
+# RUBY DOCS TASK ==================================
- p.rdoc_pattern = /^(lib|README.rdoc|CHANGELOG.rdoc|THANKS.rdoc)/
+Rake::RDocTask.new do |t|
+ t.rdoc_dir = 'doc'
+ t.title = @spec.summary
+ t.options << '--line-numbers' << '-A cattr_accessor=object'
+ t.options << '--charset' << 'utf-8'
+ t.rdoc_files.include(README)
+ t.rdoc_files.include(CHANGES)
+ t.rdoc_files.include(THANKS)
+ t.rdoc_files.include('lib/**/*.rb')
end
+
diff --git a/net-ssh.gemspec b/net-ssh.gemspec
new file mode 100644
index 0000000..42e0556
--- /dev/null
+++ b/net-ssh.gemspec
@@ -0,0 +1,128 @@
+@spec = Gem::Specification.new do |s|
+ s.name = "net-ssh"
+ s.rubyforge_project = 'net-ssh'
+ s.version = "2.0.12"
+ s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
+ s.description = s.summary
+ s.author = "Jamis Buck"
+ s.email = "net-ssh@solutious.com"
+ s.homepage = "http://github.com/net-ssh/net-ssh"
+
+ s.extra_rdoc_files = %w[README.rdoc THANKS.rdoc CHANGELOG.rdoc]
+ s.has_rdoc = true
+ s.rdoc_options = ["--line-numbers", "--title", s.summary, "--main", "README.rdoc"]
+ s.require_paths = %w[lib]
+ s.rubygems_version = '1.1.1'
+
+ s.executables = %w[]
+
+ # = MANIFEST =
+ s.files = %w(
+ CHANGELOG.rdoc
+ Manifest
+ README.rdoc
+ Rakefile
+ THANKS.rdoc
+ lib/net/ssh.rb
+ lib/net/ssh/authentication/agent.rb
+ lib/net/ssh/authentication/constants.rb
+ lib/net/ssh/authentication/key_manager.rb
+ lib/net/ssh/authentication/methods/abstract.rb
+ lib/net/ssh/authentication/methods/hostbased.rb
+ lib/net/ssh/authentication/methods/keyboard_interactive.rb
+ lib/net/ssh/authentication/methods/password.rb
+ lib/net/ssh/authentication/methods/publickey.rb
+ lib/net/ssh/authentication/pageant.rb
+ lib/net/ssh/authentication/session.rb
+ lib/net/ssh/buffer.rb
+ lib/net/ssh/buffered_io.rb
+ lib/net/ssh/config.rb
+ lib/net/ssh/connection/channel.rb
+ lib/net/ssh/connection/constants.rb
+ lib/net/ssh/connection/session.rb
+ lib/net/ssh/connection/term.rb
+ lib/net/ssh/errors.rb
+ lib/net/ssh/key_factory.rb
+ lib/net/ssh/known_hosts.rb
+ lib/net/ssh/loggable.rb
+ lib/net/ssh/packet.rb
+ lib/net/ssh/prompt.rb
+ lib/net/ssh/proxy/errors.rb
+ lib/net/ssh/proxy/http.rb
+ lib/net/ssh/proxy/socks4.rb
+ lib/net/ssh/proxy/socks5.rb
+ lib/net/ssh/ruby_compat.rb
+ lib/net/ssh/service/forward.rb
+ lib/net/ssh/test.rb
+ lib/net/ssh/test/channel.rb
+ lib/net/ssh/test/extensions.rb
+ lib/net/ssh/test/kex.rb
+ lib/net/ssh/test/local_packet.rb
+ lib/net/ssh/test/packet.rb
+ lib/net/ssh/test/remote_packet.rb
+ lib/net/ssh/test/script.rb
+ lib/net/ssh/test/socket.rb
+ lib/net/ssh/transport/algorithms.rb
+ lib/net/ssh/transport/cipher_factory.rb
+ lib/net/ssh/transport/constants.rb
+ lib/net/ssh/transport/hmac.rb
+ lib/net/ssh/transport/hmac/abstract.rb
+ lib/net/ssh/transport/hmac/md5.rb
+ lib/net/ssh/transport/hmac/md5_96.rb
+ lib/net/ssh/transport/hmac/none.rb
+ lib/net/ssh/transport/hmac/sha1.rb
+ lib/net/ssh/transport/hmac/sha1_96.rb
+ lib/net/ssh/transport/identity_cipher.rb
+ lib/net/ssh/transport/kex.rb
+ lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
+ lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
+ lib/net/ssh/transport/openssl.rb
+ lib/net/ssh/transport/packet_stream.rb
+ lib/net/ssh/transport/server_version.rb
+ lib/net/ssh/transport/session.rb
+ lib/net/ssh/transport/state.rb
+ lib/net/ssh/verifiers/lenient.rb
+ lib/net/ssh/verifiers/null.rb
+ lib/net/ssh/verifiers/strict.rb
+ lib/net/ssh/version.rb
+ net-ssh.gemspec
+ setup.rb
+ test/authentication/methods/common.rb
+ test/authentication/methods/test_abstract.rb
+ test/authentication/methods/test_hostbased.rb
+ test/authentication/methods/test_keyboard_interactive.rb
+ test/authentication/methods/test_password.rb
+ test/authentication/methods/test_publickey.rb
+ test/authentication/test_agent.rb
+ test/authentication/test_key_manager.rb
+ test/authentication/test_session.rb
+ test/common.rb
+ test/configs/eqsign
+ test/configs/exact_match
+ test/configs/wild_cards
+ test/connection/test_channel.rb
+ test/connection/test_session.rb
+ test/test_all.rb
+ test/test_buffer.rb
+ test/test_buffered_io.rb
+ test/test_config.rb
+ test/test_key_factory.rb
+ test/transport/hmac/test_md5.rb
+ test/transport/hmac/test_md5_96.rb
+ test/transport/hmac/test_none.rb
+ test/transport/hmac/test_sha1.rb
+ test/transport/hmac/test_sha1_96.rb
+ test/transport/kex/test_diffie_hellman_group1_sha1.rb
+ test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb
+ test/transport/test_algorithms.rb
+ test/transport/test_cipher_factory.rb
+ test/transport/test_hmac.rb
+ test/transport/test_identity_cipher.rb
+ test/transport/test_packet_stream.rb
+ test/transport/test_server_version.rb
+ test/transport/test_session.rb
+ test/transport/test_state.rb
+ )
+
+
+end