screwcap 0.6.pre2 → 0.6.pre3

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -14,6 +14,7 @@ lib/screwcap/task.rb
14
14
  lib/screwcap/task_manager.rb
15
15
  lib/trollop.rb
16
16
  recipes/setup_rails.rb
17
+ runrdoc
17
18
  screwcap.gemspec
18
19
  spec/runner_spec.rb
19
20
  spec/sequence_spec.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.6.pre2'
14
+ self.version = '0.6.pre3'
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/lib/screwcap/task.rb CHANGED
@@ -128,6 +128,7 @@ class Task < Screwcap::Base
128
128
  def __build_commands(command_sets = [], _self = self)
129
129
  commands = []
130
130
 
131
+ self.__commands = []
131
132
  self.instance_eval(&self.__block)
132
133
 
133
134
  if self.__options[:before]
data/lib/screwcap.rb CHANGED
@@ -16,7 +16,7 @@ require 'screwcap/sequence'
16
16
  require 'screwcap/task_manager'
17
17
 
18
18
  module Screwcap
19
- VERSION='0.6.pre2'
19
+ VERSION='0.6.pre3'
20
20
 
21
21
  class TaskNotFound < RuntimeError; end
22
22
  class NoServersDefined < Exception; end
data/runrdoc ADDED
@@ -0,0 +1 @@
1
+ rdoc -x trollop -x spec -x runner -x object -x message -x tasknotfound -x runrdoc
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.6.pre2"
9
+ s.version = "0.6.pre3"
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.author = "Grant Ammons"
12
12
  s.email = ["grant@pipelinedealsco.com"]
@@ -97,4 +97,21 @@ describe "Task Managers" do
97
97
  commands[0][:command].should == "task1"
98
98
  commands[1][:command].should == "task2"
99
99
  end
100
+
101
+ it "command sets should retain global variables" do
102
+ @tm.animal = "monkey"
103
+ @tm.animal.should == "monkey"
104
+ @tm.server :server, :address => "test", :user => "root"
105
+ @tm.command_set(:pet_animal) { run "pet #{animal}" }
106
+
107
+ @tm.task(:pet_donkey, :server => :server) do
108
+ set :animal, "donkey"
109
+ pet_animal
110
+ end
111
+ @tm.task(:pet_global, :server => :server) do
112
+ pet_animal
113
+ end
114
+
115
+ @tm.run!([:pet_donkey, :pet_global]).map {|c| c[:command] }.should == ["pet donkey","pet monkey"]
116
+ end
100
117
  end
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: -1876988247
4
+ hash: -1876988234
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - pre2
10
- version: 0.6.pre2
9
+ - pre3
10
+ version: 0.6.pre3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Grant Ammons
@@ -125,6 +125,7 @@ files:
125
125
  - lib/screwcap/task_manager.rb
126
126
  - lib/trollop.rb
127
127
  - recipes/setup_rails.rb
128
+ - runrdoc
128
129
  - screwcap.gemspec
129
130
  - spec/runner_spec.rb
130
131
  - spec/sequence_spec.rb