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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7252b6a08a8e929c3d481444a4144b7e6045b74a7b1b54fb92bf65c186db7a2a
4
- data.tar.gz: a36f6bb8ef95e1b6125cafb3b5033229ad7d6d91ffc3180f1893bd173ad07891
3
+ metadata.gz: 2b71e54f44331a34669c58c5f6997825fe0469a96de8520d24029605134068f2
4
+ data.tar.gz: ec4dd8f6d56ab2097f99dcd1c51c54002c2385595890c43fc959cb8ca2cc11ab
5
5
  SHA512:
6
- metadata.gz: fa78476741398c2052be1a31af784dc70ffcea225b5bbfe7b086853753249d43982dd29133d5e381db21799040c0112e37adc12f5a8050bc5571a9782f7a98bc
7
- data.tar.gz: 450f06137321fd93edccb3480bb7539d63d661c10acd1884a20069480c132742871a8dfca7a2105ddd6a54d6d42bbdc543aa775a063d08e0e6486f28dd1c9030
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: `config/react_on_rails_pro_license.key` or `REACT_ON_RAILS_PRO_LICENSE` env var
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.4)
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.4)
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.4)
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
- ### Method 1: Environment Variable (Recommended)
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
- ### Method 2: Configuration File
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, share a paid license via environment variable or configuration file.
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** — Add `config/react_on_rails_pro_license.key` to `.gitignore`
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
- Or create a config file at `config/react_on_rails_pro_license.key`:
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
- Or create a config file at `config/react_on_rails_pro_license.key`:
183
-
184
- ```bash
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. 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.).
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
@@ -42,7 +42,6 @@ module ReactOnRailsPro
42
42
 
43
43
  puts ""
44
44
  puts "No license found. Set REACT_ON_RAILS_PRO_LICENSE"
45
- puts "or place a key file at config/react_on_rails_pro_license.key"
46
45
  end
47
46
 
48
47
  def print_details(result, info)
@@ -232,25 +232,10 @@ module ReactOnRailsPro
232
232
  ATTRIBUTION_REQUIRED_PLANS.include?(plan.strip)
233
233
  end
234
234
 
235
- # Loads license string from env var or file
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
- # First try environment variable
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRailsPro
4
- VERSION = "16.4.0.rc.4"
4
+ VERSION = "16.4.0.rc.5"
5
5
  PROTOCOL_VERSION = "2.0.0"
6
6
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rails"
4
+ require "react_on_rails"
4
5
 
5
6
  require "react_on_rails_pro/request"
6
7
  require "react_on_rails_pro/version"
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
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-23 00:00:00.000000000 Z
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.4
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.4
138
+ version: 16.4.0.rc.5
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: bundler
141
141
  requirement: !ruby/object:Gem::Requirement