Permalink
Browse files

Monolithic commit of shame

  • Loading branch information...
catsby committed Apr 18, 2011
1 parent 5882d03 commit e8df65a41ca41e803cae2addc2cb986187da5abc
Showing with 29 additions and 24 deletions.
  1. +2 −0 .gitignore
  2. +2 −1 Gemfile
  3. +6 −2 Gemfile.lock
  4. +16 −16 features/gt_scp_file.feature
  5. +1 −2 features/step_definitions/gt_scp_steps.rb
  6. +2 −3 features/support/env.rb
@@ -3,3 +3,5 @@ test/dest
pkg/
*.swp
*~
*.rbc
*.rvmrc
@@ -9,9 +9,10 @@ group :development do
gem "shoulda", ">= 0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.5.1"
gem "rcov", ">= 0"
gem "ruby-growl", ">=3.0"
gem "net-scp", ">=1.0.4"
gem "cucumber"
gem "simplecov", :require => false, :group => :test
gem "rspec"
gem "highline"
end
@@ -12,6 +12,7 @@ GEM
gherkin (2.3.5)
json (>= 1.4.6)
git (1.2.5)
highline (1.6.1)
jeweler (1.5.1)
bundler (~> 1.0.0)
git (>= 1.2.5)
@@ -21,7 +22,6 @@ GEM
net-ssh (>= 1.99.1)
net-ssh (2.0.23)
rake (0.8.7)
rcov (0.9.9)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
@@ -32,6 +32,9 @@ GEM
rspec-mocks (2.5.0)
ruby-growl (3.0)
shoulda (2.11.3)
simplecov (0.4.2)
simplecov-html (~> 0.4.4)
simplecov-html (0.4.4)
term-ansicolor (1.0.5)

PLATFORMS
@@ -40,9 +43,10 @@ PLATFORMS
DEPENDENCIES
bundler (~> 1.0.0)
cucumber
highline
jeweler (~> 1.5.1)
net-scp (>= 1.0.4)
rcov
rspec
ruby-growl (>= 3.0)
shoulda
simplecov
@@ -6,22 +6,22 @@ Feature: growl-down downloads a file via scp
So that I can do other things in the meantime
And not have to watch or check the progress

# Scenario: Download file assuming ssh keyless authentication
# Given I have ssh keyless auth setup on "ctshryock.com"
# And specify "growl-down-test/unicorns.zip" as the file name
# When I run "download"
# Then TEST_DIR should contain "unicorns.zip" file
#
# Scenario: Download file assuming ssh keyless auth, but specify a username
# Given I have ssh keyless auth setup on "ctshryock.com"
# And I specify "clint" as the username before the url
# And specify "growl-down-test/unicorns.zip" as the file name
# When I run "download"
# Then TEST_DIR should contain "unicorns.zip" file
Scenario: Download file assuming ssh keyless authentication
Given I have ssh keyless auth setup on "ctshryock.com"
And specify "growl-down-test/unicorns.zip" as the file name
When I run "download"
Then TEST_DIR should contain "unicorns.zip" file

Scenario: Download file assuming password based auth
Given I have a valid password setup on "clint@ctshryock.com"
And I specify the "-p" option
Scenario: Download file assuming ssh keyless auth, but specify a username
Given I have ssh keyless auth setup on "ctshryock.com"
And I specify "clint" as the username before the url
And specify "growl-down-test/unicorns.zip" as the file name
When I run "download"
Then TEST_DIR should contain "unicorns.zip" file
Then TEST_DIR should contain "unicorns.zip" file

# Scenario: Download file assuming password based auth
# Given I have a valid password setup on "clint@ctshryock.com"
# And I specify the "-p" option
# And specify "growl-down-test/unicorns.zip" as the file name
# When I run "download"
# Then TEST_DIR should contain "unicorns.zip" file
@@ -56,7 +56,6 @@ def output
When /^I run "([^"]*)"$/ do |action|
@options[:from] = @remote.join(':')
@options[:to] = TEST_DIR
puts @options[:from]
run_gt(@options)
end

@@ -66,4 +65,4 @@ def output

Then /^TEST_DIR should contain "([^"]*)" file$/ do |arg1|
(File.file?([TEST_DIR, arg1].join('/'))).should == true
end
end
@@ -10,7 +10,6 @@ def run_gt(opts = {})
command = GT_PATH + ' '
command << opts[:password_flag] + ' ' unless opts[:password_flag].nil?
command << opts[:from] + ' ' + opts[:to]
# command << " >> /dev/null 2>&1" if opts[:debug].nil?
# pp command
command << " >> /dev/null 2>&1" if opts[:debug].nil?
system command
end
end

0 comments on commit e8df65a

Please sign in to comment.