elasticity 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 1.3.1
2
+
3
+ + Explicitly requiring 'time'.
4
+ + Elasticity::JobFlow now exposes last_state_change_reason.
5
+
1
6
  ### 1.3 (Contributions from Wouter Broekhof)
2
7
 
3
8
  + The default mode of communication is now via HTTPS.
@@ -1,4 +1,5 @@
1
1
  require 'base64'
2
+ require 'time'
2
3
 
3
4
  require 'rest_client'
4
5
  require 'nokogiri'
@@ -12,6 +12,7 @@ module Elasticity
12
12
  attr_accessor :instance_count
13
13
  attr_accessor :master_instance_type
14
14
  attr_accessor :slave_instance_type
15
+ attr_accessor :last_state_change_reason
15
16
 
16
17
  def initialize
17
18
  @steps = []
@@ -24,6 +25,7 @@ module Elasticity
24
25
  jobflow.name = xml_element.xpath("./Name").text.strip
25
26
  jobflow.jobflow_id = xml_element.xpath("./JobFlowId").text.strip
26
27
  jobflow.state = xml_element.xpath("./ExecutionStatusDetail/State").text.strip
28
+ jobflow.last_state_change_reason = xml_element.xpath("./ExecutionStatusDetail/LastStateChangeReason").text.strip
27
29
  jobflow.steps = JobFlowStep.from_members_nodeset(xml_element.xpath("./Steps/member"))
28
30
  jobflow.created_at = Time.parse(xml_element.xpath("./ExecutionStatusDetail/CreationDateTime").text.strip)
29
31
  started_at = xml_element.xpath("./ExecutionStatusDetail/StartDateTime").text.strip
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "1.3"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -14,6 +14,9 @@ describe Elasticity::JobFlow do
14
14
  <CreationDateTime>
15
15
  2011-10-04T21:49:16Z
16
16
  </CreationDateTime>
17
+ <LastStateChangeReason>
18
+ Steps completed with errors
19
+ </LastStateChangeReason>
17
20
  <StartDateTime>
18
21
  2011-10-04T21:49:17Z
19
22
  </StartDateTime>
@@ -73,7 +76,12 @@ describe Elasticity::JobFlow do
73
76
  <ReadyDateTime>
74
77
 
75
78
  </ReadyDateTime>
76
- <State>TERMINATED</State>
79
+ <State>
80
+ TERMINATED
81
+ </State>
82
+ <LastStateChangeReason>
83
+ Steps completed
84
+ </LastStateChangeReason>
77
85
  </ExecutionStatusDetail>
78
86
  <Instances>
79
87
  <Placement>
@@ -118,6 +126,7 @@ describe Elasticity::JobFlow do
118
126
  jobflow.master_instance_type.should == "m1.small"
119
127
  jobflow.slave_instance_type.should == "m1.small"
120
128
  jobflow.instance_count.should == "4"
129
+ jobflow.last_state_change_reason.should == "Steps completed with errors"
121
130
  end
122
131
  end
123
132
 
@@ -133,6 +142,7 @@ describe Elasticity::JobFlow do
133
142
  jobflow.map(&:master_instance_type).should == ["m1.small","c1.medium"]
134
143
  jobflow.map(&:slave_instance_type).should == ["m1.small", "c1.medium"]
135
144
  jobflow.map(&:instance_count).should == ["4","2"]
145
+ jobflow.map(&:last_state_change_reason).should == ["Steps completed with errors", "Steps completed"]
136
146
  end
137
147
  end
138
148
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticity
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- version: "1.3"
9
+ - 1
10
+ version: 1.3.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Robert Slifka
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-10-10 00:00:00 -07:00
18
+ date: 2011-11-16 00:00:00 -08:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency