wagn 1.20.3 → 1.20.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/support/debugger.rb +44 -0
- data/features/support/env.rb +20 -47
- data/lib/wagn/generators/wagn/templates/Gemfile +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b24eaee3796d3a2dd901d53f7f5fde5812b8f0cf
|
4
|
+
data.tar.gz: '01907edb2c055543feee4bc45dbea97948d22fe7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1674997df75d0f0e771701eae5650258779a24de64d1ddc4539322457d13a49060e321652c25c04cb577a72a0849a025a02eeccb57a19fe02bac2ee39c26af7
|
7
|
+
data.tar.gz: e7024bba7c91ae141ed53548a66d1ce03603d7ffdbb20a17052b37f657df7acd64431346788dfad997fd9c1debdf26aac706d90fc3f29eec69a1be2e49cb5c04
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# `LAUNCHY=1 cucumber` to open page on failure
|
2
|
+
After do |scenario|
|
3
|
+
save_and_open_page if scenario.failed? && ENV["LAUNCHY"]
|
4
|
+
end
|
5
|
+
|
6
|
+
# `FAST=1 cucumber` to stop on first failure
|
7
|
+
After do |scenario|
|
8
|
+
Cucumber.wants_to_quit = ENV["FAST"] && scenario.failed?
|
9
|
+
end
|
10
|
+
|
11
|
+
# `DEBUG=1 cucumber` to drop into debugger on failure
|
12
|
+
After do |scenario|
|
13
|
+
next unless ENV["DEBUG"] && scenario.failed?
|
14
|
+
puts "Debugging scenario: #{scenario.name}"
|
15
|
+
if respond_to? :debugger
|
16
|
+
debugger
|
17
|
+
elsif binding.respond_to? :pry
|
18
|
+
binding.pry #
|
19
|
+
else
|
20
|
+
puts "Can't find debugger or pry to debug"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# `STEP=1 cucumber` to pause after each step
|
25
|
+
AfterStep do |_result, _step|
|
26
|
+
next unless ENV["STEP"]
|
27
|
+
unless defined?(@counter)
|
28
|
+
#puts "Stepping through #{scenario.name}"
|
29
|
+
@counter = 0
|
30
|
+
end
|
31
|
+
@counter += 1
|
32
|
+
#print "At step ##{@counter} of #{scenario.steps.count}. Press Return to"\
|
33
|
+
# " execute..."
|
34
|
+
print "Press Return to execute next step...\n"\
|
35
|
+
"(d=debug, c=continue, s=step, a=abort)"
|
36
|
+
case STDIN.getch
|
37
|
+
when "d" then
|
38
|
+
binding.pry #
|
39
|
+
when "c" then
|
40
|
+
ENV.delete "STEP"
|
41
|
+
when "a" then
|
42
|
+
Cucumber.wants_to_quit = true
|
43
|
+
end
|
44
|
+
end
|
data/features/support/env.rb
CHANGED
@@ -13,22 +13,38 @@ World(RSpecHtmlMatchers)
|
|
13
13
|
|
14
14
|
require "pry"
|
15
15
|
|
16
|
+
$feature_seeded ||= ::Set.new
|
17
|
+
|
16
18
|
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
17
19
|
# It is recommended to regenerate this file in the future when you upgrade to a
|
18
20
|
# newer version of cucumber-rails. Consider adding your own code to a new file
|
19
21
|
# instead of editing this one. Cucumber will automatically load all
|
20
22
|
# features/**/*.rb files.
|
21
|
-
Before("@background-jobs, @delayed-jobs, @javascript") do
|
22
|
-
DatabaseCleaner.strategy = :truncation
|
23
|
+
Before("@background-jobs, @delayed-jobs, @javascript") do |scenario|
|
24
|
+
# DatabaseCleaner.strategy = :truncation
|
25
|
+
Card.seed_test_db unless $feature_seeded.include?(scenario.feature.name)
|
26
|
+
end
|
27
|
+
|
28
|
+
Before("@no-db-clean-between-scenarios") do |scenario|
|
29
|
+
$feature_seeded.add scenario.feature.name
|
23
30
|
end
|
31
|
+
|
24
32
|
Before("~@background-jobs", "~@delayed-jobs", "~@javascript") do
|
25
|
-
|
33
|
+
DatabaseCleaner.strategy = :transaction
|
34
|
+
DatabaseCleaner.start
|
26
35
|
end
|
27
|
-
|
36
|
+
|
37
|
+
After("~@background-jobs", "~@delayed-jobs", "~@javascript") do
|
38
|
+
DatabaseCleaner.clean
|
39
|
+
end
|
40
|
+
|
41
|
+
at_exit do
|
28
42
|
Card.seed_test_db
|
29
43
|
end
|
30
44
|
|
45
|
+
|
31
46
|
require "cucumber/rails"
|
47
|
+
Cucumber::Rails::Database.autorun_database_cleaner = false
|
32
48
|
require "test_after_commit"
|
33
49
|
|
34
50
|
Capybara.register_driver :selenium do |app|
|
@@ -88,47 +104,4 @@ ActionController::Base.allow_rescue = false
|
|
88
104
|
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
|
89
105
|
Cucumber::Rails::Database.javascript_strategy = :truncation
|
90
106
|
|
91
|
-
# `LAUNCHY=1 cucumber` to open page on failure
|
92
|
-
After do |scenario|
|
93
|
-
save_and_open_page if scenario.failed? && ENV["LAUNCHY"]
|
94
|
-
end
|
95
|
-
|
96
|
-
# `FAST=1 cucumber` to stop on first failure
|
97
|
-
After do |scenario|
|
98
|
-
Cucumber.wants_to_quit = ENV["FAST"] && scenario.failed?
|
99
|
-
end
|
100
107
|
|
101
|
-
# `DEBUG=1 cucumber` to drop into debugger on failure
|
102
|
-
After do |scenario|
|
103
|
-
next unless ENV["DEBUG"] && scenario.failed?
|
104
|
-
puts "Debugging scenario: #{scenario.name}"
|
105
|
-
if respond_to? :debugger
|
106
|
-
debugger
|
107
|
-
elsif binding.respond_to? :pry
|
108
|
-
binding.pry #
|
109
|
-
else
|
110
|
-
puts "Can't find debugger or pry to debug"
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
# `STEP=1 cucumber` to pause after each step
|
115
|
-
AfterStep do |result, step|
|
116
|
-
next unless ENV["STEP"]
|
117
|
-
unless defined?(@counter)
|
118
|
-
#puts "Stepping through #{scenario.name}"
|
119
|
-
@counter = 0
|
120
|
-
end
|
121
|
-
@counter += 1
|
122
|
-
#print "At step ##{@counter} of #{scenario.steps.count}. Press Return to"\
|
123
|
-
# " execute..."
|
124
|
-
print "Press Return to execute next step...\n"\
|
125
|
-
"(d=debug, c=continue, s=step, a=abort)"
|
126
|
-
case STDIN.getch
|
127
|
-
when "d" then
|
128
|
-
binding.pry #
|
129
|
-
when "c" then
|
130
|
-
ENV.delete "STEP"
|
131
|
-
when "a" then
|
132
|
-
Cucumber.wants_to_quit = true
|
133
|
-
end
|
134
|
-
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wagn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.20.
|
4
|
+
version: 1.20.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-04-
|
14
|
+
date: 2017-04-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -33,14 +33,14 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.20.
|
36
|
+
version: 1.20.4
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.20.
|
43
|
+
version: 1.20.4
|
44
44
|
description: a wiki approach to stuctured data, dynamic interaction, and web design
|
45
45
|
email:
|
46
46
|
- info@wagn.org
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- features/step_definitions/web_steps.rb
|
95
95
|
- features/step_definitions/window_steps.rb
|
96
96
|
- features/structure.feature
|
97
|
+
- features/support/debugger.rb
|
97
98
|
- features/support/delayed_job.rb
|
98
99
|
- features/support/env.rb
|
99
100
|
- features/support/file.txt
|
@@ -789,6 +790,7 @@ test_files:
|
|
789
790
|
- features/step_definitions/web_steps.rb
|
790
791
|
- features/step_definitions/window_steps.rb
|
791
792
|
- features/structure.feature
|
793
|
+
- features/support/debugger.rb
|
792
794
|
- features/support/delayed_job.rb
|
793
795
|
- features/support/env.rb
|
794
796
|
- features/support/file.txt
|