authrocket 3.7.0 → 3.8.0

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: 3c6c9c00fc890a56c43bb7bc068016f27369351625e66063101646d02c2af8ed
4
- data.tar.gz: 476de1e3111c160015f9360fe8a018252301a44a8e046f73a39c5a65c0968b1c
3
+ metadata.gz: ca2b450264123e1f8c829da1502ec2e522ccb83b0a198947177f998abf52a4e6
4
+ data.tar.gz: c9e85fd3e027dc8ef10cb2a250f389461cf0c5315c85104c96859445044c134b
5
5
  SHA512:
6
- metadata.gz: 8424ff6291fab0bfe14b2c24865ce13b67f69a238f9962d8ef0251b3867faa9aaf28f540b59b051e65f0aa506b4732e224524b7dbb0d97c30c2d9e2c7f151598
7
- data.tar.gz: 3f7933b0630f747ddaafe6cf7ab19d5088a4fa8a25931220f77e259d5f8a84300c9f5c87721e3db93282643c619057545d8b12b474e98217e29a845244567cdd
6
+ metadata.gz: 24e006d46f8bdaa08cb09da92093489b6120d1c27f8a506082f425f7bb7eb5e2c75d968364fadd2fc8d0dbc256a619d46e8160c3b4e385ad85336e6985f00022
7
+ data.tar.gz: 18f53e295fdf755d687cf82b200b96ae2169257a8e80c82040e22d1c7a7783671cfb2568706f1e23f1e70dd4181accbe87a867565123ba25249119d8ce9b2a22
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .ruby-*
5
6
  .yardoc
6
7
  Gemfile.lock
7
8
  InstalledFiles
@@ -15,5 +16,3 @@ spec/reports
15
16
  test/tmp
16
17
  test/version_tmp
17
18
  tmp
18
- *.tmproj
19
- .rvmrc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### 3.8.0
2
+
3
+ - Lazy load ENVs
4
+ - Require Ruby >= 2.7
5
+
1
6
  #### 3.7.0
2
7
 
3
8
  - Add MailingListSubscription (replaces HookState)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2024 Notioneer, Inc.
1
+ Copyright 2014-2025 Notioneer, Inc.
2
2
 
3
3
  MIT License
4
4
 
data/authrocket.gemspec CHANGED
@@ -3,27 +3,32 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'authrocket/api/version'
5
5
 
6
- Gem::Specification.new do |gem|
7
- gem.name = "authrocket"
8
- gem.version = AuthRocket::VERSION
9
- gem.authors = ["AuthRocket Team"]
10
- gem.email = ["hello@authrocket.com"]
11
- gem.description = %q{AuthRocket client for Ruby.}
12
- gem.summary = %q{AuthRocket client for Ruby}
13
- gem.homepage = 'https://authrocket.com/'
14
- gem.license = 'MIT'
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "authrocket"
8
+ spec.version = AuthRocket::VERSION
9
+ spec.authors = ["AuthRocket Team"]
10
+ spec.email = ["hello@authrocket.com"]
11
+ spec.description = %q{AuthRocket client for Ruby.}
12
+ spec.summary = %q{AuthRocket client for Ruby}
13
+ spec.homepage = 'https://authrocket.com/'
14
+ spec.license = 'MIT'
15
15
 
16
- gem.files = `git ls-files`.split($/)
17
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
- gem.require_paths = ["lib"]
16
+ spec.metadata = {
17
+ 'source_code_uri' => 'https://github.com/authrocket/authrocket-ruby',
18
+ 'changelog_uri' => 'https://github.com/authrocket/authrocket-ruby/blob/master/CHANGELOG.md'
19
+ }
20
20
 
21
- gem.required_ruby_version = '>= 2.3'
21
+ spec.files = `git ls-files`.split($/)
22
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
23
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
24
+ spec.require_paths = ["lib"]
22
25
 
23
- gem.add_dependency 'addressable', '~> 2.5'
24
- gem.add_dependency 'ncore', '~> 3.0'
25
- gem.add_dependency 'jwt', '~> 2.1'
26
+ spec.required_ruby_version = '>= 2.7'
26
27
 
27
- gem.add_development_dependency "bundler"
28
- gem.add_development_dependency "rake"
28
+ spec.add_dependency 'addressable', '~> 2.5'
29
+ spec.add_dependency 'ncore', '~> 3.10'
30
+ spec.add_dependency 'jwt', '~> 2.1'
31
+
32
+ spec.add_development_dependency "bundler"
33
+ spec.add_development_dependency "rake"
29
34
  end
@@ -4,7 +4,9 @@ module AuthRocket
4
4
  SingletonResource.send :include, AuthRocket::Client
5
5
 
6
6
  configure do
7
- self.default_url = ENV['AUTHROCKET_URL']
7
+ self.default_url = proc do
8
+ ENV['AUTHROCKET_URL']
9
+ end
8
10
 
9
11
  self.default_headers = {
10
12
  accept: 'application/json',
@@ -12,30 +14,30 @@ module AuthRocket
12
14
  user_agent: "AuthRocket/ruby v#{VERSION} [nc #{NCore::VERSION}]"
13
15
  }
14
16
 
15
- if ENV['AUTHROCKET_URI']
16
- self.credentials = parse_credentials ENV['AUTHROCKET_URI']
17
- elsif ENV['AUTHROCKET_API_KEY']
18
- self.credentials = {
19
- api_key: ENV['AUTHROCKET_API_KEY'],
20
- realm: ENV['AUTHROCKET_REALM'],
21
- service: ENV['AUTHROCKET_SERVICE'],
22
- }
23
- else
24
- self.credentials = {}
25
- end
26
-
27
- if ENV['AUTHROCKET_JWT_KEY']
28
- self.credentials[:jwt_key] ||= ENV['AUTHROCKET_JWT_KEY']
29
- end
30
- if ENV['LOGINROCKET_URL']
31
- self.credentials[:loginrocket_url] = ENV['LOGINROCKET_URL']
17
+ self.credentials = proc do
18
+ c = if ENV['AUTHROCKET_URI']
19
+ parse_credentials ENV['AUTHROCKET_URI']
20
+ elsif ENV['AUTHROCKET_API_KEY']
21
+ { api_key: ENV['AUTHROCKET_API_KEY'],
22
+ realm: ENV['AUTHROCKET_REALM'],
23
+ service: ENV['AUTHROCKET_SERVICE'],
24
+ }
25
+ else
26
+ {}
27
+ end
28
+ if ENV['AUTHROCKET_JWT_KEY']
29
+ c[:jwt_key] ||= ENV['AUTHROCKET_JWT_KEY']
30
+ end
31
+ if ENV['LOGINROCKET_URL']
32
+ c[:loginrocket_url] = ENV['LOGINROCKET_URL']
33
+ end
34
+ c
32
35
  end
33
36
 
34
37
  self.debug = false
35
38
 
36
39
  self.strict_attributes = true
37
40
 
38
-
39
41
  self.i18n_scope = :authrocket
40
42
 
41
43
  self.instrument_key = 'request.authrocket'
@@ -1,3 +1,3 @@
1
1
  module AuthRocket
2
- VERSION = '3.7.0'
2
+ VERSION = '3.8.0'
3
3
  end
@@ -42,7 +42,7 @@ module AuthRocket
42
42
  obj
43
43
  end
44
44
 
45
- # params - {token: 'kli:...', code: '000000'}
45
+ # params - {token: 'tmf:...', code: '000000'}
46
46
  # returns: Session
47
47
  def authenticate_token(params)
48
48
  params = parse_request_params(params, json_root: json_root)
@@ -61,7 +61,7 @@ module AuthRocket
61
61
  obj
62
62
  end
63
63
 
64
- # params - {token: '...', password: '...', password_confirmation: '...'}
64
+ # params - {token: 'tpw:...', password: '...', password_confirmation: '...'}
65
65
  # returns: Session || Token
66
66
  def reset_password_with_token(params)
67
67
  params = parse_request_params(params, json_root: json_root)
@@ -80,7 +80,7 @@ module AuthRocket
80
80
  obj
81
81
  end
82
82
 
83
- # params - {token: '...'}
83
+ # params - {token: 'tve:...'}
84
84
  # returns: User
85
85
  def verify_email(params)
86
86
  params = parse_request_params(params, json_root: json_root)
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authrocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AuthRocket Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: addressable
@@ -30,14 +29,14 @@ dependencies:
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '3.0'
32
+ version: '3.10'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '3.0'
39
+ version: '3.10'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: jwt
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -130,8 +129,9 @@ files:
130
129
  homepage: https://authrocket.com/
131
130
  licenses:
132
131
  - MIT
133
- metadata: {}
134
- post_install_message:
132
+ metadata:
133
+ source_code_uri: https://github.com/authrocket/authrocket-ruby
134
+ changelog_uri: https://github.com/authrocket/authrocket-ruby/blob/master/CHANGELOG.md
135
135
  rdoc_options: []
136
136
  require_paths:
137
137
  - lib
@@ -139,15 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
- version: '2.3'
142
+ version: '2.7'
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  requirements: []
149
- rubygems_version: 3.5.3
150
- signing_key:
149
+ rubygems_version: 3.6.9
151
150
  specification_version: 4
152
151
  summary: AuthRocket client for Ruby
153
152
  test_files: []