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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 334c2082e80376ff85f40fe9d97af5bd4f9f1afd
4
- data.tar.gz: fe8f9b0398f44584ad25d3984d3540b459bfee45
3
+ metadata.gz: 80aee05b643bbc004b4cf9a1b9962f31c5d4516a
4
+ data.tar.gz: 764c1380810d1ce67a5c52f6b62ca9686164894f
5
5
  SHA512:
6
- metadata.gz: f18ac99c52a515ab24896c8c567f8c3fac39c0e3db7c7317db3aea91b0c8a31df968d06ed648b9023e10bfc7eb4e2a87d3460bee00b99b8b23730570b7e03506
7
- data.tar.gz: 281da9a937b67c080b9628564a0242e757e3f9e77ad65b55851fb749788fc474692fa910896f198ea641d9e70f72f2f1351f180af92d597071b29bbc9cf67db9
6
+ metadata.gz: 4aa9adc4ac3e7a283d8e4156464b41efd1a76ef23e00fc6b730e7345c42b0d010b11ae28be553d226d77cd8c4ca392a4024f8957669b35874950a0e204a6e5f5
7
+ data.tar.gz: c9c06824333836a45b25aa37d3d56ae3cedf0b9e841b0b390c89a15e39ecaac7e80561b264fb05a09dbd8e2073236f3b7f8c8d30a8c4baa8271415623b215014
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.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
- "https://#{self.host}#{self.prefix}"
111
+ "#{self.scheme}://#{self.host}#{self.prefix}"
108
112
  end
109
113
  end
110
114
  end
@@ -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.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-08-09"
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.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-08-09 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport