johac 0.9.3 → 0.9.4

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: 9a61c39d9d7aa0e5b26e26dfb95c3fa939c2ba82
4
- data.tar.gz: cb149b3ca883aecb69c3e4254c2972349d09e779
3
+ metadata.gz: e4b63bbad484ffbde7f5f70624dcfe64c24537e5
4
+ data.tar.gz: 753395644624c95a93e89014df5514e0e761ab21
5
5
  SHA512:
6
- metadata.gz: 9d047090c1859f0219e3460d167f24f87306b29106fb46a2c18b08e430ffe2aa787dffc921fa11f871ece308bfe384e52d8ce44e0e7efc28a1b1cb0bdb4cca51
7
- data.tar.gz: 89c2d34a9bacc322a2f6f4b64e053db7e94f987d8c9d68457dbcb66700c082722c91fbc74feba93c59a3bfa0870f569af595866e2a7ae738106a817b541cea6d
6
+ metadata.gz: 4984ad31332f7272890794c5ec2c74b884ce48feae9e40086e2ef025abef2405f389fd788d1346aedca0e7a636a8a11ad5881eeb91cb8b3bc72538753879172a
7
+ data.tar.gz: 890b6f038b08e759331b026aaf53341819056efd49acfaba2834158d9ad6e8653f550df0b94ba66bd6465c34f25bb40e03d41cc1597c92712c8be95c37a07853
@@ -43,7 +43,9 @@ module Johac
43
43
  capture(&block).map { |env|
44
44
  output = []
45
45
  output << "curl -s -X#{env.method.to_s.upcase}"
46
- env.request_headers.each { |name, value|
46
+ env.request_headers.select { |name, value|
47
+ name.downcase != 'user-agent'
48
+ }.each { |name, value|
47
49
  output << "-H'#{name}: #{value}'"
48
50
  }
49
51
  output << "'#{env.url}'"
@@ -31,11 +31,7 @@ module Johac
31
31
 
32
32
  # @return OpenStruct object of hash, or empty struct if error
33
33
  def object
34
- if error?
35
- OpenStruct.new(body)
36
- else
37
- OpenStruct.new
38
- end
34
+ error? ? OpenStruct.new : OpenStruct.new(body)
39
35
  end
40
36
 
41
37
  # Map response body if successful
@@ -1,3 +1,3 @@
1
1
  module Johac
2
- Version = '0.9.3'
2
+ Version = '0.9.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Simpson
@@ -146,7 +146,7 @@ dependencies:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: 4.7.5
149
- description: Opintionated library for implement HTTP+JSON API clients
149
+ description: Opintionated library for implementing HTTP+JSON API clients
150
150
  email: dan.simpson@gmail.com
151
151
  executables: []
152
152
  extensions: []