passenger-metrics 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ece3183790878ef70152c7ffd4c33119c9e126fd0cc4a0f0034fd164ff1a80
4
- data.tar.gz: 8d14dc5b1879632605400d877906d3bbc64f4f19e42307d9120c6836f78af377
3
+ metadata.gz: e0873c6e0f2746b18947a4f4115fdf2e055db45e3eda4bd292e6bf22ebbd98a1
4
+ data.tar.gz: 49c13c5db27283bab2c6bb08d18e83ef56b5899b5b81b648b99f5f511550b19e
5
5
  SHA512:
6
- metadata.gz: cce9a96901b6aa622ae60bc1d3606baf245143bb96f45bb774165902945b3166a7cee3c0215b4ea6e3a64e299069b2af2f2c32494d1be0f7f807a362e3577109
7
- data.tar.gz: 0a87aa5880719787514a62a18c9792e327a4dc10771cc4b79bb8cc5519c41f0789ce8a48c5586035be049f0034f2720edf9610a3f0f939e6e31f11edd58f02b8
6
+ metadata.gz: 2dd70f966eddd86674c10a68a71958d62339041b9808dc2cdc42fc43265723e7160c6fc1ba2ee9e97517d0af71c0a31aada70120963d22ea7e4fb18a17ef03e8
7
+ data.tar.gz: 9e815080c684a23487287f67941e3fc9848aa9c0b8fb9538d16437a56436a635705142723933319af1fe380ad54c452925f535e0429c8ee7f62ebbdf491d7874
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  gem 'crack', '~> 0.4.3'
4
4
  gem 'aws-sdk-cloudwatch'
5
+ gem 'aws-sdk-ec2'
5
6
 
6
7
  group :development do
7
8
  gem 'rspec', '>= 0'
@@ -1,4 +1,5 @@
1
1
  require 'aws-sdk-cloudwatch'
2
+ require 'aws-sdk-ec2'
2
3
  require 'crack'
3
4
 
4
5
  module PassengerMetrics
@@ -7,7 +8,11 @@ module PassengerMetrics
7
8
  end
8
9
 
9
10
  def self.instance_id
10
- @instance_id ||= Net::HTTP.get( URI.parse('http://169.254.169.254/latest/meta-data/instance-id' ) )
11
+ @instance_id ||= @_metadata_client.get('/latest/meta-data/instance-id')
12
+ end
13
+
14
+ def self.metadata_client
15
+ @_metadata_client ||= Aws::EC2Metadata.new
11
16
  end
12
17
  end
13
18
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "passenger-metrics".freeze
9
- s.version = "0.0.5"
9
+ s.version = "0.0.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull