knapsack 1.11.0 → 1.11.1

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: 586b4f20bd1e8eeaa8cecd582028c38bbda68798
4
- data.tar.gz: ba890d94aeb726731268b2138c81106c8d1dd21b
3
+ metadata.gz: 9707d40522261fe0ed81e7e607b6fb46ed220703
4
+ data.tar.gz: 6ffe1d23a0ab0e1b373989d9042469799fe339f9
5
5
  SHA512:
6
- metadata.gz: 0d826026f771d18064f2fc0c4fd48f41b0193d015f1c655bee098c8e887665271245ef1293140347a49ebb93b1b34868ed05f1c1ff5342374eb6dd8bc8c80d1f
7
- data.tar.gz: f92c71f48e7a86142903714034d2e1e6a08412592159e544159d89b01bc3841008d173d2fe461ab6597961533d2c8e9ec246f163b7cec046dc86d65075c1784c
6
+ metadata.gz: 74bb98c429c28db932d514d8090042a55767834949fc1a219d69334a9582474f4a5e195020a03b8ada025815d62ab5cf7e74081a2dd8344d734e3ab43ec30354
7
+ data.tar.gz: 2c640c9d958f91fab219f040b1a87b9e27664b999b23742b701c342b565d72abf7b4a0dcf86e22313e351ff35eae847916155702d5230bea00ffd94e66576083
@@ -2,6 +2,15 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 1.11.1
6
+
7
+ * Require spinach in spec helper so tests will pass but don't require it in spinach adapter because it breaks for users who don't use spinach and they don't want to add it to their Gemfile
8
+
9
+ Related PR:
10
+ https://github.com/ArturT/knapsack/pull/41
11
+
12
+ https://github.com/ArturT/knapsack/compare/v1.11.0...v1.11.1
13
+
5
14
  ### 1.11.0
6
15
 
7
16
  * Add support for Spinach
@@ -34,7 +34,7 @@ module Knapsack
34
34
  end
35
35
 
36
36
  def self.test_path(object)
37
- if Cucumber::VERSION.to_i >= 2
37
+ if ::Cucumber::VERSION.to_i >= 2
38
38
  test_case = object
39
39
  test_case.location.file
40
40
  else
@@ -1,5 +1,3 @@
1
- require 'spinach'
2
-
3
1
  module Knapsack
4
2
  module Adapters
5
3
  class SpinachAdapter < BaseAdapter
@@ -7,29 +5,29 @@ module Knapsack
7
5
  REPORT_PATH = 'knapsack_spinach_report.json'
8
6
 
9
7
  def bind_time_tracker
10
- Spinach.hooks.before_scenario do |scenario_data, step_definitions|
8
+ ::Spinach.hooks.before_scenario do |scenario_data, step_definitions|
11
9
  Knapsack.tracker.test_path = SpinachAdapter.test_path(scenario_data)
12
10
  Knapsack.tracker.start_timer
13
11
  end
14
12
 
15
- Spinach.hooks.after_scenario do
13
+ ::Spinach.hooks.after_scenario do
16
14
  Knapsack.tracker.stop_timer
17
15
  end
18
16
 
19
- Spinach.hooks.after_run do
17
+ ::Spinach.hooks.after_run do
20
18
  Knapsack.logger.info(Presenter.global_time)
21
19
  end
22
20
  end
23
21
 
24
22
  def bind_report_generator
25
- Spinach.hooks.after_run do
23
+ ::Spinach.hooks.after_run do
26
24
  Knapsack.report.save
27
25
  Knapsack.logger.info(Presenter.report_details)
28
26
  end
29
27
  end
30
28
 
31
29
  def bind_time_offset_warning
32
- Spinach.hooks.after_run do
30
+ ::Spinach.hooks.after_run do
33
31
  Knapsack.logger.log(
34
32
  Presenter.time_offset_log_level,
35
33
  Presenter.time_offset_warning
@@ -1,3 +1,3 @@
1
1
  module Knapsack
2
- VERSION = '1.11.0'
2
+ VERSION = '1.11.1'
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'rspec/its'
2
+ require 'spinach'
2
3
 
3
4
  require 'timecop'
4
5
  Timecop.safe_mode = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT