knapsack 1.13.3 → 1.14.0

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: 719ba9d4cfc8bc37b1409b517f03c16d9906b6c5
4
- data.tar.gz: 5734c293161e912ec892c61cd1a95917d92cc213
3
+ metadata.gz: 791f62378674dfea4714d41216464728df74aea7
4
+ data.tar.gz: 9ecde6692285c8b32a0cb430afd24a14b2240fac
5
5
  SHA512:
6
- metadata.gz: 61250f2f1792424e16b9530d11ed6d37c45e30bc0f89b7adb1eb34dd17d3497fae06f18fb2eb3fa1d2a383893c64c22dd5d2fb629e2d861b2a9e229b8cda9e7e
7
- data.tar.gz: ad64bd1b049327ca1f2dd8ea8dcecd45eb3f0c4d8e5c8d9597a9d0f257df160e5597405cf62bf25e77fd5cf0525b53ec73436e0af593f965676f2a6d889cf523
6
+ metadata.gz: f146ac7d2ea4ee8b19c730788041674685a9280f639b2a77f0e90590004550447707f45469c8a4784ffc3a011617713179d90a2e95462714c80fc5fe722db85c
7
+ data.tar.gz: 84ed0f322cd3db11c8e805788a548e519fd86a8781f6b30da643897db61e7a9ab3c4cef34e0d447d42f8589ea288d716fb396c021c878a82987202d6b929a758
@@ -2,6 +2,14 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 1.14.0
6
+
7
+ * Moves Timecop to development dependency.
8
+
9
+ https://github.com/ArturT/knapsack/pull/61
10
+
11
+ https://github.com/ArturT/knapsack/compare/v1.13.3...v1.14.0
12
+
5
13
  ### 1.13.3
6
14
 
7
15
  * Fix: Trailing slash should be removed from allocator test_dir.
data/README.md CHANGED
@@ -36,15 +36,19 @@ The knapsack gem supports:
36
36
 
37
37
  | Feature | knapsack gem | knapsack_pro gem
38
38
  | --- | :---: | :---:
39
- | Queue mode designed for most optimal dynamic test suite split | ✘ | ✔
39
+ | Queue mode designed for optimal dynamic test suite split | ✘ | ✔
40
40
  | Test suite split based on tests time execution | ✔ | ✔
41
41
  | Automated tests time execution recording | ✘ | ✔
42
42
  | Test suite split based on most up to date tests time execution data | ✘ | ✔
43
43
  | [Show all features](https://knapsackpro.com/features?utm_source=github&utm_medium=readme&utm_campaign=knapsack_gem&utm_content=show_all_features) | |
44
44
 
45
+ __Play video how dynamic rspec allocation works__
46
+
47
+ [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/pkdLzKlnlQg/0.jpg)](https://knapsackpro.com/?utm_source=github&utm_medium=readme&utm_campaign=knapsack_gem&utm_content=video#video)
48
+
45
49
  How knapsack_pro makes my life easier as opposed to regular knapsack gem?
46
50
 
47
- * The knapsack_pro version has queue mode designed for most optimal test suite split thanks to dynamic tests allocation.
51
+ * The knapsack_pro version has queue mode designed for optimal test suite split thanks to dynamic tests allocation.
48
52
  * With the knapsack_pro version the setup and the ongoing work is easier because you don’t have to manually generate knapsack json report with test files time execution for each test suite like rspec, cucumber etc.
49
53
  * The knapsack_pro version tracks all you branches so when your test code changes the knapsack_pro tries to provide you as optimal test suite split as possible.
50
54
  * When your test codebase changes over time you need to manually generate a new knapsack report in free gem version which is extra overhead and waste of time of the developer.
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'rake', '>= 0'
22
- spec.add_dependency 'timecop', '>= 0.1.0'
23
22
 
24
23
  spec.add_development_dependency 'bundler', '~> 1.6'
25
24
  spec.add_development_dependency 'rspec', '~> 3.0', '>= 2.0.0'
@@ -29,4 +28,5 @@ Gem::Specification.new do |spec|
29
28
  spec.add_development_dependency 'minitest', '>= 5.0.0'
30
29
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 0'
31
30
  spec.add_development_dependency 'pry', '~> 0'
31
+ spec.add_development_dependency 'timecop', '>= 0.1.0'
32
32
  end
@@ -1,7 +1,7 @@
1
1
  require 'singleton'
2
2
  require 'rake/testtask'
3
- require 'timecop'
4
3
  require_relative 'knapsack/version'
4
+ require_relative 'knapsack/extensions/time'
5
5
  require_relative 'knapsack/config/env'
6
6
  require_relative 'knapsack/config/tracker'
7
7
  require_relative 'knapsack/logger'
@@ -0,0 +1,7 @@
1
+ require 'time'
2
+
3
+ class Time
4
+ class << self
5
+ alias_method :raw_now, :now
6
+ end
7
+ end
@@ -63,7 +63,7 @@ Happy testing!}
63
63
  str << "\n\nNeed explanation? See FAQ:"
64
64
  str << "\nhttps://github.com/ArturT/knapsack#faq"
65
65
  str << "\n=================================================\n"
66
- str << %{Sign up for beta Knapsack Pro here:
66
+ str << %{Sign up for Knapsack Pro here:
67
67
  http://knapsackpro.com}
68
68
  str << "\n=================================================\n"
69
69
  str
@@ -81,7 +81,11 @@ module Knapsack
81
81
  end
82
82
 
83
83
  def now_without_mock_time
84
- Time.now_without_mock_time
84
+ if defined?(Timecop)
85
+ Time.now_without_mock_time
86
+ else
87
+ Time.raw_now
88
+ end
85
89
  end
86
90
  end
87
91
  end
@@ -1,3 +1,3 @@
1
1
  module Knapsack
2
- VERSION = '1.13.3'
2
+ VERSION = '1.14.0'
3
3
  end
@@ -0,0 +1,5 @@
1
+ describe Time do
2
+ it 'responds to :raw_now' do
3
+ expect(Time.respond_to?(:raw_now)).to be true
4
+ end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.3
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-03 00:00:00.000000000 Z
11
+ date: 2017-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: timecop
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 0.1.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 0.1.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -156,6 +142,20 @@ dependencies:
156
142
  - - "~>"
157
143
  - !ruby/object:Gem::Version
158
144
  version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: timecop
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: 0.1.0
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 0.1.0
159
159
  description: Parallel tests across CI server nodes based on each test file's time
160
160
  execution. It generates a test time execution report and uses it for future test
161
161
  runs.
@@ -202,6 +202,7 @@ files:
202
202
  - lib/knapsack/distributors/base_distributor.rb
203
203
  - lib/knapsack/distributors/leftover_distributor.rb
204
204
  - lib/knapsack/distributors/report_distributor.rb
205
+ - lib/knapsack/extensions/time.rb
205
206
  - lib/knapsack/logger.rb
206
207
  - lib/knapsack/presenter.rb
207
208
  - lib/knapsack/report.rb
@@ -228,6 +229,7 @@ files:
228
229
  - spec/knapsack/distributors/base_distributor_spec.rb
229
230
  - spec/knapsack/distributors/leftover_distributor_spec.rb
230
231
  - spec/knapsack/distributors/report_distributor_spec.rb
232
+ - spec/knapsack/extensions/time_spec.rb
231
233
  - spec/knapsack/logger_spec.rb
232
234
  - spec/knapsack/presenter_spec.rb
233
235
  - spec/knapsack/report_spec.rb
@@ -302,6 +304,7 @@ test_files:
302
304
  - spec/knapsack/distributors/base_distributor_spec.rb
303
305
  - spec/knapsack/distributors/leftover_distributor_spec.rb
304
306
  - spec/knapsack/distributors/report_distributor_spec.rb
307
+ - spec/knapsack/extensions/time_spec.rb
305
308
  - spec/knapsack/logger_spec.rb
306
309
  - spec/knapsack/presenter_spec.rb
307
310
  - spec/knapsack/report_spec.rb