Commit 0c8b5df
Refactor (#186)
* Eliminate test warnings
Each of these changes were causing a longer version of the below warning
> WARNING: Using the `raise_error` matcher without providing a specific error
> or message risks false positives
There are definitely better refactors for each of these, but I'm
optimizing for cleaning up the test output, not for improving the code
interface or possibly introducing breaking changes
* Ecosystem Updates
- Add support for Ruby 3.2 and 3.3
- Require Faraday 2.0+
* Add Verbose option
This change turns off request and response logging by default and allows
users to turn that back on by setting a new `verbose` option to true.
* Clean up GitHub Actions script
- only build on some pushes, but all pull requests
- support manual builds via workflow_dispatch
- change publish to be triggered by a GitHub release action
- update to latest actions/checkout script
* BREAKING: remove `compress` option
This change removes the `compress` option from the client entirely.
We use the default faraday adapter, which is `net/http` from stdlib. If
you read [the documentation for that module][net-http-docs], you'll come
across this:
> `Net::HTTP` automatically adds Accept-Encoding for compression of
> response bodies and automatically decompresses gzip and deflate
> responses unless a Range header was sent.
In other words, by default, ruby's net/http module will request gzipped
content and automatically uncompress it if that's what the response
contains.
If instead one sets the `Accept-Encoding` header on a request that's
made with `net/http`, that default behavior is ignored and we're left to
deal with unpacking hte response ourselves as was done in the
`FaradayMiddleware` class.
In other words, whether the `compress` option is used or not, the
behavior has been that we're asking for compressed responses and the
option is effectively ignored. I went back to ruby 1.9.2 and the same
behavior existed there. Given that, I'm confident this option has always
been either ignored or redundant.
[net-http-docs]: https://ruby-doc.org/stdlib-3.0.0/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Compression
* Remove highline dependency
Highline is only used within this cli provider, and only to capture and
do some minor formatting on the user input. This changeset removes
highline entirely and replaces it with equivalent ruby
* remove broken Code Climate badge
* Update reso_faraday_middleware.rb
The new Faraday::Middleware class does not have a `body` method from the response and requires us to retrieve it from the `env` variable.
---------
Co-authored-by: Cody Gustafson <[email protected]>1 parent 5d7bb8b commit 0c8b5df
File tree
20 files changed
+64
-123
lines changed- .github/workflows
- lib/spark_api
- authentication/oauth2_impl
- configuration
- spec
- unit/spark_api
- configuration
20 files changed
+64
-123
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
| |||
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
12 | | - | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | | - | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | | - | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | | - | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
43 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
0 commit comments