knapsack_pro 0.2.1 → 0.3.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: 96ff13037f32a161f5a770ba6636b171a2d317c4
4
- data.tar.gz: 11c088648df8c54ee22bd101fce0442ed5af7b85
3
+ metadata.gz: 3332981f8b8f00fd4ae1746202ff4955a931db8e
4
+ data.tar.gz: d58ddf37cbacdec16e88b70bff56c0da917da206
5
5
  SHA512:
6
- metadata.gz: 06f9467cd5208500e8daf2aa1efa77631fc189e50547f5b70f0a81b2966d6416450535da9637665f990e24f6ca5a21ef67fbea85dc2e793725458e5c93125d72
7
- data.tar.gz: a63200ecee7013d6163c0bfe5a330c3416c2bc5151e1d22b0ba25851305a0cc048d43c483020508bfa3b42f57edfb06a5621c2fbe38057779f61a7cc379398a2
6
+ metadata.gz: 7aa19777190f729ab41ee527b17ce46547bcf45c8ef2aadfb8c962f3492f0b6915b10bada62b1673bf47c9286b55948dde63c6e2edf380746c96e5317f3f0f52
7
+ data.tar.gz: eefb8f79a50289e91bbe662e1afae427d46a9ad492c21a76497c0fa7eb1d6d9fe9e69fd2bc89fb47b4c02771ce51792013a7ce47e6b3da08c05a1c3dba943ad9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.3.0
6
+
7
+ * Remove keyword arguments in order to add support for old ruby versions.
8
+
5
9
  ### 0.2.1
6
10
 
7
11
  * TestFileFinder should find unique files without duplicates when using test file pattern supporting symlinks
data/README.md CHANGED
@@ -36,7 +36,7 @@ For instance when you will run tests with rake knapsack_pro:rspec then:
36
36
 
37
37
  # Requirements
38
38
 
39
- * >= Ruby 2.1 (because gem uses required keyword arguments in ruby)
39
+ * >= Ruby 2.0.0
40
40
 
41
41
  # Table of Contents
42
42
 
@@ -1,13 +1,10 @@
1
1
  module KnapsackPro
2
2
  class Allocator
3
- def initialize(test_files:,
4
- ci_node_total:,
5
- ci_node_index:,
6
- repository_adapter:)
7
- @test_files = test_files
8
- @ci_node_total = ci_node_total
9
- @ci_node_index = ci_node_index
10
- @repository_adapter = repository_adapter
3
+ def initialize(args)
4
+ @test_files = args.fetch(:test_files)
5
+ @ci_node_total = args.fetch(:ci_node_total)
6
+ @ci_node_index = args.fetch(:ci_node_index)
7
+ @repository_adapter = args.fetch(:repository_adapter)
11
8
  end
12
9
 
13
10
  def test_file_paths
@@ -4,12 +4,10 @@ module KnapsackPro
4
4
  class Action
5
5
  attr_reader :endpoint_path, :http_method, :request_hash
6
6
 
7
- def initialize(endpoint_path:,
8
- http_method:,
9
- request_hash:)
10
- @endpoint_path = endpoint_path
11
- @http_method = http_method
12
- @request_hash = request_hash
7
+ def initialize(args)
8
+ @endpoint_path = args.fetch(:endpoint_path)
9
+ @http_method = args.fetch(:http_method)
10
+ @request_hash = args.fetch(:request_hash)
13
11
  end
14
12
  end
15
13
  end
@@ -4,20 +4,16 @@ module KnapsackPro
4
4
  module V1
5
5
  class BuildDistributions < Base
6
6
  class << self
7
- def subset(commit_hash:,
8
- branch:,
9
- node_total:,
10
- node_index:,
11
- test_files:)
7
+ def subset(args)
12
8
  action_class.new(
13
9
  endpoint_path: '/v1/build_distributions/subset',
14
10
  http_method: :post,
15
11
  request_hash: {
16
- :commit_hash => commit_hash,
17
- :branch => branch,
18
- :node_total => node_total,
19
- :node_index => node_index,
20
- :test_files => test_files
12
+ :commit_hash => args.fetch(:commit_hash),
13
+ :branch => args.fetch(:branch),
14
+ :node_total => args.fetch(:node_total),
15
+ :node_index => args.fetch(:node_index),
16
+ :test_files => args.fetch(:test_files)
21
17
  }
22
18
  )
23
19
  end
@@ -4,20 +4,16 @@ module KnapsackPro
4
4
  module V1
5
5
  class BuildSubsets < Base
6
6
  class << self
7
- def create(commit_hash:,
8
- branch:,
9
- node_total:,
10
- node_index:,
11
- test_files:)
7
+ def create(args)
12
8
  action_class.new(
13
9
  endpoint_path: '/v1/build_subsets',
14
10
  http_method: :post,
15
11
  request_hash: {
16
- :commit_hash => commit_hash,
17
- :branch => branch,
18
- :node_total => node_total,
19
- :node_index => node_index,
20
- :test_files => test_files
12
+ :commit_hash => args.fetch(:commit_hash),
13
+ :branch => args.fetch(:branch),
14
+ :node_total => args.fetch(:node_total),
15
+ :node_index => args.fetch(:node_index),
16
+ :test_files => args.fetch(:test_files)
21
17
  }
22
18
  )
23
19
  end
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake