aws_ro 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -6
- data/lib/aws_ro/ec2/instance.rb +1 -0
- data/lib/aws_ro/ec2/repository.rb +1 -0
- data/lib/aws_ro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68c2dde788db572723bc6847d444d1e8d979dc97
|
4
|
+
data.tar.gz: 469637de553ceefd61115661070f9086eb68cf86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bbda904addebf1ea8e70ba0f58a02aa1acf195ecbbd16a16ca9e0da3440de68872283185f3e55d99f480b76c0de603d8ad1b8aadb7fdf885db21066af3e5b4c
|
7
|
+
data.tar.gz: 8a32263755f874faa3d6f09d6a9daeac8839f418ea8823a329da99be3285c58699869e2c76544c84ac007eb5ecdff2285a247aa2c75998f621b6e05719baae48
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ By using plain AWS SDK v2:
|
|
32
32
|
|
33
33
|
```ruby
|
34
34
|
client = Aws::EC2::Client.new(some_options)
|
35
|
-
res =
|
35
|
+
res = client.describe_instances(filters: [{name: 'tag:MyEnv', values: ['develop']}, {name: 'tag:MyTag', values: ['*']}])
|
36
36
|
instances = res.reservations.flat_map(&:instances)
|
37
37
|
instances.each do |i|
|
38
38
|
v = i.tags.find { |t| t.key == 'MyTag' }.value
|
@@ -46,7 +46,7 @@ On the other hand, by using the `aws_ro` gem:
|
|
46
46
|
|
47
47
|
```ruby
|
48
48
|
repo = AwsRo::EC2::Repository.new(some_options)
|
49
|
-
repo.tags({'MyEnv' => 'develop', 'MyTag' => '*'}).each |i|
|
49
|
+
repo.tags({'MyEnv' => 'develop', 'MyTag' => '*'}).each do |i|
|
50
50
|
puts "ID: #{i.instance_id}, MyTag value: #{i.my_tag}"
|
51
51
|
end
|
52
52
|
```
|
@@ -105,7 +105,7 @@ end
|
|
105
105
|
# All query methods are chainable and return an `Array` like object.
|
106
106
|
## list security group of running-public-instances
|
107
107
|
repo.running.filters([{name: 'ip-address', values: ['*'] }]).each do |i|
|
108
|
-
puts i.ec2.security_groups.map(&:group_name)
|
108
|
+
puts i.ec2.security_groups.map(&:group_name)
|
109
109
|
end
|
110
110
|
|
111
111
|
## list my 'InUse' tag instances
|
@@ -115,7 +115,7 @@ repo.not_terminated.tags('InUse' => '*').map(&:instance_id)
|
|
115
115
|
|
116
116
|
#### class : `AwsRo::EC2::Instance`
|
117
117
|
|
118
|
-
Instance is wrapper of EC2 instace object.
|
118
|
+
`Instance` is wrapper of EC2 instace object.
|
119
119
|
|
120
120
|
```ruby
|
121
121
|
ins = repo.all.first
|
@@ -143,7 +143,7 @@ ins.ec2
|
|
143
143
|
|
144
144
|
```ruby
|
145
145
|
# Instance#tags returns `Struct` of tags.
|
146
|
-
ins.tags.
|
146
|
+
ins.tags.Name
|
147
147
|
# => 'Value of Name tag'
|
148
148
|
ins.tags.roles
|
149
149
|
# => 'staging, somerole'
|
@@ -163,7 +163,7 @@ ins.xyz_enabled?
|
|
163
163
|
|
164
164
|
## Development
|
165
165
|
|
166
|
-
After checking out the repo
|
166
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
167
167
|
|
168
168
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
169
169
|
|
@@ -178,3 +178,19 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
178
178
|
## License
|
179
179
|
|
180
180
|
This library is distributed under the Apache License, version 2.0
|
181
|
+
|
182
|
+
```no-highlight
|
183
|
+
copyright 2016. GREE, Inc. all rights reserved.
|
184
|
+
|
185
|
+
licensed under the apache license, version 2.0 (the "license");
|
186
|
+
you may not use this file except in compliance with the license.
|
187
|
+
you may obtain a copy of the license at
|
188
|
+
|
189
|
+
http://www.apache.org/licenses/license-2.0
|
190
|
+
|
191
|
+
unless required by applicable law or agreed to in writing, software
|
192
|
+
distributed under the license is distributed on an "as is" basis,
|
193
|
+
without warranties or conditions of any kind, either express or implied.
|
194
|
+
see the license for the specific language governing permissions and
|
195
|
+
limitations under the license.
|
196
|
+
```
|
data/lib/aws_ro/ec2/instance.rb
CHANGED
data/lib/aws_ro/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_ro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- takuto.komazaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|