react_on_rails_pro 16.4.0.rc.4 → 16.4.0.rc.5
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/CLAUDE.md +1 -1
- data/Gemfile.lock +3 -3
- data/LICENSE_SETUP.md +8 -19
- data/docs/installation.md +1 -7
- data/docs/updating.md +13 -6
- data/lib/react_on_rails_pro/engine.rb +26 -0
- data/lib/react_on_rails_pro/license_task_formatter.rb +0 -1
- data/lib/react_on_rails_pro/license_validator.rb +2 -17
- data/lib/react_on_rails_pro/version.rb +1 -1
- data/lib/react_on_rails_pro.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b71e54f44331a34669c58c5f6997825fe0469a96de8520d24029605134068f2
|
|
4
|
+
data.tar.gz: ec4dd8f6d56ab2097f99dcd1c51c54002c2385595890c43fc959cb8ca2cc11ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ab4f06e700c5710649c0edf4be00398eaeddad34704325cc426c14813b5db3c2a67f2af44832d6e7830b3c4982ad4994774ca0bc24d52afb575c2c7abfd2b25
|
|
7
|
+
data.tar.gz: a2c840298e0efda608cefedc7211ff8561788aa55eabe4efc9eaf461bf85a48971eaf8247bffee247c232b1caa2689d1348e89284d95043ba039e6cbc977a016
|
data/CLAUDE.md
CHANGED
|
@@ -72,7 +72,7 @@ Order matters. If the base package isn't published first, the chain breaks.
|
|
|
72
72
|
|
|
73
73
|
`ReactOnRailsPro::LicenseValidator` runs on engine startup via JWT validation.
|
|
74
74
|
|
|
75
|
-
- License key: `
|
|
75
|
+
- License key: `REACT_ON_RAILS_PRO_LICENSE` environment variable
|
|
76
76
|
- Expired licenses cause startup failures in dummy app
|
|
77
77
|
- License is checked in Pro engine initializer (`lib/react_on_rails_pro/engine.rb`)
|
|
78
78
|
|
data/Gemfile.lock
CHANGED
|
@@ -9,7 +9,7 @@ GIT
|
|
|
9
9
|
PATH
|
|
10
10
|
remote: ..
|
|
11
11
|
specs:
|
|
12
|
-
react_on_rails (16.4.0.rc.
|
|
12
|
+
react_on_rails (16.4.0.rc.5)
|
|
13
13
|
addressable
|
|
14
14
|
connection_pool
|
|
15
15
|
execjs (~> 2.5)
|
|
@@ -20,7 +20,7 @@ PATH
|
|
|
20
20
|
PATH
|
|
21
21
|
remote: .
|
|
22
22
|
specs:
|
|
23
|
-
react_on_rails_pro (16.4.0.rc.
|
|
23
|
+
react_on_rails_pro (16.4.0.rc.5)
|
|
24
24
|
addressable
|
|
25
25
|
async (>= 2.6)
|
|
26
26
|
connection_pool
|
|
@@ -29,7 +29,7 @@ PATH
|
|
|
29
29
|
httpx (~> 1.5)
|
|
30
30
|
jwt (~> 2.7)
|
|
31
31
|
rainbow
|
|
32
|
-
react_on_rails (= 16.4.0.rc.
|
|
32
|
+
react_on_rails (= 16.4.0.rc.5)
|
|
33
33
|
|
|
34
34
|
GEM
|
|
35
35
|
remote: https://rubygems.org/
|
data/LICENSE_SETUP.md
CHANGED
|
@@ -51,7 +51,7 @@ This change allows your application to start even with license issues, giving yo
|
|
|
51
51
|
|
|
52
52
|
## Installation
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### Environment Variable (Required)
|
|
55
55
|
|
|
56
56
|
Set the `REACT_ON_RAILS_PRO_LICENSE` environment variable:
|
|
57
57
|
|
|
@@ -72,22 +72,8 @@ heroku config:set REACT_ON_RAILS_PRO_LICENSE="your_token"
|
|
|
72
72
|
# Add to your CI environment variables if needed
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Create `config/react_on_rails_pro_license.key` in your Rails root:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
echo "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." > config/react_on_rails_pro_license.key
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Important**: Add this file to your `.gitignore` to avoid committing your license:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Add to .gitignore
|
|
87
|
-
echo "config/react_on_rails_pro_license.key" >> .gitignore
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Never commit your license to version control.**
|
|
75
|
+
Configure your license token via the `REACT_ON_RAILS_PRO_LICENSE` environment variable.
|
|
76
|
+
Never commit license tokens to version control.
|
|
91
77
|
|
|
92
78
|
## License Validation
|
|
93
79
|
|
|
@@ -105,7 +91,10 @@ When no license is present, the application runs in **unlicensed mode**. This is
|
|
|
105
91
|
|
|
106
92
|
No license setup is needed for development. Developers can install and use React on Rails Pro immediately.
|
|
107
93
|
|
|
108
|
-
For production deployments,
|
|
94
|
+
For production deployments, configure a paid license via the `REACT_ON_RAILS_PRO_LICENSE` environment variable.
|
|
95
|
+
|
|
96
|
+
> Migration note: `config/react_on_rails_pro_license.key` is no longer read.
|
|
97
|
+
> If you used that file previously, move the token to `REACT_ON_RAILS_PRO_LICENSE`.
|
|
109
98
|
|
|
110
99
|
### For CI/CD
|
|
111
100
|
|
|
@@ -339,7 +328,7 @@ Need help?
|
|
|
339
328
|
|
|
340
329
|
## Security Best Practices
|
|
341
330
|
|
|
342
|
-
1. ✅ **Never commit licenses to Git** —
|
|
331
|
+
1. ✅ **Never commit licenses to Git** — Keep license tokens in environment variables or secret managers
|
|
343
332
|
2. ✅ **Use environment variables in production**
|
|
344
333
|
3. ✅ **Use CI secrets for production deployment pipelines**
|
|
345
334
|
4. ✅ **Don't share licenses publicly**
|
data/docs/installation.md
CHANGED
|
@@ -111,13 +111,7 @@ React on Rails Pro uses a license-optional model to simplify evaluation and deve
|
|
|
111
111
|
export REACT_ON_RAILS_PRO_LICENSE="your-license-token-here"
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
echo "your-license-token-here" > config/react_on_rails_pro_license.key
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
⚠️ **Security Warning**: Never commit your license token to version control. Add `config/react_on_rails_pro_license.key` to your `.gitignore`. For production, use environment variables or secure secret management systems (Rails credentials, Heroku config vars, AWS Secrets Manager, etc.).
|
|
114
|
+
⚠️ **Security Warning**: Never commit your license token to version control. For production, use environment variables or secure secret management systems (Rails credentials, Heroku config vars, AWS Secrets Manager, etc.).
|
|
121
115
|
|
|
122
116
|
For complete license setup instructions, see [LICENSE_SETUP.md](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/LICENSE_SETUP.md).
|
|
123
117
|
|
data/docs/updating.md
CHANGED
|
@@ -30,6 +30,15 @@ Package names have changed:
|
|
|
30
30
|
|
|
31
31
|
**Important:** Pro users should now import from `react-on-rails-pro` instead of `react-on-rails`. The Pro package includes all core features plus Pro-exclusive functionality.
|
|
32
32
|
|
|
33
|
+
## Breaking Changes and Deprecation Policy
|
|
34
|
+
|
|
35
|
+
To reduce upgrade risk, React on Rails Pro follows this policy:
|
|
36
|
+
|
|
37
|
+
1. **Deprecate first when practical** (docs/changelog + clear replacement).
|
|
38
|
+
2. **Warn at runtime when practical** if a deprecated setup is detected.
|
|
39
|
+
3. **Remove in a later release** with a short migration note in this guide.
|
|
40
|
+
4. **Exception:** security/legal fixes may be removed immediately, but must include an explicit upgrade note.
|
|
41
|
+
|
|
33
42
|
### Your Current Setup (GitHub Packages)
|
|
34
43
|
|
|
35
44
|
If you're upgrading, you currently have:
|
|
@@ -179,13 +188,11 @@ Configure your React on Rails Pro license token as an environment variable:
|
|
|
179
188
|
export REACT_ON_RAILS_PRO_LICENSE="your-license-token-here"
|
|
180
189
|
```
|
|
181
190
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
echo "your-license-token-here" > config/react_on_rails_pro_license.key
|
|
186
|
-
```
|
|
191
|
+
> **Migration note (legacy key-file setup):**
|
|
192
|
+
> `config/react_on_rails_pro_license.key` is no longer read by React on Rails Pro.
|
|
193
|
+
> If you previously used that file, move the token into `REACT_ON_RAILS_PRO_LICENSE`.
|
|
187
194
|
|
|
188
|
-
⚠️ **Security Warning**: Never commit your license token to version control.
|
|
195
|
+
⚠️ **Security Warning**: Never commit your license token to version control. For production, use environment variables or secure secret management systems (Rails credentials, Heroku config vars, AWS Secrets Manager, etc.).
|
|
189
196
|
|
|
190
197
|
**Where to get your license token:** Contact [justin@shakacode.com](mailto:justin@shakacode.com) if you don't have your license token.
|
|
191
198
|
|
|
@@ -5,7 +5,10 @@ require "rails/railtie"
|
|
|
5
5
|
module ReactOnRailsPro
|
|
6
6
|
class Engine < Rails::Engine
|
|
7
7
|
LICENSE_URL = "https://www.shakacode.com/react-on-rails-pro/"
|
|
8
|
+
# TODO: Remove this legacy migration warning path after 16.5.0 stable release (target: 2026-05-31).
|
|
9
|
+
LEGACY_LICENSE_FILE = "config/react_on_rails_pro_license.key"
|
|
8
10
|
private_constant :LICENSE_URL
|
|
11
|
+
private_constant :LEGACY_LICENSE_FILE
|
|
9
12
|
|
|
10
13
|
initializer "react_on_rails_pro.routes" do
|
|
11
14
|
ActionDispatch::Routing::Mapper.include ReactOnRailsPro::Routes
|
|
@@ -23,8 +26,10 @@ module ReactOnRailsPro
|
|
|
23
26
|
|
|
24
27
|
case status
|
|
25
28
|
when :valid
|
|
29
|
+
log_legacy_file_cleanup_notice if legacy_license_file_present?
|
|
26
30
|
log_valid_license
|
|
27
31
|
when :missing
|
|
32
|
+
log_legacy_license_migration_notice if legacy_license_file_present?
|
|
28
33
|
log_license_issue("No license found", "Get a license at #{LICENSE_URL}")
|
|
29
34
|
when :expired
|
|
30
35
|
expiration = ReactOnRailsPro::LicenseValidator.license_expiration
|
|
@@ -79,6 +84,27 @@ module ReactOnRailsPro
|
|
|
79
84
|
Rails.logger.info "#{prefix} No license required for development/test environments."
|
|
80
85
|
end
|
|
81
86
|
end
|
|
87
|
+
|
|
88
|
+
def legacy_license_file_present?
|
|
89
|
+
Rails.root.join(LEGACY_LICENSE_FILE).exist?
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def log_legacy_file_cleanup_notice
|
|
93
|
+
Rails.logger.info "[React on Rails Pro] Legacy license file at #{LEGACY_LICENSE_FILE} " \
|
|
94
|
+
"is no longer read and can be safely deleted."
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def log_legacy_license_migration_notice
|
|
98
|
+
message = "[React on Rails Pro] Detected legacy license file at #{LEGACY_LICENSE_FILE}, " \
|
|
99
|
+
"but this file is no longer read. " \
|
|
100
|
+
"Move your token to REACT_ON_RAILS_PRO_LICENSE."
|
|
101
|
+
|
|
102
|
+
if Rails.env.production?
|
|
103
|
+
Rails.logger.warn message
|
|
104
|
+
else
|
|
105
|
+
Rails.logger.info message
|
|
106
|
+
end
|
|
107
|
+
end
|
|
82
108
|
end
|
|
83
109
|
end
|
|
84
110
|
end
|
|
@@ -232,25 +232,10 @@ module ReactOnRailsPro
|
|
|
232
232
|
ATTRIBUTION_REQUIRED_PLANS.include?(plan.strip)
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
-
# Loads license string from
|
|
235
|
+
# Loads license string from environment variable
|
|
236
236
|
# @return [String, nil] License string or nil if not found
|
|
237
237
|
def load_license_string
|
|
238
|
-
|
|
239
|
-
license = ENV.fetch("REACT_ON_RAILS_PRO_LICENSE", nil)
|
|
240
|
-
return license if license && !license.strip.empty?
|
|
241
|
-
|
|
242
|
-
# Then try config file
|
|
243
|
-
config_path = Rails.root.join("config", "react_on_rails_pro_license.key")
|
|
244
|
-
return unless config_path.exist?
|
|
245
|
-
|
|
246
|
-
begin
|
|
247
|
-
content = File.read(config_path).strip
|
|
248
|
-
return nil if content.empty?
|
|
249
|
-
|
|
250
|
-
content
|
|
251
|
-
rescue StandardError
|
|
252
|
-
nil
|
|
253
|
-
end
|
|
238
|
+
ENV.fetch("REACT_ON_RAILS_PRO_LICENSE", nil)&.strip.presence
|
|
254
239
|
end
|
|
255
240
|
|
|
256
241
|
# Decodes and verifies the JWT license
|
data/lib/react_on_rails_pro.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: react_on_rails_pro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.4.0.rc.
|
|
4
|
+
version: 16.4.0.rc.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Gordon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -128,14 +128,14 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - '='
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 16.4.0.rc.
|
|
131
|
+
version: 16.4.0.rc.5
|
|
132
132
|
type: :runtime
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - '='
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 16.4.0.rc.
|
|
138
|
+
version: 16.4.0.rc.5
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
140
|
name: bundler
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|