cuculungwa 0.0.79 → 0.0.81
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cuculungwa.rb +0 -29
- data/lib/cuculungwa/utils.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9af1211250fcb6ccf0fd584fac836172686aa8b3
|
4
|
+
data.tar.gz: 6a3f7a97ef7c05ca80a0f63e772d10c46eeb21cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c729682e25de1e3ea494fc5e6c66925fc7fe9d7a7c9ea95f0bac19838d824e593311792fd3ce2d122ef2dd97a4f8646471c6c174f3130d571cfb29fe8935063d
|
7
|
+
data.tar.gz: 65543956d1d2a18b3dadacc6b6e7b0c87b1c75afcbf72fe05383d840f582dffa75df010c03a1ed093d4581321eefaf0d8e20fc0986ed7a36948c938a9eb5d225
|
data/lib/cuculungwa.rb
CHANGED
@@ -58,33 +58,4 @@ Capybara.save_and_open_page_path = config['capybara']['save_and_open_page_path']
|
|
58
58
|
Capybara.app_host = config['project']['default_host']['front']
|
59
59
|
Capybara.default_max_wait_time = config['capybara']['default_wait_time']
|
60
60
|
|
61
|
-
# Quick finish after first fail
|
62
|
-
After do |scenario|
|
63
|
-
Cucumber.wants_to_quit = ENV['STOP_ON_FAIL'] == 'true' && scenario.failed?
|
64
|
-
end
|
65
|
-
|
66
61
|
World(Capybara)
|
67
|
-
|
68
|
-
def override_method(obj, method_name, &block)
|
69
|
-
klass = class <<obj; self; end
|
70
|
-
klass.send(:undef_method, method_name)
|
71
|
-
klass.send(:define_method, method_name, block)
|
72
|
-
end
|
73
|
-
|
74
|
-
AfterConfiguration do |configuration|
|
75
|
-
override_method(configuration, :feature_files) do
|
76
|
-
potential_feature_files = with_default_features_path(paths).map do |path|
|
77
|
-
path = path.chomp('/')
|
78
|
-
if File.directory?(path)
|
79
|
-
Dir[path.to_s + config['framework']['features_regexp']].sort
|
80
|
-
elsif path[0..0] == '@' &&
|
81
|
-
File.file?(path[1..-1])
|
82
|
-
IO.read(path[1..-1]).split
|
83
|
-
else
|
84
|
-
path
|
85
|
-
end
|
86
|
-
end.flatten.uniq
|
87
|
-
remove_excluded_files_from(potential_feature_files)
|
88
|
-
potential_feature_files.shuffle
|
89
|
-
end
|
90
|
-
end
|
data/lib/cuculungwa/utils.rb
CHANGED
@@ -11,19 +11,20 @@ module Utils
|
|
11
11
|
Capybara.app_host = @app.config['project']['default_host'][app]
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
14
|
+
def set_environment_and_app(environment, app)
|
15
|
+
Capybara.app_host = @app.config['project'][environment][app]
|
15
16
|
end
|
16
17
|
|
17
18
|
def wait_for_expected_result(timespan = @app.config['capybara']['default_wait_time'], exception_type = RSpec::Expectations::ExpectationNotMetError)
|
18
19
|
# Default setting: get default wait time from config.yml
|
19
|
-
|
20
|
+
start_time = Time.now
|
20
21
|
loop do
|
21
22
|
begin
|
22
23
|
yield
|
23
24
|
break
|
24
25
|
rescue exception_type => e
|
25
26
|
# Expectations were not met, check if we timed out, otherwise try one more time after 10ms
|
26
|
-
if Time.now >
|
27
|
+
if Time.now > start_time + timespan
|
27
28
|
puts 'Timeout.'
|
28
29
|
raise e
|
29
30
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuculungwa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michal Kaftanski
|
8
8
|
- Jakub Kubiak
|
9
9
|
- Tomasz Tokarski
|
10
|
-
-
|
10
|
+
- Jaroslaw Biniek
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: aruba
|