castle_devise 0.4.3 → 0.7.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 +4 -4
- data/.github/workflows/lint.yml +10 -13
- data/.github/workflows/specs.yml +55 -27
- data/.gitignore +1 -0
- data/.octocov.yml +14 -0
- data/.standard.yml +3 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +32 -1
- data/Gemfile +5 -2
- data/Gemfile.lock +232 -164
- data/README.md +16 -28
- data/bin/console +1 -1
- data/castle_devise.gemspec +6 -8
- data/gemfiles/rails_6.0.gemfile +5 -4
- data/gemfiles/rails_6.1.gemfile +5 -4
- data/gemfiles/rails_7.0.gemfile +4 -3
- data/gemfiles/rails_7.1.gemfile +18 -0
- data/gemfiles/rails_7.2.gemfile +18 -0
- data/gemfiles/rails_8.0.gemfile +18 -0
- data/gemfiles/rails_8.1.gemfile +17 -0
- data/lib/castle_devise/configuration.rb +32 -18
- data/lib/castle_devise/helpers/castle_devise.js +48 -0
- data/lib/castle_devise/helpers/castle_helper.rb +33 -13
- data/lib/castle_devise/hooks/castle_protectable.rb +1 -1
- data/lib/castle_devise/version.rb +1 -1
- data/mise.toml +11 -0
- metadata +21 -29
- data/Appraisals +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ec99e18ff024ed0a67da899ebb6ecd0feca90f4f4a9e9ecf482195f99473c536
|
|
4
|
+
data.tar.gz: 1936cca9eb03a1f6a70680337f9513f266fe09493d1886881ccd3d8be8a3c759
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba9db9541573aa3ce7e7dba634bae8756303f337327bd96631d73b0055fbb6159d311ba668a9ae6828392336cf2aeec49702e827134f6ba9a650095b67af9de2
|
|
7
|
+
data.tar.gz: da1ee7ab23bdd7db7b9a2975d7becd1d2dd10ad56667db657355ed49126975fabba059342f2975ae6e536fedd9fdb7479cddce81a17bb50c2d26e299cd6c3c20
|
data/.github/workflows/lint.yml
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
name: Lint
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
4
7
|
|
|
5
8
|
jobs:
|
|
6
9
|
standardrb:
|
|
7
|
-
name:
|
|
10
|
+
name: standardrb
|
|
8
11
|
runs-on: ubuntu-latest
|
|
9
12
|
steps:
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
- name: Give permissions
|
|
13
|
-
run: |
|
|
14
|
-
sudo chown -R root:root $GITHUB_WORKSPACE
|
|
15
|
-
- name: standardrb
|
|
16
|
-
uses: SennaLabs/action-standardrb@v0.0.3
|
|
13
|
+
- uses: actions/checkout@v5
|
|
14
|
+
- uses: ruby/setup-ruby@v1
|
|
17
15
|
with:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
rubocop_flags: --format progress
|
|
16
|
+
ruby-version: "3.4"
|
|
17
|
+
bundler-cache: true
|
|
18
|
+
- run: bundle exec standardrb --format progress
|
data/.github/workflows/specs.yml
CHANGED
|
@@ -10,31 +10,59 @@ jobs:
|
|
|
10
10
|
strategy:
|
|
11
11
|
fail-fast: false
|
|
12
12
|
matrix:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
include:
|
|
14
|
+
# Rails 6.0
|
|
15
|
+
- ruby: "3.2"
|
|
16
|
+
rails: "6.0"
|
|
17
|
+
# Rails 6.1
|
|
18
|
+
- ruby: "3.2"
|
|
19
|
+
rails: "6.1"
|
|
20
|
+
# Rails 7.0
|
|
21
|
+
- ruby: "3.2"
|
|
22
|
+
rails: "7.0"
|
|
23
|
+
# Rails 7.1
|
|
24
|
+
- ruby: "3.2"
|
|
25
|
+
rails: "7.1"
|
|
26
|
+
- ruby: "3.3"
|
|
27
|
+
rails: "7.1"
|
|
28
|
+
# Rails 7.2
|
|
29
|
+
- ruby: "3.2"
|
|
30
|
+
rails: "7.2"
|
|
31
|
+
- ruby: "3.3"
|
|
32
|
+
rails: "7.2"
|
|
33
|
+
# Rails 8.0
|
|
34
|
+
- ruby: "3.3"
|
|
35
|
+
rails: "8.0"
|
|
36
|
+
- ruby: "3.4"
|
|
37
|
+
rails: "8.0"
|
|
38
|
+
- ruby: "4.0"
|
|
39
|
+
rails: "8.0"
|
|
40
|
+
# Rails 8.1
|
|
41
|
+
- ruby: "3.3"
|
|
42
|
+
rails: "8.1"
|
|
43
|
+
- ruby: "3.4"
|
|
44
|
+
rails: "8.1"
|
|
45
|
+
- ruby: "4.0"
|
|
46
|
+
rails: "8.1"
|
|
16
47
|
steps:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
uses: aki77/simplecov-report-action@v1
|
|
39
|
-
with:
|
|
40
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
+
- uses: actions/checkout@v5
|
|
49
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
50
|
+
uses: ruby/setup-ruby@v1
|
|
51
|
+
with:
|
|
52
|
+
ruby-version: ${{ matrix.ruby }}
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
env:
|
|
55
|
+
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
|
|
56
|
+
run: |
|
|
57
|
+
bundle config path vendor/bundle
|
|
58
|
+
bundle install
|
|
59
|
+
- name: Run specs
|
|
60
|
+
env:
|
|
61
|
+
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
|
|
62
|
+
run: |
|
|
63
|
+
bundle exec rake
|
|
64
|
+
- name: Simplecov Report
|
|
65
|
+
uses: k1LoW/octocov-action@v1
|
|
66
|
+
if: matrix.ruby == '3.4' && matrix.rails == '8.1'
|
|
67
|
+
with:
|
|
68
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
CHANGED
data/.octocov.yml
ADDED
data/.standard.yml
ADDED
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 3.4.10
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased][main]
|
|
4
4
|
|
|
5
|
+
## [0.7.0] - 2026-09-07
|
|
6
|
+
- Drop `cdn.castle.io`; load `castle.umd.js` from `/vendor/castle-js` via `castle_javascript_tag`
|
|
7
|
+
- Seed `window.Castle` before a UMD script so 3.x (`name: @castleio/castle-js`) attaches to the same global
|
|
8
|
+
- Support `@castleio/castle-js` 2.x (`injectTokenOnSubmit` / `createRequestToken`) and 3.x (`configure({ pk })` + `createRequestToken`)
|
|
9
|
+
- Add `publishable_key` configuration and drop `app_id`
|
|
10
|
+
- Bump development Gemfile.lock dependencies, including Rails 8.1.3.1, `castle-rb` 9.3.0, Standard 1.56, and SimpleCov 1.2
|
|
11
|
+
- Pin Ruby 3.4.10 via `.tool-versions` and add `mise.toml` task aliases
|
|
12
|
+
- Use `actions/checkout@v5` in CI
|
|
13
|
+
|
|
14
|
+
## [0.6.0] - 2026-05-25
|
|
15
|
+
- Add support for Rails 8.1
|
|
16
|
+
- Add support for Devise 5
|
|
17
|
+
- Allow `castle-rb` 9.x (constraint widened to `>= 7.2, < 10.0`); verified
|
|
18
|
+
against the upcoming 9.0 release — castle_devise uses only the
|
|
19
|
+
`#risk` / `#filter` / `#log` Client APIs and the `Castle::Error` /
|
|
20
|
+
`InvalidParametersError` / `InvalidRequestTokenError` classes, all of
|
|
21
|
+
which remain in 9.0.
|
|
22
|
+
- Bump `castle-rb` to 9.1.0
|
|
23
|
+
- Add Ruby 3.3, 3.4, and 4.0 to the CI matrix
|
|
24
|
+
- Bump minimum required Ruby version to 3.2
|
|
25
|
+
- Replace deprecated `ActiveSupport::Configurable` with plain Ruby attribute accessors (drops the Rails 8.2 deprecation warning)
|
|
26
|
+
- Drop `appraisal` development dependency in favor of hand-maintained `gemfiles/*.gemfile`
|
|
27
|
+
- Bump development Gemfile to Rails 8.1, Devise 5, sqlite3 ~> 2.1, Bundler 2.7.x
|
|
28
|
+
|
|
29
|
+
## [0.5.0] - 2025-06-17
|
|
30
|
+
- Throw a warning instead of an error for the `$login.failed` event when an exception is raised
|
|
31
|
+
- Security fixes and dependency updates
|
|
32
|
+
|
|
5
33
|
## [0.4.3] - 2023-07-11
|
|
6
34
|
- Fix an issue where we would send a `login.failed` event on any attempt of accessing a protected resource, not only when the user failed to log in specifically
|
|
7
35
|
|
|
@@ -29,7 +57,10 @@
|
|
|
29
57
|
|
|
30
58
|
- Initial release
|
|
31
59
|
|
|
32
|
-
[main]: https://github.com/castle/castle_devise/compare/v0.
|
|
60
|
+
[main]: https://github.com/castle/castle_devise/compare/v0.7.0...HEAD
|
|
61
|
+
[0.7.0]: https://github.com/castle/castle_devise/compare/v0.6.0...v0.7.0
|
|
62
|
+
[0.6.0]: https://github.com/castle/castle_devise/compare/v0.5.0...v0.6.0
|
|
63
|
+
[0.5.0]: https://github.com/castle/castle_devise/compare/v0.4.3...v0.5.0
|
|
33
64
|
[0.4.3]: https://github.com/castle/castle_devise/compare/v0.4.2...v0.4.3
|
|
34
65
|
[0.4.2]: https://github.com/castle/castle_devise/compare/v0.4.1...v0.4.2
|
|
35
66
|
[0.4.1]: https://github.com/castle/castle_devise/compare/v0.4.0...v0.4.1
|
data/Gemfile
CHANGED
|
@@ -7,13 +7,16 @@ gemspec
|
|
|
7
7
|
|
|
8
8
|
gem "actionmailer"
|
|
9
9
|
gem "activerecord"
|
|
10
|
+
# Dev/test: track castle-rb upstream develop. Gemspec uses rubygems.
|
|
11
|
+
gem "castle-rb", github: "castle/castle-ruby", branch: "develop"
|
|
10
12
|
gem "byebug"
|
|
11
|
-
gem "
|
|
13
|
+
gem "devise", "~> 5.0"
|
|
14
|
+
gem "railties", "~> 8.1"
|
|
12
15
|
gem "rake"
|
|
13
16
|
gem "rspec"
|
|
14
17
|
gem "rspec-rails"
|
|
15
18
|
gem "simplecov"
|
|
19
|
+
gem "sqlite3", "~> 2.1"
|
|
16
20
|
gem "standard"
|
|
17
|
-
gem "sqlite3"
|
|
18
21
|
gem "vcr"
|
|
19
22
|
gem "webmock"
|