vertebrae 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/configuration.rb +5 -1
- data/spec/configuration_spec.rb +4 -1
- data/vertebrae.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80aee05b643bbc004b4cf9a1b9962f31c5d4516a
|
4
|
+
data.tar.gz: 764c1380810d1ce67a5c52f6b62ca9686164894f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aa9adc4ac3e7a283d8e4156464b41efd1a76ef23e00fc6b730e7345c42b0d010b11ae28be553d226d77cd8c4ca392a4024f8957669b35874950a0e204a6e5f5
|
7
|
+
data.tar.gz: c9c06824333836a45b25aa37d3d56ae3cedf0b9e841b0b390c89a15e39ecaac7e80561b264fb05a09dbd8e2073236f3b7f8c8d30a8c4baa8271415623b215014
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/configuration.rb
CHANGED
@@ -15,11 +15,15 @@ module Vertebrae
|
|
15
15
|
:password,
|
16
16
|
:connection_options,
|
17
17
|
:content_type,
|
18
|
+
:scheme,
|
18
19
|
].freeze
|
19
20
|
|
20
21
|
# Other adapters are :typhoeus, :patron, :em_synchrony, :excon, :test
|
21
22
|
DEFAULT_ADAPTER = :net_http
|
22
23
|
|
24
|
+
# The default HTTP scheme configuration
|
25
|
+
DEFAULT_SCHEME = 'https'
|
26
|
+
|
23
27
|
# The default SSL configuration
|
24
28
|
DEFAULT_SSL = {}
|
25
29
|
|
@@ -104,7 +108,7 @@ module Vertebrae
|
|
104
108
|
|
105
109
|
|
106
110
|
def endpoint
|
107
|
-
"
|
111
|
+
"#{self.scheme}://#{self.host}#{self.prefix}"
|
108
112
|
end
|
109
113
|
end
|
110
114
|
end
|
data/spec/configuration_spec.rb
CHANGED
@@ -5,6 +5,7 @@ describe Vertebrae::Configuration do
|
|
5
5
|
subject { Vertebrae::Configuration.new({}) }
|
6
6
|
|
7
7
|
{:adapter => described_class::DEFAULT_ADAPTER,
|
8
|
+
:scheme => described_class::DEFAULT_SCHEME,
|
8
9
|
:ssl => described_class::DEFAULT_SSL,
|
9
10
|
:user_agent => described_class::DEFAULT_USER_AGENT,
|
10
11
|
:username => described_class::DEFAULT_USERNAME,
|
@@ -17,11 +18,13 @@ describe Vertebrae::Configuration do
|
|
17
18
|
its(:connection_options) { should be_empty }
|
18
19
|
|
19
20
|
describe "override" do
|
20
|
-
subject{ Vertebrae::Configuration.new({username: 'foo', password: 'bar'}) }
|
21
|
+
subject{ Vertebrae::Configuration.new({username: 'foo', password: 'bar', scheme: 'http'}) }
|
21
22
|
|
23
|
+
its(:default_scheme) { should == described_class::DEFAULT_SCHEME }
|
22
24
|
its(:default_username) { should == described_class::DEFAULT_USERNAME }
|
23
25
|
its(:default_password) { should == described_class::DEFAULT_PASSWORD }
|
24
26
|
|
27
|
+
its(:scheme) { should == 'http'}
|
25
28
|
its(:username) { should == 'foo'}
|
26
29
|
its(:password) { should == 'bar'}
|
27
30
|
end
|
data/vertebrae.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "vertebrae"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nathan Woodhull"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-10-22"
|
13
13
|
s.description = "A set of low level infrastructure and reusable code for building API clients"
|
14
14
|
s.email = "nathan@controlshiftlabs.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertebrae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Woodhull
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|