aws-data 0.0.0
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 +7 -0
- data/README.md +6 -0
- data/aws-data.gemspec +17 -0
- data/lib/aws-data/metadata.rb +12 -0
- data/lib/aws-data/transport.rb +24 -0
- data/lib/aws-data.rb +6 -0
- metadata +49 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 27e8ce1b196c30054d66b267351e0eddaf1ad653
|
4
|
+
data.tar.gz: 10731dd7bc8e8e2edc1898d15ccc45c2f60d8e4e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 396378fe485c201d3d836367c7a0baf4da0f5b54920acbacc4ec89689198be920633a180b04e25bedb85405e566d5916b2ae77eb3c91af85389a77a5a2c56a10
|
7
|
+
data.tar.gz: f4ceb355dffe3e9325c9eb7a72a50600060f5b94c8bb9eee565b6cab73000a90ea4cbb944c9d4cc7f6796fe1e3f65a37eb3c16a675b4a6d06722f95fbcd96d91
|
data/README.md
ADDED
data/aws-data.gemspec
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# vim: ft=ruby
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "aws-data"
|
5
|
+
s.version = "0.0.0"
|
6
|
+
s.authors = ["Richo Healey"]
|
7
|
+
s.email = ["richo@psych0tik.net"]
|
8
|
+
s.homepage = "http://github.com/richo/aws-data"
|
9
|
+
s.summary = "Fetch instance data from AWS"
|
10
|
+
s.description = s.summary
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split("\n")
|
13
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
end
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
module AWSData
|
4
|
+
class Transport
|
5
|
+
|
6
|
+
def get(path)
|
7
|
+
uri = uri_for(path)
|
8
|
+
res = Net::HTTP.get_response(uri)
|
9
|
+
if res.is_a?(Net::HTTPSuccess)
|
10
|
+
return JSON.parse(res.body)
|
11
|
+
else
|
12
|
+
raise "oops"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def uri_for(path)
|
19
|
+
uri = URI("http://169.254.169.254")
|
20
|
+
uri.path = path
|
21
|
+
return uri
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/aws-data.rb
ADDED
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-data
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richo Healey
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Fetch instance data from AWS
|
14
|
+
email:
|
15
|
+
- richo@psych0tik.net
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- README.md
|
21
|
+
- aws-data.gemspec
|
22
|
+
- lib/aws-data.rb
|
23
|
+
- lib/aws-data/metadata.rb
|
24
|
+
- lib/aws-data/transport.rb
|
25
|
+
homepage: http://github.com/richo/aws-data
|
26
|
+
licenses: []
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 2.0.2
|
45
|
+
signing_key:
|
46
|
+
specification_version: 4
|
47
|
+
summary: Fetch instance data from AWS
|
48
|
+
test_files: []
|
49
|
+
has_rdoc:
|