standard_id-apple 0.2.0 → 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: 12a977e4ff2079df4c467f77c117bd3ea4564de05381b29514f7c1bbdec87380
4
- data.tar.gz: c071fe2549d4dae82f12d98e435214a615e68fa892fd85ff2a0dda88290c1a9b
3
+ metadata.gz: 75dbd2b3cec3ede939959396e75f19d8aea74524af5d94a19ceb3a88ac35fea5
4
+ data.tar.gz: a8cbbae0a326e7289c8bd537ab61451a90c39bd93ecca72d6f6aff4c4cc34736
5
5
  SHA512:
6
- metadata.gz: c94b517719fa7da262ec4c189e4c3d791eef9e3e352afc4181844f0d353729bf167523932d9aab1c1eae88825001d9e87a7cf0c808b14182a6c081190ab956a3
7
- data.tar.gz: b92eb9d4c48fefc7c59e1636f28e8a5483e13e58bdc83753716ca6e4956d334b8880e2a685a4288949b13c5048b433b788db0c874df9d2fd25809ae6b287e847
6
+ metadata.gz: b34faef3f56f6b1f8e6753b99dbdf5ed11170ecd6d666f3096d3c206b09ccbde0ed9177868c737abd401b8e5025699268b2e9272e106053b87cf355932ad57c9
7
+ data.tar.gz: 98dededac1c594d78d430c0c0ccb103912f997cce6369642921fd5568a078ecf9f375bea01535b6373b76e8cc9ac6cf1a3ffd0ddd92fcd78b24eac9a9892b704
data/.editorconfig ADDED
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
13
+
14
+ [Makefile]
15
+ indent_style = tab
data/AGENTS.md ADDED
@@ -0,0 +1,72 @@
1
+ # AGENTS.md - AI Agent Guide for standard_id-apple
2
+
3
+ `standard_id-apple` is a provider plugin for the [StandardId](https://github.com/rarebit-one/standard_id) authentication engine. It packages a `StandardId::Providers::Apple` implementation for Sign in with Apple, and auto-registers itself with the host StandardId installation via a `Rails::Railtie` so apps that bundle the gem don't need an explicit initializer.
4
+
5
+ ## Quick Reference
6
+
7
+ ```bash
8
+ # Run tests
9
+ bundle exec rspec
10
+
11
+ # Run a single spec file
12
+ bundle exec rspec spec/standard_id/apple/providers/apple_spec.rb
13
+
14
+ # Run linting (note: --config flag is required on Ruby 4.0)
15
+ bundle exec rubocop --config .rubocop.yml
16
+
17
+ # Auto-fix lint issues
18
+ bundle exec rubocop --config .rubocop.yml -A
19
+ ```
20
+
21
+ ## Project Structure
22
+
23
+ ```
24
+ standard_id-apple/
25
+ ├── lib/standard_id/
26
+ │ ├── apple.rb # Top-level require entrypoint
27
+ │ └── apple/
28
+ │ ├── version.rb # Gem version constant
29
+ │ ├── railtie.rb # Auto-registers provider on after_initialize
30
+ │ └── providers/apple.rb # StandardId::Providers::Apple implementation
31
+ └── spec/
32
+ ├── spec_helper.rb # Boots a minimal Rails app so the Railtie fires
33
+ └── standard_id/ # Provider specs
34
+ ```
35
+
36
+ ## Key Patterns
37
+
38
+ ### Provider class
39
+
40
+ `StandardId::Providers::Apple` inherits from `StandardId::Providers::Base` (defined in the parent `standard_id` gem) and implements the provider contract: `provider_name`, `authorization_url`, `get_user_info`, `config_schema`, plus Apple-specific helpers (`verify_id_token`, `generate_client_secret`, JWKS fetching).
41
+
42
+ ### Railtie auto-registration
43
+
44
+ `StandardId::Apple::Railtie` runs on `config.after_initialize` and calls `StandardId::ProviderRegistry.register(:apple, StandardId::Providers::Apple)`. Host apps just need the gem in their Gemfile — no initializer required.
45
+
46
+ ### Spec bootstrapping
47
+
48
+ `spec/spec_helper.rb` defines a tiny `Rails::Application` and calls `Rails.application.initialize!` so the Railtie's `after_initialize` hook fires during the spec run; without this the provider would not appear in the registry.
49
+
50
+ ## Key Files
51
+
52
+ | File | Purpose |
53
+ |------|---------|
54
+ | `lib/standard_id/apple.rb` | Top-level require entrypoint |
55
+ | `lib/standard_id/apple/railtie.rb` | Provider registration on Rails boot |
56
+ | `lib/standard_id/apple/providers/apple.rb` | Apple provider implementation |
57
+ | `lib/standard_id/apple/version.rb` | Gem version constant |
58
+ | `standard_id-apple.gemspec` | Gem metadata + runtime deps |
59
+
60
+ ## Dependencies
61
+
62
+ - **standard_id** `~> 0.1`, `>= 0.1.7` (parent engine — provides `Providers::Base`, `ProviderRegistry`, errors)
63
+ - **activesupport** `>= 8.0` (`Time.current`, `present?`/`blank?`, indifferent access)
64
+ - **jwt** `~> 2.7` (id_token decoding, client_secret signing)
65
+
66
+ Dev: rspec, rubocop, webmock, lefthook.
67
+
68
+ ## Testing
69
+
70
+ - WebMock stubs Apple's JWKS and token endpoints — never make real network calls in specs.
71
+ - The dummy Rails app in `spec_helper.rb` is intentionally minimal; add config via `StandardId.config.apple_*` setters in individual specs rather than expanding the dummy app.
72
+ - CI runs the full Ruby 4.0.x patch matrix via the shared `rarebit-one/.github` reusable workflow.
data/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.0] - 2026-05-19
11
+
12
+ ### Changed
13
+
14
+ - Relaxed `jwt` dependency constraint from `~> 2.7` to `>= 2.7, < 4`, allowing consumers to satisfy the GHSA security advisory for `jwt` 2.x by upgrading to `jwt` 3.x. The provider's `JWT.encode` / `JWT.decode` call sites already pass an explicit algorithm and are compatible with the 3.x API surface.
15
+
16
+ ## [0.3.0] - 2026-04-29
17
+
18
+ ### Added
19
+
20
+ - `.editorconfig` and `AGENTS.md` for dev tooling parity with the parent `standard_id` gem.
21
+ - SimpleCov branch coverage reporting in `spec/spec_helper.rb`. No minimum threshold is enforced; `coverage/` is gitignored.
22
+
23
+ ### Changed
24
+
25
+ - CI and release workflows migrated to the shared `rarebit-one/.github` reusable workflows (`reusable-gem-ci.yml@v1`, `reusable-gem-release.yml@v1`); `.github/workflows/ci.yml` and `release.yml` are now thin shims.
26
+ - CI matrix expanded to all four Ruby 4.0.x patch releases (`4.0.0`, `4.0.1`, `4.0.2`, `4.0.3`) and lint pinned to `4.0.3`. Branch protection will be updated post-merge to require the consolidated `ci / test` aggregator (added in `rarebit-one/.github#6`) instead of per-version checks, so future Ruby version churn won't require updating protection.
27
+
28
+ ### Removed
29
+
30
+ - **BREAKING:** Dropped support for Ruby < 4.0. `required_ruby_version` is now `>= 4.0`. Aligns with `standard_id` (the parent gem) which made the same break in [rarebit-one/standard_id#195](https://github.com/rarebit-one/standard_id/pull/195) — host apps must upgrade to Ruby 4.0+ before bundling this version.
31
+
10
32
  ## [0.2.0] - 2026-04-21
11
33
 
12
34
  ### Added
data/CLAUDE.md CHANGED
@@ -24,3 +24,9 @@ Then work inside `.worktrees/<name>/` for the rest of the session.
24
24
  **Why this matters:** Working directly on the main checkout causes cross-contamination between sessions — uncommitted changes, wrong branches, and dirty state leak into unrelated work. Worktrees eliminate this entirely.
25
25
 
26
26
  See the `/worktree` and `/start` skills for full conventions and flags.
27
+
28
+ ## Consumers
29
+
30
+ `standard_id-apple` is currently consumed by `luminality-web` only in the rarebit-one workspace. Apple Sign In is a Luminality-only feature; `fundbright-web` and `nutripod-web` do not consume this gem.
31
+
32
+ After publishing a new version via `/publish-gem`, roll it out with the workspace-level `/rollout-gem standard_id-apple [<version>]` skill (defined at the rarebit-one workspace root, one directory above this repo). The canonical consumer matrix — including version constraints — lives in that skill's `SKILL.md`.
@@ -137,7 +137,7 @@ module StandardId
137
137
  id_token,
138
138
  jwk.public_key,
139
139
  true,
140
- algorithm: "RS256",
140
+ algorithms: ["RS256"],
141
141
  iss: ISSUER,
142
142
  verify_iss: true,
143
143
  aud: client_id,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module StandardId
4
4
  module Apple
5
- VERSION = "0.2.0"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard_id-apple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaryl Sim
@@ -27,16 +27,22 @@ dependencies:
27
27
  name: jwt
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - "~>"
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.7'
33
+ - - "<"
34
+ - !ruby/object:Gem::Version
35
+ version: '4'
33
36
  type: :runtime
34
37
  prerelease: false
35
38
  version_requirements: !ruby/object:Gem::Requirement
36
39
  requirements:
37
- - - "~>"
40
+ - - ">="
38
41
  - !ruby/object:Gem::Version
39
42
  version: '2.7'
43
+ - - "<"
44
+ - !ruby/object:Gem::Version
45
+ version: '4'
40
46
  - !ruby/object:Gem::Dependency
41
47
  name: standard_id
42
48
  requirement: !ruby/object:Gem::Requirement
@@ -65,9 +71,11 @@ executables: []
65
71
  extensions: []
66
72
  extra_rdoc_files: []
67
73
  files:
74
+ - ".editorconfig"
68
75
  - ".rspec"
69
76
  - ".rubocop.yml"
70
77
  - ".ruby-version"
78
+ - AGENTS.md
71
79
  - CHANGELOG.md
72
80
  - CLAUDE.md
73
81
  - CODE_OF_CONDUCT.md
@@ -93,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
101
  requirements:
94
102
  - - ">="
95
103
  - !ruby/object:Gem::Version
96
- version: 3.2.0
104
+ version: '4.0'
97
105
  required_rubygems_version: !ruby/object:Gem::Requirement
98
106
  requirements:
99
107
  - - ">="