onboardable 1.3.0 → 1.3.1

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: c7a359f33f51c9c573afe6ad4b438c7dbad0650ad3a665f5062ff0fb056a4e3d
4
- data.tar.gz: d11d9642fae0159ef3055b1341ee6d6fffa9c25c7facf64244b98b6aed005bc4
3
+ metadata.gz: 64a5fbb1b0cfbe18fc1ed5060581fa138f726e52d9eac213ccfc4ac58d9c9a41
4
+ data.tar.gz: 7d7bf373308e6ca7f82afceb7d658ac5e5e960099e68de343b65bb2fdf918279
5
5
  SHA512:
6
- metadata.gz: 98d9460b91553ab1808e567989b7d05b6dac8fd4867a887461656e5202bbf60689cdeba416338f6b93c20e84e704721de31b77298197798542a72f64229472d5
7
- data.tar.gz: 7d4c7a97f04bb61b0240f7c174f4a93b633f2af10396d547ae4537bce1eb734a05c98be14c547f0045e779bf011c153385d120cf7556553580b8075876d5bfc2
6
+ metadata.gz: 6aa13416b3f767daeab45c7e4c5fa48a5895eaf9929da9eab25848c5956c805f2a193aa7d78e9b7e2fc7721b9e53618b10705f5f73adadab549ed14d8253e4b5
7
+ data.tar.gz: 828fe6ada70d330175d6e71eaf6b4b7506e1f1fb9e829f4a2a82fbf66692cd3de14388667c5ebff8779420038d92ef5b519f0cae7d8c97b43cf2a490fed0111e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.3.1] - 2024-06-10
6
+
7
+ - Fixed the issue with the custom formula calculation.
8
+
5
9
  ## [1.3.0] - 2024-06-10
6
10
 
7
11
  - Added option to calculate onboarding progress using a custom formula.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onboardable (1.3.0)
4
+ onboardable (1.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,11 +6,13 @@ module Onboardable
6
6
  class Builder
7
7
  include Utils::Warnings
8
8
 
9
+ STEP_KEY = :steps
10
+
9
11
  # Stores the steps added to the builder.
10
12
  #
11
13
  # @return [Hash] A hash of steps added to the builder.
12
14
  def steps
13
- options[__method__] ||= {}
15
+ options[STEP_KEY] ||= {}
14
16
  end
15
17
 
16
18
  # @return [Step] The current step in the building process, defaulting to the first added step.
@@ -45,7 +47,11 @@ module Onboardable
45
47
  # @param current_step_name [String, nil] The name of the current step.
46
48
  # @return [Base] A new List object initialized with the steps and the specified current step.
47
49
  def build(current_step_name = nil)
48
- Base.new(convert_to_steps!, convert_to_step!(current_step_name || current_step.name))
50
+ Base.new(
51
+ convert_to_steps!,
52
+ convert_to_step!(current_step_name || current_step.name),
53
+ options.except(STEP_KEY)
54
+ )
49
55
  end
50
56
 
51
57
  private
@@ -57,7 +63,7 @@ module Onboardable
57
63
  #
58
64
  # @param options [Hash] The options hash to be set.
59
65
  def options=(options)
60
- @options = Hash(options)
66
+ @options = Hash(options).except(STEP_KEY)
61
67
  end
62
68
 
63
69
  # Adds a step to the builder.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onboardable
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
@@ -1,6 +1,8 @@
1
1
  module Onboardable
2
2
  module List
3
3
  class Builder
4
+ STEP_KEY: Symbol
5
+
4
6
  attr_reader steps: Hash[String, Step]
5
7
  attr_accessor current_step: Step
6
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onboardable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Skrynnyk