kis_http 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 90cf8804c9b8fab2d42e58567bc05f304344fac286b6874240a20e3e832b8852
4
- data.tar.gz: a0eb1a0095d20ba88ffbffc95accc6a08e95e6081811dccb87002b8ae1cb1f80
3
+ metadata.gz: b80b04fc1a30b28254ba7384c15f0e43e1418258dd454d1656af827ba1060d38
4
+ data.tar.gz: c5288db7382fea7daeef6e2cb1a7a346dc65e9e2d49ae76754ec6820418cbd3b
5
5
  SHA512:
6
- metadata.gz: 9f72fcfc774f7167b69d1affa960f9cee2bfa75f63efe2e6da743f92348f6a96b8474f9f05b537e7107f924bd95328468c9fe26c4f7b37d1e543a0e287bdc10c
7
- data.tar.gz: 29f28c1523dc105a1360dd80daee941f61fd9de9b9fb890460c488b22b2a188e31a680a76b57e55c02b33137718f5e9742942db5c20eab00edcdf50ac3b54f05
6
+ metadata.gz: e65794f80de0468f452b52f393351f179acdd471ff34ab3db1d301a037e6e0a73af69fa251515c76bfaa074fbda9813c1dde0254d26d08c8275a1e988ec47d30
7
+ data.tar.gz: f6db9a4864bfe140d2bde6a858cbcc85fcf3af4f6808459f21e69055caf4a3a826edde46f4a3ea3633dc5ed2cfa9b3048b478670ed975d5aa0b4cdec2f9c384c
@@ -29,13 +29,13 @@ module KisHttp
29
29
  private
30
30
 
31
31
  def request(url, body: nil, headers: nil, options: nil)
32
- options = Rest.Options(options) if options
32
+ options = KisHttp.Options(options) if options
33
33
 
34
34
  uri = URI("#{url}#{options}")
35
35
 
36
36
  request = yield uri.request_uri
37
37
 
38
- Rest.Headers(headers).assign_each_to(request) if headers
38
+ KisHttp.Headers(headers).assign_each_to(request) if headers
39
39
 
40
40
  request.body = body ? JSON.generate(body) : ''
41
41
 
@@ -70,12 +70,12 @@ module KisHttp
70
70
  end
71
71
 
72
72
  def self.Headers(obj)
73
- if obj.is_a? Rest::Headers
73
+ if obj.is_a? KisHttp::Headers
74
74
  obj
75
75
  elsif obj.is_a? Hash
76
- Rest::Headers.new(**obj)
76
+ KisHttp::Headers.new(**obj)
77
77
  elsif obj.is_a? Array
78
- Rest::Headers.new(**obj.to_h)
78
+ KisHttp::Headers.new(**obj.to_h)
79
79
  else
80
80
  raise 'Invalid object type for Headers!'
81
81
  end
@@ -135,12 +135,12 @@ module KisHttp
135
135
  end
136
136
 
137
137
  def self.Options(obj)
138
- if obj.is_a? Rest::Options
138
+ if obj.is_a? KisHttp::Options
139
139
  obj
140
140
  elsif obj.is_a? Hash
141
- Rest::Options.new(**obj)
141
+ KisHttp::Options.new(**obj)
142
142
  elsif obj.is_a? Array
143
- Rest::Options.new(**obj.to_h)
143
+ KisHttp::Options.new(**obj.to_h)
144
144
  else
145
145
  raise 'Invalid object type for Options!'
146
146
  end
@@ -1,3 +1,3 @@
1
1
  module KisHttp
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kis_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: DRY for Net::HTTP
14
14
  email: