abraham 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: b75864d476b103f987bcfebba3192a4b3c646970
4
- data.tar.gz: 60b54906c18bc75b0afe2fb5131fd31bd6a9fd39
3
+ metadata.gz: 1b983847ab3547066ba7f7093e4a4a61fdb3c9e8
4
+ data.tar.gz: c810cbc464ae2790a328dfd47e37d01b40289b34
5
5
  SHA512:
6
- metadata.gz: 56d6c9a0fd49be1354d182a083ea29504051092bd362303d32b2bb47f9cbadef71abc3e5e0d33999a2346533d2a01854bac07bd08a095ffa8d566273c9c96416
7
- data.tar.gz: 17abb8e5732b9f48c67459fdfeb3b99a1acbcc483a9240ae78af7c1d4c3d7592c90385c2a0bf1f2cedd066b45ef12ce21899cd6cfc61f6f4bc9b96f4636fa89b
6
+ metadata.gz: 349042bb09bd181050a618b8e1151f112be052874feb0f6045bdc745cbe89dbff05598c3186b4fc3683348d5b9b41d922de9cd07ee4ab7f8e08711ba34ea8b37
7
+ data.tar.gz: 8c5a44c84be0202671ada9534f3f75fe1b3061a3c6e3e77e043c34cce7d389a34cd19df001dc47284dcd9ea245322eb09c002724e17ae1b68f738cf55e21c32d
data/README.md CHANGED
@@ -29,10 +29,10 @@ $ bundle install
29
29
  $ rails generate abraham:install
30
30
  ```
31
31
 
32
- Require Shepherd.js in `app/assets/javascripts/application.js`
32
+ Require `abraham` in `app/assets/javascripts/application.js`
33
33
 
34
34
  ```
35
- //= require shepherd.js.js
35
+ //= require abraham
36
36
  ```
37
37
 
38
38
  Require a Shepherd.js CSS theme in `app/assets/stylesheets/application.scss`
@@ -117,3 +117,11 @@ Abraham takes care of which buttons should appear with each step:
117
117
  ### Testing your tours
118
118
 
119
119
  Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.
120
+
121
+ If you'd like to run JavaScript integrations tests without the Abraham tours getting in the way, clear the Abraham configuration in your test helper, e.g.
122
+
123
+ ```
124
+ Rails.application.configure do
125
+ config.abraham.tours = {}
126
+ end
127
+ ```
@@ -0,0 +1,10 @@
1
+ //= require jquery
2
+ //= require jquery_ujs
3
+ //= require js-cookie
4
+ //= require tether
5
+ //= require shepherd.js.js
6
+
7
+ $(document).on('turbolinks:before-cache', function() {
8
+ // Remove visible product tours
9
+ $(".shepherd-step").remove();
10
+ });
@@ -20,6 +20,10 @@
20
20
  });
21
21
  });
22
22
 
23
+ tour.on("cancel", function() {
24
+ Cookies.set('abraham-<%= controller_name %>-<%= action_name %>-<%= tour_name %>', 'later');
25
+ });
26
+
23
27
  <% steps.each_with_index do |(key, step), index| %>
24
28
  tour.addStep('step-<%= key %>', {
25
29
  <% if step.key?('title') %>
@@ -45,5 +49,8 @@
45
49
  });
46
50
  <% end %>
47
51
 
48
- tour.start();
52
+ // Don't start the tour if the user dismissed it once this session
53
+ if (!Cookies.get('abraham-<%= controller_name %>-<%= action_name %>-<%= tour_name %>')) {
54
+ tour.start();
55
+ }
49
56
  </script>
@@ -2,6 +2,7 @@
2
2
  require 'rubygems'
3
3
  require 'rails-assets-shepherd.js'
4
4
  require 'jquery-rails'
5
+ require 'rails-assets-js-cookie'
5
6
 
6
7
  module Abraham
7
8
  class Engine < ::Rails::Engine
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Abraham
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  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: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Abbett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.8'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rails-assets-js-cookie
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '2.1'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '2.1'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: sqlite3
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +114,7 @@ dependencies:
100
114
  - - ">="
101
115
  - !ruby/object:Gem::Version
102
116
  version: '0'
103
- description: Guide your users in the one true path.
117
+ description: Trackable application tours for Rails with i18n support, based on Shepherd.js.
104
118
  email:
105
119
  - jonathan@act.md
106
120
  executables: []
@@ -110,6 +124,7 @@ files:
110
124
  - README.md
111
125
  - Rakefile
112
126
  - app/assets/config/abraham_manifest.js
127
+ - app/assets/javascripts/abraham/index.js
113
128
  - app/controllers/abraham_histories_controller.rb
114
129
  - app/helpers/abraham_helper.rb
115
130
  - app/models/abraham_history.rb
@@ -126,7 +141,7 @@ files:
126
141
  - lib/generators/abraham/templates/initializer.rb
127
142
  - lib/generators/abraham/templates/migration.rb
128
143
  - lib/tasks/abraham_tasks.rake
129
- homepage: http://getabraham.com
144
+ homepage: https://github.com/actmd/abraham
130
145
  licenses:
131
146
  - MIT
132
147
  metadata: {}
@@ -149,5 +164,5 @@ rubyforge_project:
149
164
  rubygems_version: 2.6.8
150
165
  signing_key:
151
166
  specification_version: 4
152
- summary: Trackable application tours for Rails with i18n support.
167
+ summary: Trackable application tours for Rails with i18n support, based on Shepherd.js.
153
168
  test_files: []