rails_onboarding 0.8.3 → 0.8.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 007cab6c758c3d50c9c2b9dca6c8f798956b6c09d61a0078de8c347f2b857395
|
|
4
|
+
data.tar.gz: d431ee736da8d5de6af011483929f64cefd5da668844d88934ad48d30e3af5a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6f99c18d8a9e4143aa445392866e46e88561ec28e51f8d29a72c37458eecfbab311bed79ed9c400104849ba2669acecc8307464a5bbb8edbe3001543df763ec
|
|
7
|
+
data.tar.gz: c4db1b37aeec6472fb839ac1647f8d4ddc9fd1f643e4118e889e0a14db9a5ec1b9793bd3d3af0cfbb1f1550cced75c5439216f8a3c1b7f26402bf26d276a0dfb
|
|
@@ -242,12 +242,23 @@ module RailsOnboarding
|
|
|
242
242
|
|
|
243
243
|
# Check if milestone-based feature is ready
|
|
244
244
|
def milestone_based_ready?(feature)
|
|
245
|
-
|
|
245
|
+
# Onboardable exposes the awarded keys as #achieved_milestones. This used
|
|
246
|
+
# to guard on #earned_milestones, which the engine has never defined, so
|
|
247
|
+
# the guard was false for every host and a :milestone_based feature was
|
|
248
|
+
# never revealed to anyone - silently, since a reveal that does not happen
|
|
249
|
+
# looks exactly like one whose condition is not met yet. #earned_milestones
|
|
250
|
+
# is still honoured for any host that defines it itself.
|
|
251
|
+
milestones = if respond_to?(:achieved_milestones)
|
|
252
|
+
achieved_milestones
|
|
253
|
+
elsif respond_to?(:earned_milestones)
|
|
254
|
+
earned_milestones
|
|
255
|
+
end
|
|
256
|
+
return false unless milestones
|
|
246
257
|
|
|
247
258
|
required_milestone = feature[:required_milestone]
|
|
248
259
|
return false unless required_milestone
|
|
249
260
|
|
|
250
|
-
|
|
261
|
+
milestones.map(&:to_s).include?(required_milestone.to_s)
|
|
251
262
|
end
|
|
252
263
|
|
|
253
264
|
# Check if engagement-based feature is ready
|
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.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Lewis
|
|
@@ -282,7 +282,7 @@ licenses:
|
|
|
282
282
|
metadata:
|
|
283
283
|
allowed_push_host: https://rubygems.org
|
|
284
284
|
homepage_uri: https://github.com/bunnahabhain/rails_onboarding
|
|
285
|
-
source_code_uri: https://github.com/bunnahabhain/rails_onboarding/tree/v0.8.
|
|
285
|
+
source_code_uri: https://github.com/bunnahabhain/rails_onboarding/tree/v0.8.4
|
|
286
286
|
changelog_uri: https://github.com/bunnahabhain/rails_onboarding/blob/master/docs/CHANGELOG.md
|
|
287
287
|
rdoc_options: []
|
|
288
288
|
require_paths:
|