task-orchestrator 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ module Orchestrator
14
14
  parser.banner = "Usage: #{$0} [options]"
15
15
 
16
16
  options.config = Orchestrator::Settings
17
- parser.on( '--config [PATH]', 'Path to settings yaml' ) do |config|
17
+ parser.on( '--config PATH', String, 'Path to settings yaml' ) do |config|
18
18
  options.config = config
19
19
  options.args.instance_variable_set(:@config,config)
20
20
  end
@@ -26,7 +26,7 @@ module Orchestrator
26
26
  options.args.instance_variable_set(:@name,name)
27
27
  end
28
28
 
29
- parser.on( '--statefile PATH', 'Path to state file yaml' ) do |statefile|
29
+ parser.on( '--statefile PATH', String, 'Path to state file yaml' ) do |statefile|
30
30
  options.statefile = statefile
31
31
  options.args.instance_variable_set(:@statefile,statefile)
32
32
  end
@@ -31,10 +31,10 @@ module Orchestrator
31
31
  @state = (@options.statefile && File.exist?(@options.statefile) && !@options.reset) ? YAML.load_file(@options.statefile) : @settings['orchestrator'][@options.name]
32
32
 
33
33
  @options.email = false unless @state.has_key?('email')
34
- @options.email_on_success = false if @options.email and @state['email'].has_key?('on_success') and not @state['email']['on_success']
34
+ @options.email_on_success = (@options.email and @state['email'].has_key?('on_success')) ? @state['email']['on_success']) : true
35
35
 
36
36
  @options.sms = false unless @state.has_key?('sms')
37
- @options.sms_on_success = true if @options.sms and @state['sms'].has_key?('on_success') and @state['sms']['on_success']
37
+ @options.sms_on_success = (@options.sms and @state['sms'].has_key?('on_success')) ? @state['sms']['on_success']) : false
38
38
  end
39
39
 
40
40
  def invalid(reason)
@@ -1,3 +1,3 @@
1
1
  module Orchestrator
2
- VERSION ||= '0.0.3'
2
+ VERSION ||= '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: task-orchestrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pony