@@ -200,13 +200,14 @@ jobs:
200200 with :
201201 bundler-cache : true
202202
203- # Add database, credentials, and other app-specific setup required to boot Rails in production.
203+ # Add database, credentials, Node/pnpm, and other app-specific setup required to boot Rails in production.
204204 - name : Verify React on Rails Pro license
205205 run : bundle exec rake react_on_rails_pro:verify_license
206206` ` `
207207
208208The task depends on the Rails environment. If your production boot requires credentials or services such as
209- ` RAILS_MASTER_KEY`, `DATABASE_URL`, or database preparation, add those to the workflow before running the task.
209+ ` RAILS_MASTER_KEY`, `DATABASE_URL`, database preparation, or Node package setup, add those to the workflow before
210+ running the task.
210211
211212# ### Advisory CI Example
212213
@@ -237,7 +238,7 @@ jobs:
237238 with:
238239 bundler-cache: true
239240
240- # Add database, credentials, and other app-specific setup required to boot Rails in production.
241+ # Add database, credentials, Node/pnpm, and other app-specific setup required to boot Rails in production.
241242 - name: Check React on Rails Pro license
242243 run: |
243244 set +e
@@ -248,15 +249,17 @@ jobs:
248249 {
249250 echo "## React on Rails Pro license"
250251 echo
251- echo "\`\`\` text"
252+ echo "~~~ text"
252253 echo "$output"
253- echo "\`\`\` "
254+ echo "~~~ "
254255 } >> "$GITHUB_STEP_SUMMARY"
255256
256257 if [ "$status" -ne 0 ]; then
257258 echo "::warning title=React on Rails Pro license::License validation did not pass. See job summary."
258259 fi
259260
261+ # Always exit 0: this is an advisory check. The warning annotation
262+ # and step summary above provide visibility without blocking the workflow.
260263 exit 0
261264` ` `
262265
@@ -267,21 +270,23 @@ checks would report a missing token there.
267270# ## Monitor License Expiration
268271
269272If your organization wants an app-owned scheduled check with a custom warning threshold, add a wrapper task like this.
270- It uses the Pro utility API and treats the built-in 30-day renewal window as the default :
273+ It mirrors the built-in verification task and treats the built-in 30-day renewal window as the default :
271274
272275` ` ` ruby
273276# lib/tasks/react_on_rails_pro_license.rake
274277namespace :licenses do
275278 desc "Fail if the React on Rails Pro license is invalid, expired, or expiring soon"
276279 task check_react_on_rails_pro: :environment do
277280 threshold_days = Integer(ENV.fetch("DAYS", "30"))
278- info = ReactOnRailsPro::Utils .license_info
281+ info = ReactOnRailsPro::LicenseValidator .license_info
279282 status = info.fetch(:status, :unknown)
280283 expiration = info[:expiration]
281284 days_remaining = expiration && ((expiration - Time.now) / 86_400).ceil
282285
283286 if status == :expired
284287 abort "React on Rails Pro license is expired. Renew and update REACT_ON_RAILS_PRO_LICENSE."
288+ elsif status == :missing
289+ abort "React on Rails Pro license is missing. Set REACT_ON_RAILS_PRO_LICENSE."
285290 elsif status != :valid
286291 abort "React on Rails Pro license is #{status}. Update REACT_ON_RAILS_PRO_LICENSE."
287292 end
0 commit comments