zeployment 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a132bea8cfcbf497f12d63e0e31fc22a4c5e2729116564bd36b0f8be0072335
4
- data.tar.gz: 90fa0e65f109edc827b3469b31936129d4a476920f238b82ef8e25ebcee33200
3
+ metadata.gz: 944cf66063ed8752479bbd0c63c060b144fbfb9796431d61f0bb63d08cc82bbf
4
+ data.tar.gz: 7fbf4ef5efa8aef95aadc87e7e13c9c84585081051b9f470fbd9e9a9a4d1ad10
5
5
  SHA512:
6
- metadata.gz: 2c542aaf9cde926dbf76606ac0e7091c9b70a6d2cfc774f72731e6ebc33bae9099dc7e1137b41494590b88d77115fcf574fe2a6d0a8d70688b20a2040aedfedd
7
- data.tar.gz: 0bb8efcec5deb8ce0b2bdb424f4d1f220613814ce04d67624a8061f1eeedce7b368ec66462b77c6e2913306791b522a192a8ad3850a00fb4720984ce37848b0f
6
+ metadata.gz: e1fbac99af1570ec97054ec02fa9f4e729c0e87707b96a195739bd53aff9df2b604fd2f7a973277e073f991ab538a0cf78523df26bcf11cceed3ecdda3f96954
7
+ data.tar.gz: d61f1c11b169302c4568b3c673193751288a7d2be96ed9c1190076e2f1139990e4b602174fc786b52b9cdfa789cce5401eb721c6e951b008cbcb8df8ca2cbe15
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zeployment (0.1.1)
4
+ zeployment (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module Zeployment
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/zeployment.rb CHANGED
@@ -60,4 +60,15 @@ module Zeployment
60
60
  JSON.parse(`aws elb register-instances-with-load-balancer --load-balancer-name #{name_of_load_balancer} --instances #{instance_id}`)
61
61
  end
62
62
 
63
+ def self.get_load_balancer_particular_instance_data (name_of_load_balancer, instance_id)
64
+ load_balancers_instance_description_command = "aws elb describe-instance-health --load-balancer-name #{name_of_load_balancer} --instances #{instance_id}"
65
+ load_balancer_instances_description = `#{load_balancers_instance_description_command}`
66
+ return JSON.parse(load_balancer_instances_description)
67
+ end
68
+
69
+ def self.instance_is_in_service? (name_of_load_balancer, instance_id)
70
+ load_balancer_insrance_data_hash = get_load_balancer_particular_instance_data name_of_load_balancer, instance_id
71
+ return load_balancer_insrance_data_hash["InstanceStates"][0]["State"] == "InService"
72
+ end
73
+
63
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naman Gupta