bp3-railties 0.1.2 → 0.1.3

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: f4826f145ebc5417af12c29ca019277f175cce13a06248b5b04fc5520d00a7cb
4
- data.tar.gz: 75d5ea2462df8ba53ddfe9ff46d8c5cbc46558df2b2c589b518b2b5049926af7
3
+ metadata.gz: 0c54fea4172b955d157345eeb5464eca4765d75813721dc374e4b09371b5e3c7
4
+ data.tar.gz: 2e5a6674a4df84028c39db243dc50020ff98fa3aa71b8e7b1ce2a601277cf8a7
5
5
  SHA512:
6
- metadata.gz: '08c8eb745032ebbca3ea9c240759b286fd1d64d50a5f073eca3d7651ef40754e2c259fb5a8a47118ec2fae43c7cb8a7fffe812fe5186428b3055efd3822646a5'
7
- data.tar.gz: 7a8e8b3d903ac9111616d600d6c33b7ddee1aeb7d6faf9538b28545b774118530f7d73a115c65a29d833959022d71f84aa2f0f283bac906116f694df997ff5a8
6
+ metadata.gz: 74573197b902485da83833e46957397234624c929fff0a8be49c14cf2f28cfdf023c8e88121b58d75be3915978d1d849f388e8a335016d0f310a7963d0b68de2
7
+ data.tar.gz: 9cb335899a8a8ea909e17d426cd4ca678343b247832e009ff8a1d933fc116ef533711b49a07f7bcc9bbd8c9b16f564788f1ad168c8479f7816862199c817131b
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.3] - 2026-01-12
4
+
5
+ - Update gems
6
+
3
7
  ## [0.1.2] - 2024-11-18
4
8
 
5
9
  - Relax gem constraints
data/CLAUDE.md ADDED
@@ -0,0 +1,105 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ bp3-railties is a Ruby gem that adapts Rails' `railties` for BP3 (persuavis/black_phoebe_3), a multi-site multi-tenant Rails application. The primary purpose is to enhance `Rails::MailersController` with BP3-specific functionality.
8
+
9
+ ## Development Commands
10
+
11
+ ### Setup
12
+ ```bash
13
+ bin/setup # Install dependencies
14
+ ```
15
+
16
+ ### Testing
17
+ ```bash
18
+ rake spec # Run RSpec tests only
19
+ rake rubocop # Run RuboCop linting only
20
+ rake # Run both tests and linting (default task)
21
+ ```
22
+
23
+ To run a single test file:
24
+ ```bash
25
+ rspec spec/path/to/file_spec.rb
26
+ ```
27
+
28
+ To run a specific test:
29
+ ```bash
30
+ rspec spec/path/to/file_spec.rb:LINE_NUMBER
31
+ ```
32
+
33
+ ### Local Installation
34
+ ```bash
35
+ rake install # Install gem locally
36
+ ```
37
+
38
+ ### Console
39
+ ```bash
40
+ bin/console # Interactive prompt for experimentation
41
+ ```
42
+
43
+ ## Architecture
44
+
45
+ ### Core Functionality
46
+
47
+ The gem uses a Rails Railtie to monkey-patch `Rails::MailersController` at application initialization. This happens in `lib/bp3/railties/railtie.rb:8-22`.
48
+
49
+ **Key mechanism**: After Rails initializes, the gem:
50
+ 1. Preloads `Rails::MailersController`
51
+ 2. Reopens the class and includes four modules from `bp3-core`:
52
+ - `Bp3::Core::Actions`
53
+ - `Bp3::Core::Settings`
54
+ - `Bp3::Core::FeatureFlags`
55
+ - `Bp3::Core::Cookies`
56
+ 3. Adds a `before_action :authenticate_root!` filter
57
+
58
+ ### Module Structure
59
+
60
+ ```
61
+ lib/
62
+ bp3-railties.rb # Entry point, requires bp3/railties
63
+ bp3/
64
+ railties.rb # Main module, requires railtie and version
65
+ railties/
66
+ railtie.rb # Rails integration via Railtie
67
+ version.rb # Version constant
68
+ ```
69
+
70
+ ### Dependencies
71
+
72
+ - **Runtime**: `bp3-core` (>= 0.1), Rails components (`railties`, `actionmailer`, `activesupport`)
73
+ - **Rails version**: 7.1.2 to < 8.1.2
74
+ - **Ruby version**: >= 3.2.0
75
+
76
+ ## RuboCop Configuration
77
+
78
+ The project uses RuboCop with the following plugins:
79
+ - rubocop-rake
80
+ - rubocop-rspec
81
+
82
+ Notable exceptions in `.rubocop.yml`:
83
+ - `Lint/ConstantDefinitionInBlock` and `Lint/Void` are disabled for railtie files (necessary for monkey-patching)
84
+ - `Naming/FileName` excludes `lib/bp3-*.rb` files
85
+ - Documentation is disabled (`Style/Documentation: false`)
86
+
87
+ ## Testing Notes
88
+
89
+ The test suite uses RSpec with:
90
+ - `--only-failures` and `--next-failure` flags enabled
91
+ - Example status persistence in `.rspec_status`
92
+ - Monkey patching disabled
93
+ - Expect syntax only
94
+
95
+ Current test coverage is minimal - only verifies version constant exists. The commented-out test in `spec/bp3/railties_spec.rb:11-16` suggests intended testing of module inclusion but requires a Rails application context to run properly.
96
+
97
+ ## Release Process
98
+
99
+ Per README:
100
+ 1. Update version in `lib/bp3/railties/version.rb`
101
+ 2. Run `rake release` (creates git tag, pushes commits/tags, publishes to rubygems.org)
102
+
103
+ ## BP3 Ecosystem Context
104
+
105
+ This gem is part of the BP3 (Black Phoebe 3) ecosystem, a multi-site multi-tenant Rails application. It depends on `bp3-core` for the modules it includes into `Rails::MailersController`. The primary use case is enabling BP3's authentication, feature flags, and tenant-specific settings in the Rails mailer preview interface.
data/Gemfile.lock CHANGED
@@ -1,25 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bp3-railties (0.1.2)
5
- actionmailer (>= 7.1.2)
6
- activesupport (>= 7.1.2)
4
+ bp3-railties (0.1.3)
5
+ actionmailer (~> 8.1)
6
+ activesupport (~> 8.1)
7
7
  bp3-core (>= 0.1)
8
- railties (>= 7.1.2)
8
+ railties (~> 8.1)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionmailer (8.0.0)
14
- actionpack (= 8.0.0)
15
- actionview (= 8.0.0)
16
- activejob (= 8.0.0)
17
- activesupport (= 8.0.0)
13
+ actionmailer (8.1.2)
14
+ actionpack (= 8.1.2)
15
+ actionview (= 8.1.2)
16
+ activejob (= 8.1.2)
17
+ activesupport (= 8.1.2)
18
18
  mail (>= 2.8.0)
19
19
  rails-dom-testing (~> 2.2)
20
- actionpack (8.0.0)
21
- actionview (= 8.0.0)
22
- activesupport (= 8.0.0)
20
+ actionpack (8.1.2)
21
+ actionview (= 8.1.2)
22
+ activesupport (= 8.1.2)
23
23
  nokogiri (>= 1.8.5)
24
24
  rack (>= 2.2.4)
25
25
  rack-session (>= 1.0.1)
@@ -27,155 +27,184 @@ GEM
27
27
  rails-dom-testing (~> 2.2)
28
28
  rails-html-sanitizer (~> 1.6)
29
29
  useragent (~> 0.16)
30
- actionview (8.0.0)
31
- activesupport (= 8.0.0)
30
+ actionview (8.1.2)
31
+ activesupport (= 8.1.2)
32
32
  builder (~> 3.1)
33
33
  erubi (~> 1.11)
34
34
  rails-dom-testing (~> 2.2)
35
35
  rails-html-sanitizer (~> 1.6)
36
- activejob (8.0.0)
37
- activesupport (= 8.0.0)
36
+ activejob (8.1.2)
37
+ activesupport (= 8.1.2)
38
38
  globalid (>= 0.3.6)
39
- activesupport (8.0.0)
39
+ activesupport (8.1.2)
40
40
  base64
41
- benchmark (>= 0.3)
42
41
  bigdecimal
43
42
  concurrent-ruby (~> 1.0, >= 1.3.1)
44
43
  connection_pool (>= 2.2.5)
45
44
  drb
46
45
  i18n (>= 1.6, < 2)
46
+ json
47
47
  logger (>= 1.4.2)
48
48
  minitest (>= 5.1)
49
49
  securerandom (>= 0.3)
50
50
  tzinfo (~> 2.0, >= 2.0.5)
51
51
  uri (>= 0.13.1)
52
- ast (2.4.2)
53
- base64 (0.2.0)
54
- benchmark (0.4.0)
55
- bigdecimal (3.1.8)
56
- bp3-core (0.1.5)
57
- actionview (>= 7.1.2)
58
- activesupport (>= 7.1.2)
52
+ ast (2.4.3)
53
+ base64 (0.3.0)
54
+ bigdecimal (4.0.1)
55
+ bp3-core (0.2.0)
56
+ actionview (~> 8.1)
57
+ activesupport (~> 8.1)
58
+ bp3-request_state (~> 0.1)
59
+ bp3-request_state (0.1.3)
60
+ actionpack (~> 8.1)
61
+ activesupport (~> 8.1)
62
+ request_store (>= 1.5.1)
59
63
  builder (3.3.0)
60
- byebug (11.1.3)
61
- concurrent-ruby (1.3.4)
62
- connection_pool (2.4.1)
64
+ byebug (12.0.0)
65
+ concurrent-ruby (1.3.6)
66
+ connection_pool (3.0.2)
63
67
  crass (1.0.6)
64
- date (3.4.0)
65
- diff-lcs (1.5.1)
66
- drb (2.2.1)
67
- erubi (1.13.0)
68
- globalid (1.2.1)
68
+ date (3.5.1)
69
+ diff-lcs (1.6.2)
70
+ drb (2.2.3)
71
+ erb (6.0.1)
72
+ erubi (1.13.1)
73
+ globalid (1.3.0)
69
74
  activesupport (>= 6.1)
70
- i18n (1.14.6)
75
+ i18n (1.14.8)
71
76
  concurrent-ruby (~> 1.0)
72
- io-console (0.7.2)
73
- irb (1.14.1)
77
+ io-console (0.8.2)
78
+ irb (1.16.0)
79
+ pp (>= 0.6.0)
74
80
  rdoc (>= 4.0.0)
75
81
  reline (>= 0.4.2)
76
- json (2.8.2)
77
- language_server-protocol (3.17.0.3)
78
- logger (1.6.1)
79
- loofah (2.23.1)
82
+ json (2.18.0)
83
+ language_server-protocol (3.17.0.5)
84
+ lint_roller (1.1.0)
85
+ logger (1.7.0)
86
+ loofah (2.25.0)
80
87
  crass (~> 1.0.2)
81
88
  nokogiri (>= 1.12.0)
82
- mail (2.8.1)
89
+ mail (2.9.0)
90
+ logger
83
91
  mini_mime (>= 0.1.1)
84
92
  net-imap
85
93
  net-pop
86
94
  net-smtp
87
95
  mini_mime (1.1.5)
88
- minitest (5.25.1)
89
- net-imap (0.5.1)
96
+ minitest (6.0.1)
97
+ prism (~> 1.5)
98
+ net-imap (0.6.2)
90
99
  date
91
100
  net-protocol
92
101
  net-pop (0.1.2)
93
102
  net-protocol
94
103
  net-protocol (0.2.2)
95
104
  timeout
96
- net-smtp (0.5.0)
105
+ net-smtp (0.5.1)
97
106
  net-protocol
98
- nokogiri (1.16.7-x86_64-darwin)
107
+ nokogiri (1.19.0-x86_64-darwin)
99
108
  racc (~> 1.4)
100
- parallel (1.26.3)
101
- parser (3.3.6.0)
109
+ parallel (1.27.0)
110
+ parser (3.3.10.0)
102
111
  ast (~> 2.4.1)
103
112
  racc
104
- psych (5.2.0)
113
+ pp (0.6.3)
114
+ prettyprint
115
+ prettyprint (0.2.0)
116
+ prism (1.7.0)
117
+ psych (5.3.1)
118
+ date
105
119
  stringio
106
120
  racc (1.8.1)
107
- rack (3.1.8)
108
- rack-session (2.0.0)
121
+ rack (3.2.4)
122
+ rack-session (2.1.1)
123
+ base64 (>= 0.1.0)
109
124
  rack (>= 3.0.0)
110
- rack-test (2.1.0)
125
+ rack-test (2.2.0)
111
126
  rack (>= 1.3)
112
- rackup (2.2.1)
127
+ rackup (2.3.1)
113
128
  rack (>= 3)
114
- rails-dom-testing (2.2.0)
129
+ rails-dom-testing (2.3.0)
115
130
  activesupport (>= 5.0.0)
116
131
  minitest
117
132
  nokogiri (>= 1.6)
118
- rails-html-sanitizer (1.6.0)
133
+ rails-html-sanitizer (1.6.2)
119
134
  loofah (~> 2.21)
120
- nokogiri (~> 1.14)
121
- railties (8.0.0)
122
- actionpack (= 8.0.0)
123
- activesupport (= 8.0.0)
135
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
136
+ railties (8.1.2)
137
+ actionpack (= 8.1.2)
138
+ activesupport (= 8.1.2)
124
139
  irb (~> 1.13)
125
140
  rackup (>= 1.0.0)
126
141
  rake (>= 12.2)
127
142
  thor (~> 1.0, >= 1.2.2)
143
+ tsort (>= 0.2)
128
144
  zeitwerk (~> 2.6)
129
145
  rainbow (3.1.1)
130
- rake (13.2.1)
131
- rdoc (6.7.0)
146
+ rake (13.3.1)
147
+ rdoc (7.0.3)
148
+ erb
132
149
  psych (>= 4.0.0)
133
- regexp_parser (2.9.2)
134
- reline (0.5.11)
150
+ tsort
151
+ regexp_parser (2.11.3)
152
+ reline (0.6.3)
135
153
  io-console (~> 0.5)
136
- rspec (3.13.0)
154
+ request_store (1.7.0)
155
+ rack (>= 1.4)
156
+ rspec (3.13.2)
137
157
  rspec-core (~> 3.13.0)
138
158
  rspec-expectations (~> 3.13.0)
139
159
  rspec-mocks (~> 3.13.0)
140
- rspec-core (3.13.2)
160
+ rspec-core (3.13.6)
141
161
  rspec-support (~> 3.13.0)
142
- rspec-expectations (3.13.3)
162
+ rspec-expectations (3.13.5)
143
163
  diff-lcs (>= 1.2.0, < 2.0)
144
164
  rspec-support (~> 3.13.0)
145
- rspec-mocks (3.13.2)
165
+ rspec-mocks (3.13.7)
146
166
  diff-lcs (>= 1.2.0, < 2.0)
147
167
  rspec-support (~> 3.13.0)
148
- rspec-support (3.13.1)
149
- rubocop (1.68.0)
168
+ rspec-support (3.13.6)
169
+ rubocop (1.82.1)
150
170
  json (~> 2.3)
151
- language_server-protocol (>= 3.17.0)
171
+ language_server-protocol (~> 3.17.0.2)
172
+ lint_roller (~> 1.1.0)
152
173
  parallel (~> 1.10)
153
174
  parser (>= 3.3.0.2)
154
175
  rainbow (>= 2.2.2, < 4.0)
155
- regexp_parser (>= 2.4, < 3.0)
156
- rubocop-ast (>= 1.32.2, < 2.0)
176
+ regexp_parser (>= 2.9.3, < 3.0)
177
+ rubocop-ast (>= 1.48.0, < 2.0)
157
178
  ruby-progressbar (~> 1.7)
158
- unicode-display_width (>= 2.4.0, < 3.0)
159
- rubocop-ast (1.36.1)
160
- parser (>= 3.3.1.0)
161
- rubocop-rake (0.6.0)
162
- rubocop (~> 1.0)
163
- rubocop-rspec (3.2.0)
164
- rubocop (~> 1.61)
179
+ unicode-display_width (>= 2.4.0, < 4.0)
180
+ rubocop-ast (1.49.0)
181
+ parser (>= 3.3.7.2)
182
+ prism (~> 1.7)
183
+ rubocop-rake (0.7.1)
184
+ lint_roller (~> 1.1)
185
+ rubocop (>= 1.72.1)
186
+ rubocop-rspec (3.9.0)
187
+ lint_roller (~> 1.1)
188
+ rubocop (~> 1.81)
165
189
  ruby-progressbar (1.13.0)
166
- securerandom (0.3.2)
167
- stringio (3.1.2)
168
- thor (1.3.2)
169
- timeout (0.4.2)
190
+ securerandom (0.4.1)
191
+ stringio (3.2.0)
192
+ thor (1.5.0)
193
+ timeout (0.6.0)
194
+ tsort (0.2.0)
170
195
  tzinfo (2.0.6)
171
196
  concurrent-ruby (~> 1.0)
172
- unicode-display_width (2.6.0)
173
- uri (1.0.2)
174
- useragent (0.16.10)
175
- zeitwerk (2.7.1)
197
+ unicode-display_width (3.2.0)
198
+ unicode-emoji (~> 4.1)
199
+ unicode-emoji (4.2.0)
200
+ uri (1.1.1)
201
+ useragent (0.16.11)
202
+ zeitwerk (2.7.4)
176
203
 
177
204
  PLATFORMS
178
205
  x86_64-darwin-22
206
+ x86_64-darwin-23
207
+ x86_64-darwin-24
179
208
 
180
209
  DEPENDENCIES
181
210
  bp3-railties!
@@ -187,4 +216,4 @@ DEPENDENCIES
187
216
  rubocop-rspec (>= 2.25)
188
217
 
189
218
  BUNDLED WITH
190
- 2.5.17
219
+ 2.7.2
data/bp3-railties.gemspec CHANGED
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- spec.add_dependency 'actionmailer', '>= 7.1.2'
35
- spec.add_dependency 'activesupport', '>= 7.1.2'
34
+ spec.add_dependency 'actionmailer', '~> 8.1'
35
+ spec.add_dependency 'activesupport', '~> 8.1'
36
36
  spec.add_dependency 'bp3-core', '>= 0.1'
37
- spec.add_dependency 'railties', '>= 7.1.2'
37
+ spec.add_dependency 'railties', '~> 8.1'
38
38
 
39
39
  spec.add_development_dependency 'byebug'
40
40
  spec.add_development_dependency 'rake', '>= 13.0'
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support'
3
4
  require 'rails/railtie'
4
5
 
5
6
  module Bp3
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bp3
4
4
  module Railties
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,43 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bp3-railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wim den Braven
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-19 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: actionmailer
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 7.1.2
18
+ version: '8.1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - ">="
23
+ - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 7.1.2
25
+ version: '8.1'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: activesupport
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
30
+ - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: 7.1.2
32
+ version: '8.1'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - ">="
37
+ - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: 7.1.2
39
+ version: '8.1'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: bp3-core
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +55,16 @@ dependencies:
56
55
  name: railties
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - ">="
58
+ - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: 7.1.2
60
+ version: '8.1'
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - ">="
65
+ - - "~>"
67
66
  - !ruby/object:Gem::Version
68
- version: 7.1.2
67
+ version: '8.1'
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: byebug
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +149,6 @@ dependencies:
150
149
  - - ">="
151
150
  - !ruby/object:Gem::Version
152
151
  version: '2.25'
153
- description:
154
152
  email:
155
153
  - wimdenbraven@persuavis.com
156
154
  executables: []
@@ -161,6 +159,7 @@ files:
161
159
  - ".rubocop.yml"
162
160
  - ".yardopts"
163
161
  - CHANGELOG.md
162
+ - CLAUDE.md
164
163
  - Gemfile
165
164
  - Gemfile.lock
166
165
  - LICENSE.txt
@@ -181,7 +180,6 @@ metadata:
181
180
  source_code_uri: https://github.com/persuavis/bp3-railties
182
181
  changelog_uri: https://github.com/persuavis/bp3-railties/blob/main/CHANGELOG.md
183
182
  rubygems_mfa_required: 'true'
184
- post_install_message:
185
183
  rdoc_options: []
186
184
  require_paths:
187
185
  - lib
@@ -196,8 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
194
  - !ruby/object:Gem::Version
197
195
  version: '0'
198
196
  requirements: []
199
- rubygems_version: 3.5.17
200
- signing_key:
197
+ rubygems_version: 3.6.9
201
198
  specification_version: 4
202
199
  summary: bp3-railties adapts friendly_id for BP3 (persuavis/black_phoebe_3).
203
200
  test_files: []