bixby-common 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d655ba4c5a8200586b435768668f60b2e0a6809e
4
- data.tar.gz: 5e9d2be246830d38aef93bd079257052145d52e6
3
+ metadata.gz: 7a119f345c052270136e6030c530e24751441694
4
+ data.tar.gz: cc9419ce17828891dd41f4cd8b1f1cb49f36980a
5
5
  SHA512:
6
- metadata.gz: 3ff9e4a9b966d0a40701ec04d8fcec8125b0d523126e6da6dcae414f5e72fc84b0a92d48e70b255e7f1c76723e45c1ea4f212cff4aa26f2e4f57c347e353b963
7
- data.tar.gz: e53209d266c816916f4841a82f267494aaf3d115694eb730188d523697ab3280c450cb1a5458ffd5719b840ea6620dd4962acc67ee37c7c136ad3c8381587349
6
+ metadata.gz: 03ed34519ed6ea1d1addf3909cb7a7deede4645fef80d1d982650324c1e8e02f7cfd316d9f08a1bb96d3bc83cded4d4581f8923d1b146de7a806b601517b3f9c
7
+ data.tar.gz: 130513bcc192be3679339be975b5b8a35681ae818cc5b1d9b154bafb9477c32d95954991fdcadc4eec8d6aceb08f5239bfa3ec7e0870e91bec0edb8bf2ea4426
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: https://github.com/chetan/api_auth.git
3
- revision: 6d9351de901a51d6a386d547a8d32e23c4314550
3
+ revision: 86a79ca157402bd1c12d683a6b9948564b493443
4
4
  branch: bixby
5
5
  specs:
6
6
  api-auth (1.0.3)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/bixby-common.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bixby-common"
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chetan Sarva"]
@@ -39,6 +39,11 @@ module Bixby
39
39
  # @return [JsonResponse] response
40
40
  def execute_internal(json_request, &block)
41
41
 
42
+ if json_request.respond_to?(:headers) then
43
+ # always required for posting to API
44
+ json_request.headers["Content-Type"] = "application/json"
45
+ end
46
+
42
47
  req = HTTPI::Request.new(:url => @uri, :body => json_request.to_wire)
43
48
 
44
49
  # add in extra headers if we have a SignedJsonRequest (or anything which has additional headers)
@@ -46,12 +51,6 @@ module Bixby
46
51
  req.headers.merge!(json_request.headers)
47
52
  end
48
53
 
49
- if not req.headers.include? "Content-Type" then
50
- # add content-type if not set
51
- # may be set when creating a signed request
52
- req.headers["Content-Type"] = "application/json"
53
- end
54
-
55
54
  if block then
56
55
  # execute request with block
57
56
  req.on_body(&block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bixby-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chetan Sarva