usps-jwt_auth 0.2.5 → 0.2.6

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: d3e117b892e93bc204b114ee74d57d091b9c1d74d880cb3cd20aa538faa1888a
4
- data.tar.gz: d33118d95aaae11f9537aca25b9a75fa7f3580b9818fc6796ca6b5196d6d7663
3
+ metadata.gz: 34bde76a473a9a091c8b44a0253d49868d957e7ea2edd365aae1d0b8639073e1
4
+ data.tar.gz: 2f5a5df0b10c3344b563abede725f50b65c3fad6694babb2dd6683569e3d784c
5
5
  SHA512:
6
- metadata.gz: 3765f8cc19d7e78081c5a327be6a9c2501bf6e48583f95156b7546c1d5c9b4b368e2bf82477f48ae8e48fd54a6a5a564d123af310295887233890e21894c3485
7
- data.tar.gz: 2fc854ea47fe0013d0053512716d68e48182839d6e40c07705d543c8fd0e04641facb1437fe0d4880fa464a061811f911860aeffc80d91fc347fcb2004fcc92b
6
+ metadata.gz: b77c1978798dbe4e885b7f9f47b46d18b53bc0e72c8075ad6be054d0ac0a80c4268f945431523158f3534b896858ad32b58fa7153ae3934d87e638fa4df57bf8
7
+ data.tar.gz: fe942f554c30ef6eca06a9e99f8d4e0b73381e59da2145ae7dabe233008db30b5a01ca19095d2f48d6168e367de0db62b880eaf54a3bf74618704538de9e1fc7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-jwt_auth (0.2.5)
4
+ usps-jwt_auth (0.2.6)
5
5
  activesupport (~> 8.0)
6
6
  fileutils (~> 1.7)
7
7
  jwt (~> 3.1)
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Add the gem to your Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'usps-jwt_auth', '>= 0.2.5'
10
+ gem 'usps-jwt_auth', '>= 0.2.6'
11
11
  ```
12
12
 
13
13
  Then run the install task:
@@ -20,7 +20,7 @@ bundle exec rails usps:jwt:install
20
20
 
21
21
  ```ruby
22
22
  Usps::JwtAuth.configure do |config|
23
- config.environment = Rails.env
23
+ # config.environment = Rails.env
24
24
  # config.keys_path = 'config/keys'
25
25
  # config.public_keys_path = 'config/public_keys'
26
26
  # config.key_size = 4096
@@ -7,10 +7,11 @@ module Usps
7
7
  class Config
8
8
  REQUIRED_OPTIONS = %i[audience is_admin find_member].freeze
9
9
 
10
- attr_accessor :environment, :key_size, :algorithm, :issuer_base, :issuers, :audience, :is_admin, :find_member
10
+ attr_accessor :key_size, :algorithm, :issuer_base, :issuers, :audience, :is_admin, :find_member
11
+ attr_reader :environment
11
12
 
12
13
  def initialize
13
- @environment = ActiveSupport::StringInquirer.new('development')
14
+ @environment = defined?(Rails) ? Rails.env : ActiveSupport::StringInquirer.new('development')
14
15
  @keys_path = Pathname.new('config/keys')
15
16
  @public_keys_path = Pathname.new('config/public_keys')
16
17
  @key_size = 4096
@@ -22,6 +23,10 @@ module Usps
22
23
  yield self if block_given? # Also support setting options on initialize
23
24
  end
24
25
 
26
+ def environment=(env)
27
+ @environment = ActiveSupport::StringInquirer.new(env)
28
+ end
29
+
25
30
  def keys_path
26
31
  defined?(Rails) ? Rails.root.join(@keys_path) : @keys_path
27
32
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '0.2.5'
5
+ VERSION = '0.2.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander