screwcap 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -1,4 +1,3 @@
1
- .bundle/config
2
1
  Gemfile
3
2
  Gemfile.lock
4
3
  History.txt
@@ -31,7 +30,6 @@ test/config/expect.rb
31
30
  test/config/gateway.rb
32
31
  test/config/no_server.rb
33
32
  test/config/rails_tasks.rb
34
- test/config/real_world_recipe.rb
35
33
  test/config/simple_recipe.rb
36
34
  test/config/undefined_command_set.rb
37
35
  test/config/undefined_item.rb
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Hoe.plugin :newgem
11
11
  # Generate all the Rake tasks
12
12
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
13
  $hoe = Hoe.spec 'screwcap' do
14
- self.version = '0.3.1'
14
+ self.version = '0.3.2'
15
15
  self.developer 'Grant Ammons', 'grant@pipelinedeals.com'
16
16
  self.rubyforge_name = self.name # TODO this is default value
17
17
  self.extra_deps = [['net-ssh','>= 2.0.23'],['net-ssh-gateway','>=1.0.1'], ['net-scp','>=1.0.4']]
data/bin/screwcap CHANGED
@@ -10,8 +10,12 @@ p = Trollop::Parser.new do
10
10
  opt :nocolor, "Do not color output"
11
11
  opt :debug, "Turn on debugger. Will print full stacktrace if an exeception was raised"
12
12
  opt :help, "Show this message"
13
+ opt :tasks, "Display available tasks in recipe file"
14
+ version <<-EOF
15
+ Screwcap #{Screwcap::VERSION} by Grant Ammons (grant@pipelinedeals.com)
16
+ More info at http://gammons.github.com/screwcap
17
+ EOF
13
18
  banner <<-EOF
14
-
15
19
  Usage: screwcap [options] file task_name [[task_name2], [task_name3], ...]
16
20
  Example: screwcap config/deploy.rb deploy_to_staging
17
21
  EOF
@@ -23,6 +27,17 @@ opts = Trollop::with_standard_exception_handling p do
23
27
  require 'ruby-debug'
24
28
  Debugger.start
25
29
  end
30
+
31
+ if opts[:tasks] == true
32
+ recipe_file = ARGV.shift
33
+ deployer = Deployer.new(opts.merge(:recipe_file => recipe_file))
34
+ $stdout << "Tasks Available:\n" if deployer.__tasks.size > 0
35
+ deployer.__tasks.map {|t| t.__name }.each {|name| $stdout << " #{name}\n" }
36
+ $stdout << "Sequences Available:\n" if deployer.__sequences.size > 0
37
+ deployer.__sequences.map {|t| t.__name }.each {|name| $stdout << " #{name}\n" }
38
+ exit
39
+ end
40
+
26
41
  raise Trollop::HelpNeeded if ARGV.size < 2
27
42
  recipe_file = ARGV.shift
28
43
  begin
@@ -19,7 +19,7 @@ class Deployer < Screwcap::Base
19
19
 
20
20
  Deployer.log "Reading #{self.__options[:recipe_file]}\n" unless self.__options[:silent] == true
21
21
 
22
- file = File.open(File.expand_path("./#{self.__options[:recipe_file]}"))
22
+ file = File.open(self.__options[:recipe_file])
23
23
  data = file.read
24
24
 
25
25
  instance_eval(data)
data/lib/screwcap.rb CHANGED
@@ -17,7 +17,7 @@ require 'screwcap/sequence'
17
17
  require 'screwcap/deployer'
18
18
 
19
19
  module Screwcap
20
- VERSION='0.3.1'
20
+ VERSION='0.3.2'
21
21
 
22
22
  class TaskNotFound < RuntimeError; end
23
23
  class NoServersDefined < Exception; end
data/screwcap.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'bundler/version'
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "screwcap"
9
- s.version = "0.3.1"
9
+ s.version = "0.3.2"
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.author = "Grant Ammons"
12
12
  s.email = ["grant@pipelinedealsco.com"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screwcap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Grant Ammons
@@ -112,7 +112,6 @@ extra_rdoc_files:
112
112
  - History.txt
113
113
  - Manifest.txt
114
114
  files:
115
- - .bundle/config
116
115
  - Gemfile
117
116
  - Gemfile.lock
118
117
  - History.txt
@@ -145,7 +144,6 @@ files:
145
144
  - test/config/gateway.rb
146
145
  - test/config/no_server.rb
147
146
  - test/config/rails_tasks.rb
148
- - test/config/real_world_recipe.rb
149
147
  - test/config/simple_recipe.rb
150
148
  - test/config/undefined_command_set.rb
151
149
  - test/config/undefined_item.rb
data/.bundle/config DELETED
@@ -1,2 +0,0 @@
1
- ---
2
- BUNDLE_DISABLE_SHARED_GEMS: "1"
@@ -1,15 +0,0 @@
1
- addresses = []
2
- addresses << "ec2-174-129-166-79.compute-1.amazonaws.com"
3
- #addresses << "ec2-174-129-60-243.compute-1.amazonaws.com"
4
- #addresses << "ec2-204-236-255-140.compute-1.amazonaws.com"
5
- #gateway :dev_gateway, :address => "dev.pipelinedealsco.com", :user => "root", :keys => "~/.ssh/dev_key"
6
- server :staging, :addresses => addresses, :user => "root", :keys => "~/.ssh/pipeline_key"
7
-
8
- command_set :dofail do
9
- run "echo 'failing yeah'"
10
- end
11
-
12
- task_for :task, :server => :staging, :parallel => false do
13
- run "ruby -e 'Kernel.exit(0)'", :onfailure => :dofail
14
- run "echo 'happy days'"
15
- end