stekker_zaptec 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +201 -238
- data/Gemfile.lock +39 -30
- data/README.md +12 -0
- data/bin/release +28 -0
- data/lib/zaptec/client.rb +6 -6
- data/lib/zaptec/credentials.rb +1 -1
- data/lib/zaptec/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91b9631174d32dc32bd0844c8fa0d96bf6b484a39c9318cf25b31fc8f76956a8
|
4
|
+
data.tar.gz: ab0ac00f5cc38aca2e70a8a4ad2f954e31e4796a30dac919c8a849862d471bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c452cd49022e999f5e3250804a75359296088a573de565fcc7b8d2e27358c5308fba53eed8d3859efcee0dd0d5202c0224a52f0ea01f2c272d14a439425b9a
|
7
|
+
data.tar.gz: 5ef016998af407c8edf1fb1364af5e7a88e0cf2ceea241f4f8e9228308ec63e874a547991ebd3feb4caa8fff46144f72058accde785abba8a3d84902d129d308
|
data/.rubocop.yml
CHANGED
@@ -1,383 +1,346 @@
|
|
1
1
|
require:
|
2
|
-
- rubocop-rails
|
3
2
|
- rubocop-rspec
|
4
3
|
|
5
4
|
AllCops:
|
6
5
|
NewCops: enable
|
7
|
-
Exclude:
|
8
|
-
- "vendor/**/*"
|
9
|
-
- "bin/**/*"
|
10
|
-
- "node_modules/**/*"
|
11
|
-
- "db/schema.rb"
|
12
|
-
- "db/sequent_schema.rb"
|
13
|
-
- "db/seeds.rb"
|
14
|
-
- "db/seed/**/*"
|
15
|
-
- "db/migrate/**/*"
|
16
|
-
|
17
|
-
Rails/EnvironmentVariableAccess:
|
18
|
-
AllowReads: true
|
19
|
-
|
20
|
-
Rails/HasAndBelongsToMany:
|
21
|
-
Enabled: false
|
22
6
|
|
23
|
-
|
7
|
+
Layout/BeginEndAlignment:
|
24
8
|
Enabled: true
|
25
|
-
Exclude:
|
26
|
-
- "spec/components/previews/**/*"
|
27
9
|
|
28
|
-
|
29
|
-
Enabled:
|
10
|
+
Layout/BlockAlignment:
|
11
|
+
Enabled: true
|
12
|
+
EnforcedStyleAlignWith: start_of_block
|
30
13
|
|
31
|
-
|
32
|
-
|
33
|
-
- "spec/domain/**/*"
|
14
|
+
Layout/EmptyLineBetweenDefs:
|
15
|
+
Enabled: false
|
34
16
|
|
35
|
-
|
36
|
-
|
17
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
18
|
+
Enabled: true
|
37
19
|
|
38
|
-
|
20
|
+
Layout/FirstArgumentIndentation:
|
39
21
|
Enabled: true
|
40
|
-
|
22
|
+
EnforcedStyle: consistent
|
41
23
|
|
42
|
-
|
43
|
-
Enabled:
|
24
|
+
Layout/FirstArrayElementIndentation:
|
25
|
+
Enabled: true
|
26
|
+
EnforcedStyle: consistent
|
44
27
|
|
45
|
-
|
46
|
-
|
28
|
+
Layout/FirstArrayElementLineBreak:
|
29
|
+
Enabled: true
|
47
30
|
|
48
|
-
|
49
|
-
Enabled:
|
31
|
+
Layout/FirstHashElementIndentation:
|
32
|
+
Enabled: true
|
33
|
+
EnforcedStyle: consistent
|
50
34
|
|
51
|
-
|
52
|
-
Enabled:
|
35
|
+
Layout/FirstHashElementLineBreak:
|
36
|
+
Enabled: true
|
53
37
|
|
54
|
-
|
55
|
-
Enabled:
|
38
|
+
Layout/FirstMethodArgumentLineBreak:
|
39
|
+
Enabled: true
|
56
40
|
|
57
|
-
|
41
|
+
Layout/FirstParameterIndentation:
|
58
42
|
Enabled: true
|
43
|
+
EnforcedStyle: consistent
|
59
44
|
|
60
|
-
|
61
|
-
Enabled:
|
45
|
+
Layout/LineLength:
|
46
|
+
Enabled: true
|
47
|
+
Max: 115
|
62
48
|
|
63
|
-
|
49
|
+
Layout/MultilineArrayBraceLayout:
|
64
50
|
Enabled: true
|
51
|
+
EnforcedStyle: new_line
|
65
52
|
|
66
|
-
|
53
|
+
Layout/MultilineArrayLineBreaks:
|
67
54
|
Enabled: true
|
68
55
|
|
69
|
-
|
56
|
+
Layout/MultilineHashBraceLayout:
|
70
57
|
Enabled: true
|
58
|
+
EnforcedStyle: new_line
|
71
59
|
|
72
|
-
|
73
|
-
Enabled:
|
60
|
+
Layout/MultilineHashKeyLineBreaks:
|
61
|
+
Enabled: true
|
74
62
|
|
75
|
-
|
76
|
-
Enabled:
|
63
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
64
|
+
Enabled: true
|
77
65
|
|
78
|
-
|
66
|
+
Layout/MultilineMethodCallBraceLayout:
|
79
67
|
Enabled: true
|
80
|
-
|
68
|
+
EnforcedStyle: new_line
|
69
|
+
|
70
|
+
Layout/MultilineMethodCallIndentation:
|
81
71
|
Enabled: true
|
82
|
-
|
72
|
+
EnforcedStyle: indented
|
73
|
+
|
74
|
+
Layout/SpaceAroundMethodCallOperator:
|
83
75
|
Enabled: true
|
84
|
-
|
76
|
+
|
77
|
+
Layout/TrailingWhitespace:
|
78
|
+
AllowInHeredoc: true
|
85
79
|
Enabled: true
|
86
|
-
|
87
|
-
|
88
|
-
|
80
|
+
|
81
|
+
Lint/AmbiguousBlockAssociation:
|
82
|
+
Exclude:
|
83
|
+
- spec/**/*
|
84
|
+
|
85
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
89
86
|
Enabled: true
|
90
|
-
|
87
|
+
|
88
|
+
Lint/ConstantDefinitionInBlock:
|
91
89
|
Enabled: true
|
92
|
-
|
90
|
+
|
91
|
+
Lint/DeprecatedOpenSSLConstant:
|
93
92
|
Enabled: true
|
94
|
-
|
93
|
+
|
94
|
+
Lint/DuplicateBranch:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Lint/DuplicateElsifCondition:
|
95
98
|
Enabled: true
|
96
|
-
|
99
|
+
|
100
|
+
Lint/DuplicateRequire:
|
97
101
|
Enabled: true
|
98
|
-
|
102
|
+
|
103
|
+
Lint/DuplicateRescueException:
|
99
104
|
Enabled: true
|
100
|
-
|
105
|
+
|
106
|
+
Lint/EmptyConditionalBody:
|
101
107
|
Enabled: true
|
102
|
-
|
108
|
+
|
109
|
+
Lint/EmptyFile:
|
103
110
|
Enabled: true
|
104
|
-
|
111
|
+
|
112
|
+
Lint/FloatComparison:
|
105
113
|
Enabled: true
|
106
|
-
|
114
|
+
|
115
|
+
Lint/IdentityComparison:
|
107
116
|
Enabled: true
|
108
|
-
|
117
|
+
|
118
|
+
Lint/MissingSuper:
|
109
119
|
Enabled: true
|
110
|
-
|
120
|
+
|
121
|
+
Lint/MixedRegexpCaptureTypes:
|
111
122
|
Enabled: true
|
112
|
-
|
123
|
+
|
124
|
+
Lint/OutOfRangeRegexpRef:
|
113
125
|
Enabled: true
|
114
|
-
|
126
|
+
|
127
|
+
Lint/RaiseException:
|
115
128
|
Enabled: true
|
116
|
-
|
129
|
+
|
130
|
+
Lint/SelfAssignment:
|
117
131
|
Enabled: true
|
118
132
|
|
119
|
-
|
120
|
-
|
121
|
-
Enabled: false
|
133
|
+
Lint/StructNewOverride:
|
134
|
+
Enabled: true
|
122
135
|
|
123
|
-
|
136
|
+
Lint/TopLevelReturnWithArgument:
|
124
137
|
Enabled: true
|
125
|
-
ForbiddenPrefixes:
|
126
|
-
is_
|
127
138
|
|
128
|
-
|
139
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
129
140
|
Enabled: true
|
130
|
-
Exclude:
|
131
|
-
- "spec/**/*"
|
132
|
-
- "gems/we_connect/spec//**/*"
|
133
141
|
|
134
|
-
|
135
|
-
|
142
|
+
Lint/UnreachableLoop:
|
143
|
+
Enabled: true
|
136
144
|
|
137
|
-
|
138
|
-
|
145
|
+
Lint/UselessAssignment:
|
146
|
+
Enabled: true
|
139
147
|
|
140
|
-
|
141
|
-
|
142
|
-
Exclude:
|
143
|
-
- "spec/**/*"
|
148
|
+
Lint/UselessMethodDefinition:
|
149
|
+
Enabled: true
|
144
150
|
|
145
|
-
|
151
|
+
Lint/UselessTimes:
|
146
152
|
Enabled: true
|
147
|
-
AllowInHeredoc: true
|
148
153
|
|
149
|
-
Metrics/
|
154
|
+
Metrics/AbcSize:
|
150
155
|
Enabled: false
|
151
156
|
|
152
|
-
|
157
|
+
Metrics/BlockLength:
|
153
158
|
Enabled: true
|
154
|
-
Max: 115 # Readable github.com diffs
|
155
159
|
|
156
|
-
|
160
|
+
Metrics/ClassLength:
|
157
161
|
Enabled: false
|
158
162
|
|
159
|
-
|
160
|
-
|
163
|
+
Metrics/CyclomaticComplexity:
|
164
|
+
Max: 42
|
161
165
|
|
162
166
|
Metrics/MethodLength:
|
163
167
|
Max: 42
|
164
168
|
Exclude:
|
165
|
-
- "
|
169
|
+
- "spec/**/*_spec.rb"
|
166
170
|
|
167
|
-
Metrics/
|
168
|
-
|
169
|
-
- "**/spec/**/*"
|
170
|
-
- "config/routes.rb"
|
171
|
-
- "**/*.gemspec"
|
172
|
-
|
173
|
-
Lint/UselessAssignment:
|
174
|
-
Exclude:
|
175
|
-
- "spec/**/*"
|
171
|
+
Metrics/ModuleLength:
|
172
|
+
Enabled: false
|
176
173
|
|
177
|
-
|
174
|
+
Metrics/ParameterLists:
|
175
|
+
CountKeywordArgs: false
|
178
176
|
Enabled: true
|
179
177
|
|
180
|
-
|
181
|
-
|
178
|
+
Metrics/PerceivedComplexity:
|
179
|
+
Max: 42
|
182
180
|
|
183
|
-
|
181
|
+
Naming/PredicateName:
|
184
182
|
Enabled: true
|
183
|
+
ForbiddenPrefixes: is_
|
185
184
|
|
186
|
-
|
185
|
+
Naming/VariableNumber:
|
187
186
|
Enabled: true
|
188
187
|
|
189
|
-
|
190
|
-
Enabled:
|
188
|
+
RSpec/AnyInstance:
|
189
|
+
Enabled: false
|
191
190
|
|
192
|
-
|
193
|
-
Enabled:
|
191
|
+
RSpec/DescribeClass:
|
192
|
+
Enabled: false
|
194
193
|
|
195
|
-
|
196
|
-
Enabled:
|
194
|
+
RSpec/DescribedClass:
|
195
|
+
Enabled: false
|
197
196
|
|
198
|
-
|
199
|
-
Enabled:
|
197
|
+
RSpec/ExampleLength:
|
198
|
+
Enabled: false
|
200
199
|
|
201
|
-
|
200
|
+
RSpec/MultipleExpectations:
|
202
201
|
Enabled: false
|
203
202
|
|
204
|
-
|
205
|
-
|
203
|
+
RSpec/NestedGroups:
|
204
|
+
Max: 4
|
206
205
|
|
207
|
-
|
208
|
-
|
206
|
+
RSpec/NoExpectationExample:
|
207
|
+
Exclude:
|
208
|
+
- spec/domain/**/*
|
209
209
|
|
210
|
-
|
210
|
+
RSpec/VerifiedDoubles:
|
211
211
|
Enabled: true
|
212
212
|
|
213
|
-
Style/
|
213
|
+
Style/AccessorGrouping:
|
214
214
|
Enabled: true
|
215
215
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
Metrics/PerceivedComplexity:
|
220
|
-
Max: 42
|
216
|
+
Style/ArrayCoercion:
|
217
|
+
Enabled: true
|
221
218
|
|
222
|
-
Style/
|
219
|
+
Style/AsciiComments:
|
223
220
|
Enabled: false
|
224
221
|
|
225
|
-
Style/
|
226
|
-
|
222
|
+
Style/BisectedAttrAccessor:
|
223
|
+
Enabled: true
|
227
224
|
|
228
225
|
Style/BlockDelimiters:
|
229
226
|
Enabled: true
|
230
227
|
|
231
|
-
Style/
|
228
|
+
Style/CaseLikeIf:
|
232
229
|
Enabled: true
|
233
230
|
|
234
|
-
|
235
|
-
Enabled:
|
236
|
-
|
237
|
-
|
238
|
-
Lint/DuplicateRescueException: # (new in 0.89)
|
239
|
-
Enabled: true
|
240
|
-
Lint/EmptyConditionalBody: # (new in 0.89)
|
241
|
-
Enabled: true
|
242
|
-
Lint/EmptyFile: # (new in 0.90)
|
243
|
-
Enabled: true
|
244
|
-
Lint/FloatComparison: # (new in 0.89)
|
245
|
-
Enabled: true
|
246
|
-
Lint/MissingSuper: # (new in 0.89)
|
247
|
-
Enabled: true
|
248
|
-
Lint/OutOfRangeRegexpRef: # (new in 0.89)
|
249
|
-
Enabled: true
|
250
|
-
Lint/SelfAssignment: # (new in 0.89)
|
251
|
-
Enabled: true
|
252
|
-
Lint/TopLevelReturnWithArgument: # (new in 0.89)
|
253
|
-
Enabled: true
|
254
|
-
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
|
255
|
-
Enabled: true
|
256
|
-
Lint/UnreachableLoop: # (new in 0.89)
|
257
|
-
Enabled: true
|
258
|
-
Lint/UselessMethodDefinition: # (new in 0.90)
|
259
|
-
Enabled: true
|
260
|
-
Style/CombinableLoops: # (new in 0.90)
|
261
|
-
Enabled: true
|
262
|
-
Style/ExplicitBlockArgument: # (new in 0.89)
|
263
|
-
Enabled: true
|
264
|
-
Style/GlobalStdStream: # (new in 0.89)
|
265
|
-
Enabled: true
|
266
|
-
Style/KeywordParametersOrder: # (new in 0.90)
|
267
|
-
Enabled: true
|
268
|
-
Style/OptionalBooleanParameter: # (new in 0.89)
|
269
|
-
Enabled: true
|
270
|
-
Style/RedundantSelfAssignment: # (new in 0.90)
|
271
|
-
Enabled: true
|
272
|
-
Style/SoleNestedConditional: # (new in 0.89)
|
273
|
-
Enabled: true
|
274
|
-
Style/StringConcatenation: # (new in 0.89)
|
231
|
+
Style/ClassAndModuleChildren:
|
232
|
+
Enabled: false
|
233
|
+
|
234
|
+
Style/CombinableLoops:
|
275
235
|
Enabled: true
|
276
236
|
|
277
|
-
|
237
|
+
Style/Documentation:
|
278
238
|
Enabled: false
|
279
239
|
|
280
|
-
|
240
|
+
Style/EmptyMethod:
|
241
|
+
EnforcedStyle: expanded
|
242
|
+
|
243
|
+
Style/ExplicitBlockArgument:
|
281
244
|
Enabled: true
|
282
|
-
|
245
|
+
|
246
|
+
Style/ExponentialNotation:
|
283
247
|
Enabled: true
|
284
|
-
|
248
|
+
|
249
|
+
Style/FrozenStringLiteralComment:
|
250
|
+
EnforcedStyle: never
|
251
|
+
|
252
|
+
Style/GlobalStdStream:
|
285
253
|
Enabled: true
|
286
|
-
|
254
|
+
|
255
|
+
Style/GuardClause:
|
256
|
+
Enabled: false
|
257
|
+
|
258
|
+
Style/HashAsLastArrayItem:
|
287
259
|
Enabled: true
|
288
|
-
|
260
|
+
|
261
|
+
Style/HashEachMethods:
|
289
262
|
Enabled: true
|
290
|
-
|
263
|
+
|
264
|
+
Style/HashLikeCase:
|
291
265
|
Enabled: true
|
292
|
-
|
266
|
+
|
267
|
+
Style/HashTransformKeys:
|
293
268
|
Enabled: true
|
294
|
-
Metrics/AbcSize:
|
295
|
-
Enabled: false
|
296
269
|
|
297
|
-
|
298
|
-
|
299
|
-
- production
|
300
|
-
- development
|
301
|
-
- test
|
302
|
-
- staging
|
270
|
+
Style/HashTransformValues:
|
271
|
+
Enabled: true
|
303
272
|
|
304
|
-
|
305
|
-
Enabled: false
|
306
|
-
RSpec/DescribedClass:
|
307
|
-
Enabled: false
|
308
|
-
RSpec/NestedGroups:
|
309
|
-
Max: 4
|
310
|
-
RSpec/MultipleExpectations:
|
273
|
+
Style/IfInsideElse:
|
311
274
|
Enabled: false
|
312
|
-
|
275
|
+
|
276
|
+
Style/IfUnlessModifier:
|
313
277
|
Enabled: false
|
314
|
-
|
278
|
+
|
279
|
+
Style/KeywordParametersOrder:
|
280
|
+
Enabled: true
|
281
|
+
|
282
|
+
Style/Lambda:
|
283
|
+
EnforcedStyle: literal
|
284
|
+
|
285
|
+
Style/MultilineBlockChain:
|
315
286
|
Enabled: false
|
316
287
|
|
317
|
-
|
318
|
-
|
319
|
-
Exclude:
|
320
|
-
- "app/controllers/admin/**/*"
|
288
|
+
Style/NumericLiterals:
|
289
|
+
Enabled: false
|
321
290
|
|
322
|
-
|
323
|
-
# Multi-line formatting (hashes)
|
324
|
-
##
|
325
|
-
Layout/FirstHashElementLineBreak:
|
291
|
+
Style/OptionalBooleanParameter:
|
326
292
|
Enabled: true
|
327
293
|
|
328
|
-
|
294
|
+
Style/RedundantAssignment:
|
329
295
|
Enabled: true
|
330
|
-
EnforcedStyle: consistent
|
331
296
|
|
332
|
-
|
297
|
+
Style/RedundantFetchBlock:
|
333
298
|
Enabled: true
|
334
|
-
EnforcedStyle: new_line
|
335
299
|
|
336
|
-
|
300
|
+
Style/RedundantFileExtensionInRequire:
|
337
301
|
Enabled: true
|
338
302
|
|
339
|
-
|
340
|
-
# Multi-line formatting (array)
|
341
|
-
##
|
342
|
-
Layout/FirstArrayElementLineBreak:
|
303
|
+
Style/RedundantRegexpCharacterClass:
|
343
304
|
Enabled: true
|
344
305
|
|
345
|
-
|
306
|
+
Style/RedundantRegexpEscape:
|
346
307
|
Enabled: true
|
347
|
-
EnforcedStyle: consistent
|
348
308
|
|
349
|
-
|
309
|
+
Style/RedundantSelfAssignment:
|
350
310
|
Enabled: true
|
351
|
-
EnforcedStyle: new_line
|
352
311
|
|
353
|
-
|
354
|
-
Enabled:
|
312
|
+
Style/RescueModifier:
|
313
|
+
Enabled: false
|
355
314
|
|
356
|
-
|
357
|
-
# Multi-line formatting (methods/arguments/blocks)
|
358
|
-
##
|
359
|
-
Layout/FirstMethodArgumentLineBreak:
|
315
|
+
Style/SingleArgumentDig:
|
360
316
|
Enabled: true
|
361
317
|
|
362
|
-
|
318
|
+
Style/SlicingWithRange:
|
363
319
|
Enabled: true
|
364
|
-
EnforcedStyle: consistent
|
365
320
|
|
366
|
-
|
321
|
+
Style/SoleNestedConditional:
|
367
322
|
Enabled: true
|
368
|
-
EnforcedStyle: consistent
|
369
323
|
|
370
|
-
|
324
|
+
Style/StringConcatenation:
|
371
325
|
Enabled: true
|
372
|
-
EnforcedStyle: new_line
|
373
326
|
|
374
|
-
|
327
|
+
Style/StringLiterals:
|
328
|
+
EnforcedStyle: double_quotes
|
329
|
+
|
330
|
+
Style/StringLiteralsInInterpolation:
|
331
|
+
EnforcedStyle: double_quotes
|
332
|
+
|
333
|
+
Style/SymbolArray:
|
334
|
+
EnforcedStyle: brackets
|
335
|
+
|
336
|
+
Style/TrailingCommaInArguments:
|
375
337
|
Enabled: true
|
338
|
+
EnforcedStyleForMultiline: comma
|
376
339
|
|
377
|
-
|
340
|
+
Style/TrailingCommaInArrayLiteral:
|
378
341
|
Enabled: true
|
379
|
-
|
342
|
+
EnforcedStyleForMultiline: comma
|
380
343
|
|
381
|
-
|
344
|
+
Style/TrailingCommaInHashLiteral:
|
382
345
|
Enabled: true
|
383
|
-
|
346
|
+
EnforcedStyleForMultiline: comma
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stekker_zaptec (1.
|
4
|
+
stekker_zaptec (1.2.1)
|
5
5
|
activemodel
|
6
6
|
activesupport
|
7
7
|
faraday
|
@@ -10,17 +10,18 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (7.0.
|
14
|
-
activesupport (= 7.0.
|
15
|
-
activesupport (7.0.
|
13
|
+
activemodel (7.0.8)
|
14
|
+
activesupport (= 7.0.8)
|
15
|
+
activesupport (7.0.8)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
19
19
|
tzinfo (~> 2.0)
|
20
|
-
addressable (2.8.
|
20
|
+
addressable (2.8.5)
|
21
21
|
public_suffix (>= 2.0.2, < 6.0)
|
22
22
|
ast (2.4.2)
|
23
|
-
|
23
|
+
base64 (0.1.1)
|
24
|
+
concurrent-ruby (1.2.2)
|
24
25
|
crack (0.4.5)
|
25
26
|
rexml
|
26
27
|
diff-lcs (1.5.0)
|
@@ -51,62 +52,70 @@ GEM
|
|
51
52
|
faraday (~> 1.0)
|
52
53
|
gem-release (2.2.2)
|
53
54
|
hashdiff (1.0.1)
|
54
|
-
i18n (1.
|
55
|
+
i18n (1.14.1)
|
55
56
|
concurrent-ruby (~> 1.0)
|
56
57
|
json (2.6.3)
|
57
|
-
jwt (2.
|
58
|
-
|
58
|
+
jwt (2.7.1)
|
59
|
+
language_server-protocol (3.17.0.3)
|
60
|
+
minitest (5.20.0)
|
59
61
|
multipart-post (2.3.0)
|
60
|
-
parallel (1.
|
61
|
-
parser (3.2.
|
62
|
+
parallel (1.23.0)
|
63
|
+
parser (3.2.2.3)
|
62
64
|
ast (~> 2.4.1)
|
63
|
-
|
64
|
-
|
65
|
+
racc
|
66
|
+
public_suffix (5.0.3)
|
67
|
+
racc (1.7.1)
|
68
|
+
rack (3.0.8)
|
65
69
|
rainbow (3.1.1)
|
66
70
|
rake (13.0.6)
|
67
|
-
regexp_parser (2.
|
68
|
-
rexml (3.2.
|
71
|
+
regexp_parser (2.8.1)
|
72
|
+
rexml (3.2.6)
|
69
73
|
rspec (3.12.0)
|
70
74
|
rspec-core (~> 3.12.0)
|
71
75
|
rspec-expectations (~> 3.12.0)
|
72
76
|
rspec-mocks (~> 3.12.0)
|
73
|
-
rspec-core (3.12.
|
77
|
+
rspec-core (3.12.2)
|
74
78
|
rspec-support (~> 3.12.0)
|
75
|
-
rspec-expectations (3.12.
|
79
|
+
rspec-expectations (3.12.3)
|
76
80
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
81
|
rspec-support (~> 3.12.0)
|
78
|
-
rspec-mocks (3.12.
|
82
|
+
rspec-mocks (3.12.6)
|
79
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
84
|
rspec-support (~> 3.12.0)
|
81
|
-
rspec-support (3.12.
|
82
|
-
rubocop (1.
|
85
|
+
rspec-support (3.12.1)
|
86
|
+
rubocop (1.56.3)
|
87
|
+
base64 (~> 0.1.1)
|
83
88
|
json (~> 2.3)
|
89
|
+
language_server-protocol (>= 3.17.0)
|
84
90
|
parallel (~> 1.10)
|
85
|
-
parser (>= 3.2.
|
91
|
+
parser (>= 3.2.2.3)
|
86
92
|
rainbow (>= 2.2.2, < 4.0)
|
87
93
|
regexp_parser (>= 1.8, < 3.0)
|
88
94
|
rexml (>= 3.2.5, < 4.0)
|
89
|
-
rubocop-ast (>= 1.
|
95
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
90
96
|
ruby-progressbar (~> 1.7)
|
91
97
|
unicode-display_width (>= 2.4.0, < 3.0)
|
92
|
-
rubocop-ast (1.
|
93
|
-
parser (>= 3.
|
94
|
-
rubocop-capybara (2.
|
98
|
+
rubocop-ast (1.29.0)
|
99
|
+
parser (>= 3.2.1.0)
|
100
|
+
rubocop-capybara (2.18.0)
|
95
101
|
rubocop (~> 1.41)
|
96
|
-
rubocop-
|
102
|
+
rubocop-factory_bot (2.23.1)
|
103
|
+
rubocop (~> 1.33)
|
104
|
+
rubocop-rails (2.21.0)
|
97
105
|
activesupport (>= 4.2.0)
|
98
106
|
rack (>= 1.1)
|
99
107
|
rubocop (>= 1.33.0, < 2.0)
|
100
|
-
rubocop-rspec (2.
|
108
|
+
rubocop-rspec (2.24.0)
|
101
109
|
rubocop (~> 1.33)
|
102
110
|
rubocop-capybara (~> 2.17)
|
103
|
-
|
111
|
+
rubocop-factory_bot (~> 2.22)
|
112
|
+
ruby-progressbar (1.13.0)
|
104
113
|
ruby2_keywords (0.0.5)
|
105
|
-
timecop (0.9.
|
114
|
+
timecop (0.9.8)
|
106
115
|
tzinfo (2.0.6)
|
107
116
|
concurrent-ruby (~> 1.0)
|
108
117
|
unicode-display_width (2.4.2)
|
109
|
-
webmock (3.
|
118
|
+
webmock (3.19.1)
|
110
119
|
addressable (>= 2.8.0)
|
111
120
|
crack (>= 0.3.2)
|
112
121
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/README.md
CHANGED
@@ -63,3 +63,15 @@ client.state(id, device_type_apollo).online?
|
|
63
63
|
## Contributing
|
64
64
|
|
65
65
|
Bug reports and pull requests are welcome on GitHub at https://github.com/stekker/zaptec.
|
66
|
+
|
67
|
+
## Publishing
|
68
|
+
|
69
|
+
```bash
|
70
|
+
# - bumps the gem version to the next major, minor or patch version.
|
71
|
+
# - creates commit for the version bump
|
72
|
+
# - tags the commit
|
73
|
+
# - pushes the commit and tag
|
74
|
+
# - publishes the gem to Rubygems
|
75
|
+
bin/release [major|minor|patch]
|
76
|
+
# See also https://github.com/svenfuchs/gem-release#gem-bump
|
77
|
+
```
|
data/bin/release
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
# Read major/minor/patch argument
|
7
|
+
version="$1"
|
8
|
+
|
9
|
+
# Do a pretend version bump to determine what the new version should be
|
10
|
+
bumped_version=$(gem bump "$version" --pretend --no-commit | awk '{ print $4 }' | tr -d '[:space:]')
|
11
|
+
|
12
|
+
# Use ruby to get the root level directory name
|
13
|
+
gem_name=$(ruby -e "puts File.basename(Dir.pwd)")
|
14
|
+
|
15
|
+
# Update version file
|
16
|
+
gem bump --version "$bumped_version" --no-commit
|
17
|
+
|
18
|
+
# Run bundle install to ensure gem version in Gemfile is updated
|
19
|
+
bundle install
|
20
|
+
|
21
|
+
# Stage Gemfile.lock and the version file
|
22
|
+
git add Gemfile.lock "lib/$gem_name/version.rb"
|
23
|
+
|
24
|
+
# Finally create the bump commit
|
25
|
+
git commit -m "Bump $gem_name to $bumped_version"
|
26
|
+
|
27
|
+
# Create a tag, push the commit and tag, and release to Rubygems
|
28
|
+
gem bump --version "$bumped_version" --no-commit --tag --push --release
|
data/lib/zaptec/client.rb
CHANGED
@@ -42,16 +42,16 @@ module Zaptec
|
|
42
42
|
{
|
43
43
|
username:,
|
44
44
|
password:,
|
45
|
-
grant_type: "password"
|
45
|
+
grant_type: "password",
|
46
46
|
}.to_query,
|
47
47
|
{
|
48
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
49
|
-
}
|
48
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
49
|
+
},
|
50
50
|
)
|
51
51
|
|
52
52
|
@credentials = Zaptec::Credentials.new(
|
53
53
|
response.body["access_token"],
|
54
|
-
start + response.body["expires_in"].to_f
|
54
|
+
start + response.body["expires_in"].to_f,
|
55
55
|
)
|
56
56
|
rescue Faraday::BadRequestError
|
57
57
|
raise Errors::AuthorizationFailed
|
@@ -84,7 +84,7 @@ module Zaptec
|
|
84
84
|
.to_h do |state|
|
85
85
|
[
|
86
86
|
Constants.observation_state_id_to_name(state_id: state.fetch("StateId"), device_type:),
|
87
|
-
state.fetch("ValueAsString", nil)
|
87
|
+
state.fetch("ValueAsString", nil),
|
88
88
|
]
|
89
89
|
end
|
90
90
|
.then { |data| State.new(data) }
|
@@ -176,7 +176,7 @@ module Zaptec
|
|
176
176
|
@token_cache.write(
|
177
177
|
TOKENS_CACHE_KEY,
|
178
178
|
@encryptor.encrypt(request_access_token.to_json, cipher_options: { deterministic: true }),
|
179
|
-
expires_in: 1.day
|
179
|
+
expires_in: 1.day,
|
180
180
|
)
|
181
181
|
rescue Faraday::Error => e
|
182
182
|
raise Errors::RequestFailed.new("Request returned status #{e.response_status}", e.response)
|
data/lib/zaptec/credentials.rb
CHANGED
data/lib/zaptec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stekker_zaptec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Stekker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- README.md
|
84
84
|
- Rakefile
|
85
85
|
- bin/console
|
86
|
+
- bin/release
|
86
87
|
- bin/setup
|
87
88
|
- data/constants.json
|
88
89
|
- lib/stekker_zaptec.rb
|
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
requirements: []
|
124
|
-
rubygems_version: 3.4.
|
125
|
+
rubygems_version: 3.4.18
|
125
126
|
signing_key:
|
126
127
|
specification_version: 4
|
127
128
|
summary: Connect to your Zaptec charger
|