standard_id-google 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: 48adde03a7f835aa201d6874ff53cdf949b5cc92a123e42a3481421ff8d3ebb3
4
- data.tar.gz: 52a7009ce1d2015890d8f56f461e49f307250feca184f80953eecadf13ef16a8
3
+ metadata.gz: 88bce7685da60d2df6e41c103d179a5baa6bfb71d9e7f82ecaabb43e280680c7
4
+ data.tar.gz: 55a57eaba19c3907515a9609548e4d1370adaf400aa3481125e3d2a42e866c9b
5
5
  SHA512:
6
- metadata.gz: 8865520036b8f389c0acd3d02607370ffa0b19822750e934cb04d2ac3d01cbf2d1c530627e76e01aadf5a1aa72ac5b095d4299d960067599e3196611855d7e30
7
- data.tar.gz: c326578aecf2141db5e4f4d476242fafcda37699394121f1d7a7e14d1ff4af6cb4ff2f8cd4ff92950baef55cfad270155930f81acfcaeaf4972916a18d990ef8
6
+ metadata.gz: 1453686923aaf994a195d5d8d811fce1d1f02a4128eba1bcecffe457a533bad0a9345be8ae6f2545375e5c65d5357a170d450f18ca5ae71ae322f822b5a2013c
7
+ data.tar.gz: 1d23bfa48f33aab5980bbd9f6a4e5594dba9259dbe8cac91b434a3700f13187884972ca783674bc29986ebfc7c22040bf516445c338cc0d24ae15eb1099a0f9f
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,71 @@
1
+ # AGENTS.md - AI Agent Guide for standard_id-google
2
+
3
+ `standard_id-google` is a provider plugin for the [StandardId](https://github.com/rarebit-one/standard_id) authentication engine. It packages a `StandardId::Providers::Google` implementation for Sign in with Google, 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/google/providers/google_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-google/
25
+ ├── lib/standard_id/
26
+ │ ├── google.rb # Top-level require entrypoint
27
+ │ └── google/
28
+ │ ├── version.rb # Gem version constant
29
+ │ ├── railtie.rb # Auto-registers provider on after_initialize
30
+ │ └── providers/google.rb # StandardId::Providers::Google 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::Google` 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 Google-specific helpers (`verify_id_token`, `fetch_user_info`, code/token exchange via Google's tokeninfo + userinfo endpoints).
41
+
42
+ ### Railtie auto-registration
43
+
44
+ `StandardId::Google::Railtie` runs on `config.after_initialize` and calls `StandardId::ProviderRegistry.register(:google, StandardId::Providers::Google)`. 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/google.rb` | Top-level require entrypoint |
55
+ | `lib/standard_id/google/railtie.rb` | Provider registration on Rails boot |
56
+ | `lib/standard_id/google/providers/google.rb` | Google provider implementation |
57
+ | `lib/standard_id/google/version.rb` | Gem version constant |
58
+ | `standard_id-google.gemspec` | Gem metadata + runtime deps |
59
+
60
+ ## Dependencies
61
+
62
+ - **standard_id** `~> 0.1`, `>= 0.1.7` (parent engine — provides `Providers::Base`, `ProviderRegistry`, `HttpClient`, errors)
63
+ - **activesupport** `>= 8.0` (`present?`/`blank?`, indifferent access)
64
+
65
+ Dev: rspec, rubocop, webmock, lefthook.
66
+
67
+ ## Testing
68
+
69
+ - WebMock stubs Google's tokeninfo and userinfo endpoints — never make real network calls in specs.
70
+ - The dummy Rails app in `spec_helper.rb` is intentionally minimal; add config via `StandardId.config.google_*` setters in individual specs rather than expanding the dummy app.
71
+ - 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 Google
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-google
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
@@ -56,9 +56,11 @@ files:
56
56
  - ".claude/skills/publish-gem/SKILL.md"
57
57
  - ".claude/skills/start/SKILL.md"
58
58
  - ".claude/skills/worktree/SKILL.md"
59
+ - ".editorconfig"
59
60
  - ".rspec"
60
61
  - ".rubocop.yml"
61
62
  - ".ruby-version"
63
+ - AGENTS.md
62
64
  - CHANGELOG.md
63
65
  - CLAUDE.md
64
66
  - CODE_OF_CONDUCT.md
@@ -84,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
86
  requirements:
85
87
  - - ">="
86
88
  - !ruby/object:Gem::Version
87
- version: 3.2.0
89
+ version: '4.0'
88
90
  required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  requirements:
90
92
  - - ">="