aws_client 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws_client.rb +5 -0
- data/lib/aws_client/version.rb +1 -1
- data/lib/elasticsearch_wrapper.rb +16 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e6685a53797287639bdda145e16a47293510fa
|
4
|
+
data.tar.gz: f39271751a05675561d629269482c3899f3f3ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c34feb17c04fdf75436c3cf5a7dce595c86201b5dfec6d170597180aad5fe85c7d163aab9bbbb0703eeda28d02f0fdbb57c8cb95c827b33f1b5e932f2072ce
|
7
|
+
data.tar.gz: b6488048aaede4ca2fcba564ad48f6572242128796aafe8c9a5fadc6171544d6316e2f0c2867225bc8ab807c34931f4271ce8d7dafee9cdafbcc5f94878f4847
|
data/lib/aws_client.rb
CHANGED
@@ -10,6 +10,7 @@ require "ec2_wrapper"
|
|
10
10
|
require "elb_wrapper"
|
11
11
|
require "elb"
|
12
12
|
require "elasticache_wrapper"
|
13
|
+
require "elasticsearch_wrapper"
|
13
14
|
|
14
15
|
module AwsClient
|
15
16
|
|
@@ -53,6 +54,10 @@ module AwsClient
|
|
53
54
|
@elasticache ||= ::AwsClient::ElastiCacheWrapper.new(client: client_connect(::Aws::ElastiCache::Client))
|
54
55
|
end
|
55
56
|
|
57
|
+
def elasticsearch
|
58
|
+
@elasticsearch ||= ::AwsClient::ElasticSearchWrapper.new(client: client_connect(::Aws::ElasticsearchService::Client))
|
59
|
+
end
|
60
|
+
|
56
61
|
protected
|
57
62
|
|
58
63
|
def credentials
|
data/lib/aws_client/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
module AwsClient
|
2
|
+
class ElasticSearchWrapper < AwsClient::Wrapper
|
3
|
+
|
4
|
+
def endpoint_for_domain(domain)
|
5
|
+
domains = domains_by_reference([domain])
|
6
|
+
status_lists = domains.domain_status_list
|
7
|
+
raise "ElasticSearch - nothing found for domain '#{domain}'" if status_lists.first.nil?
|
8
|
+
return status_lists.first.endpoint
|
9
|
+
end
|
10
|
+
|
11
|
+
def domains_by_reference(domain_names)
|
12
|
+
return client.describe_elasticsearch_domains(:domain_names => domain_names)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Webzakimbo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/cf_wrapper.rb
|
75
75
|
- lib/ec2_wrapper.rb
|
76
76
|
- lib/elasticache_wrapper.rb
|
77
|
+
- lib/elasticsearch_wrapper.rb
|
77
78
|
- lib/elb.rb
|
78
79
|
- lib/elb_wrapper.rb
|
79
80
|
- lib/rds_wrapper.rb
|
@@ -100,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
101
|
version: '0'
|
101
102
|
requirements: []
|
102
103
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.6.8
|
104
105
|
signing_key:
|
105
106
|
specification_version: 4
|
106
107
|
summary: Light-weight AWS wrapper.
|