kybus-client 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: 780ba9b783a2b37eec363ae19830e75eb244ba3816fcffb273a12234d4d9a15a
4
- data.tar.gz: 45252fb2cf4c320df1314003d834fbd62d830bfe09a33dc45e0c86a8e81b138c
3
+ metadata.gz: 6f6f650300d24b8314e038f0aa9a6befbbd09bc8b2036bb82172da0f7b4ad65d
4
+ data.tar.gz: d511d19f9d09c3802c4a7aac773fe37012c8077d6c5de7a5734cc34a5e8d502d
5
5
  SHA512:
6
- metadata.gz: 32969dc8079c3c2f000dbf9e15d2b8606fc22c78464e2a8e90fdf201ccf83fefbb9f533849c5e869894c223551d965ec64dda518fc155ffac17cd7b45bac81a3
7
- data.tar.gz: 826255a577bdfe2a6a57f9d44898f591b81053fd7d2266f32ff64265f95acf67958ec51c784e80cf022d49716d684743864597b8994b9f46442204db4ba0a909
6
+ metadata.gz: d27c498ac20425e238925b425ddeaea34b3115540e31a914ae0826b3e2c1ad2e7d4bfbbfe814dc7d761b8376d6bc1454aafbdbc8bdad940684960a17a474b619
7
+ data.tar.gz: 60847ff9fbb88c17f52bd64fb37a253830416468d85ebc951e598caeb4cec110a7918eb0fe7b29df1ad5e4b390338dd31effe40a207bd6508476624534a1b98a
@@ -54,13 +54,13 @@ module Kybus
54
54
  private
55
55
 
56
56
  def perform_raw_request(method, path, data)
57
- log_debug('Performing request', method: method, path: path, data: data)
57
+ log_debug('Performing request', method:, path:, data:)
58
58
  init_time = Time.now
59
59
  uri = (path.start_with?('http') ? path : "#{@endpoint}#{path}")
60
60
  result = @session.perform_request(method, uri,
61
61
  @format.pack(data))
62
62
  log_info('Request perfomed',
63
- path: path,
63
+ path:,
64
64
  server: @endpoint,
65
65
  verb: method,
66
66
  processing_time: (Time.now - init_time).to_f * 1000)
@@ -41,7 +41,7 @@ module Kybus
41
41
  # :nocov: #
42
42
 
43
43
  def configure_request(request)
44
- basic_auth(request, @config[:basic_auth]) if @config[:basic_auth]
44
+ basic_auth(request, **@config[:basic_auth]) if @config[:basic_auth]
45
45
  request[:verify] = @config[:verify] if @config.key?(:verify)
46
46
  end
47
47
 
@@ -6,7 +6,7 @@ module Kybus
6
6
  # Implements basic auth functionality for http client
7
7
  module BasicAuth
8
8
  def basic_auth(request, user:, password:)
9
- request[:basic_auth] ||= { username: user, password: password }
9
+ request[:basic_auth] ||= { username: user, password: }
10
10
  end
11
11
  end
12
12
  end
@@ -7,9 +7,9 @@ module Kybus
7
7
  class JSend
8
8
  include Kybus::Exceptions
9
9
  EXCEPTION_LIST = {
10
- 'fail' => AntFail,
11
- 'error' => AntError,
12
- 'fatal' => AntError
10
+ 'fail' => KybusFail,
11
+ 'error' => KybusError,
12
+ 'fatal' => KybusError
13
13
  }.freeze
14
14
 
15
15
  def validate(response)
@@ -22,7 +22,7 @@ module Kybus
22
22
  response[:code],
23
23
  response[:data])
24
24
  else
25
- raise(AntError, 'Unknown Error')
25
+ raise(KybusError, 'Unknown Error')
26
26
  end
27
27
  end
28
28
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kybus
4
4
  module Client
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kybus-client
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
  - Gilberto Vargas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kybus-core
@@ -16,154 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '0.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.1'
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: kybus-logger
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
33
+ version: '0.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.1'
41
- - !ruby/object:Gem::Dependency
42
- name: httparty
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '5.11'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '5.11'
69
- - !ruby/object:Gem::Dependency
70
- name: mocha
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.8'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.8'
83
- - !ruby/object:Gem::Dependency
84
- name: pry
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.12'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.12'
97
- - !ruby/object:Gem::Dependency
98
- name: rack-minitest
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.0'
111
- - !ruby/object:Gem::Dependency
112
- name: rake
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '12.3'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '12.3'
125
- - !ruby/object:Gem::Dependency
126
- name: rdoc
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '6.1'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '6.1'
139
- - !ruby/object:Gem::Dependency
140
- name: simplecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.16'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.16'
153
- - !ruby/object:Gem::Dependency
154
- name: webmock
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '3.5'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '3.5'
40
+ version: '0.2'
167
41
  description: Use this gem with a duo with the kybus-server gem
168
42
  email:
169
43
  - tachoguitar@gmail.com
@@ -175,7 +49,6 @@ files:
175
49
  - lib/kybus/client/format/format.rb
176
50
  - lib/kybus/client/format/json_format.rb
177
51
  - lib/kybus/client/format/url_encoded.rb
178
- - lib/kybus/client/format/xml_format.rb
179
52
  - lib/kybus/client/rest_client.rb
180
53
  - lib/kybus/client/session/base.rb
181
54
  - lib/kybus/client/session/basic_auth.rb
@@ -186,7 +59,8 @@ files:
186
59
  homepage: https://github.com/tachomex/kybus-client
187
60
  licenses:
188
61
  - MIT
189
- metadata: {}
62
+ metadata:
63
+ rubygems_mfa_required: 'true'
190
64
  post_install_message:
191
65
  rdoc_options: []
192
66
  require_paths:
@@ -202,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
76
  - !ruby/object:Gem::Version
203
77
  version: '0'
204
78
  requirements: []
205
- rubygems_version: 3.1.4
79
+ rubygems_version: 3.5.14
206
80
  signing_key:
207
81
  specification_version: 4
208
82
  summary: Implements a HTTP Client that can be configured a lot
File without changes