onboardable 1.3.3 → 1.4.0
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/CHANGELOG.md +5 -0
- data/Gemfile.lock +39 -34
- data/README.md +27 -27
- data/lib/onboardable/errors.rb +1 -1
- data/lib/onboardable/version.rb +1 -1
- data/lib/onboardable.rb +2 -2
- data/onboardable.gemspec +2 -2
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b6bddf9e6bd140af8b288a658222c3742ce07f6b9f2585716ba28e9c24a1097
|
4
|
+
data.tar.gz: '09a2c6fe377f80a33e1fbff274c9e05cfa6c907ae3661def938b961bf1afe181'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0379a520c2bb0699772c500866924497fb6ab89ffacbb93d3e7b34b0fac3f614ae899d8ab5bff49a9189d6c46f3d37fe1c7e557c95c9929d2205c03530edc63c'
|
7
|
+
data.tar.gz: ce3d1feaca082deedc5dbf4d20fb56663ec403d3614e35e35c1ebb21b237864bde9599da46e8ff0e16a7d03164253fea878c9f736afc0631bba982a706b25200
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,68 +1,73 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
onboardable (1.
|
4
|
+
onboardable (1.4.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
diff-lcs (1.
|
9
|
+
ast (2.4.3)
|
10
|
+
diff-lcs (1.6.1)
|
11
11
|
docile (1.4.1)
|
12
|
-
json (2.
|
13
|
-
language_server-protocol (3.17.0.
|
14
|
-
|
15
|
-
|
12
|
+
json (2.10.2)
|
13
|
+
language_server-protocol (3.17.0.4)
|
14
|
+
lint_roller (1.1.0)
|
15
|
+
parallel (1.26.3)
|
16
|
+
parser (3.3.7.4)
|
16
17
|
ast (~> 2.4.1)
|
17
18
|
racc
|
19
|
+
prism (1.4.0)
|
18
20
|
racc (1.8.1)
|
19
21
|
rainbow (3.1.1)
|
20
22
|
rake (13.2.1)
|
21
|
-
regexp_parser (2.
|
22
|
-
rexml (3.3.5)
|
23
|
-
strscan
|
23
|
+
regexp_parser (2.10.0)
|
24
24
|
rspec (3.13.0)
|
25
25
|
rspec-core (~> 3.13.0)
|
26
26
|
rspec-expectations (~> 3.13.0)
|
27
27
|
rspec-mocks (~> 3.13.0)
|
28
|
-
rspec-core (3.13.
|
28
|
+
rspec-core (3.13.3)
|
29
29
|
rspec-support (~> 3.13.0)
|
30
|
-
rspec-expectations (3.13.
|
30
|
+
rspec-expectations (3.13.3)
|
31
31
|
diff-lcs (>= 1.2.0, < 2.0)
|
32
32
|
rspec-support (~> 3.13.0)
|
33
|
-
rspec-mocks (3.13.
|
33
|
+
rspec-mocks (3.13.2)
|
34
34
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
35
|
rspec-support (~> 3.13.0)
|
36
|
-
rspec-support (3.13.
|
37
|
-
rubocop (1.
|
36
|
+
rspec-support (3.13.2)
|
37
|
+
rubocop (1.75.1)
|
38
38
|
json (~> 2.3)
|
39
|
-
language_server-protocol (
|
39
|
+
language_server-protocol (~> 3.17.0.2)
|
40
|
+
lint_roller (~> 1.1.0)
|
40
41
|
parallel (~> 1.10)
|
41
42
|
parser (>= 3.3.0.2)
|
42
43
|
rainbow (>= 2.2.2, < 4.0)
|
43
|
-
regexp_parser (>= 2.
|
44
|
-
|
45
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
44
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
45
|
+
rubocop-ast (>= 1.43.0, < 2.0)
|
46
46
|
ruby-progressbar (~> 1.7)
|
47
|
-
unicode-display_width (>= 2.4.0, <
|
48
|
-
rubocop-ast (1.
|
49
|
-
parser (>= 3.3.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
rubocop (
|
55
|
-
rubocop-
|
56
|
-
|
47
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
48
|
+
rubocop-ast (1.43.0)
|
49
|
+
parser (>= 3.3.7.2)
|
50
|
+
prism (~> 1.4)
|
51
|
+
rubocop-performance (1.25.0)
|
52
|
+
lint_roller (~> 1.1)
|
53
|
+
rubocop (>= 1.75.0, < 2.0)
|
54
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
55
|
+
rubocop-rake (0.7.1)
|
56
|
+
lint_roller (~> 1.1)
|
57
|
+
rubocop (>= 1.72.1)
|
58
|
+
rubocop-rspec (3.5.0)
|
59
|
+
lint_roller (~> 1.1)
|
60
|
+
rubocop (~> 1.72, >= 1.72.1)
|
57
61
|
ruby-progressbar (1.13.0)
|
58
62
|
simplecov (0.22.0)
|
59
63
|
docile (~> 1.1)
|
60
64
|
simplecov-html (~> 0.11)
|
61
65
|
simplecov_json_formatter (~> 0.1)
|
62
|
-
simplecov-html (0.
|
66
|
+
simplecov-html (0.13.1)
|
63
67
|
simplecov_json_formatter (0.1.4)
|
64
|
-
|
65
|
-
|
68
|
+
unicode-display_width (3.1.4)
|
69
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
70
|
+
unicode-emoji (4.0.4)
|
66
71
|
|
67
72
|
PLATFORMS
|
68
73
|
x86_64-darwin-23
|
@@ -74,9 +79,9 @@ DEPENDENCIES
|
|
74
79
|
rspec (~> 3.13)
|
75
80
|
rubocop (~> 1.65, >= 1.65.1)
|
76
81
|
rubocop-performance (~> 1.21, >= 1.21.1)
|
77
|
-
rubocop-rake (~> 0.
|
82
|
+
rubocop-rake (~> 0.7.1)
|
78
83
|
rubocop-rspec (~> 3.0, >= 3.0.4)
|
79
84
|
simplecov (~> 0.22.0)
|
80
85
|
|
81
86
|
BUNDLED WITH
|
82
|
-
2.
|
87
|
+
2.6.6
|
data/README.md
CHANGED
@@ -73,23 +73,23 @@ that allow step navigation and state verification:
|
|
73
73
|
- Instantiate the onboarding process when a `User` object is created.
|
74
74
|
This sets up the initial step based on the defined onboarding flow.
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
```ruby
|
77
|
+
onboarding = User.new.onboarding
|
78
|
+
```
|
79
79
|
|
80
80
|
- For a more detailed setup, use the `Onboardable::List::Builder` to
|
81
81
|
create a custom onboarding flow with specific steps and details.
|
82
82
|
|
83
|
-
|
84
|
-
|
83
|
+
```ruby
|
84
|
+
builder = Onboardable::List::Builder.new
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
86
|
+
builder.create_step 'welcome', message: 'Welcome to your new account!'
|
87
|
+
builder.create_step 'account_setup', task: 'Create credentials'
|
88
|
+
builder.create_step 'confirmation'
|
89
|
+
builder.create_step_from ExternalStepProvider
|
90
90
|
|
91
|
-
|
92
|
-
|
91
|
+
onboarding = builder.build
|
92
|
+
```
|
93
93
|
|
94
94
|
1. **Check the order of steps**
|
95
95
|
|
@@ -145,32 +145,32 @@ that allow step navigation and state verification:
|
|
145
145
|
- Calculate the progress or completion percentage of the onboarding process
|
146
146
|
to provide users with an indication of how far they have progressed.
|
147
147
|
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
```ruby
|
149
|
+
onboarding.progress # Returns the completion percentage
|
150
|
+
```
|
151
151
|
|
152
152
|
- To customize the progress calculation formula, define a lambda function
|
153
153
|
that takes the current step index and the total number of steps as arguments.
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
155
|
+
```ruby
|
156
|
+
CALCULATION = ->(step_index, steps_size) { step_index + steps_size }
|
157
|
+
onboarding.progress(CALCULATION)
|
158
|
+
```
|
159
159
|
|
160
160
|
- Alternatively, set the custom progress calculation formula during the
|
161
161
|
onboarding definition to automatically calculate the progress.
|
162
162
|
|
163
|
-
|
164
|
-
|
165
|
-
|
163
|
+
```ruby
|
164
|
+
class User
|
165
|
+
include Onboardable
|
166
166
|
|
167
|
-
|
167
|
+
CALCULATION = ->(step_index, steps_size) { step_index + steps_size }
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
169
|
+
has_onboarding progress_calculation: CALCULATION do
|
170
|
+
# ...
|
171
|
+
end
|
172
|
+
end
|
173
|
+
```
|
174
174
|
|
175
175
|
1. **Access Current Step Details**
|
176
176
|
|
data/lib/onboardable/errors.rb
CHANGED
@@ -22,7 +22,7 @@ module Onboardable
|
|
22
22
|
# @param klass [Class] The class that failed to convert.
|
23
23
|
# @param step [unknown] The object that was attempted to be converted to a Step.
|
24
24
|
def initialize(klass, step)
|
25
|
-
super("
|
25
|
+
super("Can't convert #{klass} to Step (#{klass}#to_onboarding_step gives #{step.class}).")
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
data/lib/onboardable/version.rb
CHANGED
data/lib/onboardable.rb
CHANGED
@@ -29,9 +29,9 @@ module Onboardable
|
|
29
29
|
# @param options [Hash] Optional configuration options for the ListBuilder.
|
30
30
|
# @yield [List::Builder] Executes block in the context of List::Builder.
|
31
31
|
# @return [Step] The current step in the building process.
|
32
|
-
def onboarding=(options = {}, &
|
32
|
+
def onboarding=(options = {}, &)
|
33
33
|
self.list_builder = List::Builder.new(options)
|
34
|
-
list_builder.instance_eval(&
|
34
|
+
list_builder.instance_eval(&)
|
35
35
|
end
|
36
36
|
alias has_onboarding onboarding=
|
37
37
|
|
data/onboardable.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Provides tools for easy setup of custom onboarding to boost engagement.'
|
13
13
|
spec.homepage = 'https://github.com/dmrAnderson/onboardable'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = '>= 3.
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
18
18
|
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
43
43
|
spec.add_development_dependency 'rspec', '~> 3.13'
|
44
44
|
spec.add_development_dependency 'rubocop', '~> 1.65', '~> 1.65', '>= 1.65.1'
|
45
45
|
spec.add_development_dependency 'rubocop-performance', '~> 1.21', '>= 1.21.1'
|
46
|
-
spec.add_development_dependency 'rubocop-rake', '~> 0.
|
46
|
+
spec.add_development_dependency 'rubocop-rake', '~> 0.7.1'
|
47
47
|
spec.add_development_dependency 'rubocop-rspec', '~> 3.0', '>= 3.0.4'
|
48
48
|
spec.add_development_dependency 'simplecov', '~> 0.22.0'
|
49
49
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onboardable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Skrynnyk
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rake
|
@@ -90,14 +89,14 @@ dependencies:
|
|
90
89
|
requirements:
|
91
90
|
- - "~>"
|
92
91
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.
|
92
|
+
version: 0.7.1
|
94
93
|
type: :development
|
95
94
|
prerelease: false
|
96
95
|
version_requirements: !ruby/object:Gem::Requirement
|
97
96
|
requirements:
|
98
97
|
- - "~>"
|
99
98
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.
|
99
|
+
version: 0.7.1
|
101
100
|
- !ruby/object:Gem::Dependency
|
102
101
|
name: rubocop-rspec
|
103
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +170,6 @@ metadata:
|
|
171
170
|
bug_tracker_uri: https://github.com/dmrAnderson/onboardable/issues
|
172
171
|
documentation_uri: https://rubydoc.info/gems/onboardable
|
173
172
|
rubygems_mfa_required: 'true'
|
174
|
-
post_install_message:
|
175
173
|
rdoc_options: []
|
176
174
|
require_paths:
|
177
175
|
- lib
|
@@ -179,15 +177,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
177
|
requirements:
|
180
178
|
- - ">="
|
181
179
|
- !ruby/object:Gem::Version
|
182
|
-
version: 3.
|
180
|
+
version: 3.1.0
|
183
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
182
|
requirements:
|
185
183
|
- - ">="
|
186
184
|
- !ruby/object:Gem::Version
|
187
185
|
version: '0'
|
188
186
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
190
|
-
signing_key:
|
187
|
+
rubygems_version: 3.6.2
|
191
188
|
specification_version: 4
|
192
189
|
summary: Streamlines onboarding process integration
|
193
190
|
test_files: []
|