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 +4 -4
- data/Gemfile +1 -0
- data/lib/passenger-metrics.rb +6 -1
- data/passenger-metrics.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0873c6e0f2746b18947a4f4115fdf2e055db45e3eda4bd292e6bf22ebbd98a1
|
4
|
+
data.tar.gz: 49c13c5db27283bab2c6bb08d18e83ef56b5899b5b81b648b99f5f511550b19e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dd70f966eddd86674c10a68a71958d62339041b9808dc2cdc42fc43265723e7160c6fc1ba2ee9e97517d0af71c0a31aada70120963d22ea7e4fb18a17ef03e8
|
7
|
+
data.tar.gz: 9e815080c684a23487287f67941e3fc9848aa9c0b8fb9538d16437a56436a635705142723933319af1fe380ad54c452925f535e0429c8ee7f62ebbdf491d7874
|
data/Gemfile
CHANGED
data/lib/passenger-metrics.rb
CHANGED
@@ -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 ||=
|
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
|
|
data/passenger-metrics.gemspec
CHANGED
@@ -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.
|
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]
|