publishing_platform_sso 0.3.2 → 0.4.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: c741003970d79722a409247f1c428b44bfd5244db7225767e8d3f3e484677fbd
4
- data.tar.gz: e8f167de46211c415cf4639f10c69e187c93d5583cebda3f3d9a7efda993c426
3
+ metadata.gz: 5db45f6cf6588fdd48c90f970d1e93c510d9657c95af940a059aa6880f510113
4
+ data.tar.gz: 6d970b25d32bb7be21c6b7cb4ccc03567672c29770bfdb5e7f71f257d8998f6f
5
5
  SHA512:
6
- metadata.gz: e608f5c9a129b8065e28a29c0e581fa27379ed721c148d54543294fa2f6469e77f77135bf9143f412e67521dbfb5cc3fed156a2761db79a28c8ef6158eca5e2c
7
- data.tar.gz: 8649c2f184d8073799642ff5854008f6cee1a0a1fb8f44a49eb2b042caa9d69df4165e537ec2d9ebea250c00a368333fd85d41c8467d94fc5cb4f8e81611f7d2
6
+ metadata.gz: 75829509bfa165316a74e556d67b0494fb9aa7baf9fbeee633d0499cd5cc65f56ccb39884e855faf3c801a97806bda1286afe58127a4247f8517c7f673607291
7
+ data.tar.gz: cf00b01c3c82f6a0f1306d702dac5ff468c6652042991320928029f509b492a1e7b71ee2f27602af69a2f027bc1bee802375b6ad536f255f98a58eaaccd9e15d
data/README.md CHANGED
@@ -161,6 +161,7 @@ require 'publishing_platform_sso/lint/user_spec'
161
161
  describe User do
162
162
  it_behaves_like "a publishing_platform_sso user class"
163
163
  end
164
+ ```
164
165
 
165
166
  ### Running the test suite
166
167
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PublishingPlatform
4
4
  module SSO
5
- VERSION = "0.3.2"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
@@ -66,7 +66,7 @@ Warden::Strategies.add(:mock_publishing_platform_sso) do
66
66
  logger.warn("Authenticating with mock_publishing_platform_sso strategy")
67
67
 
68
68
  test_user = PublishingPlatform::SSO.test_user
69
- test_user ||= PublishingPlatform::SSO::Config.user_klass.first
69
+ test_user ||= ENV["PUBLISHING_PLATFORM_SSO_MOCK_INVALID"].present? ? nil : PublishingPlatform::SSO::Config.user_klass.first
70
70
  if test_user
71
71
  # Brute force ensure test user has correct perms to signin
72
72
  unless test_user.has_permission?("signin")
@@ -74,6 +74,8 @@ Warden::Strategies.add(:mock_publishing_platform_sso) do
74
74
  test_user.update_attribute(:permissions, permissions << "signin")
75
75
  end
76
76
  success!(test_user)
77
+ elsif Rails.env.test? && ENV["PUBLISHING_PLATFORM_SSO_MOCK_INVALID"].present?
78
+ fail!(:invalid)
77
79
  else
78
80
  raise "publishing_platform_sso running in mock mode and no test user found. Normally we'd load the first user in the database. Create a user in the database."
79
81
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publishing_platform_sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Publishing Platform
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-28 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: publishing_platform_location
@@ -207,7 +206,6 @@ dependencies:
207
206
  - !ruby/object:Gem::Version
208
207
  version: '0'
209
208
  description: Client for Publishing Platform's OAuth 2-based SSO.
210
- email:
211
209
  executables: []
212
210
  extensions: []
213
211
  extra_rdoc_files: []
@@ -233,11 +231,9 @@ files:
233
231
  - lib/publishing_platform_sso/user.rb
234
232
  - lib/publishing_platform_sso/version.rb
235
233
  - lib/publishing_platform_sso/warden_config.rb
236
- homepage:
237
234
  licenses:
238
235
  - MIT
239
236
  metadata: {}
240
- post_install_message:
241
237
  rdoc_options: []
242
238
  require_paths:
243
239
  - lib
@@ -252,8 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
248
  - !ruby/object:Gem::Version
253
249
  version: '0'
254
250
  requirements: []
255
- rubygems_version: 3.5.23
256
- signing_key:
251
+ rubygems_version: 3.6.7
257
252
  specification_version: 4
258
253
  summary: Client for Publishing Platform's OAuth 2-based SSO.
259
254
  test_files: []