aptible-resource 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aptible/resource/base.rb +10 -10
- data/lib/aptible/resource/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82f938de116c53f45b2033e06ae7a293aca0c0f7
|
4
|
+
data.tar.gz: dc977779622c227070d3cd09f58c91d9883baa8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d37e852b758d7e3300bca70bbc8c80338fdb0ef489199f3fb965ed4c8a5ec6b0a063f5091b349d556d9fdc2797e15529ada77caa121736c8874e58a3d91c73e
|
7
|
+
data.tar.gz: 7191b315d2d20abf449f3215e7b2907e77b0f67a2d65631b2c0cce686b5a2bebeb72a44ee1d4b91d0674137b04778d7da4d8d3d7146f54657b37ae1e0a31bc00
|
@@ -193,23 +193,23 @@ module Aptible
|
|
193
193
|
}
|
194
194
|
end
|
195
195
|
|
196
|
-
# rubocop:disable MethodLength
|
197
196
|
def initialize(options = {})
|
198
197
|
if options.is_a?(Hash)
|
199
198
|
self.token = options[:token]
|
200
|
-
|
201
|
-
options[:root] ||= root_url
|
202
|
-
options[:namespace] ||= namespace
|
203
|
-
options[:headers] ||= {}
|
204
|
-
options[:headers].merge!(
|
205
|
-
'Content-Type' => 'application/json',
|
206
|
-
'Authorization' => "Bearer #{bearer_token}"
|
207
|
-
) if options[:token]
|
199
|
+
populate_default_options!(options)
|
208
200
|
end
|
209
201
|
|
210
202
|
super(options)
|
211
203
|
end
|
212
|
-
|
204
|
+
|
205
|
+
def populate_default_options!(options)
|
206
|
+
options[:root] ||= root_url
|
207
|
+
options[:namespace] ||= namespace
|
208
|
+
options[:headers] ||= {}
|
209
|
+
options[:headers]['Content-Type'] = 'application/json'
|
210
|
+
return unless options[:token]
|
211
|
+
options[:headers]['Authorization'] = "Bearer #{bearer_token}"
|
212
|
+
end
|
213
213
|
|
214
214
|
def adapter
|
215
215
|
self.class.adapter
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri_template
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.2.2
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: Foundation classes for Aptible resource server gems
|