gman_client 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound-rubocop.yml +242 -0
- data/.hound.yml +1 -4
- data/.rubocop.yml +17 -230
- data/Gemfile +1 -1
- data/lib/gman/client.rb +7 -6
- data/lib/gman_client/commodity_merchandising/contracts.rb +7 -1
- data/lib/gman_client/version.rb +1 -1
- data/spec/lib/client_contracts_spec.rb +10 -1
- data/spec/lib/driver_commission_history_response_spec.rb +3 -2
- data/spec/support/gman_adapter.rb +5 -4
- data/spec/vcr_cassettes/contracts.yml +70 -31
- data/spec/vcr_cassettes/driver_commission_histories.yml +88 -4
- data/spec/vcr_cassettes/driver_commission_histories_by_paid_date.yml +8 -8
- data/spec/vcr_cassettes/drivers.yml +90 -6
- data/spec/vcr_cassettes/inventory_items.yml +85 -1
- data/spec/vcr_cassettes/inventory_items_like_id_description.yml +6 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d92c041243c9292d3a28fb93757b7cc1fbc7b3c
|
4
|
+
data.tar.gz: 5cd96aeae1636af33b2f3861973e22a7e831474a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3385ae7287f790b40dca3c132c197b6e1aedcf919c8c13d85e3bfabf12bb8829c069ceaaf25d2fa644ece243d2b569b3b6dca7d62b6afebcc8249680cfa8880c
|
7
|
+
data.tar.gz: ccc90ec73835c249501a98b4dc866f58be56302b22e69771875ca19f5cbd25bf65c5538686edb07681981c7ac523cfa478ef9fe6ac4c619da58418a86f19248c
|
data/.hound-rubocop.yml
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.2
|
3
|
+
Exclude:
|
4
|
+
UseCache: false
|
5
|
+
Style/CollectionMethods:
|
6
|
+
Description: Preferred collection methods.
|
7
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
8
|
+
Enabled: true
|
9
|
+
PreferredMethods:
|
10
|
+
collect: map
|
11
|
+
collect!: map!
|
12
|
+
find: detect
|
13
|
+
find_all: select
|
14
|
+
reduce: inject
|
15
|
+
Style/DotPosition:
|
16
|
+
Description: Checks the position of the dot in multi-line method calls.
|
17
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
18
|
+
Enabled: true
|
19
|
+
EnforcedStyle: trailing
|
20
|
+
SupportedStyles:
|
21
|
+
- leading
|
22
|
+
- trailing
|
23
|
+
Style/FileName:
|
24
|
+
Description: Use snake_case for source file names.
|
25
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
26
|
+
Enabled: false
|
27
|
+
Exclude: []
|
28
|
+
Style/GuardClause:
|
29
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
30
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
31
|
+
Enabled: false
|
32
|
+
MinBodyLength: 1
|
33
|
+
Style/IfUnlessModifier:
|
34
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
35
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
36
|
+
Enabled: false
|
37
|
+
MaxLineLength: 80
|
38
|
+
Style/OptionHash:
|
39
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
40
|
+
Enabled: false
|
41
|
+
Style/PercentLiteralDelimiters:
|
42
|
+
Description: Use `%`-literal delimiters consistently
|
43
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
44
|
+
Enabled: false
|
45
|
+
PreferredDelimiters:
|
46
|
+
"%": "()"
|
47
|
+
"%i": "()"
|
48
|
+
"%q": "()"
|
49
|
+
"%Q": "()"
|
50
|
+
"%r": "{}"
|
51
|
+
"%s": "()"
|
52
|
+
"%w": "()"
|
53
|
+
"%W": "()"
|
54
|
+
"%x": "()"
|
55
|
+
Style/PredicateName:
|
56
|
+
Description: Check the names of predicate methods.
|
57
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
58
|
+
Enabled: true
|
59
|
+
NamePrefix:
|
60
|
+
- is_
|
61
|
+
- has_
|
62
|
+
- have_
|
63
|
+
NamePrefixBlacklist:
|
64
|
+
- is_
|
65
|
+
Exclude:
|
66
|
+
- spec/**/*
|
67
|
+
Style/RaiseArgs:
|
68
|
+
Description: Checks the arguments passed to raise/fail.
|
69
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
70
|
+
Enabled: false
|
71
|
+
EnforcedStyle: exploded
|
72
|
+
SupportedStyles:
|
73
|
+
- compact
|
74
|
+
- exploded
|
75
|
+
Style/SignalException:
|
76
|
+
Description: Checks for proper usage of fail and raise.
|
77
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
78
|
+
Enabled: false
|
79
|
+
EnforcedStyle: semantic
|
80
|
+
SupportedStyles:
|
81
|
+
- only_raise
|
82
|
+
- only_fail
|
83
|
+
- semantic
|
84
|
+
Style/SingleLineBlockParams:
|
85
|
+
Description: Enforces the names of some block params.
|
86
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
87
|
+
Enabled: false
|
88
|
+
Methods:
|
89
|
+
- reduce:
|
90
|
+
- a
|
91
|
+
- e
|
92
|
+
- inject:
|
93
|
+
- a
|
94
|
+
- e
|
95
|
+
Style/SingleLineMethods:
|
96
|
+
Description: Avoid single-line methods.
|
97
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
98
|
+
Enabled: false
|
99
|
+
AllowIfMethodIsEmpty: true
|
100
|
+
Style/StringLiterals:
|
101
|
+
Description: Checks if uses of quotes match the configured preference.
|
102
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
103
|
+
Enabled: true
|
104
|
+
EnforcedStyle: double_quotes
|
105
|
+
SupportedStyles:
|
106
|
+
- single_quotes
|
107
|
+
- double_quotes
|
108
|
+
Style/StringLiteralsInInterpolation:
|
109
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
110
|
+
match the configured preference.
|
111
|
+
Enabled: true
|
112
|
+
EnforcedStyle: single_quotes
|
113
|
+
SupportedStyles:
|
114
|
+
- single_quotes
|
115
|
+
- double_quotes
|
116
|
+
Style/TrailingCommaInArguments:
|
117
|
+
Description: 'Checks for trailing comma in argument lists.'
|
118
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
119
|
+
Enabled: false
|
120
|
+
EnforcedStyleForMultiline: no_comma
|
121
|
+
SupportedStyles:
|
122
|
+
- comma
|
123
|
+
- consistent_comma
|
124
|
+
- no_comma
|
125
|
+
Style/TrailingCommaInLiteral:
|
126
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
127
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
128
|
+
Enabled: false
|
129
|
+
EnforcedStyleForMultiline: no_comma
|
130
|
+
SupportedStyles:
|
131
|
+
- comma
|
132
|
+
- consistent_comma
|
133
|
+
- no_comma
|
134
|
+
Metrics/AbcSize:
|
135
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
136
|
+
conditions.
|
137
|
+
Enabled: false
|
138
|
+
Max: 15
|
139
|
+
Metrics/ClassLength:
|
140
|
+
Description: Avoid classes longer than 100 lines of code.
|
141
|
+
Enabled: false
|
142
|
+
CountComments: false
|
143
|
+
Max: 100
|
144
|
+
Metrics/ModuleLength:
|
145
|
+
CountComments: false
|
146
|
+
Max: 100
|
147
|
+
Description: Avoid modules longer than 100 lines of code.
|
148
|
+
Enabled: false
|
149
|
+
Metrics/CyclomaticComplexity:
|
150
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
151
|
+
cases needed to validate a method.
|
152
|
+
Enabled: false
|
153
|
+
Max: 6
|
154
|
+
Metrics/MethodLength:
|
155
|
+
Description: Avoid methods longer than 10 lines of code.
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
157
|
+
Enabled: false
|
158
|
+
CountComments: false
|
159
|
+
Max: 10
|
160
|
+
Metrics/ParameterLists:
|
161
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
162
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
163
|
+
Enabled: false
|
164
|
+
Max: 5
|
165
|
+
CountKeywordArgs: true
|
166
|
+
Metrics/PerceivedComplexity:
|
167
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
168
|
+
reader.
|
169
|
+
Enabled: false
|
170
|
+
Max: 7
|
171
|
+
Lint/AssignmentInCondition:
|
172
|
+
Description: Don't use assignment in conditions.
|
173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
174
|
+
Enabled: false
|
175
|
+
AllowSafeAssignment: true
|
176
|
+
Style/InlineComment:
|
177
|
+
Description: Avoid inline comments.
|
178
|
+
Enabled: false
|
179
|
+
Style/AccessorMethodName:
|
180
|
+
Description: Check the naming of accessor methods for get_/set_.
|
181
|
+
Enabled: false
|
182
|
+
Style/Alias:
|
183
|
+
Description: Use alias_method instead of alias.
|
184
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
185
|
+
Enabled: false
|
186
|
+
Style/Documentation:
|
187
|
+
Description: Document classes and non-namespace modules.
|
188
|
+
Enabled: false
|
189
|
+
Style/DoubleNegation:
|
190
|
+
Description: Checks for uses of double negation (!!).
|
191
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
192
|
+
Enabled: false
|
193
|
+
Style/EachWithObject:
|
194
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
195
|
+
Enabled: false
|
196
|
+
Style/EmptyLiteral:
|
197
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
199
|
+
Enabled: false
|
200
|
+
Style/ModuleFunction:
|
201
|
+
Description: Checks for usage of `extend self` in modules.
|
202
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
203
|
+
Enabled: false
|
204
|
+
Style/OneLineConditional:
|
205
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
206
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
207
|
+
Enabled: false
|
208
|
+
Style/PerlBackrefs:
|
209
|
+
Description: Avoid Perl-style regex back references.
|
210
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
211
|
+
Enabled: false
|
212
|
+
Style/Send:
|
213
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
214
|
+
may overlap with existing methods.
|
215
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
216
|
+
Enabled: false
|
217
|
+
Style/SpecialGlobalVars:
|
218
|
+
Description: Avoid Perl-style global variables.
|
219
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
220
|
+
Enabled: false
|
221
|
+
Style/VariableInterpolation:
|
222
|
+
Description: Don't interpolate global, instance and class variables directly in
|
223
|
+
strings.
|
224
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
225
|
+
Enabled: false
|
226
|
+
Style/WhenThen:
|
227
|
+
Description: Use when x then ... for one-line cases.
|
228
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
229
|
+
Enabled: false
|
230
|
+
Lint/EachWithObjectArgument:
|
231
|
+
Description: Check for immutable argument given to each_with_object.
|
232
|
+
Enabled: true
|
233
|
+
Lint/HandleExceptions:
|
234
|
+
Description: Don't suppress exception.
|
235
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
236
|
+
Enabled: false
|
237
|
+
Lint/LiteralInCondition:
|
238
|
+
Description: Checks of literals used in conditions.
|
239
|
+
Enabled: false
|
240
|
+
Lint/LiteralInInterpolation:
|
241
|
+
Description: Checks for literals used in interpolation.
|
242
|
+
Enabled: false
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,18 +1,23 @@
|
|
1
|
+
inherit_from: .hound-rubocop.yml
|
2
|
+
|
1
3
|
AllCops:
|
4
|
+
TargetRubyVersion: 2.2
|
2
5
|
Exclude:
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Description: Preferred collection methods.
|
8
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
6
|
+
- bin/*
|
7
|
+
Style/AndOr:
|
8
|
+
Description: Use &&/|| instead of and/or.
|
9
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
9
10
|
Enabled: true
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
EnforcedStyle: conditionals
|
12
|
+
SupportedStyles:
|
13
|
+
- always
|
14
|
+
- conditionals
|
15
|
+
Style/ClassAndModuleChildren:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedStyle: nested
|
18
|
+
SupportedStyles:
|
19
|
+
- compact
|
20
|
+
- nested
|
16
21
|
Style/DotPosition:
|
17
22
|
Description: Checks the position of the dot in multi-line method calls.
|
18
23
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
@@ -21,83 +26,6 @@ Style/DotPosition:
|
|
21
26
|
SupportedStyles:
|
22
27
|
- leading
|
23
28
|
- trailing
|
24
|
-
Style/FileName:
|
25
|
-
Description: Use snake_case for source file names.
|
26
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
27
|
-
Enabled: false
|
28
|
-
Exclude: []
|
29
|
-
Style/GuardClause:
|
30
|
-
Description: Check for conditionals that can be replaced with guard clauses
|
31
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
32
|
-
Enabled: false
|
33
|
-
MinBodyLength: 1
|
34
|
-
Style/IfUnlessModifier:
|
35
|
-
Description: Favor modifier if/unless usage when you have a single-line body.
|
36
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
37
|
-
Enabled: false
|
38
|
-
MaxLineLength: 80
|
39
|
-
Style/OptionHash:
|
40
|
-
Description: Don't use option hashes when you can use keyword arguments.
|
41
|
-
Enabled: false
|
42
|
-
Style/PercentLiteralDelimiters:
|
43
|
-
Description: Use `%`-literal delimiters consistently
|
44
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
45
|
-
Enabled: false
|
46
|
-
PreferredDelimiters:
|
47
|
-
"%": "()"
|
48
|
-
"%i": "()"
|
49
|
-
"%q": "()"
|
50
|
-
"%Q": "()"
|
51
|
-
"%r": "{}"
|
52
|
-
"%s": "()"
|
53
|
-
"%w": "()"
|
54
|
-
"%W": "()"
|
55
|
-
"%x": "()"
|
56
|
-
Style/PredicateName:
|
57
|
-
Description: Check the names of predicate methods.
|
58
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
59
|
-
Enabled: true
|
60
|
-
NamePrefix:
|
61
|
-
- is_
|
62
|
-
- has_
|
63
|
-
- have_
|
64
|
-
NamePrefixBlacklist:
|
65
|
-
- is_
|
66
|
-
Exclude:
|
67
|
-
- spec/**/*
|
68
|
-
Style/RaiseArgs:
|
69
|
-
Description: Checks the arguments passed to raise/fail.
|
70
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
71
|
-
Enabled: false
|
72
|
-
EnforcedStyle: exploded
|
73
|
-
SupportedStyles:
|
74
|
-
- compact
|
75
|
-
- exploded
|
76
|
-
Style/SignalException:
|
77
|
-
Description: Checks for proper usage of fail and raise.
|
78
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
79
|
-
Enabled: false
|
80
|
-
EnforcedStyle: semantic
|
81
|
-
SupportedStyles:
|
82
|
-
- only_raise
|
83
|
-
- only_fail
|
84
|
-
- semantic
|
85
|
-
Style/SingleLineBlockParams:
|
86
|
-
Description: Enforces the names of some block params.
|
87
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
88
|
-
Enabled: false
|
89
|
-
Methods:
|
90
|
-
- reduce:
|
91
|
-
- a
|
92
|
-
- e
|
93
|
-
- inject:
|
94
|
-
- a
|
95
|
-
- e
|
96
|
-
Style/SingleLineMethods:
|
97
|
-
Description: Avoid single-line methods.
|
98
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
99
|
-
Enabled: false
|
100
|
-
AllowIfMethodIsEmpty: true
|
101
29
|
Style/StringLiterals:
|
102
30
|
Description: Checks if uses of quotes match the configured preference.
|
103
31
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
@@ -106,144 +34,3 @@ Style/StringLiterals:
|
|
106
34
|
SupportedStyles:
|
107
35
|
- single_quotes
|
108
36
|
- double_quotes
|
109
|
-
Style/StringLiteralsInInterpolation:
|
110
|
-
Description: Checks if uses of quotes inside expressions in interpolated strings
|
111
|
-
match the configured preference.
|
112
|
-
Enabled: true
|
113
|
-
EnforcedStyle: single_quotes
|
114
|
-
SupportedStyles:
|
115
|
-
- single_quotes
|
116
|
-
- double_quotes
|
117
|
-
Style/TrailingCommaInArguments:
|
118
|
-
Description: 'Checks for trailing comma in argument lists.'
|
119
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
120
|
-
Enabled: false
|
121
|
-
EnforcedStyleForMultiline: no_comma
|
122
|
-
SupportedStyles:
|
123
|
-
- comma
|
124
|
-
- consistent_comma
|
125
|
-
- no_comma
|
126
|
-
Style/TrailingCommaInLiteral:
|
127
|
-
Description: 'Checks for trailing comma in array and hash literals.'
|
128
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
129
|
-
Enabled: false
|
130
|
-
EnforcedStyleForMultiline: no_comma
|
131
|
-
SupportedStyles:
|
132
|
-
- comma
|
133
|
-
- consistent_comma
|
134
|
-
- no_comma
|
135
|
-
Metrics/AbcSize:
|
136
|
-
Description: A calculated magnitude based on number of assignments, branches, and
|
137
|
-
conditions.
|
138
|
-
Enabled: false
|
139
|
-
Max: 15
|
140
|
-
Metrics/ClassLength:
|
141
|
-
Description: Avoid classes longer than 100 lines of code.
|
142
|
-
Enabled: false
|
143
|
-
CountComments: false
|
144
|
-
Max: 100
|
145
|
-
Metrics/ModuleLength:
|
146
|
-
CountComments: false
|
147
|
-
Max: 100
|
148
|
-
Description: Avoid modules longer than 100 lines of code.
|
149
|
-
Enabled: false
|
150
|
-
Metrics/CyclomaticComplexity:
|
151
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
152
|
-
cases needed to validate a method.
|
153
|
-
Enabled: false
|
154
|
-
Max: 6
|
155
|
-
Metrics/MethodLength:
|
156
|
-
Description: Avoid methods longer than 10 lines of code.
|
157
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
158
|
-
Enabled: false
|
159
|
-
CountComments: false
|
160
|
-
Max: 10
|
161
|
-
Metrics/ParameterLists:
|
162
|
-
Description: Avoid parameter lists longer than three or four parameters.
|
163
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
164
|
-
Enabled: false
|
165
|
-
Max: 5
|
166
|
-
CountKeywordArgs: true
|
167
|
-
Metrics/PerceivedComplexity:
|
168
|
-
Description: A complexity metric geared towards measuring complexity for a human
|
169
|
-
reader.
|
170
|
-
Enabled: false
|
171
|
-
Max: 7
|
172
|
-
Lint/AssignmentInCondition:
|
173
|
-
Description: Don't use assignment in conditions.
|
174
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
175
|
-
Enabled: false
|
176
|
-
AllowSafeAssignment: true
|
177
|
-
Style/MultilineOperationIndentation:
|
178
|
-
Enabled: false
|
179
|
-
EnforcedStyle: indented
|
180
|
-
SupportedStyles:
|
181
|
-
- aligned
|
182
|
-
- indented
|
183
|
-
Style/InlineComment:
|
184
|
-
Description: Avoid inline comments.
|
185
|
-
Enabled: false
|
186
|
-
Style/AccessorMethodName:
|
187
|
-
Description: Check the naming of accessor methods for get_/set_.
|
188
|
-
Enabled: false
|
189
|
-
Style/Alias:
|
190
|
-
Description: Use alias_method instead of alias.
|
191
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
192
|
-
Enabled: false
|
193
|
-
Style/Documentation:
|
194
|
-
Description: Document classes and non-namespace modules.
|
195
|
-
Enabled: false
|
196
|
-
Style/DoubleNegation:
|
197
|
-
Description: Checks for uses of double negation (!!).
|
198
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
199
|
-
Enabled: false
|
200
|
-
Style/EachWithObject:
|
201
|
-
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
202
|
-
Enabled: false
|
203
|
-
Style/EmptyLiteral:
|
204
|
-
Description: Prefer literals to Array.new/Hash.new/String.new.
|
205
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
206
|
-
Enabled: false
|
207
|
-
Style/ModuleFunction:
|
208
|
-
Description: Checks for usage of `extend self` in modules.
|
209
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
210
|
-
Enabled: false
|
211
|
-
Style/OneLineConditional:
|
212
|
-
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
213
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
214
|
-
Enabled: false
|
215
|
-
Style/PerlBackrefs:
|
216
|
-
Description: Avoid Perl-style regex back references.
|
217
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
218
|
-
Enabled: false
|
219
|
-
Style/Send:
|
220
|
-
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
221
|
-
may overlap with existing methods.
|
222
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
223
|
-
Enabled: false
|
224
|
-
Style/SpecialGlobalVars:
|
225
|
-
Description: Avoid Perl-style global variables.
|
226
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
227
|
-
Enabled: false
|
228
|
-
Style/VariableInterpolation:
|
229
|
-
Description: Don't interpolate global, instance and class variables directly in
|
230
|
-
strings.
|
231
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
232
|
-
Enabled: false
|
233
|
-
Style/WhenThen:
|
234
|
-
Description: Use when x then ... for one-line cases.
|
235
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
236
|
-
Enabled: false
|
237
|
-
Lint/EachWithObjectArgument:
|
238
|
-
Description: Check for immutable argument given to each_with_object.
|
239
|
-
Enabled: true
|
240
|
-
Lint/HandleExceptions:
|
241
|
-
Description: Don't suppress exception.
|
242
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
243
|
-
Enabled: false
|
244
|
-
Lint/LiteralInCondition:
|
245
|
-
Description: Checks of literals used in conditions.
|
246
|
-
Enabled: false
|
247
|
-
Lint/LiteralInInterpolation:
|
248
|
-
Description: Checks for literals used in interpolation.
|
249
|
-
Enabled: false
|
data/Gemfile
CHANGED
data/lib/gman/client.rb
CHANGED
@@ -51,12 +51,13 @@ module Gman
|
|
51
51
|
.v1
|
52
52
|
.inventory
|
53
53
|
.items_like_id_description
|
54
|
-
.get(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
.get(
|
55
|
+
params:
|
56
|
+
{
|
57
|
+
item_id: item_id,
|
58
|
+
in_item_description: in_item_description
|
59
|
+
}
|
60
|
+
)
|
60
61
|
end
|
61
62
|
convert_payload(response)
|
62
63
|
end
|
@@ -17,7 +17,13 @@ module GmanClient
|
|
17
17
|
|
18
18
|
def clean_filters(filters)
|
19
19
|
keep = filters.select do |k, _v|
|
20
|
-
[
|
20
|
+
[
|
21
|
+
:commodity_id_eq,
|
22
|
+
:contract_type_eq,
|
23
|
+
:customer_id_eq,
|
24
|
+
:inv_contract_id_eq,
|
25
|
+
:location_id_eq
|
26
|
+
].include?(k)
|
21
27
|
end
|
22
28
|
|
23
29
|
Hash[filters.to_a & keep.to_a]
|
data/lib/gman_client/version.rb
CHANGED
@@ -6,7 +6,7 @@ RSpec.describe Gman::Client do
|
|
6
6
|
let(:customer_id) { 100_001 }
|
7
7
|
let(:response) do
|
8
8
|
VCR.use_cassette('contracts') do
|
9
|
-
client.contracts(customer_id_eq: 100_001)
|
9
|
+
client.contracts(customer_id_eq: 100_001, contract_type_eq: 'S')
|
10
10
|
end
|
11
11
|
end
|
12
12
|
subject { response }
|
@@ -18,6 +18,14 @@ RSpec.describe Gman::Client do
|
|
18
18
|
is_expected
|
19
19
|
.to satisfy { |h| h.is_a?(Array) && h.all? { |e| e.is_a?(Hash) } }
|
20
20
|
end
|
21
|
+
it 'should match the customer filter' do
|
22
|
+
customer_ids = response.map { |hash| hash[:customer_id] }
|
23
|
+
expect(customer_ids).to all eq 100_001
|
24
|
+
end
|
25
|
+
it 'should match the contract type filter' do
|
26
|
+
contract_types = response.map { |hash| hash[:contract_type] }
|
27
|
+
expect(contract_types).to all eq 'Sale'
|
28
|
+
end
|
21
29
|
|
22
30
|
describe 'first contract' do
|
23
31
|
subject { response.first }
|
@@ -29,6 +37,7 @@ RSpec.describe Gman::Client do
|
|
29
37
|
:contract_number,
|
30
38
|
:contract_date,
|
31
39
|
:contract_type,
|
40
|
+
:inv_contract_id,
|
32
41
|
:quantity,
|
33
42
|
:delivered_quantity,
|
34
43
|
:price,
|
@@ -49,7 +49,8 @@ RSpec.describe GmanClient do
|
|
49
49
|
let(:response) do
|
50
50
|
VCR.use_cassette('driver_commission_histories_by_paid_date') do
|
51
51
|
gman_adapter.driver_commission_histories_by_paid_date(
|
52
|
-
Date.new(2014,
|
52
|
+
Date.new(2014, 1, 1)
|
53
|
+
)
|
53
54
|
end
|
54
55
|
end
|
55
56
|
subject(:client_response) { response }
|
@@ -86,7 +87,7 @@ RSpec.describe GmanClient do
|
|
86
87
|
it { is_expected.to have_key(:split_rate) }
|
87
88
|
it { is_expected.to have_key(:total_freight_revenue) }
|
88
89
|
it { is_expected.to have_key(:drvrcomh_key) }
|
89
|
-
it { is_expected.to have_value(Date.new(2014,
|
90
|
+
it { is_expected.to have_value(Date.new(2014, 1, 1).to_s) }
|
90
91
|
end
|
91
92
|
end
|
92
93
|
end
|
@@ -3,8 +3,9 @@ def gman_adapter
|
|
3
3
|
client_id = ENV['GMAN_SERVICES_CLIENT_ID']
|
4
4
|
client_secret = ENV['GMAN_SERVICES_CLIENT_SECRET']
|
5
5
|
|
6
|
-
Gman::Client.new(
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
Gman::Client.new(
|
7
|
+
url: url,
|
8
|
+
client_id: client_id,
|
9
|
+
client_secret: client_secret
|
10
|
+
)
|
10
11
|
end
|
@@ -35,18 +35,18 @@ http_interactions:
|
|
35
35
|
Content-Type:
|
36
36
|
- application/json; charset=utf-8
|
37
37
|
Etag:
|
38
|
-
- '"
|
38
|
+
- '"0ae1c7559c2e6b42c16cf59ffd1306ff"'
|
39
39
|
X-Request-Id:
|
40
|
-
-
|
40
|
+
- 99d792c5-90fd-4aff-8c3e-d47b5fdd2c07
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
42
|
+
- '0.052000'
|
43
43
|
Transfer-Encoding:
|
44
44
|
- chunked
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
|
-
string: '{"access_token":"
|
47
|
+
string: '{"access_token":"693c423c971de4c621605a60e5dea2f21553f05729864a8061321854ec390071","token_type":"bearer","created_at":1482272218}'
|
48
48
|
http_version:
|
49
|
-
recorded_at: Tue,
|
49
|
+
recorded_at: Tue, 20 Dec 2016 22:16:58 GMT
|
50
50
|
- request:
|
51
51
|
method: get
|
52
52
|
uri: "<GMAN_SERVICES_URL>/api/v1/commodity_merchandising/contracts.json?q%5Bcustomer_id_eq%5D=100001"
|
@@ -55,7 +55,7 @@ http_interactions:
|
|
55
55
|
string: ''
|
56
56
|
headers:
|
57
57
|
Authorization:
|
58
|
-
- Bearer
|
58
|
+
- Bearer 693c423c971de4c621605a60e5dea2f21553f05729864a8061321854ec390071
|
59
59
|
response:
|
60
60
|
status:
|
61
61
|
code: 200
|
@@ -70,38 +70,77 @@ http_interactions:
|
|
70
70
|
Content-Type:
|
71
71
|
- application/json; charset=utf-8
|
72
72
|
Etag:
|
73
|
-
- '"
|
73
|
+
- '"c055d2733ad6698948cb11bae30ff1d9"'
|
74
74
|
Cache-Control:
|
75
75
|
- max-age=0, private, must-revalidate
|
76
76
|
X-Request-Id:
|
77
|
-
-
|
77
|
+
- 84372fb6-cf16-4f04-af53-1ad6fbdb9fe8
|
78
78
|
X-Runtime:
|
79
|
-
- '0.
|
79
|
+
- '0.096000'
|
80
80
|
Transfer-Encoding:
|
81
81
|
- chunked
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
|
-
string: '[{"contract_id":"
|
85
|
-
|
86
|
-
5"},"contract_date":"2016-
|
87
|
-
|
88
|
-
7"},"contract_date":"2016-
|
89
|
-
|
90
|
-
9"},"contract_date":"2016-
|
91
|
-
4","conversion_factor":
|
92
|
-
11"},"contract_date":"2016-
|
93
|
-
|
94
|
-
13"},"contract_date":"2016-
|
95
|
-
|
96
|
-
15"},"contract_date":"2016-
|
97
|
-
1","conversion_factor":
|
98
|
-
17"},"contract_date":"2016-
|
99
|
-
|
100
|
-
19"},"contract_date":"2016-
|
101
|
-
2","conversion_factor":56},"unit_of_measure":{"uom_id":21,"description":"
|
102
|
-
21"},"contract_date":"2016-
|
103
|
-
|
104
|
-
23"},"contract_date":"2016-
|
84
|
+
string: '[{"contract_id":"0010000100P","customer_id":100001,"commodity_id":1004,"inv_contract_id":"10000100","location_id":1,"contract_number":100001,"price":378.0,"freight_adjustment":6.0,"commodity":{"commodity_id":1004,"description":"laudantium
|
85
|
+
4","conversion_factor":2000},"unit_of_measure":{"uom_id":5,"description":"cupiditate
|
86
|
+
5"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":51985.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000200P","customer_id":100001,"commodity_id":1002,"inv_contract_id":"10000200","location_id":2,"contract_number":100002,"price":255.0,"freight_adjustment":7.0,"commodity":{"commodity_id":1002,"description":"sunt
|
87
|
+
2","conversion_factor":56},"unit_of_measure":{"uom_id":7,"description":"sapiente
|
88
|
+
7"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":50000.0,"delivered_quantity":13090.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000300S","customer_id":100001,"commodity_id":1001,"inv_contract_id":"10000300","location_id":3,"contract_number":100003,"price":349.0,"freight_adjustment":6.0,"commodity":{"commodity_id":1001,"description":"et
|
89
|
+
1","conversion_factor":56},"unit_of_measure":{"uom_id":9,"description":"modi
|
90
|
+
9"},"contract_date":"2016-12-20","contract_type":"Sale","quantity":50000.0,"delivered_quantity":22587.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000400P","customer_id":100001,"commodity_id":1004,"inv_contract_id":"10000400","location_id":4,"contract_number":100004,"price":203.0,"freight_adjustment":0.0,"commodity":{"commodity_id":1004,"description":"laudantium
|
91
|
+
4","conversion_factor":2000},"unit_of_measure":{"uom_id":11,"description":"occaecati
|
92
|
+
11"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":42224.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000500P","customer_id":100001,"commodity_id":1002,"inv_contract_id":"10000500","location_id":5,"contract_number":100005,"price":215.0,"freight_adjustment":0.0,"commodity":{"commodity_id":1002,"description":"sunt
|
93
|
+
2","conversion_factor":56},"unit_of_measure":{"uom_id":13,"description":"rem
|
94
|
+
13"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":50000.0,"delivered_quantity":48004.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000600P","customer_id":100001,"commodity_id":1002,"inv_contract_id":"10000600","location_id":6,"contract_number":100006,"price":269.0,"freight_adjustment":7.0,"commodity":{"commodity_id":1002,"description":"sunt
|
95
|
+
2","conversion_factor":56},"unit_of_measure":{"uom_id":15,"description":"at
|
96
|
+
15"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":20011.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000700P","customer_id":100001,"commodity_id":1001,"inv_contract_id":"10000700","location_id":7,"contract_number":100007,"price":331.0,"freight_adjustment":0.0,"commodity":{"commodity_id":1001,"description":"et
|
97
|
+
1","conversion_factor":56},"unit_of_measure":{"uom_id":17,"description":"aliquam
|
98
|
+
17"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":50000.0,"delivered_quantity":11840.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000800P","customer_id":100001,"commodity_id":1003,"inv_contract_id":"10000800","location_id":8,"contract_number":100008,"price":304.0,"freight_adjustment":6.0,"commodity":{"commodity_id":1003,"description":"natus
|
99
|
+
3","conversion_factor":56},"unit_of_measure":{"uom_id":19,"description":"quia
|
100
|
+
19"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":47574.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010000900P","customer_id":100001,"commodity_id":1002,"inv_contract_id":"10000900","location_id":9,"contract_number":100009,"price":226.0,"freight_adjustment":0.0,"commodity":{"commodity_id":1002,"description":"sunt
|
101
|
+
2","conversion_factor":56},"unit_of_measure":{"uom_id":21,"description":"ipsa
|
102
|
+
21"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":72657.0,"from_date":"2016-12-20","to_date":"2017-12-20"},{"contract_id":"0010001000P","customer_id":100001,"commodity_id":1005,"inv_contract_id":"10001000","location_id":10,"contract_number":100010,"price":295.0,"freight_adjustment":5.0,"commodity":{"commodity_id":1005,"description":"ipsum
|
103
|
+
5","conversion_factor":2000},"unit_of_measure":{"uom_id":23,"description":"dolorem
|
104
|
+
23"},"contract_date":"2016-12-20","contract_type":"Purchase","quantity":100000.0,"delivered_quantity":90928.0,"from_date":"2016-12-20","to_date":"2017-12-20"}]'
|
105
105
|
http_version:
|
106
|
-
recorded_at: Tue,
|
106
|
+
recorded_at: Tue, 20 Dec 2016 22:16:58 GMT
|
107
|
+
- request:
|
108
|
+
method: get
|
109
|
+
uri: "<GMAN_SERVICES_URL>/api/v1/commodity_merchandising/contracts.json?q%5Bcontract_type_eq%5D=S&q%5Bcustomer_id_eq%5D=100001"
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: ''
|
113
|
+
headers:
|
114
|
+
Authorization:
|
115
|
+
- Bearer 693c423c971de4c621605a60e5dea2f21553f05729864a8061321854ec390071
|
116
|
+
response:
|
117
|
+
status:
|
118
|
+
code: 200
|
119
|
+
message: OK
|
120
|
+
headers:
|
121
|
+
X-Frame-Options:
|
122
|
+
- SAMEORIGIN
|
123
|
+
X-Xss-Protection:
|
124
|
+
- 1; mode=block
|
125
|
+
X-Content-Type-Options:
|
126
|
+
- nosniff
|
127
|
+
Content-Type:
|
128
|
+
- application/json; charset=utf-8
|
129
|
+
Etag:
|
130
|
+
- '"6568bcf4945b4fb3266f95ed24085cf9"'
|
131
|
+
Cache-Control:
|
132
|
+
- max-age=0, private, must-revalidate
|
133
|
+
X-Request-Id:
|
134
|
+
- 7c0a453c-d117-4b39-9b23-4f513d204072
|
135
|
+
X-Runtime:
|
136
|
+
- '0.056000'
|
137
|
+
Transfer-Encoding:
|
138
|
+
- chunked
|
139
|
+
body:
|
140
|
+
encoding: UTF-8
|
141
|
+
string: '[{"contract_id":"0010000300S","customer_id":100001,"commodity_id":1001,"inv_contract_id":"10000300","location_id":3,"contract_number":100003,"price":349.0,"freight_adjustment":6.0,"commodity":{"commodity_id":1001,"description":"et
|
142
|
+
1","conversion_factor":56},"unit_of_measure":{"uom_id":9,"description":"modi
|
143
|
+
9"},"contract_date":"2016-12-20","contract_type":"Sale","quantity":50000.0,"delivered_quantity":22587.0,"from_date":"2016-12-20","to_date":"2017-12-20"}]'
|
144
|
+
http_version:
|
145
|
+
recorded_at: Tue, 20 Dec 2016 22:21:27 GMT
|
107
146
|
recorded_with: VCR 3.0.1
|
@@ -2,10 +2,10 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: grant_type=client_credentials&client_id
|
8
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- "*/*; q=0.5, application/xml"
|
@@ -49,7 +49,7 @@ http_interactions:
|
|
49
49
|
recorded_at: Wed, 25 Feb 2015 23:44:03 GMT
|
50
50
|
- request:
|
51
51
|
method: get
|
52
|
-
uri:
|
52
|
+
uri: <GMAN_SERVICES_URL>/api/v1/driver_commissions_history.json
|
53
53
|
body:
|
54
54
|
encoding: US-ASCII
|
55
55
|
string: ''
|
@@ -124,4 +124,88 @@ http_interactions:
|
|
124
124
|
88857276"}]'
|
125
125
|
http_version:
|
126
126
|
recorded_at: Wed, 25 Feb 2015 23:44:03 GMT
|
127
|
-
|
127
|
+
- request:
|
128
|
+
method: post
|
129
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
130
|
+
body:
|
131
|
+
encoding: US-ASCII
|
132
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
133
|
+
headers:
|
134
|
+
Accept:
|
135
|
+
- "*/*; q=0.5, application/xml"
|
136
|
+
Accept-Encoding:
|
137
|
+
- gzip, deflate
|
138
|
+
Content-Length:
|
139
|
+
- '183'
|
140
|
+
Content-Type:
|
141
|
+
- application/x-www-form-urlencoded
|
142
|
+
User-Agent:
|
143
|
+
- Ruby
|
144
|
+
response:
|
145
|
+
status:
|
146
|
+
code: 200
|
147
|
+
message: OK
|
148
|
+
headers:
|
149
|
+
X-Frame-Options:
|
150
|
+
- SAMEORIGIN
|
151
|
+
X-Xss-Protection:
|
152
|
+
- 1; mode=block
|
153
|
+
X-Content-Type-Options:
|
154
|
+
- nosniff
|
155
|
+
Cache-Control:
|
156
|
+
- no-store
|
157
|
+
Pragma:
|
158
|
+
- no-cache
|
159
|
+
Content-Type:
|
160
|
+
- application/json; charset=utf-8
|
161
|
+
Etag:
|
162
|
+
- '"37e499a1eada80f17cc0328921b8fe55"'
|
163
|
+
X-Request-Id:
|
164
|
+
- a91a20d9-edaa-468d-b104-429145f9655b
|
165
|
+
X-Runtime:
|
166
|
+
- '0.050000'
|
167
|
+
Transfer-Encoding:
|
168
|
+
- chunked
|
169
|
+
body:
|
170
|
+
encoding: UTF-8
|
171
|
+
string: '{"access_token":"8cf762be46b1177415a5976636e9ebfbf6fc01e3c585155a2176d5bf6d70baca","token_type":"bearer","created_at":1482272535}'
|
172
|
+
http_version:
|
173
|
+
recorded_at: Tue, 20 Dec 2016 22:22:15 GMT
|
174
|
+
- request:
|
175
|
+
method: get
|
176
|
+
uri: "<GMAN_SERVICES_URL>/api/v1/driver_commissions_history.json"
|
177
|
+
body:
|
178
|
+
encoding: US-ASCII
|
179
|
+
string: ''
|
180
|
+
headers:
|
181
|
+
Authorization:
|
182
|
+
- Bearer 8cf762be46b1177415a5976636e9ebfbf6fc01e3c585155a2176d5bf6d70baca
|
183
|
+
response:
|
184
|
+
status:
|
185
|
+
code: 200
|
186
|
+
message: OK
|
187
|
+
headers:
|
188
|
+
X-Frame-Options:
|
189
|
+
- SAMEORIGIN
|
190
|
+
X-Xss-Protection:
|
191
|
+
- 1; mode=block
|
192
|
+
X-Content-Type-Options:
|
193
|
+
- nosniff
|
194
|
+
Content-Type:
|
195
|
+
- application/json; charset=utf-8
|
196
|
+
Etag:
|
197
|
+
- '"d751713988987e9331980363e24189ce"'
|
198
|
+
Cache-Control:
|
199
|
+
- max-age=0, private, must-revalidate
|
200
|
+
X-Request-Id:
|
201
|
+
- 55ec56af-f0bc-4772-8ef3-dbfc86698291
|
202
|
+
X-Runtime:
|
203
|
+
- '0.040000'
|
204
|
+
Transfer-Encoding:
|
205
|
+
- chunked
|
206
|
+
body:
|
207
|
+
encoding: UTF-8
|
208
|
+
string: "[]"
|
209
|
+
http_version:
|
210
|
+
recorded_at: Tue, 20 Dec 2016 22:22:15 GMT
|
211
|
+
recorded_with: VCR 3.0.1
|
@@ -2,10 +2,10 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: grant_type=client_credentials&client_id
|
8
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- "*/*; q=0.5, application/xml"
|
@@ -44,18 +44,18 @@ http_interactions:
|
|
44
44
|
- chunked
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
|
-
string: '{"access_token":"
|
48
|
-
http_version:
|
47
|
+
string: '{"access_token":"353a2cbab066042919da50eeeafd1586f7710c2040dec596962bed66a5bdad94","token_type":"bearer","expires_in":7200,"created_at":1424907844}'
|
48
|
+
http_version:
|
49
49
|
recorded_at: Wed, 25 Feb 2015 23:44:04 GMT
|
50
50
|
- request:
|
51
51
|
method: get
|
52
|
-
uri:
|
52
|
+
uri: "<GMAN_SERVICES_URL>/api/v1/driver_commissions_history_by_paid_date.json?paid_date=2014-01-01"
|
53
53
|
body:
|
54
54
|
encoding: US-ASCII
|
55
55
|
string: ''
|
56
56
|
headers:
|
57
57
|
Authorization:
|
58
|
-
- Bearer
|
58
|
+
- Bearer 353a2cbab066042919da50eeeafd1586f7710c2040dec596962bed66a5bdad94
|
59
59
|
response:
|
60
60
|
status:
|
61
61
|
code: 200
|
@@ -122,6 +122,6 @@ http_interactions:
|
|
122
122
|
FLOOR","other_hour_dollars":8201,"order_number_text":"0065","origin_name":"ORIGIN
|
123
123
|
NAME","paid_date":"2014-01-01","revenue":2480,"split_rate":6634,"total_freight_revenue":4212,"drvrcomh_key":"78688
|
124
124
|
88857276"}]'
|
125
|
-
http_version:
|
125
|
+
http_version:
|
126
126
|
recorded_at: Wed, 25 Feb 2015 23:44:04 GMT
|
127
|
-
recorded_with: VCR
|
127
|
+
recorded_with: VCR 3.0.1
|
@@ -2,10 +2,10 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: grant_type=client_credentials&client_id
|
8
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- "*/*; q=0.5, application/xml"
|
@@ -45,11 +45,11 @@ http_interactions:
|
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
47
|
string: '{"access_token":"809eb7e39031e67b45b67297a83942e476b899b762ba75f99103e8e0825f432a","token_type":"bearer","expires_in":7200,"created_at":1424907844}'
|
48
|
-
http_version:
|
48
|
+
http_version:
|
49
49
|
recorded_at: Wed, 25 Feb 2015 23:44:04 GMT
|
50
50
|
- request:
|
51
51
|
method: get
|
52
|
-
uri:
|
52
|
+
uri: <GMAN_SERVICES_URL>/api/v1/drivers.json
|
53
53
|
body:
|
54
54
|
encoding: US-ASCII
|
55
55
|
string: ''
|
@@ -82,6 +82,90 @@ http_interactions:
|
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
84
|
string: '[{"driver_id":1,"active_fg":1,"driver_type":"DR","sub_hauler_fg":1,"first_name":"Elmore","last_name":"Quigley"},{"driver_id":2,"active_fg":0,"driver_type":"DR","sub_hauler_fg":0,"first_name":"Duane","last_name":"Altenwerth"},{"driver_id":3,"active_fg":1,"driver_type":"DR","sub_hauler_fg":1,"first_name":"Mose","last_name":"Cummings"},{"driver_id":4,"active_fg":0,"driver_type":"DR","sub_hauler_fg":0,"first_name":"Stone","last_name":"Grady"},{"driver_id":5,"active_fg":1,"driver_type":"DR","sub_hauler_fg":0,"first_name":"Retha","last_name":"Gutmann"},{"driver_id":6,"active_fg":1,"driver_type":"DR","sub_hauler_fg":1,"first_name":"Libby","last_name":"Zemlak"},{"driver_id":7,"active_fg":0,"driver_type":"DR","sub_hauler_fg":0,"first_name":"Kiara","last_name":"Bartell"},{"driver_id":8,"active_fg":1,"driver_type":"DR","sub_hauler_fg":1,"first_name":"Jerry","last_name":"Runolfsson"},{"driver_id":9,"active_fg":0,"driver_type":"DR","sub_hauler_fg":0,"first_name":"George","last_name":"Kerluke"},{"driver_id":10,"active_fg":1,"driver_type":"DR","sub_hauler_fg":1,"first_name":"Laverne","last_name":"MacGyver"}]'
|
85
|
-
http_version:
|
85
|
+
http_version:
|
86
86
|
recorded_at: Wed, 25 Feb 2015 23:44:04 GMT
|
87
|
-
|
87
|
+
- request:
|
88
|
+
method: post
|
89
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
90
|
+
body:
|
91
|
+
encoding: US-ASCII
|
92
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
93
|
+
headers:
|
94
|
+
Accept:
|
95
|
+
- "*/*; q=0.5, application/xml"
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip, deflate
|
98
|
+
Content-Length:
|
99
|
+
- '183'
|
100
|
+
Content-Type:
|
101
|
+
- application/x-www-form-urlencoded
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
X-Frame-Options:
|
110
|
+
- SAMEORIGIN
|
111
|
+
X-Xss-Protection:
|
112
|
+
- 1; mode=block
|
113
|
+
X-Content-Type-Options:
|
114
|
+
- nosniff
|
115
|
+
Cache-Control:
|
116
|
+
- no-store
|
117
|
+
Pragma:
|
118
|
+
- no-cache
|
119
|
+
Content-Type:
|
120
|
+
- application/json; charset=utf-8
|
121
|
+
Etag:
|
122
|
+
- '"e49132c9a74b31ee6b8ff64c3985e677"'
|
123
|
+
X-Request-Id:
|
124
|
+
- e73d9c9d-c2f4-4e0f-98a5-eae6e0609c31
|
125
|
+
X-Runtime:
|
126
|
+
- '0.058000'
|
127
|
+
Transfer-Encoding:
|
128
|
+
- chunked
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"access_token":"405160692fecd21f960dbd444ca37f7a4b961171b7cee4d1b7862319cdaa7f55","token_type":"bearer","created_at":1482272568}'
|
132
|
+
http_version:
|
133
|
+
recorded_at: Tue, 20 Dec 2016 22:22:48 GMT
|
134
|
+
- request:
|
135
|
+
method: get
|
136
|
+
uri: "<GMAN_SERVICES_URL>/api/v1/drivers.json"
|
137
|
+
body:
|
138
|
+
encoding: US-ASCII
|
139
|
+
string: ''
|
140
|
+
headers:
|
141
|
+
Authorization:
|
142
|
+
- Bearer 405160692fecd21f960dbd444ca37f7a4b961171b7cee4d1b7862319cdaa7f55
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 200
|
146
|
+
message: OK
|
147
|
+
headers:
|
148
|
+
X-Frame-Options:
|
149
|
+
- SAMEORIGIN
|
150
|
+
X-Xss-Protection:
|
151
|
+
- 1; mode=block
|
152
|
+
X-Content-Type-Options:
|
153
|
+
- nosniff
|
154
|
+
Content-Type:
|
155
|
+
- application/json; charset=utf-8
|
156
|
+
Etag:
|
157
|
+
- '"2a7971077f9fe40cc85aba26e42ddd2c"'
|
158
|
+
Cache-Control:
|
159
|
+
- max-age=0, private, must-revalidate
|
160
|
+
X-Request-Id:
|
161
|
+
- b5d36bd9-9ac4-4a3b-a281-74dc17f89d1a
|
162
|
+
X-Runtime:
|
163
|
+
- '0.091000'
|
164
|
+
Transfer-Encoding:
|
165
|
+
- chunked
|
166
|
+
body:
|
167
|
+
encoding: UTF-8
|
168
|
+
string: '[{"driver_id":8212,"first_name":"Jordane","last_name":"Quitzon","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":1040,"first_name":"Leatha","last_name":"Goldner","driver_type":"DR","sub_hauler_fg":1,"active_fg":null},{"driver_id":9625,"first_name":"Melody","last_name":"Kling","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":6175,"first_name":"Ashton","last_name":"Schoen","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":9453,"first_name":"Consuelo","last_name":"Weimann","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":5513,"first_name":"Sofia","last_name":"Farrell","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":6569,"first_name":"Stephania","last_name":"Stamm","driver_type":"DR","sub_hauler_fg":null,"active_fg":null},{"driver_id":4085,"first_name":"Elva","last_name":"Jaskolski","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":7847,"first_name":"Adella","last_name":"Okuneva","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":9743,"first_name":"Keith","last_name":"Mertz","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":8516,"first_name":"Florencio","last_name":"Barrows","driver_type":"DR","sub_hauler_fg":1,"active_fg":null},{"driver_id":1662,"first_name":"Carolyne","last_name":"Buckridge","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":3006,"first_name":"Jerel","last_name":"Nikolaus","driver_type":"DR","sub_hauler_fg":null,"active_fg":null},{"driver_id":5145,"first_name":"Trisha","last_name":"Shields","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":2987,"first_name":"Sid","last_name":"Ortiz","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":7409,"first_name":"Werner","last_name":"Bahringer","driver_type":"DR","sub_hauler_fg":null,"active_fg":null},{"driver_id":2195,"first_name":"Tabitha","last_name":"Schmeler","driver_type":"DR","sub_hauler_fg":1,"active_fg":1},{"driver_id":4854,"first_name":"Cletus","last_name":"Walker","driver_type":"DR","sub_hauler_fg":null,"active_fg":1},{"driver_id":7653,"first_name":"Pascale","last_name":"Carter","driver_type":"DR","sub_hauler_fg":null,"active_fg":null},{"driver_id":1735,"first_name":"Yolanda","last_name":"Kub","driver_type":"DR","sub_hauler_fg":null,"active_fg":1}]'
|
169
|
+
http_version:
|
170
|
+
recorded_at: Tue, 20 Dec 2016 22:22:48 GMT
|
171
|
+
recorded_with: VCR 3.0.1
|
@@ -84,4 +84,88 @@ http_interactions:
|
|
84
84
|
string: '[{"item_id":7634,"in_item_description":"Donnell"},{"item_id":4144,"in_item_description":"Shemar"},{"item_id":2167,"in_item_description":"Chris"},{"item_id":9617,"in_item_description":"Loyal"},{"item_id":1582,"in_item_description":"Jackson"},{"item_id":4874,"in_item_description":"Juanita"},{"item_id":2476,"in_item_description":"Stacey"},{"item_id":6119,"in_item_description":"Reba"},{"item_id":1574,"in_item_description":"Onie"},{"item_id":3881,"in_item_description":"Britney"}]'
|
85
85
|
http_version:
|
86
86
|
recorded_at: Wed, 25 Feb 2015 23:44:04 GMT
|
87
|
-
|
87
|
+
- request:
|
88
|
+
method: post
|
89
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
90
|
+
body:
|
91
|
+
encoding: US-ASCII
|
92
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
93
|
+
headers:
|
94
|
+
Accept:
|
95
|
+
- "*/*; q=0.5, application/xml"
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip, deflate
|
98
|
+
Content-Length:
|
99
|
+
- '183'
|
100
|
+
Content-Type:
|
101
|
+
- application/x-www-form-urlencoded
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
X-Frame-Options:
|
110
|
+
- SAMEORIGIN
|
111
|
+
X-Xss-Protection:
|
112
|
+
- 1; mode=block
|
113
|
+
X-Content-Type-Options:
|
114
|
+
- nosniff
|
115
|
+
Cache-Control:
|
116
|
+
- no-store
|
117
|
+
Pragma:
|
118
|
+
- no-cache
|
119
|
+
Content-Type:
|
120
|
+
- application/json; charset=utf-8
|
121
|
+
Etag:
|
122
|
+
- '"c036df64f0837afa7b6f66f397628d96"'
|
123
|
+
X-Request-Id:
|
124
|
+
- f52b8ed1-623e-4f27-9273-b02c25f34ab3
|
125
|
+
X-Runtime:
|
126
|
+
- '0.050000'
|
127
|
+
Transfer-Encoding:
|
128
|
+
- chunked
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"access_token":"1ea87588bb8f20a2ed054d0958f58ab4a4998fd0b10250771d268aa22949e3a4","token_type":"bearer","created_at":1482272535}'
|
132
|
+
http_version:
|
133
|
+
recorded_at: Tue, 20 Dec 2016 22:22:15 GMT
|
134
|
+
- request:
|
135
|
+
method: get
|
136
|
+
uri: "<GMAN_SERVICES_URL>/api/v1/inventory/items.json"
|
137
|
+
body:
|
138
|
+
encoding: US-ASCII
|
139
|
+
string: ''
|
140
|
+
headers:
|
141
|
+
Authorization:
|
142
|
+
- Bearer 1ea87588bb8f20a2ed054d0958f58ab4a4998fd0b10250771d268aa22949e3a4
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 200
|
146
|
+
message: OK
|
147
|
+
headers:
|
148
|
+
X-Frame-Options:
|
149
|
+
- SAMEORIGIN
|
150
|
+
X-Xss-Protection:
|
151
|
+
- 1; mode=block
|
152
|
+
X-Content-Type-Options:
|
153
|
+
- nosniff
|
154
|
+
Content-Type:
|
155
|
+
- application/json; charset=utf-8
|
156
|
+
Etag:
|
157
|
+
- '"355ff53426099bf476a031193b83a1b7"'
|
158
|
+
Cache-Control:
|
159
|
+
- max-age=0, private, must-revalidate
|
160
|
+
X-Request-Id:
|
161
|
+
- 78284c60-0824-4cf7-a10f-8105c1e543ef
|
162
|
+
X-Runtime:
|
163
|
+
- '0.048000'
|
164
|
+
Transfer-Encoding:
|
165
|
+
- chunked
|
166
|
+
body:
|
167
|
+
encoding: UTF-8
|
168
|
+
string: '[{"item_id":7550,"in_item_description":"Lizeth"},{"item_id":4808,"in_item_description":"Andreane"},{"item_id":4417,"in_item_description":"Jan"},{"item_id":2413,"in_item_description":"Jannie"},{"item_id":2779,"in_item_description":"Wallace"},{"item_id":2546,"in_item_description":"Osbaldo"},{"item_id":7750,"in_item_description":"Jaiden"},{"item_id":7023,"in_item_description":"Deon"},{"item_id":1284,"in_item_description":"Estell"},{"item_id":2913,"in_item_description":"Sienna"}]'
|
169
|
+
http_version:
|
170
|
+
recorded_at: Tue, 20 Dec 2016 22:22:15 GMT
|
171
|
+
recorded_with: VCR 3.0.1
|
@@ -2,10 +2,10 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri:
|
5
|
+
uri: "<GMAN_SERVICES_URL>/oauth/token"
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: grant_type=client_credentials&client_id
|
8
|
+
string: grant_type=client_credentials&client_id=<GMAN_SERVICES_CLIENT_ID>&client_secret=<GMAN_SERVICES_CLIENT_SECRET>
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- "*/*; q=0.5, application/xml"
|
@@ -45,11 +45,11 @@ http_interactions:
|
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
47
|
string: '{"access_token":"1e096801ad14a3b8251b683c127ff31bf6325baad1efdbc839e6f3852f555236","token_type":"bearer","expires_in":7200,"created_at":1421888460}'
|
48
|
-
http_version:
|
48
|
+
http_version:
|
49
49
|
recorded_at: Thu, 22 Jan 2015 01:01:00 GMT
|
50
50
|
- request:
|
51
51
|
method: get
|
52
|
-
uri:
|
52
|
+
uri: <GMAN_SERVICES_URL>/api/v1/inventory/items_like_id_description.json?in_item_description=Rachelle&item_id=9370
|
53
53
|
body:
|
54
54
|
encoding: US-ASCII
|
55
55
|
string: ''
|
@@ -82,6 +82,6 @@ http_interactions:
|
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
84
|
string: '[{"item_id":9370,"in_item_description":"Rachelle"}]'
|
85
|
-
http_version:
|
85
|
+
http_version:
|
86
86
|
recorded_at: Thu, 22 Jan 2015 01:01:00 GMT
|
87
|
-
recorded_with: VCR
|
87
|
+
recorded_with: VCR 3.0.1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gman_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MichaelAChrisco
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-12-
|
12
|
+
date: 2016-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vcr
|
@@ -159,6 +159,7 @@ extensions: []
|
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
161
|
- ".gitignore"
|
162
|
+
- ".hound-rubocop.yml"
|
162
163
|
- ".hound.yml"
|
163
164
|
- ".rspec"
|
164
165
|
- ".rubocop.yml"
|