stacker_bee 2.1.1.pre300 → 2.1.1.pre303
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/stacker_bee +1 -1
- data/lib/stacker_bee/client.rb +3 -0
- data/lib/stacker_bee/middleware/adapter.rb +14 -2
- data/stacker_bee.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDc1ZTRlNGUwOGY4MDU0N2M5NDkxMjE4Nzk4NjA5Mzg1YmU1NzEyZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzE3ZGZjNTZjMTllYzEwZmEyYjcyZWZjMzUyODM5ZGYwOWRiYmM1Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjRlM2U2NzcyMzhkZWQyZGEyYTE0ZTc2MDQ4NDgzZWQ2NDRkZjk0M2RkNjhi
|
10
|
+
YzdjNGMyNGYwZThiOWM3ZmVkMDM2NTEzMTQ4Zjc5NTYyNWRiMDYwMDZjY2Vh
|
11
|
+
YzI2ZjVkMjhkOGE4ZWQ4ZTk0YmUyODViYzc5NGI4ZjQ2NWRlNDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTBiNjBjZjVmYTg4YWQ0OTY5OTMxNjYyZDUxNmQzMDZmMDhlNjdkMDE4MmEy
|
14
|
+
ZDUyZjM0ZWE5YWJjYjNkNGY1MWFkODExOTI3ZWU4Nzk5NjRiM2I3NzY0ZGUw
|
15
|
+
MTRmYjE5ZTA5YjA2ZWVhMDJhZDIyMjM4N2JhYmY0NWUyNmRkNGY=
|
data/bin/stacker_bee
CHANGED
@@ -58,7 +58,7 @@ begin
|
|
58
58
|
options.merge! Hash[YAML.load(hash).map { |k, v| [k.to_sym, v] }]
|
59
59
|
end
|
60
60
|
unless options.keys.include?(:config) ||
|
61
|
-
|
61
|
+
([:api_key, :secret_key, :url] - options.keys).empty?
|
62
62
|
puts 'Please specify a config file or all of the following: ' \
|
63
63
|
'--api_key, --secret_key and --url'
|
64
64
|
exit
|
data/lib/stacker_bee/client.rb
CHANGED
@@ -31,6 +31,7 @@ module StackerBee
|
|
31
31
|
)
|
32
32
|
|
33
33
|
# rubocop:disable MethodLength
|
34
|
+
# rubocop:disable Metrics/AbcSize
|
34
35
|
def middlewares
|
35
36
|
# request
|
36
37
|
builder.use Middleware::ConsoleAccess
|
@@ -60,6 +61,8 @@ module StackerBee
|
|
60
61
|
|
61
62
|
builder.build
|
62
63
|
end
|
64
|
+
# rubocop:enable Metrics/AbcSize
|
65
|
+
# rubocop:enable MethodLength
|
63
66
|
|
64
67
|
def builder
|
65
68
|
@builder ||= Builder.new
|
@@ -2,13 +2,25 @@ module StackerBee
|
|
2
2
|
module Middleware
|
3
3
|
class Adapter < Base
|
4
4
|
def call(env)
|
5
|
-
|
6
|
-
|
5
|
+
perform_request env
|
6
|
+
pluck_content_type env
|
7
|
+
pluck_body env
|
8
|
+
end
|
9
|
+
|
10
|
+
def pluck_content_type(env)
|
7
11
|
env.response.content_type =
|
8
12
|
env.raw_response.env[:response_headers]['content-type']
|
13
|
+
end
|
14
|
+
|
15
|
+
def pluck_body(env)
|
9
16
|
env.response.body = env.raw_response.body
|
10
17
|
end
|
11
18
|
|
19
|
+
def perform_request(env)
|
20
|
+
params = env.request.params.to_a.sort
|
21
|
+
env.raw_response = connection.get(env.request.path, params)
|
22
|
+
end
|
23
|
+
|
12
24
|
def endpoint_name_for(*)
|
13
25
|
end
|
14
26
|
end
|
data/stacker_bee.gemspec
CHANGED
@@ -27,14 +27,14 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
29
|
spec.add_development_dependency 'rspec', '~> 3.1.0'
|
30
|
-
spec.add_development_dependency 'rspec-its', '~> 1.0'
|
30
|
+
spec.add_development_dependency 'rspec-its', '~> 1.1.0'
|
31
31
|
spec.add_development_dependency 'webmock', '~> 1.15'
|
32
32
|
spec.add_development_dependency 'vcr', '~> 2.9'
|
33
33
|
spec.add_development_dependency 'coveralls'
|
34
34
|
|
35
35
|
# It should be consistent for Travis and all developers, since we don't check
|
36
36
|
# in the Gemfile.lock
|
37
|
-
spec.add_development_dependency 'rubocop', '0.
|
37
|
+
spec.add_development_dependency 'rubocop', '0.27.1'
|
38
38
|
spec.add_development_dependency 'rubocop-rspec', '1.2.0'
|
39
39
|
|
40
40
|
# Release every merge to master as a prerelease
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stacker_bee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.1.
|
4
|
+
version: 2.1.1.pre303
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Sterndale
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -107,14 +107,14 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.1.0
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 1.1.0
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: webmock
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,14 +163,14 @@ dependencies:
|
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
166
|
+
version: 0.27.1
|
167
167
|
type: :development
|
168
168
|
prerelease: false
|
169
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
173
|
+
version: 0.27.1
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: rubocop-rspec
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|