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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmVlMzQ3YjA3NzRjYTlmNjBkNWI5N2QyNGNjOWJhYWUzZDQyZWExZA==
4
+ MDc1ZTRlNGUwOGY4MDU0N2M5NDkxMjE4Nzk4NjA5Mzg1YmU1NzEyZg==
5
5
  data.tar.gz: !binary |-
6
- ZWM2NzM4NzUwNTAxYTEwZjNlN2VmMjFmM2JjMzA0MTVlNTQ0NTUzOQ==
6
+ NzE3ZGZjNTZjMTllYzEwZmEyYjcyZWZjMzUyODM5ZGYwOWRiYmM1Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTJkM2RlNjRlOTcyZWQyZGNjNjVkYjM0YzJhYjQ3YmMyNGFkOWU4MTEyMzg0
10
- MzcxNWZmYjMzNzYzMDM4YzM5YzBiYWIyZjUyMzE2YTg2NmQ1ZjZmMWEzMmYw
11
- YTExMDk4YjQzOGFkMWU1NTlkMDc3MmQ4MWQ2Y2IxOWJiN2FjZDU=
9
+ MjRlM2U2NzcyMzhkZWQyZGEyYTE0ZTc2MDQ4NDgzZWQ2NDRkZjk0M2RkNjhi
10
+ YzdjNGMyNGYwZThiOWM3ZmVkMDM2NTEzMTQ4Zjc5NTYyNWRiMDYwMDZjY2Vh
11
+ YzI2ZjVkMjhkOGE4ZWQ4ZTk0YmUyODViYzc5NGI4ZjQ2NWRlNDc=
12
12
  data.tar.gz: !binary |-
13
- OTQ0ZTRhMjc2Njg0NjM3ZjdmMjdmZGRiZDJjMjcyM2I1NDM5MzM4M2IzMDUy
14
- NjQxMDhlYjZlODAxYTlhZGU4ZTVkZjE1ZmE5YTAyNDI0YzEwYTIzN2I5ZmZj
15
- ZDA2MTM4OTgzNzcyMzIzMDJhNTM4Zjg4NWU0NzZhMWRjMjhhZDM=
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
- ([:api_key, :secret_key, :url] - options.keys).empty?
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
@@ -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
- params = env.request.params.to_a.sort
6
- env.raw_response = connection.get(env.request.path, params)
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.26.1'
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.pre300
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 00:00:00.000000000 Z
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: '1.0'
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: '1.0'
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.26.1
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.26.1
173
+ version: 0.27.1
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: rubocop-rspec
176
176
  requirement: !ruby/object:Gem::Requirement