engineyard-cloud-client 1.0.0 → 1.0.1

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.
@@ -46,6 +46,14 @@ module EY
46
46
  alias deployed_by user_name
47
47
  alias deployed_by= user_name=
48
48
 
49
+ def created_at
50
+ super && (@created_at ||= Time.parse(super))
51
+ end
52
+
53
+ def finished_at
54
+ super && (@finished_at ||= Time.parse(super))
55
+ end
56
+
49
57
  def config
50
58
  return {} unless deployed_by # not started yet so not all info is here
51
59
  @config ||= {'deployed_by' => deployed_by}.merge(extra_config)
@@ -4,6 +4,7 @@ end
4
4
 
5
5
  require 'dm-migrations'
6
6
  require 'dm-aggregates'
7
+ require 'dm-timestamps'
7
8
  DataMapper.setup(:default, "sqlite::memory:")
8
9
  DataMapper.finalize
9
10
  DataMapper.auto_migrate!
@@ -1,7 +1,7 @@
1
1
  # This file is maintained by a herd of rabid monkeys with Rakes.
2
2
  module EY
3
3
  class CloudClient
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
6
6
  end
7
7
  # Please be aware that the monkeys like tho throw poo sometimes.
@@ -24,16 +24,23 @@ describe EY::CloudClient::AppEnvironment do
24
24
  deployment.commit.should be_nil
25
25
  deployment.resolved_ref.should be_nil
26
26
 
27
+ deployment.created_at.should be_nil
28
+ deployment.finished_at.should be_nil
29
+
27
30
  deployment.start
28
31
 
32
+ deployment.created_at.should_not be_nil
33
+ deployment.finished_at.should be_nil
29
34
  deployment.config.should == {'deployed_by' => 'Multiple Ambiguous Accounts', 'extra' => 'config'}
30
- deployment.commit.should_not be_nil
35
+ deployment.commit.should =~ /[0-9a-f]{40}/
31
36
  deployment.resolved_ref.should_not be_nil
32
37
  deployment.out << "Test output"
33
38
  deployment.out << "Test error"
34
39
  deployment.successful = true
35
40
  deployment.finished
36
41
  deployment.should be_finished
42
+ deployment.created_at.should be_within(5).of(Time.now)
43
+ deployment.finished_at.should be_within(5).of(Time.now)
37
44
 
38
45
  found_dep = @app_env.last_deployment
39
46
  found_dep.id.should == deployment.id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard-cloud-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -203,6 +203,22 @@ dependencies:
203
203
  - - ! '>='
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: dm-timestamps
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
206
222
  - !ruby/object:Gem::Dependency
207
223
  name: dm-sqlite-adapter
208
224
  requirement: !ruby/object:Gem::Requirement
@@ -331,7 +347,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
331
347
  version: '0'
332
348
  segments:
333
349
  - 0
334
- hash: 3506935384923941414
350
+ hash: -2184825853889346664
335
351
  required_rubygems_version: !ruby/object:Gem::Requirement
336
352
  none: false
337
353
  requirements:
@@ -340,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
356
  version: '0'
341
357
  segments:
342
358
  - 0
343
- hash: 3506935384923941414
359
+ hash: -2184825853889346664
344
360
  requirements: []
345
361
  rubyforge_project:
346
362
  rubygems_version: 1.8.24