closer 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +7 -0
- data/closer.gemspec +3 -3
- data/lib/closer.rb +0 -1
- data/lib/closer/drivers/file_detector.rb +16 -0
- data/lib/closer/helpers/driver.rb +14 -16
- data/lib/closer/version.rb +1 -1
- data/lib/tasks/close.rake +1 -0
- metadata +15 -9
- data/lib/closer/cucumber_patch.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35cef9166bf15b1780e96939351d4850864ecb85
|
4
|
+
data.tar.gz: a85f690669457cbd250c401b60904879d774e3ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 356711966ec1b38283ad292febe7bafa65faf96641fc7ab5f6d76fc2d2186b81d40daabdee9947660c818f174ccef505efb692248f8b034bc6ac4f3f3b8df6e7
|
7
|
+
data.tar.gz: 19db102779c2ee7851f7918e1650c5d5de71ceef44d3386843614b893c5983a98ff13b51eee062e8dce5bc42e094a9a5b5d0c9fa280439de4f5a8d8c629ef579
|
data/HISTORY.md
CHANGED
data/closer.gemspec
CHANGED
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.required_ruby_version = '~> 2.1'
|
21
21
|
|
22
|
-
spec.add_runtime_dependency 'cucumber', '
|
22
|
+
spec.add_runtime_dependency 'cucumber', '>= 2.4', '<= 4.0'
|
23
23
|
spec.add_runtime_dependency 'poltergeist', '>= 1.16'
|
24
|
-
spec.add_runtime_dependency 'selenium-webdriver', '~>
|
24
|
+
spec.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
|
25
25
|
|
26
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
26
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
27
27
|
spec.add_development_dependency 'minitest', '~> 5.10'
|
28
28
|
spec.add_development_dependency 'rake', '~> 12.0'
|
29
29
|
end
|
data/lib/closer.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'closer/drivers/file_detector'
|
2
|
+
|
3
|
+
Capybara.default_driver = (ENV['DRIVER'] || 'firefox').to_sym
|
2
4
|
|
3
5
|
case Capybara.default_driver
|
4
6
|
when :chrome
|
@@ -14,12 +16,7 @@ when :chrome
|
|
14
16
|
:desired_capabilities => caps
|
15
17
|
)
|
16
18
|
|
17
|
-
driver
|
18
|
-
str = args.first.to_s
|
19
|
-
str if File.exist?(str)
|
20
|
-
end
|
21
|
-
|
22
|
-
driver
|
19
|
+
Closer::Drivers::FileDetector.apply(driver)
|
23
20
|
end
|
24
21
|
else
|
25
22
|
Capybara.register_driver :chrome do |app|
|
@@ -30,25 +27,26 @@ when :chrome
|
|
30
27
|
end
|
31
28
|
when :poltergeist
|
32
29
|
require 'capybara/poltergeist'
|
33
|
-
when :
|
30
|
+
when :firefox
|
34
31
|
if ENV['CI'] == 'travis'
|
35
|
-
caps = Selenium::WebDriver::Remote::Capabilities.
|
32
|
+
caps = Selenium::WebDriver::Remote::Capabilities.firefox(
|
36
33
|
'tunnel-identifier' => ENV['TRAVIS_JOB_NUMBER']
|
37
34
|
)
|
38
35
|
|
39
|
-
Capybara.register_driver :
|
36
|
+
Capybara.register_driver :firefox do |app|
|
40
37
|
driver = Capybara::Selenium::Driver.new(app,
|
41
38
|
:browser => :remote,
|
42
39
|
:url => "http://#{ENV['SAUCE_USERNAME']}:#{ENV['SAUCE_ACCESS_KEY']}@ondemand.saucelabs.com/wd/hub",
|
43
40
|
:desired_capabilities => caps
|
44
41
|
)
|
45
42
|
|
46
|
-
driver
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
Closer::Drivers::FileDetector.apply(driver)
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Capybara.register_driver :firefox do |app|
|
47
|
+
driver = Capybara::Selenium::Driver.new(app,
|
48
|
+
:browser => :firefox
|
49
|
+
)
|
52
50
|
end
|
53
51
|
end
|
54
52
|
end
|
data/lib/closer/version.rb
CHANGED
data/lib/tasks/close.rake
CHANGED
@@ -47,6 +47,7 @@ task :close => dependencies do |t, args|
|
|
47
47
|
format_arg
|
48
48
|
]
|
49
49
|
args << '--dry-run' if ENV['DRY_RUN'] or ENV['DR']
|
50
|
+
args << "--retry #{ENV['RETRY'].to_i}" if ENV['RETRY'].to_i > 0
|
50
51
|
if feature_dir != 'user_stories'
|
51
52
|
args << '--order random' unless ENV['SORT']
|
52
53
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: closer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.4'
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.4'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: poltergeist
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +50,28 @@ dependencies:
|
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '3.0'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '3.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: bundler
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
67
|
+
version: '1.15'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
74
|
+
version: '1.15'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: minitest
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +116,7 @@ files:
|
|
110
116
|
- closer.gemspec
|
111
117
|
- lib/closer.rb
|
112
118
|
- lib/closer/config.rb
|
113
|
-
- lib/closer/
|
119
|
+
- lib/closer/drivers/file_detector.rb
|
114
120
|
- lib/closer/formatter/closer.css
|
115
121
|
- lib/closer/formatter/closer.js
|
116
122
|
- lib/closer/formatter/closer_html.rb
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'cucumber'
|
2
|
-
require 'cucumber/core/ast/step'
|
3
|
-
require 'cucumber/formatter/console'
|
4
|
-
|
5
|
-
module Cucumber
|
6
|
-
module Core
|
7
|
-
module Ast
|
8
|
-
class Step
|
9
|
-
|
10
|
-
def backtrace_line
|
11
|
-
"#{location.to_s.force_encoding('UTF-8')}:in `#{keyword.force_encoding('UTF-8')}#{name.force_encoding('UTF-8')}'"
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
module Cucumber
|
20
|
-
module Formatter
|
21
|
-
module Console
|
22
|
-
|
23
|
-
def print_failing_scenarios(failures, custom_profiles, given_source)
|
24
|
-
@io.puts format_string("Failing Scenarios:", :failed)
|
25
|
-
failures.each do |failure|
|
26
|
-
profiles_string = custom_profiles.empty? ? '' : (custom_profiles.map{|profile| "-p #{profile}" }).join(' ') + ' '
|
27
|
-
source = given_source ? format_string(" # " + failure.name, :comment) : ''
|
28
|
-
@io.puts format_string("cucumber #{profiles_string}" + failure.location.to_s.force_encoding('UTF-8'), :failed) + source
|
29
|
-
end
|
30
|
-
@io.puts
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|