soror 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 750e04f0bc547c30982dc0467d6e2fffe8e2dbb5
4
- data.tar.gz: fd516c974bc99a6e2079967f1fbadfb2c6ae4b69
3
+ metadata.gz: 99ce1c99d1b38245fc74bfef5dc527df19106ab0
4
+ data.tar.gz: 06a1da98ba2918a3be328f7bac98860e06f31e37
5
5
  SHA512:
6
- metadata.gz: 6ded2ee4d566930e4cf1a2acf5c794baa9c7192f367f17a608e4a16dcb5447e4b403f9786f991d2e0ff8822dff5e3db8fe01a737d316012b7a8e47630b23a696
7
- data.tar.gz: abb3e1be5c7f022d59f82380e372f095c385aa559507c473971a20674e4cfb7c181890576eff85405ae7ecebc93f656f23016e9a8457b709c876862e392f4d6b
6
+ metadata.gz: 1a79c6bbcc5956a6bcc0da8164eb73ccf1a8afa3412f698c7177dbd5e94f790c591935baa878ae70ef9f48ed9498655ef7196d6bf8dcac61564b495ca3626a51
7
+ data.tar.gz: 9172e10f58adcb37f6e8a5ac0a1670a67393ece4f444f5785bf277fd052e421f32f31e8378a0a3eb62b90840a06e707fd990d00bde01a6e117ee8c060b3267fb
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Soror
2
2
 
3
- Soror is EC2 instances searcher, EC2 instances is searched by tags
3
+ Soror is EC2 instances searcher, EC2 instances are searched by tags
4
4
 
5
5
  ## Installation
6
6
 
@@ -21,10 +21,30 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  ```ruby
24
- # Search for EC2 instances that have the tag { "Key": "Name", "Value": "Soror" }
24
+ # Search for EC2 instances which have the tag `{ "Key": "name", "Value": "soror" }`
25
25
  # You can use methods of AWS::EC2::Instance to an element of return value
26
26
  # See http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/EC2/Instance.html
27
- Soror::EC2::Instance.search_by('Name' => 'Soror') #=> [<AWS::EC2::Instance>, ...]
27
+ Soror::EC2::Instance.search_by(name: 'soror') #=> [<AWS::EC2::Instance>, ...]
28
+ ```
29
+
30
+ ### Configuration
31
+
32
+ ```ruby
33
+ Soror.config(access_key_id: 'xxxxx', secret_access_key: 'xxxxx', region: 'ap-northeast-1')
34
+ ```
35
+
36
+ ## Required permissions
37
+
38
+ ```js
39
+ {
40
+ "Statement": [
41
+ {
42
+ "Effect": "Allow",
43
+ "Action": "ec2:Describe*",
44
+ "Resource": "*"
45
+ }
46
+ }
47
+ }
28
48
  ```
29
49
 
30
50
  ## Contributing
@@ -7,7 +7,7 @@ module Soror
7
7
  AWS.memoize do
8
8
  ec2.instances.
9
9
  filter('instance-state-name', 'running').
10
- select{ |i| tags.all?{ |k, v| i.tags[k] == v } }
10
+ select{ |i| tags.all?{ |k, v| i.tags[k.to_s] == v.to_s } }
11
11
  end
12
12
  end
13
13
  end
data/lib/soror/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Soror
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soror
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kirikiriyamama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler