rails_onboarding 0.8.15 → 0.8.16
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/views/layouts/rails_onboarding/application.html.erb +9 -0
- data/lib/generators/rails_onboarding/templates/rails_onboarding.rb +6 -0
- data/lib/rails_onboarding/configuration.rb +6 -0
- data/lib/rails_onboarding/configuration_validator.rb +1 -0
- data/lib/rails_onboarding/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f79e357fe7c8d557e953c0c0b531e255b81b79ab2a23fe468c9c3c5d71769dd1
|
|
4
|
+
data.tar.gz: 98f0008fca60f449ae12e3d7cef03717ceb5069f91cb0038f98ccd502a87cc85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ab29b9cb21add6000d90cc9656c7ae70f31c67417c3921f1e895b1d478006c581954e4ce6b8b201b7521b64f1f22acae8a310902821392569c9926e28ad9883
|
|
7
|
+
data.tar.gz: 73564d4673ff3a1ba775153b563e45f2e78345162d0cdaa6ade4cdee2f57fc00bec13b189ab7ec92c4a1b1382a16c847aff8163b34ada2fd38017f9e0d66b597
|
|
@@ -48,6 +48,15 @@
|
|
|
48
48
|
<% end %>
|
|
49
49
|
|
|
50
50
|
<%= javascript_include_tag "rails_onboarding/application", "data-turbo-track": "reload", defer: true %>
|
|
51
|
+
|
|
52
|
+
<%# Host-supplied script, loaded after the engine's. Nothing else on these pages
|
|
53
|
+
loads the host's JavaScript, so without it a host whose pages need Turbo or
|
|
54
|
+
Stimulus loses both here - and a Hotwire Native app, which requires Turbo on
|
|
55
|
+
every page it shows, refuses the page outright with "Turbo is not present".
|
|
56
|
+
Deferred like the engine's, so the two run in this order. %>
|
|
57
|
+
<% if RailsOnboarding.configuration.custom_js_path.present? %>
|
|
58
|
+
<%= javascript_include_tag RailsOnboarding.configuration.custom_js_path, "data-turbo-track": "reload", defer: true %>
|
|
59
|
+
<% end %>
|
|
51
60
|
</head>
|
|
52
61
|
<body>
|
|
53
62
|
|
|
@@ -21,6 +21,12 @@ RailsOnboarding.configure do |config|
|
|
|
21
21
|
# --onboarding-* tokens in that file rather than overriding rules.
|
|
22
22
|
# config.custom_css_path = "rails_onboarding_custom"
|
|
23
23
|
|
|
24
|
+
# Asset name of a script loaded after the engine's own on onboarding pages.
|
|
25
|
+
# Nothing else loads your JavaScript there, so name your application bundle
|
|
26
|
+
# if those pages need Turbo or Stimulus - a Hotwire Native app always does,
|
|
27
|
+
# and shows "Turbo is not present" instead of the page without it.
|
|
28
|
+
# config.custom_js_path = "application"
|
|
29
|
+
|
|
24
30
|
# Feature toggles
|
|
25
31
|
config.enable_tooltips = true
|
|
26
32
|
config.enable_milestones = true
|
|
@@ -59,6 +59,12 @@ module RailsOnboarding
|
|
|
59
59
|
# app/assets/stylesheets/rails_onboarding_custom.css; set this to
|
|
60
60
|
# "rails_onboarding_custom" to actually load it. nil = load nothing.
|
|
61
61
|
@custom_css_path = nil
|
|
62
|
+
|
|
63
|
+
# Asset name of a host script to load after the engine's own on onboarding
|
|
64
|
+
# pages - typically the host's "application" bundle, which is what brings
|
|
65
|
+
# Turbo and Stimulus. Required for a Hotwire Native app, which refuses any
|
|
66
|
+
# page without Turbo. nil = load nothing.
|
|
67
|
+
@custom_js_path = nil
|
|
62
68
|
@redirect_after_completion = :root_path
|
|
63
69
|
@redirect_after_skip = :root_path
|
|
64
70
|
@welcome_heading = "We're excited to have you here!"
|
|
@@ -55,6 +55,7 @@ module RailsOnboarding
|
|
|
55
55
|
validate_type(:user_class_name, [ String ], "user_class_name must be a String")
|
|
56
56
|
validate_type(:include_host_styles, [ TrueClass, FalseClass ], "include_host_styles must be a Boolean")
|
|
57
57
|
validate_type(:custom_css_path, [ String ], "custom_css_path must be a String")
|
|
58
|
+
validate_type(:custom_js_path, [ String ], "custom_js_path must be a String")
|
|
58
59
|
validate_type(:enable_tooltips, [ TrueClass, FalseClass ], "enable_tooltips must be a Boolean")
|
|
59
60
|
validate_type(:enable_milestones, [ TrueClass, FalseClass ], "enable_milestones must be a Boolean")
|
|
60
61
|
validate_type(:enable_analytics, [ TrueClass, FalseClass ], "enable_analytics must be a Boolean")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_onboarding
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Lewis
|
|
@@ -283,7 +283,7 @@ licenses:
|
|
|
283
283
|
metadata:
|
|
284
284
|
allowed_push_host: https://rubygems.org
|
|
285
285
|
homepage_uri: https://github.com/bunnahabhain/rails_onboarding
|
|
286
|
-
source_code_uri: https://github.com/bunnahabhain/rails_onboarding/tree/v0.8.
|
|
286
|
+
source_code_uri: https://github.com/bunnahabhain/rails_onboarding/tree/v0.8.16
|
|
287
287
|
changelog_uri: https://github.com/bunnahabhain/rails_onboarding/blob/master/docs/CHANGELOG.md
|
|
288
288
|
rdoc_options: []
|
|
289
289
|
require_paths:
|