abraham 0.1.1 → 1.0.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: 83d11a1352ea5de72d10a8fcda202be22ecf89c4
4
- data.tar.gz: 0ee13be0fd3ea208cb4507cf7850404b38ce8596
3
+ metadata.gz: b75864d476b103f987bcfebba3192a4b3c646970
4
+ data.tar.gz: 60b54906c18bc75b0afe2fb5131fd31bd6a9fd39
5
5
  SHA512:
6
- metadata.gz: 10b216baee44e1f4dceecf7d60bc7c656d09f24c4d9a8545ff2e696557c40e4bd1b8c8ff496114bce61a107356be6b95c95aeeed5f8f6d9f29e3428716e85f1e
7
- data.tar.gz: 9f1cf539e22d4d5eb78f5c24f53c5e16630b93abd4383154e5417d887fd8c213eb04f2aca36726115e1fdd8bc91693552190f20b357bf6e61bb7108ed4f11d10
6
+ metadata.gz: 56d6c9a0fd49be1354d182a083ea29504051092bd362303d32b2bb47f9cbadef71abc3e5e0d33999a2346533d2a01854bac07bd08a095ffa8d566273c9c96416
7
+ data.tar.gz: 17abb8e5732b9f48c67459fdfeb3b99a1acbcc483a9240ae78af7c1d4c3d7592c90385c2a0bf1f2cedd066b45ef12ce21899cd6cfc61f6f4bc9b96f4636fa89b
data/README.md CHANGED
@@ -12,7 +12,7 @@ Abraham injects dynamically-generated [Shepherd.js](http://github.hubspot.com/sh
12
12
 
13
13
  ## Requirements
14
14
 
15
- * devise? (for current_user)
15
+ Abraham needs to know the current user to track tour views, e.g. `current_user` from Devise.
16
16
 
17
17
  ## Installation
18
18
 
@@ -51,6 +51,21 @@ Shepherd.js provides the following themes:
51
51
  - `shepherd-theme-square`
52
52
  - `shepherd-theme-square-dark`
53
53
 
54
+ Update `config/abraham.yml` if you choose a different theme:
55
+
56
+ ```
57
+ defaults: &defaults
58
+ :default_theme: 'shepherd-theme-arrows'
59
+ ```
60
+
61
+ Tell Abraham where to insert its generated JavaScript in `app/views/layouts/application.html.erb`, just before the closing `body` tag:
62
+
63
+ ```erb
64
+ <%= abraham_tour %>
65
+ </body>
66
+ </html>
67
+ ```
68
+
54
69
  ## Defining your tours
55
70
 
56
71
  Define your tours in the `config/tours` directory. Its directory structure should mirror your application's controllers, and the tour files should mirror your actions/views.
@@ -101,8 +116,4 @@ Abraham takes care of which buttons should appear with each step:
101
116
 
102
117
  ### Testing your tours
103
118
 
104
- Abraham loads tour definitions once when you start your server. If you'd like to iteratively test changes without restarting your server, use the Rails console to rerun the initializer:
105
-
106
- ```
107
- ???
108
- ```
119
+ Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.
@@ -2,7 +2,7 @@
2
2
  class AbrahamHistoriesController < ApplicationController
3
3
  def create
4
4
  @abraham_history = AbrahamHistory.new(abraham_history_params)
5
- @abraham_history.creator_id = current_user
5
+ @abraham_history.creator_id = current_user.id
6
6
  respond_to do |format|
7
7
  if @abraham_history.save
8
8
  format.json { render json: @abraham_history, status: :created }
@@ -11,7 +11,8 @@ module AbrahamHelper
11
11
 
12
12
  if tours
13
13
  completed = AbrahamHistory.where(
14
- creator_id: current_user, controller_name: controller_name,
14
+ creator_id: current_user.id,
15
+ controller_name: controller_name,
15
16
  action_name: action_name
16
17
  )
17
18
  remaining = tours.keys - completed.map(&:tour_name)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Abraham
3
- VERSION = '0.1.1'
3
+ VERSION = '1.0.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abraham
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Abbett