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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffba0c69edd60bf8b2efe9c85ceaaab90c743ee5
4
- data.tar.gz: 11e36133d0c9aede15f877fd6807316b34e4e20b
3
+ metadata.gz: 35cef9166bf15b1780e96939351d4850864ecb85
4
+ data.tar.gz: a85f690669457cbd250c401b60904879d774e3ed
5
5
  SHA512:
6
- metadata.gz: c3ba0d2e1a48575ad35f52d0dcf4f4e5eaf8cb683757d12e6bd4af6abb74d464fab5a50526453219e15ce14d033941eb742f3e04b7e9b5de77ba9d54a5f646a4
7
- data.tar.gz: ac78af79d7e76ef9ac30d93cd6331fd6cfea1bdc8ad1dddb5c03a21cecbec65e44f9875c059ac7058f28edecc0189f51735b70a89322de4fb14516da3bd12980
6
+ metadata.gz: 356711966ec1b38283ad292febe7bafa65faf96641fc7ab5f6d76fc2d2186b81d40daabdee9947660c818f174ccef505efb692248f8b034bc6ac4f3f3b8df6e7
7
+ data.tar.gz: 19db102779c2ee7851f7918e1650c5d5de71ceef44d3386843614b893c5983a98ff13b51eee062e8dce5bc42e094a9a5b5d0c9fa280439de4f5a8d8c629ef579
data/HISTORY.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Master
2
2
 
3
+ # Version 0.5.4
4
+ Release Date: 2017-10-09
5
+
6
+ ### Changed
7
+ * add support for cucumber-3.x
8
+ * environment variable RETRY will set --retry option
9
+
3
10
  # Version 0.5.3
4
11
  Release Date: 2017-09-23
5
12
 
@@ -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', '~> 2.4'
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', '~> 2.53'
24
+ spec.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.12'
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
@@ -1,6 +1,5 @@
1
1
  require 'closer/version'
2
2
  require 'closer/config'
3
- require 'closer/cucumber_patch'
4
3
 
5
4
  module Closer
6
5
 
@@ -0,0 +1,16 @@
1
+ module Closer
2
+ module Drivers
3
+ class FileDetector
4
+
5
+ def self.apply(driver)
6
+ driver.browser.file_detector = lambda do |args|
7
+ str = args.first.to_s
8
+ str if File.exist?(str)
9
+ end
10
+
11
+ driver
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -1,4 +1,6 @@
1
- Capybara.default_driver = (ENV['DRIVER'] || 'selenium').to_sym
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.browser.file_detector = lambda do |args|
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 :selenium
30
+ when :firefox
34
31
  if ENV['CI'] == 'travis'
35
- caps = Selenium::WebDriver::Remote::Capabilities.chrome(
32
+ caps = Selenium::WebDriver::Remote::Capabilities.firefox(
36
33
  'tunnel-identifier' => ENV['TRAVIS_JOB_NUMBER']
37
34
  )
38
35
 
39
- Capybara.register_driver :selenium do |app|
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.browser.file_detector = lambda do |args|
47
- str = args.first.to_s
48
- str if File.exist?(str)
49
- end
50
-
51
- driver
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
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.5.3'
2
+ VERSION = '0.5.4'
3
3
  end
@@ -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.3
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-09-23 00:00:00.000000000 Z
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: '2.53'
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: '2.53'
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.12'
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.12'
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/cucumber_patch.rb
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