standard_id-apple 0.2.0 → 0.3.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: d28b3018e3f7fc20688cfddeb71fbe217a4582cda164801c248e33ea9186b14b
4
+ data.tar.gz: aa60781200a04bffbc7fe7e3103a2db6cb7309856cf7129f17442f98af4ad6d5
5
5
  SHA512:
6
- metadata.gz: c94b517719fa7da262ec4c189e4c3d791eef9e3e352afc4181844f0d353729bf167523932d9aab1c1eae88825001d9e87a7cf0c808b14182a6c081190ab956a3
7
- data.tar.gz: b92eb9d4c48fefc7c59e1636f28e8a5483e13e58bdc83753716ca6e4956d334b8880e2a685a4288949b13c5048b433b788db0c874df9d2fd25809ae6b287e847
6
+ metadata.gz: c2e6d33e993110034869730d54aba8f507ffb4871ca9f4c6049dd85da2c744e8e0ef097d6954bef6d0ed13fd7f2ac5f7e3504fa7b61ad542358ff03b941442ef
7
+ data.tar.gz: 2d586fd41238374119a596c002cb2718b7ed81c405e8b8eb4927fd9190fedc621a4cd0998f2867582ad73cf2b6eec022be825a3f9edfadfdfed62a9d88429784
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,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2026-04-29
11
+
12
+ ### Added
13
+
14
+ - `.editorconfig` and `AGENTS.md` for dev tooling parity with the parent `standard_id` gem.
15
+ - SimpleCov branch coverage reporting in `spec/spec_helper.rb`. No minimum threshold is enforced; `coverage/` is gitignored.
16
+
17
+ ### Changed
18
+
19
+ - 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.
20
+ - 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.
21
+
22
+ ### Removed
23
+
24
+ - **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.
25
+
10
26
  ## [0.2.0] - 2026-04-21
11
27
 
12
28
  ### Added
@@ -2,6 +2,6 @@
2
2
 
3
3
  module StandardId
4
4
  module Apple
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.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.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaryl Sim
@@ -65,9 +65,11 @@ executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
+ - ".editorconfig"
68
69
  - ".rspec"
69
70
  - ".rubocop.yml"
70
71
  - ".ruby-version"
72
+ - AGENTS.md
71
73
  - CHANGELOG.md
72
74
  - CLAUDE.md
73
75
  - CODE_OF_CONDUCT.md
@@ -93,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
95
  requirements:
94
96
  - - ">="
95
97
  - !ruby/object:Gem::Version
96
- version: 3.2.0
98
+ version: '4.0'
97
99
  required_rubygems_version: !ruby/object:Gem::Requirement
98
100
  requirements:
99
101
  - - ">="