abraham 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00042f82494a0aa926288b967e661ea55f2b7ec387cc340498053832903b10ad
4
- data.tar.gz: fa48c68bccf0895dab390454ba5122c054411ef915bb626611de7494e9754c0f
3
+ metadata.gz: ff95535b276b88084751642aa2341e3d412b121cca7679a399b17517ff4678f0
4
+ data.tar.gz: 8897682f52af7bb97d4b27c4d7132a1fa09fdf742bbea871da73d19fdfbd1f7b
5
5
  SHA512:
6
- metadata.gz: e4ebf498a8e81fa3f3d0391babf5b8cc17adcd9bb3fdf49d26f7e029ae63ee5cb527c09633ca7350aad3f7c177fca25b680e485052047c2508048ba305118153
7
- data.tar.gz: b1b8ea8b8a375b51809fb0436f1b8a96908a3fc8476a061cf1b0b5af2db7b64c5983e34aa00c192a01b5756e4d2e3c05f0327c03dc2bd06fc7b232e7e8c795d5
6
+ metadata.gz: f3a6e11f58d202a7030586fc4c9cbd7542bd48f7552c680d1c5374f207fb6cb8dc592f92e271a9778f5d3cb6baee75142c6afd48e6269e5120ad3537df4e61b8
7
+ data.tar.gz: 89582b9bda14987c417d09a924ab7bd8a7641e57d0bc0db25e035730558cbe35c8cbd31cfa111ca7586f827232e1ec427ff0757f57f142af1446e37025162244
data/README.md CHANGED
@@ -122,6 +122,11 @@ Abraham takes care of which buttons should appear with each step:
122
122
  * "Exit" and "Next" buttons on intermediate steps
123
123
  * "Done" button on the last step
124
124
 
125
+ Abraham tries to be helpful when your tour steps attach to page elements that are missing:
126
+
127
+ * If your first step is attached to a particular element, and that element is not present on the page, the tour won't start. ([#28](https://github.com/actmd/abraham/issues/28))
128
+ * If your tour has an intermediate step attached to a missing element, Abraham will skip that step and automatically show the next. ([#6](https://github.com/actmd/abraham/issues/6))
129
+
125
130
  ### Testing your tours
126
131
 
127
132
  Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.
@@ -54,7 +54,13 @@
54
54
  tour.start = function (start) {
55
55
  return function () {
56
56
  // Don't start the tour if the user dismissed it once this session
57
- if (!Cookies.get('<%= abraham_cookie_prefix %>-<%= tour_name %>', {domain: '<%= abraham_domain %>'})) {
57
+ var tourMayStart = !Cookies.get('<%= abraham_cookie_prefix %>-<%= tour_name %>', {domain: '<%= abraham_domain %>'});
58
+ <% if steps.first[1]['attachTo'] %>
59
+ // Don't start the tour if the first step's element is missing
60
+ tourMayStart = tourMayStart && document.querySelector("<%= steps.first[1]['attachTo']['element'] %>");
61
+ <% end %>
62
+
63
+ if (tourMayStart) {
58
64
  start();
59
65
  }
60
66
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Abraham
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abraham
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Abbett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-07 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sassc-rails
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: web-console
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Trackable application tours for Rails with i18n support, based on Shepherd.js.
70
84
  email:
71
85
  - jonathan@act.md