hopskip 0.1.3 → 0.2.0
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 +15 -0
- data/README.md +8 -3
- data/lib/hopskip/hopscotch_parser.rb +13 -0
- data/lib/hopskip/version.rb +1 -1
- data/test/dummy/app/controllers/failure_controller.rb +3 -0
- data/test/dummy/app/tours/failure_tour.yml +7 -0
- data/test/dummy/log/test.log +147 -0
- data/test/lib/hopskip/hopscotch_parser_test.rb +6 -0
- metadata +9 -19
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmYxOTQ5NTIwN2Q3YjcxOTA5N2NmMGRlYjg1MWQ4OTlhNjk3ZTc3MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MThjZTNlODE0YzkyMjk1MTlhMDAxODY5ZWMxMjNkZTczNzBiMWMwYw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ODY1NjFlZjRiYmIyMGEzZGM0M2E0M2Y0NDMzM2Y5NjRhZTZkMGZjZTY3YWFh
|
10
|
+
MDRiODA5MTgwYmE3OWNkMzc1NjJmYWIyZmFhN2Y2MjliMjAzOTVkMDdlNWY5
|
11
|
+
Mjc1YTRjNzNkNzgyMDZiZjAzODY5MDRhY2U1MWM3ODA2NDgyNDY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjM2ZTQ5Yjk2MTc3MDZmOTFlOGY1MGE4YzA5ZjNlMWZhNjRjMjEzZGNkYjc1
|
14
|
+
NDYxMzM0YTJjMDI3NTU5OGZiMGIyMTA2M2ZmOTA2NTM2MDBkNWRlOGFjNzhj
|
15
|
+
N2U0MDM2NjRiZjkyNDZjMmMxMzBmZDYzYWI1Njg5NzY5ZDA5MmY=
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Hopskip
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
[](https://coveralls.io/r/boxuk/hopskip?branch=master)
|
3
|
+
| Version | Status | Quality | Coverage |
|
4
|
+
|:--------:|:------------:|:-----:|:-----:|
|
5
|
+
| [](http://badge.fury.io/rb/hopskip) | [](https://travis-ci.org/boxuk/hopskip) | [](https://codeclimate.com/github/boxuk/hopskip) | [](https://coveralls.io/r/boxuk/hopskip?branch=master) |
|
6
6
|
|
7
7
|
Write [hopscotch](https://github.com/linkedin/hopscotch) introductions simply by adding YAML files to your Rails application.
|
8
8
|
|
@@ -86,6 +86,11 @@ index:
|
|
86
86
|
|
87
87
|
The `showError` helper will now be executed when next is clicked on the first step. You can pass as many helpers as you like to each callback methods.
|
88
88
|
|
89
|
+
|
90
|
+
## Error Handling
|
91
|
+
|
92
|
+
If the YAML file is not correctly formatted, Hopskip will raise a `Hopskip::InvalidYAMLError` exception.
|
93
|
+
|
89
94
|
## We use Hopskip
|
90
95
|
|
91
96
|
We use Hopskip in [FleetSuite](http://www.boxuk.com/fleetsuite/), a business management system offering a set of collaborative project management tools to optimise processes.
|
@@ -1,4 +1,7 @@
|
|
1
1
|
module Hopskip
|
2
|
+
|
3
|
+
class Hopskip::InvalidYAMLError < StandardError; end
|
4
|
+
|
2
5
|
class HopscotchParser
|
3
6
|
|
4
7
|
require 'yaml'
|
@@ -9,6 +12,8 @@ module Hopskip
|
|
9
12
|
def initialize(controller)
|
10
13
|
@controller = controller
|
11
14
|
filename = Rails.root.join('app', 'tours', "#{ @controller.controller_name }_tour.yml")
|
15
|
+
raise Hopskip::InvalidYAMLError unless valid_yaml_string?(File.open(filename).read)
|
16
|
+
|
12
17
|
if File.exists?(filename)
|
13
18
|
@yaml_source = YAML::load(File.open("#{ Rails.root }/app/tours/#{ @controller.controller_name }_tour.yml"))
|
14
19
|
end
|
@@ -22,5 +27,13 @@ module Hopskip
|
|
22
27
|
end
|
23
28
|
end
|
24
29
|
|
30
|
+
private
|
31
|
+
|
32
|
+
def valid_yaml_string?(yaml)
|
33
|
+
!!YAML.load(yaml)
|
34
|
+
rescue Exception => e
|
35
|
+
return false
|
36
|
+
end
|
37
|
+
|
25
38
|
end
|
26
39
|
end
|
data/lib/hopskip/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1340,3 +1340,150 @@ Processing by PeopleController#show as HTML
|
|
1340
1340
|
Parameters: {"id"=>"1"}
|
1341
1341
|
Completed 200 OK in 3.0ms (Views: 2.7ms | ActiveRecord: 0.0ms)
|
1342
1342
|
[1m[35m (0.1ms)[0m rollback transaction
|
1343
|
+
Connecting to database specified by database.yml
|
1344
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1345
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1346
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1347
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1348
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1349
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1350
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1351
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1352
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1353
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 13:59:03 +0000
|
1354
|
+
Processing by PeopleController#index as HTML
|
1355
|
+
Rendered people/index.html.erb within layouts/application (2.4ms)
|
1356
|
+
Completed 200 OK in 38.8ms (Views: 38.3ms | ActiveRecord: 0.0ms)
|
1357
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1358
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1359
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 13:59:03 +0000
|
1360
|
+
Processing by PeopleController#show as HTML
|
1361
|
+
Parameters: {"id"=>"1"}
|
1362
|
+
Completed 200 OK in 3.3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
|
1363
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1364
|
+
Connecting to database specified by database.yml
|
1365
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1366
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1367
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1368
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1369
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1370
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1371
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1372
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1373
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1374
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 13:59:49 +0000
|
1375
|
+
Processing by PeopleController#index as HTML
|
1376
|
+
Rendered people/index.html.erb within layouts/application (2.3ms)
|
1377
|
+
Completed 200 OK in 19.2ms (Views: 18.6ms | ActiveRecord: 0.0ms)
|
1378
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1379
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1380
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 13:59:49 +0000
|
1381
|
+
Processing by PeopleController#show as HTML
|
1382
|
+
Parameters: {"id"=>"1"}
|
1383
|
+
Completed 200 OK in 3.1ms (Views: 2.7ms | ActiveRecord: 0.0ms)
|
1384
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1385
|
+
Connecting to database specified by database.yml
|
1386
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1387
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1388
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1389
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1390
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1391
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1392
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1393
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1394
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1395
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 14:02:08 +0000
|
1396
|
+
Processing by PeopleController#index as HTML
|
1397
|
+
Rendered people/index.html.erb within layouts/application (3.0ms)
|
1398
|
+
Completed 200 OK in 16.8ms (Views: 16.4ms | ActiveRecord: 0.0ms)
|
1399
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1400
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1401
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 14:02:08 +0000
|
1402
|
+
Processing by PeopleController#show as HTML
|
1403
|
+
Parameters: {"id"=>"1"}
|
1404
|
+
Completed 200 OK in 3.6ms (Views: 3.1ms | ActiveRecord: 0.0ms)
|
1405
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1406
|
+
Connecting to database specified by database.yml
|
1407
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1408
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1409
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1410
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1411
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1412
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1413
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1414
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1415
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1416
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 14:03:35 +0000
|
1417
|
+
Processing by PeopleController#index as HTML
|
1418
|
+
Rendered people/index.html.erb within layouts/application (2.0ms)
|
1419
|
+
Completed 200 OK in 16.1ms (Views: 15.3ms | ActiveRecord: 0.0ms)
|
1420
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1421
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1422
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 14:03:35 +0000
|
1423
|
+
Processing by PeopleController#show as HTML
|
1424
|
+
Parameters: {"id"=>"1"}
|
1425
|
+
Completed 200 OK in 3.5ms (Views: 3.1ms | ActiveRecord: 0.0ms)
|
1426
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1427
|
+
Connecting to database specified by database.yml
|
1428
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1429
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1430
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1431
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1432
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1433
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1434
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1435
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1436
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1437
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 14:03:47 +0000
|
1438
|
+
Processing by PeopleController#index as HTML
|
1439
|
+
Rendered people/index.html.erb within layouts/application (2.1ms)
|
1440
|
+
Completed 200 OK in 17.1ms (Views: 16.5ms | ActiveRecord: 0.0ms)
|
1441
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1442
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1443
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 14:03:47 +0000
|
1444
|
+
Processing by PeopleController#show as HTML
|
1445
|
+
Parameters: {"id"=>"1"}
|
1446
|
+
Completed 200 OK in 3.4ms (Views: 3.0ms | ActiveRecord: 0.0ms)
|
1447
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1448
|
+
Connecting to database specified by database.yml
|
1449
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1450
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1451
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1452
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1453
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1454
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1455
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1456
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1457
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1458
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 14:04:07 +0000
|
1459
|
+
Processing by PeopleController#index as HTML
|
1460
|
+
Rendered people/index.html.erb within layouts/application (3.7ms)
|
1461
|
+
Completed 200 OK in 20.9ms (Views: 20.4ms | ActiveRecord: 0.0ms)
|
1462
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1463
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1464
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 14:04:08 +0000
|
1465
|
+
Processing by PeopleController#show as HTML
|
1466
|
+
Parameters: {"id"=>"1"}
|
1467
|
+
Completed 200 OK in 3.7ms (Views: 3.2ms | ActiveRecord: 0.0ms)
|
1468
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1469
|
+
Connecting to database specified by database.yml
|
1470
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1471
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1472
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1473
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1474
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1475
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1476
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1477
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1478
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1479
|
+
Started GET "/people" for 127.0.0.1 at 2013-12-20 14:04:23 +0000
|
1480
|
+
Processing by PeopleController#index as HTML
|
1481
|
+
Rendered people/index.html.erb within layouts/application (1.9ms)
|
1482
|
+
Completed 200 OK in 17.8ms (Views: 17.3ms | ActiveRecord: 0.0ms)
|
1483
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1484
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1485
|
+
Started GET "/people/1" for 127.0.0.1 at 2013-12-20 14:04:23 +0000
|
1486
|
+
Processing by PeopleController#show as HTML
|
1487
|
+
Parameters: {"id"=>"1"}
|
1488
|
+
Completed 200 OK in 3.2ms (Views: 2.8ms | ActiveRecord: 0.0ms)
|
1489
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hopskip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Max Woolf
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sqlite3
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: mysql2
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -80,10 +73,12 @@ files:
|
|
80
73
|
- test/dummy/app/assets/stylesheets/application.css
|
81
74
|
- test/dummy/app/assets/stylesheets/people.css
|
82
75
|
- test/dummy/app/controllers/application_controller.rb
|
76
|
+
- test/dummy/app/controllers/failure_controller.rb
|
83
77
|
- test/dummy/app/controllers/people_controller.rb
|
84
78
|
- test/dummy/app/helpers/application_helper.rb
|
85
79
|
- test/dummy/app/helpers/people_helper.rb
|
86
80
|
- test/dummy/app/tours/application_tour.yml
|
81
|
+
- test/dummy/app/tours/failure_tour.yml
|
87
82
|
- test/dummy/app/tours/people_tour.yml
|
88
83
|
- test/dummy/app/views/layouts/application.html.erb
|
89
84
|
- test/dummy/app/views/people/index.html.erb
|
@@ -123,33 +118,26 @@ files:
|
|
123
118
|
- test/test_helper.rb
|
124
119
|
homepage: http://boxuk.com
|
125
120
|
licenses: []
|
121
|
+
metadata: {}
|
126
122
|
post_install_message:
|
127
123
|
rdoc_options: []
|
128
124
|
require_paths:
|
129
125
|
- lib
|
130
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
127
|
requirements:
|
133
128
|
- - ! '>='
|
134
129
|
- !ruby/object:Gem::Version
|
135
130
|
version: '0'
|
136
|
-
segments:
|
137
|
-
- 0
|
138
|
-
hash: 1049451874999815942
|
139
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
132
|
requirements:
|
142
133
|
- - ! '>='
|
143
134
|
- !ruby/object:Gem::Version
|
144
135
|
version: '0'
|
145
|
-
segments:
|
146
|
-
- 0
|
147
|
-
hash: 1049451874999815942
|
148
136
|
requirements: []
|
149
137
|
rubyforge_project:
|
150
|
-
rubygems_version: 1.
|
138
|
+
rubygems_version: 2.1.11
|
151
139
|
signing_key:
|
152
|
-
specification_version:
|
140
|
+
specification_version: 4
|
153
141
|
summary: Hopscotch introductions written more cleanly in YAML
|
154
142
|
test_files:
|
155
143
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -157,10 +145,12 @@ test_files:
|
|
157
145
|
- test/dummy/app/assets/stylesheets/application.css
|
158
146
|
- test/dummy/app/assets/stylesheets/people.css
|
159
147
|
- test/dummy/app/controllers/application_controller.rb
|
148
|
+
- test/dummy/app/controllers/failure_controller.rb
|
160
149
|
- test/dummy/app/controllers/people_controller.rb
|
161
150
|
- test/dummy/app/helpers/application_helper.rb
|
162
151
|
- test/dummy/app/helpers/people_helper.rb
|
163
152
|
- test/dummy/app/tours/application_tour.yml
|
153
|
+
- test/dummy/app/tours/failure_tour.yml
|
164
154
|
- test/dummy/app/tours/people_tour.yml
|
165
155
|
- test/dummy/app/views/layouts/application.html.erb
|
166
156
|
- test/dummy/app/views/people/index.html.erb
|