oauth 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a742c9fad7615c19f25dc2b780f8811029314827b05f91bf803b2a4b92805e10
4
- data.tar.gz: dda3f9afdca321d3613bc6344d71a4cfffa43e19c380f3d86325aeaed09cc388
3
+ metadata.gz: 6209290a96231a2cca740d8fbfec7831e97f7b2b848997ebae0ea1a130a48a3d
4
+ data.tar.gz: 34689bed290728cb8e628bce2fd781fbec783b2dca832267093a228ef247e8ee
5
5
  SHA512:
6
- metadata.gz: 4abeba00e6da594572d2e74c974ac8658c947aa43fd9ea06f6e600df9a0b7b73d31bd8051cddab35749b8ed37346482c00653f29b9882d3b88a10d0716108403
7
- data.tar.gz: cdd3b2015294fef30bd722804486c50dc1b19f566b6ae5ddc65e4ceb83e284439ff7059d9a6d5c098bb945122663223b0e383a3732f298b46a5bef1946aa9a39
6
+ metadata.gz: a1725bcd2a976993bba7a2b61da4b24dd2b5086dfd01da52724f21dac2e87f7fff9ca595c479716aeec8a490c3ad16bc4a308a93edfb6c9cc957afbd4f0805cd
7
+ data.tar.gz: 516b1f0823a5f8a294e5b27fa0eda305af35c77bfaf448dd17144f1d67f9d6f6ea2807b77827c62e3a583ad92f7b8a586e3812e518b06687ac05cc5e6649dc17
data/CHANGELOG.md CHANGED
@@ -13,14 +13,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Removed
15
15
 
16
+ ## [1.0.1] 2022-08-29
17
+ ### Changed
18
+ * `OAuth::Comsumer#options` hash is now handled by `snaky_hash`, which was extracted from `oauth2`
19
+ * symbolized keys, dot-access and snake-case are now normalized
20
+
16
21
  ## [1.0.0] 2022-08-23
17
22
  ### Changed
18
23
  * Dropped support for Ruby < 2.7
24
+ * Dropped support for Rails < 6
19
25
 
20
26
  ### Added
21
27
  * New EOL Policy
22
28
  * Non-commercial support for the oldest version of Ruby (which itself is going EOL) will be dropped each year in April
23
29
 
30
+ ## [0.6.2] 2022-08-29
31
+ ### Changed
32
+ * `OAuth::Comsumer#options` hash is now handled by `snaky_hash`, which was extracted from `oauth2`
33
+ * symbolized keys, dot-access and snake-case are now normalized
34
+
24
35
  ## [0.6.1] 2022-08-23
25
36
  ### Changed
26
37
  * Fixed documentation in SECURITY.md
@@ -43,6 +54,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
54
  ### Removed
44
55
  * Ruby 2.0, 2.1, 2.2, and 2.3 are no longer valid install targets
45
56
 
57
+ ## [0.5.14] 2022-08-29
58
+ The "hopeful last 0.5.x" Release
59
+
60
+ ### Fixed
61
+ * More typos fixed
62
+
46
63
  ## [0.5.13] 2022-08-23
47
64
  The "I think I caught 'em all!" Release
48
65
 
@@ -439,10 +456,13 @@ but please have a look at the unit tests.
439
456
  * Moved all non-Rails functionality from the Rails plugin:
440
457
  http://code.google.com/p/oauth-plugin/
441
458
 
442
- [Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v1.0.0...main
459
+ [Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v1.0.1...main
460
+ [1.0.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v1.0.1
443
461
  [1.0.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v1.0.0
462
+ [0.6.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.2
444
463
  [0.6.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.1
445
464
  [0.6.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.0
465
+ [0.5.14]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.14
446
466
  [0.5.13]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.13
447
467
  [0.5.12]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.12
448
468
  [0.5.11]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.11
@@ -30,47 +30,49 @@ module OAuth
30
30
  end
31
31
  CA_FILE = nil unless defined?(CA_FILE)
32
32
 
33
- @@default_options = {
34
- # Signature method used by server. Defaults to HMAC-SHA1
35
- signature_method: "HMAC-SHA1",
36
-
37
- # default paths on site. These are the same as the defaults set up by the generators
38
- request_token_path: "/oauth/request_token",
39
- authenticate_path: "/oauth/authenticate",
40
- authorize_path: "/oauth/authorize",
41
- access_token_path: "/oauth/access_token",
42
-
43
- proxy: nil,
44
- # How do we send the oauth values to the server see
45
- # https://oauth.net/core/1.0/#consumer_req_param for more info
46
- #
47
- # Possible values:
48
- #
49
- # :header - via the Authorize header (Default) ( option 1. in spec)
50
- # :body - url form encoded in body of POST request ( option 2. in spec)
51
- # :query_string - via the query part of the url ( option 3. in spec)
52
- scheme: :header,
53
-
54
- # Default http method used for OAuth Token Requests (defaults to :post)
55
- http_method: :post,
56
-
57
- # Add a custom ca_file for consumer
58
- # :ca_file => '/etc/certs.pem'
59
-
60
- # Possible values:
61
- #
62
- # nil, false - no debug output
63
- # true - uses $stdout
64
- # some_value - uses some_value
65
- debug_output: nil,
66
-
67
- # Defaults to producing a body_hash as part of the signature but
68
- # can be disabled since it's not officially part of the OAuth 1.0
69
- # spec. Possible values are true and false
70
- body_hash_enabled: true,
71
-
72
- oauth_version: "1.0"
73
- }
33
+ @@default_options = SnakyHash::SymbolKeyed.new(
34
+ {
35
+ # Signature method used by server. Defaults to HMAC-SHA1
36
+ signature_method: "HMAC-SHA1",
37
+
38
+ # default paths on site. These are the same as the defaults set up by the generators
39
+ request_token_path: "/oauth/request_token",
40
+ authenticate_path: "/oauth/authenticate",
41
+ authorize_path: "/oauth/authorize",
42
+ access_token_path: "/oauth/access_token",
43
+
44
+ proxy: nil,
45
+ # How do we send the oauth values to the server see
46
+ # https://oauth.net/core/1.0/#consumer_req_param for more info
47
+ #
48
+ # Possible values:
49
+ #
50
+ # :header - via the Authorize header (Default) ( option 1. in spec)
51
+ # :body - url form encoded in body of POST request ( option 2. in spec)
52
+ # :query_string - via the query part of the url ( option 3. in spec)
53
+ scheme: :header,
54
+
55
+ # Default http method used for OAuth Token Requests (defaults to :post)
56
+ http_method: :post,
57
+
58
+ # Add a custom ca_file for consumer
59
+ # :ca_file => '/etc/certs.pem'
60
+
61
+ # Possible values:
62
+ #
63
+ # nil, false - no debug output
64
+ # true - uses $stdout
65
+ # some_value - uses some_value
66
+ debug_output: nil,
67
+
68
+ # Defaults to producing a body_hash as part of the signature but
69
+ # can be disabled since it's not officially part of the OAuth 1.0
70
+ # spec. Possible values are true and false
71
+ body_hash_enabled: true,
72
+
73
+ oauth_version: "1.0"
74
+ }
75
+ )
74
76
 
75
77
  attr_accessor :options, :key, :secret
76
78
  attr_writer :site, :http
@@ -103,7 +105,8 @@ module OAuth
103
105
  @secret = consumer_secret
104
106
 
105
107
  # ensure that keys are symbols
106
- @options = @@default_options.merge(options.transform_keys(&:to_sym))
108
+ snaky_options = SnakyHash::SymbolKeyed.new(options)
109
+ @options = @@default_options.merge(snaky_options)
107
110
  end
108
111
 
109
112
  # The default http method
data/lib/oauth/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OAuth
4
4
  module Version
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
data/lib/oauth.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # third party gems
4
+ require "snaky_hash"
4
5
  require "version_gem"
5
6
 
6
7
  require "oauth/version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pelle Braendgaard
@@ -16,8 +16,22 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2022-08-23 00:00:00.000000000 Z
19
+ date: 2022-08-29 00:00:00.000000000 Z
20
20
  dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: snaky_hash
23
+ requirement: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
28
+ type: :runtime
29
+ prerelease: false
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
21
35
  - !ruby/object:Gem::Dependency
22
36
  name: version_gem
23
37
  requirement: !ruby/object:Gem::Requirement
@@ -254,23 +268,23 @@ licenses:
254
268
  - MIT
255
269
  metadata:
256
270
  homepage_uri: https://github.com/oauth-xx/oauth-ruby
257
- source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v1.0.0
258
- changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v1.0.0/CHANGELOG.md
271
+ source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v1.0.1
272
+ changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v1.0.1/CHANGELOG.md
259
273
  bug_tracker_uri: https://github.com/oauth-xx/oauth-ruby/issues
260
- documentation_uri: https://www.rubydoc.info/gems/oauth/1.0.0
274
+ documentation_uri: https://www.rubydoc.info/gems/oauth/1.0.1
261
275
  wiki_uri: https://github.com/oauth-xx/oauth-ruby/wiki
262
276
  rubygems_mfa_required: 'true'
263
277
  post_install_message: |2
264
278
 
265
- You have installed oauth version 1.0.0, congratulations!
279
+ You have installed oauth version 1.0.1, congratulations!
266
280
 
267
- Non-commercial support for the 1.0.x series will end in April, 2025. Please make a plan to upgrade to the next version prior to that date.
268
- The only breaking change will be dropped support for Ruby 2.7.
281
+ Non-commercial support for the 1.x series will end by April, 2025. Please make a plan to upgrade to the next version prior to that date.
282
+ The only breaking change will be dropped support for Ruby 2.7 and any other versions which will also have reached EOL by then.
269
283
 
270
284
  Please see:
271
- • https://github.com/oauth-xx/oauth/blob/main/SECURITY.md
285
+ • https://github.com/oauth-xx/oauth-ruby/blob/main/SECURITY.md
272
286
 
273
- Note also that I, and this project, am in the process of leaving Github.
287
+ Note also that I am, and this project is, in the process of leaving Github.
274
288
  I wrote about some of the reasons here:
275
289
  • https://dev.to/galtzo/im-leaving-github-50ba
276
290
 
@@ -300,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
314
  - !ruby/object:Gem::Version
301
315
  version: '0'
302
316
  requirements: []
303
- rubygems_version: 3.1.6
317
+ rubygems_version: 3.3.21
304
318
  signing_key:
305
319
  specification_version: 4
306
320
  summary: OAuth Core Ruby implementation