oauth 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -116
  3. data/CODE_OF_CONDUCT.md +0 -0
  4. data/CONTRIBUTING.md +0 -0
  5. data/LICENSE +0 -0
  6. data/README.md +13 -9
  7. data/SECURITY.md +0 -0
  8. data/TODO +0 -0
  9. data/lib/oauth/cli/authorize_command.rb +8 -10
  10. data/lib/oauth/cli/base_command.rb +8 -6
  11. data/lib/oauth/cli/help_command.rb +0 -0
  12. data/lib/oauth/cli/query_command.rb +3 -3
  13. data/lib/oauth/cli/sign_command.rb +12 -15
  14. data/lib/oauth/cli/version_command.rb +0 -0
  15. data/lib/oauth/cli.rb +2 -2
  16. data/lib/oauth/client/action_controller_request.rb +14 -15
  17. data/lib/oauth/client/em_http.rb +28 -28
  18. data/lib/oauth/client/helper.rb +14 -17
  19. data/lib/oauth/client/net_http.rb +27 -27
  20. data/lib/oauth/client.rb +0 -0
  21. data/lib/oauth/consumer.rb +52 -62
  22. data/lib/oauth/errors/error.rb +0 -0
  23. data/lib/oauth/errors/problem.rb +0 -0
  24. data/lib/oauth/errors/unauthorized.rb +0 -0
  25. data/lib/oauth/errors.rb +0 -0
  26. data/lib/oauth/helper.rb +7 -7
  27. data/lib/oauth/oauth.rb +4 -4
  28. data/lib/oauth/oauth_test_helper.rb +0 -0
  29. data/lib/oauth/request_proxy/action_controller_request.rb +0 -0
  30. data/lib/oauth/request_proxy/action_dispatch_request.rb +0 -0
  31. data/lib/oauth/request_proxy/base.rb +3 -3
  32. data/lib/oauth/request_proxy/curb_request.rb +0 -0
  33. data/lib/oauth/request_proxy/em_http_request.rb +0 -0
  34. data/lib/oauth/request_proxy/jabber_request.rb +0 -0
  35. data/lib/oauth/request_proxy/mock_request.rb +0 -0
  36. data/lib/oauth/request_proxy/net_http.rb +2 -2
  37. data/lib/oauth/request_proxy/rack_request.rb +0 -0
  38. data/lib/oauth/request_proxy/rest_client_request.rb +2 -2
  39. data/lib/oauth/request_proxy/typhoeus_request.rb +0 -0
  40. data/lib/oauth/request_proxy.rb +3 -3
  41. data/lib/oauth/server.rb +8 -10
  42. data/lib/oauth/signature/base.rb +3 -4
  43. data/lib/oauth/signature/hmac/sha1.rb +1 -1
  44. data/lib/oauth/signature/hmac/sha256.rb +1 -1
  45. data/lib/oauth/signature/plaintext.rb +0 -0
  46. data/lib/oauth/signature/rsa/sha1.rb +3 -3
  47. data/lib/oauth/signature.rb +5 -5
  48. data/lib/oauth/token.rb +0 -0
  49. data/lib/oauth/tokens/access_token.rb +0 -0
  50. data/lib/oauth/tokens/consumer_token.rb +2 -2
  51. data/lib/oauth/tokens/request_token.rb +7 -8
  52. data/lib/oauth/tokens/server_token.rb +0 -1
  53. data/lib/oauth/tokens/token.rb +0 -0
  54. data/lib/oauth/version.rb +1 -1
  55. data/lib/oauth.rb +0 -0
  56. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1807df6b1dca91fa9f0847f63822d62091cf4ec58df1672717a0079ef4e8857a
4
- data.tar.gz: dbd064cf033678fa81a0a14c746a2baf35ccdacdca8558704d84e00305a7f6eb
3
+ metadata.gz: 427860f175079b790e1e88bcf393bee15d08812599dfcf41db5f5ff3fa819e6c
4
+ data.tar.gz: 4ec1b4af9f55f73b3bf7ab73315661f497076fe47de06b8a9a04262e2be91837
5
5
  SHA512:
6
- metadata.gz: 964271d5d010566584c7b398ad00d9c9ed73fa50a0b87e1a326cb30d3b31605af45eacd743599171f8e9f48dccf64ebfefad47c355291d9579dc19ae7cc88610
7
- data.tar.gz: 2828e98d4b4836c8493768c7f96de0d8943c05de072aaf70c59efd25c4f17eed3bfcc9f55bc3b7589260c9be5414616c9266b104499a595e98ba9da1ace0df79
6
+ metadata.gz: 71375af5e44ee5cbd0d999b21196a850504aba8e33ce8dc0c714b3fb9aa440b8ca48dcc13120a29967629b81e889fe73d7dbf8f3c8fd73caab25cb4886e401e8
7
+ data.tar.gz: 5243d503d001dd86a8e57c832106649a927012491f3204676d7bc17b64d35628739b760f2f021502e96acf65484ed8e5b75f6805e848cd3ea8cc236e5d0df1df
data/CHANGELOG.md CHANGED
@@ -7,28 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
  ## [Unreleased]
8
8
  ### Added
9
9
 
10
-
11
10
  ### Changed
12
11
 
13
-
14
12
  ### Fixed
15
13
 
16
-
17
14
  ### Removed
18
15
 
16
+ ## [0.5.9] 2022-05-03
17
+ ### Added
18
+ * Documentation related to Ruby compatibility
19
+ * Updated CHANGELOG.md formatting
20
+ * Corrected CHANGELOG.md typos
21
+ * Hardened the CI build for the next few years(?!)
22
+ * Require MFA to push new version to Rubygems
23
+ * Replace Hash Rocket syntax with JSON-style symbols where possible
24
+ * Project tooling in preparation for final release of 0.5.x series
25
+ - rubocop-ruby2_0
26
+ - overcommit
19
27
 
20
28
  ## [0.5.8] 2021-11-10
21
29
  ### Added
22
-
23
30
  * Added more documentation files to packaged gem, e.g. SECURITY.md, CODE_OF_CONDUCT.md
24
31
 
25
32
  ### Fixed
26
-
27
33
  * Removed reference to RUBY_VERSION from gemspec, as it depends on rake release, which is problematic on some ruby engines. (by @pboling)
28
34
 
29
35
  ## [0.5.7] 2021-11-02
30
36
  ### Added
31
-
32
37
  * Setup Rubocop (#205, #208 by @pboling)
33
38
  * Added CODE_OF_CONDUCT.md (#217, #218 by @pboling)
34
39
  * Added FUNDING.yml (#217, #218 by @pboling)
@@ -36,7 +41,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
41
  * Handle a nested array of hashes in OAuth::Helper.normalize (#80, #221 by @pboling)
37
42
 
38
43
  ### Changed
39
-
40
44
  * Switch from TravisCI to Github Actions (#202, #207, #176 by @pboling)
41
45
  * Upgrade webmock to v3.14.0 (#196 by @pboling)
42
46
  * Upgrade em-http-request to v1.1.7 (#173 by @pboling)
@@ -47,7 +51,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
47
51
  * Require plaintext signature method by default (#135 by @confiks & @pboling)
48
52
 
49
53
  ### Fixed
50
-
51
54
  * Fixed Infinite Redirect in v0.5.5, v0.5.6 (#186, #210 by @pboling)
52
55
  * Fixed NoMethodError on missing leading slash in path (#194, #211 by @pboling)
53
56
  * Fixed NoMethodError on nil request object (#165, #212 by @pboling)
@@ -57,61 +60,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
57
60
  * Fixed request proxy Class constant reference scopes - was missing `::` in many places (#225, #226 by @pboling)
58
61
 
59
62
  ### Removed
60
-
61
63
  * Remove direct development dependency on nokogiri (#299 by @pboling)
62
64
 
63
65
  ## [0.5.6] 2021-04-02
64
66
  ### Added
65
-
66
67
  * Add metadata to Gemspec file
67
68
  * Add support for PUT requests with Action Controller (#181)
68
69
 
69
70
  ### Changed
70
-
71
71
  * Change default timeout to be the same as Net::HTTP default, 60 seconds instead of 30 seconds.
72
72
 
73
73
  ## [0.5.5] 2020-01-19
74
74
  ### Added
75
-
76
75
  * Add :allow_empty_params option (#155)
77
76
 
78
77
  ### Changed
79
-
80
78
  * Allow redirect to different host but same path
81
79
  * Various cleanups
82
80
 
83
81
  ### Fixed
84
-
85
82
  * Fixes ssl-noverify
86
83
  * Fixed README example (#158, #159, by @pboling)
87
84
 
88
85
  ## [0.5.4] 2017-12-08
89
86
  ### Changed
90
-
91
87
  * Various cleanups (charliesome)
92
88
 
93
89
  ### Fixed
94
-
95
90
  * Fixes UnknownRequestType on Rails 5.1 for ActionDispatch::Request (xprazak2)
96
91
 
97
92
  ## [0.5.3] 2017-05-24
98
93
  ### Fixed
99
-
100
94
  * Fix #145 - broken CLI required loading active_support (James Pinto)
101
95
 
102
96
  ### Changed
103
-
104
97
  * Removing legacy scripts (James Pinto)
105
98
 
106
99
  ## [0.5.2] 2017-05-17
107
100
  ### Added
108
-
109
101
  * Adding a development dependency that had not been mentioned (James Pinto)
110
102
  * Adding CodeClimate (James Pinto)
111
103
  * Adding support to Ruby 2.4 and head (James Pinto)
112
104
 
113
105
  ### Changed
114
-
115
106
  * Use assert_nil so as to silence a Minitest 6 deprecation warning (James Pinto)
116
107
  * Stop bundling tests files in the gem (Michal Papis)
117
108
  * Minor cleanup on tests (James Pinto)
@@ -129,7 +120,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
129
120
  * Reimplementing #82 - Debug Output Option (James Pinto)
130
121
 
131
122
  ### Fixed
132
-
133
123
  * Fix #113 adding paths when a full URL has been specified (James Pinto)
134
124
  * Bug Fix, webmock 2.0 has introduced a new bug (James Pinto)
135
125
  * Making a test/support dir (James Pinto)
@@ -137,28 +127,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
137
127
 
138
128
  ## [0.5.1] 2016-02-29
139
129
  ### Added
140
-
141
130
  * Add license info to the gemspec (Robert Reiz)
142
131
 
143
132
  ### Fixed
144
-
145
133
  * Proper handling for empty query string in RequestToken#build_authorize_url (midchildan,
146
134
  Harald Sitter)
147
135
  * Replace calls to String#blank? with its implementation (Sergio Gil Pérez de la Manga)
148
136
 
149
137
  ### Changed
150
-
151
138
  * Loosen some development dependencies. Add libcurl-dev to travis
152
139
  * Fixes to travis config. Switch to rubygems for installation and loading
153
140
 
154
141
  ### Removed
155
-
156
142
  * Remove obsolete comment (Arthur Nogueira Neves)
157
143
  * Remove jeweler from gemspec
158
144
 
159
145
  ## [0.5.0] 2016-02-20
160
146
  ### Added
161
-
162
147
  * Add support for HTTP PATCH method (Richard Huang)
163
148
  * Allow reading private key from a string (Khaja Minhajuddin)
164
149
  * Add rest-client proxy (Khem Veasna)
@@ -166,14 +151,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
166
151
  * Allow reading certificate file path from environment variable. Add CentOS cert file path (Danil Vlasov)
167
152
 
168
153
  ### Changed
169
-
170
154
  * Replace jeweler with real spec and bundler tasks
171
155
  * Extract version to separate file
172
156
  * Use OpenSSL for all digest and hashing. Remove signature methods not defined by OAuth spec. (Kevin Hughes)
173
157
  * Change token requests to exclude `oauth_body_hash`. Update doc links in comments. (John Remmen)
174
158
 
175
159
  ### Fixed
176
-
177
160
  * Fix ability to pass in an authorize url with a query string (Roger Smith)
178
161
  * Fix bug in signature verification (r-stu31)
179
162
  * Use standard key name (`oauth_token_secret`) in Token#to_query (Craig Walker)
@@ -189,28 +172,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
189
172
 
190
173
  ## [0.4.7] 2012-09-03
191
174
  ### Added
192
-
193
175
  * Set a configurable timeout for all requests (Rick Olson)
194
176
 
195
177
  ### Fixed
196
-
197
178
  * Fix merging paths if the path is not empty
198
179
  * Fix nested hash params in Consumer#request (Ernie Miller)
199
180
 
200
181
  ## [0.4.6] 2012-04-21
201
182
  ### Changed
202
-
203
183
  * Make use the path component of the :site parameter (Jonathon M. Abbott)
204
184
 
205
185
  ### Fixed
206
-
207
186
  * Fixed nested attributes in #normalize (Shaliko Usubov)
208
187
  * Fixed post body's being dropped in 1.9 (Steven Hammond)
209
188
  * Fixed PUT request handling (Anton Panasenko)
210
189
 
211
190
  ## [0.4.5] 2011-06-25
212
191
  ### Added
213
-
214
192
  * Add explicit require for rsa/sha1 (Juris Galang)
215
193
  * Add gemtest support (Adrian Feldman)
216
194
 
@@ -220,17 +198,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
220
198
  * Use Net::HTTPGenericRequest (Jakub Kuźma)
221
199
 
222
200
  ### Fixed
223
-
224
201
  * Fix POST Requests with Typhoeus proxy (niedhui)
225
202
  * Fix incorrect hardcoded port (Ian Taylor)
226
203
 
227
204
  ## [0.4.4] 2010-10-31
228
205
  ### Added
229
-
230
206
  * Added support for Rails 3 in client/action_controller_request (Pelle)
231
207
 
232
208
  ### Fixed
233
-
234
209
  * Fix LoadError rescue in tests: return can't be used in this context (Hans de Graaff)
235
210
  * HTTP headers should be strings. (seancribbs)
236
211
  * ensure consumer uri gets set back to original config even if an error occurs (Brian Finney)
@@ -238,33 +213,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
238
213
 
239
214
  ## [0.4.3] 2010-09-01
240
215
  ### Fixed
241
-
242
216
  * Fix for em-http proxy (ichverstehe)
243
217
 
244
218
  ## [0.4.2] 2010-08-13
245
219
  ### Added
246
-
247
220
  * Added Bundler (rc) Gemfile for easier dev/testing
248
221
 
249
222
  ### Fixed
250
-
251
223
  * Fixed compatibility with Ruby 1.9.2 (ecavazos)
252
224
  * Fixed the em-http request proxy (Joshua Hull)
253
225
  * Fix for oauth proxy string manipulation (Jakub Suder)
254
226
 
255
227
  ## [0.4.1] 2010-06-16
256
228
  ### Added
257
-
258
229
  * Added support for using OAuth with proxies (Marsh Gardiner)
259
230
 
260
231
  ### Fixed
261
-
262
232
  * Rails 3 Compatibility fixes (Pelle Braendgaard)
263
233
  * Fixed load errors on tests for missing (non-required) libraries
264
234
 
265
235
  ## [0.4.0] 2010-04-22
266
236
  ### Added
267
-
268
237
  * Added computation of oauth_body_hash as per OAuth Request Body Hash 1.0 Draft 4 (Michael Reinsch)
269
238
  * Added the optional `oauth_session_handle` parameter for the Yahoo implementation (Will Bailey)
270
239
  * Added optional block to OAuth::Consumer.get_*_token (Neill Pearman)
@@ -276,12 +245,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
276
245
  * New website (Aaron Quint)
277
246
 
278
247
  ### Changed
279
-
280
248
  * Better marshalling implementation (Yoan Blanc)
281
249
  * Replaced hoe with Jeweler (Aaron Quint)
282
250
 
283
251
  ### Fixed
284
-
285
252
  * Strip extraneous spaces and line breaks from access_token responses (observed in the wild with Yahoo!'s OAuth+OpenID hybrid) (Eric Hartmann)
286
253
  * Stop double-escaping PLAINTEXT signatures (Jimmy Zimmerman)
287
254
  * OAuth::Client::Helper won't override the specified `oauth_version` (Philip Kromer)
@@ -289,22 +256,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
289
256
 
290
257
  ## [0.3.6] 2009-09-14
291
258
  ### Added
292
-
293
259
  * Added -B CLI option to use the :body authentication scheme (Seth)
294
260
  * Support POST and PUT with raw bodies (Yu-Shan Fung et al)
295
261
  * Added :ca_file consumer option to allow consumer specific certificate override. (Pelle)
296
262
 
297
263
  ### Changed
298
-
299
264
  * Test clean-up (Xavier Shay, Hannes Tydén)
300
265
 
301
266
  ### Fixed
302
-
303
267
  * Respect `--method` in `authorize` CLI command (Seth)
304
268
 
305
269
  ## [0.3.5] 2009-06-03
306
270
  ### Added
307
-
308
271
  * `query` CLI command to access protected resources (Seth)
309
272
  * Added -H, -Q CLI options for specifying the authentication scheme (Seth)
310
273
  * Added -O CLI option for specifying a file containing options (Seth)
@@ -315,33 +278,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
315
278
 
316
279
  ## [0.3.4] 2009-05-06
317
280
  ### Changed
318
-
319
281
  * OAuth::Client::Helper uses OAuth::VERSION (chadisfaction)
320
282
 
321
283
  ### Fixed
322
-
323
284
  * Fix OAuth::RequestProxy::ActionControllerRequest's handling of params (Tristan Groléat)
324
285
 
325
286
  ## [0.3.3] 2009-05-04
326
287
  ### Added
327
-
328
288
  * Support for arguments in OAuth::Consumer#get_access_token (Matt Sanford)
329
289
  * Add gem version to user-agent header (Matt Sanford)
330
290
 
331
291
  ### Changed
332
-
333
292
  * Improved error handling for invalid Authorization headers (Matt Sanford)
334
293
  * Handle input from aggressive form encoding libraries (Matt Wood)
335
294
 
336
295
  ### Fixed
337
-
338
296
  * Corrected OAuth XMPP namespace (Seth)
339
297
  * Fixed signatures for non-ASCII under $KCODE other than 'u' (Matt Sanford)
340
298
  * Fixed edge cases in ActionControllerRequestProxy where params were being incorrectly signed (Marcos Wright Kuhns)
341
299
 
342
300
  ## [0.3.2] 2009-03-23
343
301
  ### Added
344
-
345
302
  * Support applications using the MethodOverride Rack middleware (László Bácsi)
346
303
  * `authorize` command for `oauth` CLI (Seth)
347
304
  * Initial support for Problem Reporting extension (Seth)
@@ -349,7 +306,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
349
306
  * Added help to the 'oauth' CLI (Seth)
350
307
 
351
308
  ### Fixed
352
-
353
309
  * 2xx statuses should be treated as success (Anders Conbere)
354
310
  * Fixed ActionController parameter escaping behavior (Thiago Arrais, László Bácsi, Brett Gibson, et al)
355
311
  * Fixed signature calculation when both options and a block were provided to OAuth::Signature::Base#initialize (Seth)
@@ -357,24 +313,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
357
313
 
358
314
  ## [0.3.1] 2009-01-26
359
315
  ### Fixed
360
-
361
- * Fixed a problem with relative and absolute token request paths. (Michael
362
- Wood)
316
+ * Fixed a problem with relative and absolute token request paths. (Michael Wood)
363
317
 
364
318
  ## [0.3.0] 2009-01-25
365
319
  ### Added
366
-
367
320
  * Support ActionController::Request from Edge Rails (László Bácsi)
368
321
  * Added #normalized_parameters to OAuth::RequestProxy::Base (Pelle)
369
322
  * Command-line app for generating signatures. (Seth)
370
323
 
371
324
  ### Changed
372
-
373
325
  * OAuth::Signature.sign and friends now yield the RequestProxy instead of the token when the passed block's arity is 1. (Seth)
374
326
  * Improved test-cases and compatibility for encoding issues. (Pelle)
375
327
 
376
328
  ### Fixed
377
-
378
329
  * Correctly handle multi-valued parameters (Seth)
379
330
  * Token requests are made to the configured URL rather than generating a potentially incorrect one. (Kellan Elliott-McCrea)
380
331
 
@@ -382,7 +333,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
382
333
  The lets fix the last release release
383
334
 
384
335
  ### Fixed
385
-
386
336
  * Fixed plain text signatures (Andrew Arrow)
387
337
  * Fixed RSA requests using OAuthTokens. (Philip Lipu Tsai)
388
338
 
@@ -390,17 +340,14 @@ The lets fix the last release release
390
340
  The lets RSA release
391
341
 
392
342
  ### Added
393
-
394
343
  * Improved support for Ruby 1.8.7 (Bill Kocik)
395
344
  * Added support for 'private_key_file' option for RSA signatures (Chris Mear)
396
345
 
397
346
  ### Changed
398
-
399
347
  * Improved RSA testing
400
348
  * Omit token when signing with RSA
401
349
 
402
350
  ### Fixed
403
-
404
351
  * Fixed RSA verification to support RSA providers now using Ruby and RSA
405
352
  * Fixed several edge cases where params were being incorrectly signed (Scott Hill)
406
353
  * Fixed RSA signing (choonkeat)
@@ -409,7 +356,6 @@ The lets RSA release
409
356
  Lets actually support SSL release
410
357
 
411
358
  ### Fixed
412
-
413
359
  * Use HTTPS when required.
414
360
 
415
361
  ## 0.2 2008-1-19
@@ -421,63 +367,38 @@ but please have a look at the unit tests.
421
367
 
422
368
  ## 0.1.2 2007-12-1
423
369
  ### Fixed
424
-
425
370
  * Fixed checks for missing OAuth params to improve performance
426
371
  * Includes Pat's fix for getting the realm out.
427
372
 
428
373
  ## 0.1.1 2007-11-26
429
374
  ### Added
430
-
431
375
  * First release as a GEM
432
376
  * Moved all non-Rails functionality from the Rails plugin:
433
377
  http://code.google.com/p/oauth-plugin/
434
378
 
435
- [Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v0.5.6...HEAD
436
-
437
- [0.3.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.0
438
-
439
- [0.3.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.1
440
-
441
- [0.3.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.2
442
-
443
- [0.3.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.3
444
-
445
- [0.3.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.4
446
-
447
- [0.3.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.5
448
-
449
- [0.3.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.6
450
-
451
- [0.4.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.0
452
-
453
- [0.4.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.1
454
-
455
- [0.4.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.2
456
-
457
- [0.4.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.3
458
-
459
- [0.4.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.4
460
-
461
- [0.4.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.5
462
-
463
- [0.4.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.6
464
-
465
- [0.4.7]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.7
466
-
467
- [0.5.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.0
468
-
469
- [0.5.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.1
470
-
471
- [0.5.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.2
472
-
473
- [0.5.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.3
474
-
475
- [0.5.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.4
476
-
477
- [0.5.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.5
478
-
479
- [0.5.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.6
480
-
481
- [0.5.7]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.7
482
-
379
+ [Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v0.5.9...v0.5-maintenance
380
+ [0.5.9]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.9
483
381
  [0.5.8]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.8
382
+ [0.5.7]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.7
383
+ [0.5.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.6
384
+ [0.5.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.5
385
+ [0.5.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.4
386
+ [0.5.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.3
387
+ [0.5.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.2
388
+ [0.5.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.1
389
+ [0.5.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.0
390
+ [0.4.7]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.7
391
+ [0.4.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.6
392
+ [0.4.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.5
393
+ [0.4.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.4
394
+ [0.4.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.3
395
+ [0.4.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.2
396
+ [0.4.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.1
397
+ [0.4.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.4.0
398
+ [0.3.6]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.6
399
+ [0.3.5]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.5
400
+ [0.3.4]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.4
401
+ [0.3.3]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.3
402
+ [0.3.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.2
403
+ [0.3.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.1
404
+ [0.3.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.3.0
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/CONTRIBUTING.md CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -43,17 +43,21 @@ Or install it yourself as:
43
43
 
44
44
  ## Compatibility
45
45
 
46
- Targeted ruby compatibility is non-EOL versions of Ruby, currently 2.6, 2.7, and
47
- 3.0. Ruby is limited to 2.0+ in the gemspec, and this may change while the gem is
48
- still at version 0.x. The `master` branch currently targets 0.6.x releases.
46
+ Targeted ruby compatibility is non-EOL versions of Ruby, currently 2.7, 3.0, and
47
+ 3.1. Ruby is limited to 2.0+ in the gemspec on this `v0.5-maintenance` branch, and
48
+ this will change with minor version bumps, while the gem is still in 0.x,
49
+ in accordance with the SemVer spec.
49
50
 
50
- | Ruby OAuth Version | Maintenance Branch | Officially Supported Rubies | Unofficially Supported Rubies |
51
- |--------------------- | ------------------ | ------------------------------------------- | ----------------------------- |
52
- | 0.7.x (hypothetical) | N/A | 2.7, 3.0, 3.1 | 2.6 |
53
- | 0.6.x | `master` | 2.6, 2.7, 3.0 | 2.3, 2.4, 2.5 |
54
- | 0.5.x | `v0.5-maintenance` | 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0 | |
51
+ | | Ruby OAuth Version | Maintenance Branch | Supported Officially | Supported Unofficially | Supported Incidentally |
52
+ |:----|--------------------|--------------------|----------------------|------------------------------|------------------------|
53
+ | 1️⃣ | 0.6.x (unreleased) | `master` | 2.7, 3.0, 3.1 | 2.5, 2.6 | 2.3, 2.4 |
54
+ | 2️⃣ | 0.5.x | `v0.5-maintenance` | 2.7, 3.0, 3.1 | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 | 2.0 |
55
+ | 3️⃣ | older | N/A | Best of luck to you! | Please upgrade! | |
55
56
 
56
- NOTE: 0.5.7 is anticipated as last release of the 0.5.x series.
57
+ The `master` branch now targets 0.6.x releases.
58
+ See `v0.5-maintenance` branch for older rubies.
59
+
60
+ NOTE: If there is another 0.5.x release it is anticipated to be the last of the 0.5.x series.
57
61
 
58
62
  ## Basics
59
63
 
data/SECURITY.md CHANGED
File without changes
data/TODO CHANGED
File without changes
@@ -1,6 +1,5 @@
1
1
  class OAuth::CLI
2
2
  class AuthorizeCommand < BaseCommand
3
-
4
3
  def required_options
5
4
  [:uri]
6
5
  end
@@ -25,7 +24,7 @@ class OAuth::CLI
25
24
  def get_request_token
26
25
  consumer = get_consumer
27
26
  scope_options = options[:scope] ? { "scope" => options[:scope] } : {}
28
- consumer.get_request_token({ :oauth_callback => options[:oauth_callback] }, scope_options)
27
+ consumer.get_request_token({ oauth_callback: options[:oauth_callback] }, scope_options)
29
28
  rescue OAuth::Unauthorized => e
30
29
  alert "A problem occurred while attempting to authorize:"
31
30
  alert e
@@ -36,14 +35,13 @@ class OAuth::CLI
36
35
  OAuth::Consumer.new \
37
36
  options[:oauth_consumer_key],
38
37
  options[:oauth_consumer_secret],
39
- :access_token_url => options[:access_token_url],
40
- :authorize_url => options[:authorize_url],
41
- :request_token_url => options[:request_token_url],
42
- :scheme => options[:scheme],
43
- :http_method => options[:method].to_s.downcase.to_sym
38
+ access_token_url: options[:access_token_url],
39
+ authorize_url: options[:authorize_url],
40
+ request_token_url: options[:request_token_url],
41
+ scheme: options[:scheme],
42
+ http_method: options[:method].to_s.downcase.to_sym
44
43
  end
45
44
 
46
-
47
45
  def ask_user_for_verifier
48
46
  if options[:version] == "1.0a"
49
47
  puts "Please enter the verification code provided by the SP (oauth_verifier):"
@@ -56,10 +54,10 @@ class OAuth::CLI
56
54
  end
57
55
 
58
56
  def verbosely_get_access_token(request_token, oauth_verifier)
59
- access_token = request_token.get_access_token(:oauth_verifier => oauth_verifier)
57
+ access_token = request_token.get_access_token(oauth_verifier: oauth_verifier)
60
58
 
61
59
  puts "Response:"
62
- access_token.params.each do |k,v|
60
+ access_token.params.each do |k, v|
63
61
  puts " #{k}: #{v}" unless k.is_a?(Symbol)
64
62
  end
65
63
  rescue OAuth::Unauthorized => e
@@ -1,7 +1,9 @@
1
1
  class OAuth::CLI
2
2
  class BaseCommand
3
3
  def initialize(stdout, stdin, stderr, arguments)
4
- @stdout, @stdin, @stderr = stdout, stdin, stderr
4
+ @stdout = stdout
5
+ @stdin = stdin
6
+ @stderr = stderr
5
7
 
6
8
  @options = {}
7
9
  option_parser.parse!(arguments)
@@ -38,11 +40,11 @@ class OAuth::CLI
38
40
  options[:verbose]
39
41
  end
40
42
 
41
- def puts(string=nil)
43
+ def puts(string = nil)
42
44
  @stdout.puts(string)
43
45
  end
44
46
 
45
- def alert(string=nil)
47
+ def alert(string = nil)
46
48
  @stderr.puts(string)
47
49
  end
48
50
 
@@ -50,8 +52,8 @@ class OAuth::CLI
50
52
  @parameters ||= begin
51
53
  escaped_pairs = options[:params].collect do |pair|
52
54
  if pair =~ /:/
53
- Hash[*pair.split(":", 2)].collect do |k,v|
54
- [CGI.escape(k.strip), CGI.escape(v.strip)] * "="
55
+ Hash[*pair.split(":", 2)].collect do |k, v|
56
+ [CGI.escape(k.strip), CGI.escape(v.strip)].join("=")
55
57
  end
56
58
  else
57
59
  pair
@@ -68,7 +70,7 @@ class OAuth::CLI
68
70
  "oauth_token" => options[:oauth_token],
69
71
  "oauth_signature_method" => options[:oauth_signature_method],
70
72
  "oauth_version" => options[:oauth_version]
71
- }.reject { |_k,v| v.nil? || v == "" }.merge(cli_params)
73
+ }.reject { |_k, v| v.nil? || v == "" }.merge(cli_params)
72
74
  end
73
75
  end
74
76
 
File without changes
@@ -3,7 +3,7 @@ class OAuth::CLI
3
3
  extend OAuth::Helper
4
4
 
5
5
  def required_options
6
- [:oauth_consumer_key, :oauth_consumer_secret, :oauth_token, :oauth_token_secret]
6
+ %i[oauth_consumer_key oauth_consumer_secret oauth_token oauth_token_secret]
7
7
  end
8
8
 
9
9
  def _run
@@ -13,8 +13,8 @@ class OAuth::CLI
13
13
 
14
14
  # append params to the URL
15
15
  uri = URI.parse(options[:uri])
16
- params = parameters.map { |k,v| Array(v).map { |v2| "#{OAuth::Helper.escape(k)}=#{OAuth::Helper.escape(v2)}" } * "&" }
17
- uri.query = [uri.query, *params].reject { |x| x.nil? } * "&"
16
+ params = parameters.map { |k, v| Array(v).map { |v2| "#{OAuth::Helper.escape(k)}=#{OAuth::Helper.escape(v2)}" } * "&" }
17
+ uri.query = [uri.query, *params].reject(&:nil?) * "&"
18
18
  puts uri.to_s
19
19
 
20
20
  response = access_token.request(options[:method].to_s.downcase.to_sym, uri.to_s)