Merge branch 'release/1.1'
This commit is contained in:
commit
ed661127c4
@ -1 +1 @@
|
|||||||
2.3.2
|
2.3.3
|
||||||
|
3
Gemfile
3
Gemfile
@ -14,3 +14,6 @@ gemspec
|
|||||||
|
|
||||||
# To use a debugger
|
# To use a debugger
|
||||||
# gem 'byebug', group: [:development, :test]
|
# gem 'byebug', group: [:development, :test]
|
||||||
|
|
||||||
|
# Avoid the 'multiple sources' confusion
|
||||||
|
gem 'rails-assets-tether', :source => 'http://rails-assets.org/'
|
||||||
|
13
Gemfile.lock
13
Gemfile.lock
@ -4,6 +4,7 @@ PATH
|
|||||||
abraham (1.0.0)
|
abraham (1.0.0)
|
||||||
jquery-rails
|
jquery-rails
|
||||||
rails (~> 5.0.0, >= 5.0.0.1)
|
rails (~> 5.0.0, >= 5.0.0.1)
|
||||||
|
rails-assets-js-cookie (~> 2.1)
|
||||||
rails-assets-shepherd.js (~> 1.8)
|
rails-assets-shepherd.js (~> 1.8)
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ GEM
|
|||||||
arel (7.1.4)
|
arel (7.1.4)
|
||||||
ast (2.3.0)
|
ast (2.3.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.3)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
globalid (0.3.7)
|
globalid (0.3.7)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
@ -69,7 +70,7 @@ GEM
|
|||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2016.0521)
|
mime-types-data (3.2016.0521)
|
||||||
mini_portile2 (2.1.0)
|
mini_portile2 (2.1.0)
|
||||||
minitest (5.9.1)
|
minitest (5.10.1)
|
||||||
nio4r (1.2.1)
|
nio4r (1.2.1)
|
||||||
nokogiri (1.6.8.1)
|
nokogiri (1.6.8.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
@ -91,9 +92,10 @@ GEM
|
|||||||
bundler (>= 1.3.0, < 2.0)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
railties (= 5.0.0.1)
|
railties (= 5.0.0.1)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
|
rails-assets-js-cookie (2.1.3)
|
||||||
rails-assets-shepherd.js (1.8.1)
|
rails-assets-shepherd.js (1.8.1)
|
||||||
rails-assets-tether (>= 1.0.1, < 2)
|
rails-assets-tether (>= 1.0.1, < 2)
|
||||||
rails-assets-tether (1.3.7)
|
rails-assets-tether (1.4.0)
|
||||||
rails-dom-testing (2.0.1)
|
rails-dom-testing (2.0.1)
|
||||||
activesupport (>= 4.2.0, < 6.0)
|
activesupport (>= 4.2.0, < 6.0)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (~> 1.6.0)
|
||||||
@ -106,7 +108,7 @@ GEM
|
|||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rainbow (2.1.0)
|
rainbow (2.1.0)
|
||||||
rake (11.3.0)
|
rake (12.0.0)
|
||||||
rubocop (0.45.0)
|
rubocop (0.45.0)
|
||||||
parser (>= 2.3.1.1, < 3.0)
|
parser (>= 2.3.1.1, < 3.0)
|
||||||
powerpack (~> 0.1)
|
powerpack (~> 0.1)
|
||||||
@ -129,7 +131,7 @@ GEM
|
|||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.12)
|
sqlite3 (1.3.12)
|
||||||
thor (0.19.1)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
tilt (2.0.5)
|
tilt (2.0.5)
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
@ -144,6 +146,7 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
abraham!
|
abraham!
|
||||||
|
rails-assets-tether!
|
||||||
rubocop
|
rubocop
|
||||||
sqlite3
|
sqlite3
|
||||||
|
|
||||||
|
12
README.md
12
README.md
@ -29,10 +29,10 @@ $ bundle install
|
|||||||
$ rails generate abraham:install
|
$ rails generate abraham:install
|
||||||
```
|
```
|
||||||
|
|
||||||
Require Shepherd.js in `app/assets/javascripts/application.js`
|
Require `abraham` in `app/assets/javascripts/application.js`
|
||||||
|
|
||||||
```
|
```
|
||||||
//= require shepherd.js.js
|
//= require abraham
|
||||||
```
|
```
|
||||||
|
|
||||||
Require a Shepherd.js CSS theme in `app/assets/stylesheets/application.scss`
|
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:
|
|||||||
### Testing your tours
|
### Testing your tours
|
||||||
|
|
||||||
Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.
|
Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
```
|
||||||
|
Rails.application.configure do
|
||||||
|
config.abraham.tours = {}
|
||||||
|
end
|
||||||
|
```
|
||||||
|
@ -10,9 +10,9 @@ Gem::Specification.new do |s|
|
|||||||
s.version = Abraham::VERSION
|
s.version = Abraham::VERSION
|
||||||
s.authors = ['Jonathan Abbett']
|
s.authors = ['Jonathan Abbett']
|
||||||
s.email = ['jonathan@act.md']
|
s.email = ['jonathan@act.md']
|
||||||
s.homepage = 'http://getabraham.com'
|
s.homepage = 'https://github.com/actmd/abraham'
|
||||||
s.summary = 'Trackable application tours for Rails with i18n support.'
|
s.summary = 'Trackable application tours for Rails with i18n support, based on Shepherd.js.'
|
||||||
s.description = 'Guide your users in the one true path.'
|
s.description = 'Trackable application tours for Rails with i18n support, based on Shepherd.js.'
|
||||||
s.license = 'MIT'
|
s.license = 'MIT'
|
||||||
|
|
||||||
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
|
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
|
||||||
@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|||||||
s.add_dependency 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
s.add_dependency 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
||||||
s.add_dependency 'sass-rails', '~> 5.0'
|
s.add_dependency 'sass-rails', '~> 5.0'
|
||||||
s.add_dependency 'rails-assets-shepherd.js', '~> 1.8'
|
s.add_dependency 'rails-assets-shepherd.js', '~> 1.8'
|
||||||
|
s.add_dependency 'rails-assets-js-cookie', '~> 2.1'
|
||||||
|
|
||||||
s.add_development_dependency 'sqlite3'
|
s.add_development_dependency 'sqlite3'
|
||||||
s.add_development_dependency 'rubocop'
|
s.add_development_dependency 'rubocop'
|
||||||
|
10
app/assets/javascripts/abraham/index.js
Normal file
10
app/assets/javascripts/abraham/index.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
//= require jquery
|
||||||
|
//= require jquery_ujs
|
||||||
|
//= require js-cookie
|
||||||
|
//= require tether
|
||||||
|
//= require shepherd.js.js
|
||||||
|
|
||||||
|
$(document).on('turbolinks:before-cache', function() {
|
||||||
|
// Remove visible product tours
|
||||||
|
$(".shepherd-step").remove();
|
||||||
|
});
|
@ -20,6 +20,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tour.on("cancel", function() {
|
||||||
|
Cookies.set('abraham-<%= controller_name %>-<%= action_name %>-<%= tour_name %>', 'later');
|
||||||
|
});
|
||||||
|
|
||||||
<% steps.each_with_index do |(key, step), index| %>
|
<% steps.each_with_index do |(key, step), index| %>
|
||||||
tour.addStep('step-<%= key %>', {
|
tour.addStep('step-<%= key %>', {
|
||||||
<% if step.key?('title') %>
|
<% if step.key?('title') %>
|
||||||
@ -45,5 +49,8 @@
|
|||||||
});
|
});
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
// Don't start the tour if the user dismissed it once this session
|
||||||
|
if (!Cookies.get('abraham-<%= controller_name %>-<%= action_name %>-<%= tour_name %>')) {
|
||||||
tour.start();
|
tour.start();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'rails-assets-shepherd.js'
|
require 'rails-assets-shepherd.js'
|
||||||
require 'jquery-rails'
|
require 'jquery-rails'
|
||||||
|
require 'rails-assets-js-cookie'
|
||||||
|
|
||||||
module Abraham
|
module Abraham
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
module Abraham
|
module Abraham
|
||||||
VERSION = '1.0.0'
|
VERSION = '1.1.0'
|
||||||
end
|
end
|
||||||
|
@ -10,8 +10,5 @@
|
|||||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||||
// about supported directives.
|
// about supported directives.
|
||||||
//
|
//
|
||||||
//= require jquery
|
//= require abraham
|
||||||
//= require jquery_ujs
|
|
||||||
//= require tether
|
|
||||||
//= require shepherd.js.js
|
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user