aws-ip 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +67 -3
- data/aws-ip.gemspec +2 -1
- data/bin/aws-ip +0 -0
- data/lib/aws_ip/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd3dbe559b9f9f8ea4dcdb8ccea423cbd809cc90
|
4
|
+
data.tar.gz: 59992ef5a6f1a3c194982afaf73cbdb0a7fb5295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99d6309d0c084ddb6a11f01e2736787c35298562d7633b9d1b95dc01ae069121ed451dd03353374f4f47f9a26c91f469ac363fadfbe6ff722a79c284d3c04ca1
|
7
|
+
data.tar.gz: 993f8124bb31f33d459434298e0c44d4b506837523c32ac1c9b1655996ec17407327ae7930f534b3b62617669f5fb0e2ca66710c6edd0a5327b7069634271b69
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# aws-ip
|
2
2
|
|
3
|
-
|
3
|
+
find out AWS IP address
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,7 +20,71 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
### CLI
|
24
|
+
|
25
|
+
```sh
|
26
|
+
$ aws-ip 50.19.0.3
|
27
|
+
syncToken : 1417097828
|
28
|
+
createDate: 2014-11-27-14-21-01
|
29
|
+
|
30
|
+
{"ip_prefix"=>"50.19.0.0/16", "region"=>"us-east-1", "service"=>"AMAZON"}
|
31
|
+
{"ip_prefix"=>"50.19.0.0/16", "region"=>"us-east-1", "service"=>"EC2"}
|
32
|
+
```
|
33
|
+
|
34
|
+
### Ruby
|
35
|
+
|
36
|
+
Require it if you haven't:
|
37
|
+
```ruby
|
38
|
+
require 'aws_ip'
|
39
|
+
```
|
40
|
+
|
41
|
+
1.Fetch ranges by IP address:
|
42
|
+
```ruby
|
43
|
+
aws_ip = AwsIp.new
|
44
|
+
puts aws_ip.fetch('50.19.0.3')
|
45
|
+
{"ip_prefix"=>"50.19.0.0/16", "region"=>"us-east-1", "service"=>"AMAZON"}
|
46
|
+
{"ip_prefix"=>"50.19.0.0/16", "region"=>"us-east-1", "service"=>"EC2"}
|
47
|
+
```
|
48
|
+
|
49
|
+
2.Find out IP address in range:
|
50
|
+
```ruby
|
51
|
+
aws_ip = AwsIp.new
|
52
|
+
puts aws_ip.include?('50.19.0.3')
|
53
|
+
true
|
54
|
+
```
|
55
|
+
|
56
|
+
3.Show ranges info:
|
57
|
+
```ruby
|
58
|
+
aws_ip = AwsIp.new
|
59
|
+
puts aws_ip.env
|
60
|
+
syncToken : 1417097828
|
61
|
+
createDate: 2014-11-27-14-21-01
|
62
|
+
```
|
63
|
+
|
64
|
+
4.Update ranges:
|
65
|
+
```ruby
|
66
|
+
aws_ip = AwsIp.new
|
67
|
+
aws_ip.update
|
68
|
+
```
|
69
|
+
|
70
|
+
5.Show all ranges:
|
71
|
+
```ruby
|
72
|
+
aws_ip = AwsIp.new
|
73
|
+
puts aws_ip.ranges
|
74
|
+
|
75
|
+
or
|
76
|
+
|
77
|
+
puts aws_ip.all_ranges
|
78
|
+
|
79
|
+
{"ip_prefix"=>"50.19.0.0/16", "region"=>"us-east-1", "service"=>"AMAZON"}
|
80
|
+
{"ip_prefix"=>"54.239.98.0/24", "region"=>"us-east-1", "service"=>"AMAZON"}
|
81
|
+
{"ip_prefix"=>"205.251.254.0/24", "region"=>"GLOBAL", "service"=>"AMAZON"}
|
82
|
+
{"ip_prefix"=>"75.101.128.0/17", "region"=>"us-east-1", "service"=>"AMAZON"}
|
83
|
+
{"ip_prefix"=>"54.240.192.0/22", "region"=>"ap-southeast-2", "service"=>"AMAZON"}
|
84
|
+
{"ip_prefix"=>"54.194.0.0/15", "region"=>"eu-west-1", "service"=>"AMAZON"}
|
85
|
+
{"ip_prefix"=>"54.231.224.0/21", "region"=>"ap-northeast-1", "service"=>"AMAZON"}
|
86
|
+
...
|
87
|
+
```
|
24
88
|
|
25
89
|
## Contributing
|
26
90
|
|
data/aws-ip.gemspec
CHANGED
@@ -18,9 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
+
spec.add_dependency 'ipaddress', '~> 0.8.0'
|
22
|
+
|
21
23
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
22
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
-
spec.add_development_dependency 'ipaddress', '~> 0.8.0'
|
24
25
|
|
25
26
|
spec.add_development_dependency 'rspec', '~> 3.1.0'
|
26
27
|
spec.add_development_dependency 'webmock', '~> 1.20.4'
|
data/bin/aws-ip
CHANGED
File without changes
|
data/lib/aws_ip/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-ip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rochefort
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: ipaddress
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
19
|
+
version: 0.8.0
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|