digitalronin-rackspace 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rackspace/vm.rb +4 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 446b86b5a89e762ae77fb90df631090f7fcce78a
4
- data.tar.gz: c32a8e34068818870d92142f6b337ea5237f0ce6
3
+ metadata.gz: 7d9fac3c958eaa306568b54a866a4ac7cd19af0e
4
+ data.tar.gz: 70bc9b1958c73a7fba66d95e88189bb5128625ba
5
5
  SHA512:
6
- metadata.gz: 6043ecb8dd08a6a89ba78dc73cff637e64184fb36e61a612685871e2543b0396505863be00a3da509ca8076c70b3568649502b38bab55f92902588b78375d721
7
- data.tar.gz: 39103bc9110bf6c91b73a06bbbcea9f63fbdf9b70931e836065cc45755c6873a2c04b1d12b8847feb64e4961c88582f93765035cca246481f1ef904af7e6bd38
6
+ metadata.gz: 98ec2bec82f8a9c834c883d853ecc17f2682f4a395e0506e578c32a79d0f7c24461b1f3cf0639eb78776d11dafaed5c32ee0e24f47b4d223f405fccd1f8eb9df
7
+ data.tar.gz: 3ab07594073f14c4b565f1e201c2fe9ecbe4a7329c76a2c3591138d0adc00e5025f78ebc634ad645310c6e0209017e597dfdc3896678fd169714cd39b9dd4958
data/lib/rackspace/vm.rb CHANGED
@@ -31,6 +31,10 @@ module Rackspace
31
31
  self
32
32
  end
33
33
 
34
+ def age_in_seconds
35
+ server.created && (Time.now - Time.parse(server.created)).to_i
36
+ end
37
+
34
38
  def public_ip
35
39
  server.ipv4_address
36
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digitalronin-rackspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Salgado