rhino_project_core 0.30.0.alpha.25 → 0.30.0.alpha.29
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/app/helpers/rhino/env_helper.rb +32 -0
- data/app/overrides/devise_token_auth/confirmations_controller_override.rb +1 -1
- data/app/overrides/devise_token_auth/passwords_controller_override.rb +1 -1
- data/lib/generators/rhino/dev/setup/templates/env.tt +8 -10
- data/lib/generators/rhino/module/templates/test/dummy/config/initializers/devise_token_auth.rb +2 -2
- data/lib/rhino/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 878a70a35ea5f47d96334367458d1d96c1cf6634b11d12ab53cb2ac324d8e3c9
|
4
|
+
data.tar.gz: 9e9aa898914db2d35c275aed52b28095fed6bdd4826a4d3698081a650b73b78f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee0ef61a1b3774d6aa271ec3dd0c687233f5dddb664e383a2810bed710efc703c7220c4fa53c10c50b6c26b37a9a6f848bb07e8473cd40418d83857e48acf790
|
7
|
+
data.tar.gz: 6430d5c9109698be5934cd7e51948466034b6428fdc808d02c779212ba2b415e2c94ba840237b7810680ba7626fff07b8bcd056a5f7b7ffc650dd796f71803d9
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rhino
|
4
|
+
module EnvHelper
|
5
|
+
module_function
|
6
|
+
|
7
|
+
def rhino_env_tag
|
8
|
+
# Filter environment variables to get only those starting with "RHINO_PUBLIC"
|
9
|
+
rhino_public_env = ENV.select { |key, _| key.start_with?("RHINO_PUBLIC") }
|
10
|
+
|
11
|
+
# Create a JavaScript object with the environment variables
|
12
|
+
js_env = rhino_public_env.transform_keys { |key| key.sub("RHINO_PUBLIC_", "") }
|
13
|
+
|
14
|
+
# Create a JavaScript snippet that initializes window.rhino.env
|
15
|
+
js_code = <<~JS
|
16
|
+
(function() {
|
17
|
+
window.rhino = window.rhino || {};
|
18
|
+
window.rhino.env = window.rhino.env || {};
|
19
|
+
var env = #{js_env.to_json};
|
20
|
+
for (var key in env) {
|
21
|
+
if (Object.prototype.hasOwnProperty.call(env, key)) {
|
22
|
+
window.rhino.env[key] = env[key];
|
23
|
+
}
|
24
|
+
}
|
25
|
+
})();
|
26
|
+
JS
|
27
|
+
|
28
|
+
# Return as a script tag
|
29
|
+
javascript_tag(js_code)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -4,6 +4,6 @@ class DeviseTokenAuth::PasswordsController
|
|
4
4
|
# If there is an error preparing to edit the password, redirect to frontend
|
5
5
|
# This would normally be an expired password token
|
6
6
|
def render_edit_error
|
7
|
-
redirect_to "#{ENV['
|
7
|
+
redirect_to "#{ENV['RHINO_APP_URL']}/auth/reset-password/expired"
|
8
8
|
end
|
9
9
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
PORT=<%= server_port %>
|
2
2
|
|
3
|
-
|
4
|
-
ROOT_URL=http://localhost:$PORT
|
3
|
+
RHINO_APP_URL=http://localhost:$PORT
|
5
4
|
|
6
5
|
DB_NAME=<%= db_name %>
|
7
6
|
DB_HOST=<%= db_host %>
|
@@ -9,7 +8,13 @@ DB_PORT=<%= db_port %>
|
|
9
8
|
DB_USERNAME=<%= db_user %>
|
10
9
|
DB_PASSWORD=<%= db_password %>
|
11
10
|
|
12
|
-
# Production
|
11
|
+
# Production
|
12
|
+
|
13
|
+
#RHINO_PUBLIC_ROLLBAR_ACCESS_TOKEN=
|
14
|
+
|
15
|
+
#RHINO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_...
|
16
|
+
#RHINO_STRIPE_SECRET_KEY=sk_...
|
17
|
+
|
13
18
|
SENDGRID_API_KEY=<api-key>
|
14
19
|
|
15
20
|
#AWS_ACCESS_KEY=
|
@@ -21,13 +26,6 @@ SENDGRID_API_KEY=<api-key>
|
|
21
26
|
#AZURE_ACCOUNT_NAME="azure_acc_name"
|
22
27
|
#AZURE_CONTAINER="container-test"
|
23
28
|
|
24
|
-
#STRIPE_PUBLISHABLE_KEY=pk_...
|
25
|
-
#STRIPE_SECRET_KEY=sk_...
|
26
|
-
|
27
29
|
#AUTH_GOOGLE_OAUTH2_CLIENT_ID=
|
28
30
|
#AUTH_GOOGLE_OAUTH2_SECRET_KEY=
|
29
31
|
|
30
|
-
ROLLBAR_ACCESS_TOKEN=
|
31
|
-
|
32
|
-
# Production client:
|
33
|
-
VITE_ROLLBAR_ACCESS_TOKEN=
|
data/lib/generators/rhino/module/templates/test/dummy/config/initializers/devise_token_auth.rb
CHANGED
@@ -66,6 +66,6 @@ DeviseTokenAuth.setup do |config|
|
|
66
66
|
# send email, set it to true. (This is a setting for compatibility)
|
67
67
|
# config.send_confirmation_email = true
|
68
68
|
|
69
|
-
config.default_confirm_success_url = "#{ENV['
|
70
|
-
config.default_password_reset_url = "#{ENV['
|
69
|
+
config.default_confirm_success_url = "#{ENV['RHINO_APP_URL']}/auth/signin"
|
70
|
+
config.default_password_reset_url = "#{ENV['RHINO_APP_URL']}/auth/reset-password"
|
71
71
|
end
|
data/lib/rhino/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhino_project_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.0.alpha.
|
4
|
+
version: 0.30.0.alpha.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Rosevear
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-29 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|
@@ -387,6 +387,7 @@ files:
|
|
387
387
|
- app/controllers/rhino/crud_controller.rb
|
388
388
|
- app/controllers/rhino/simple_controller.rb
|
389
389
|
- app/controllers/rhino/simple_stream_controller.rb
|
390
|
+
- app/helpers/rhino/env_helper.rb
|
390
391
|
- app/helpers/rhino/omniauth_helper.rb
|
391
392
|
- app/helpers/rhino/policy_helper.rb
|
392
393
|
- app/helpers/rhino/segment_helper.rb
|