vertebrae 0.1.5 → 0.1.6

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: 92e7da99f45916acaa4bbc2fac5eefa2bb459f77
4
- data.tar.gz: 86055b7c8d0e479bf2c5f85b59cdeb42ebc0318e
3
+ metadata.gz: 7301e0ce2d4d44f8ef03d76adcbed3e63dbfafa1
4
+ data.tar.gz: 8aac4e0d3b3c8249bc84fd125446e98a4c681d64
5
5
  SHA512:
6
- metadata.gz: 4dd5a4c07bf810a28c78190cc29a587fd252cdf1416ba81b09f9a40ef5b65ce69a5f8e4fd18c85d082c7f9ef56fe455860458b1eb7446d0d43bebfa351414faf
7
- data.tar.gz: f99ac20ee85c98c30d36a02f27416ece9bd6ba5bbd141ec419ab1352ffcb37734fa97132a51539fe07ff9a8865ffba05e29572fbe05251acbb0bdc69efaba283
6
+ metadata.gz: 1e7d28426d484aaa3a6c79c07a4336f4b4eacd14e8e4c8b32d4d834ced69c122f3f6a0d2b779bc8038ebeffa1153252f6a412aa1a49a86c56c9d47a5b0c2d5af
7
+ data.tar.gz: f1d227611bb84986328dcce328f8874228c9507131505c4783b876e2ff1a206f7adf53598af6f09f7d3a07be019c61f9f5531de1fb1cddaf3675f2c742f90259
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lib/configuration.rb CHANGED
@@ -2,7 +2,6 @@ module Vertebrae
2
2
  module Configuration
3
3
  include Vertebrae::Constants
4
4
 
5
-
6
5
  VALID_OPTIONS_KEYS = [
7
6
  :adapter,
8
7
  :prefix,
@@ -13,6 +12,7 @@ module Vertebrae
13
12
  :username,
14
13
  :password,
15
14
  :connection_options,
15
+ :content_type,
16
16
  ].freeze
17
17
 
18
18
  # Other adapters are :typhoeus, :patron, :em_synchrony, :excon, :test
@@ -42,6 +42,8 @@ module Vertebrae
42
42
  # By default uses the Faraday connection options if none is set
43
43
  DEFAULT_CONNECTION_OPTIONS = {}
44
44
 
45
+ DEFAULT_CONTENT_TYPE = 'application/json'.freeze
46
+
45
47
 
46
48
  attr_accessor *VALID_OPTIONS_KEYS
47
49
 
@@ -67,7 +69,7 @@ module Vertebrae
67
69
  ACCEPT => "application/json;q=0.1",
68
70
  ACCEPT_CHARSET => "utf-8",
69
71
  USER_AGENT => user_agent,
70
- CONTENT_TYPE => 'application/json'
72
+ CONTENT_TYPE => content_type
71
73
  },
72
74
  :ssl => ops.fetch(:ssl) { ssl },
73
75
  :url => ops.fetch(:endpoint) { self.endpoint(ops) }
@@ -99,6 +101,7 @@ module Vertebrae
99
101
  self.username = DEFAULT_USERNAME
100
102
  self.password = DEFAULT_PASSWORD
101
103
  self.connection_options = DEFAULT_CONNECTION_OPTIONS
104
+ self.content_type = DEFAULT_CONTENT_TYPE
102
105
  self
103
106
  end
104
107
  end # Configuration
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.1.5"
8
+ s.version = "0.1.6"
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-07-16"
12
+ s.date = "2013-07-17"
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.1.5
4
+ version: 0.1.6
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-07-16 00:00:00.000000000 Z
11
+ date: 2013-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport