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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/knapsack_pro/allocator.rb +5 -8
- data/lib/knapsack_pro/client/api/action.rb +4 -6
- data/lib/knapsack_pro/client/api/v1/build_distributions.rb +6 -10
- data/lib/knapsack_pro/client/api/v1/build_subsets.rb +6 -10
- data/lib/knapsack_pro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3332981f8b8f00fd4ae1746202ff4955a931db8e
|
4
|
+
data.tar.gz: d58ddf37cbacdec16e88b70bff56c0da917da206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aa19777190f729ab41ee527b17ce46547bcf45c8ef2aadfb8c962f3492f0b6915b10bada62b1673bf47c9286b55948dde63c6e2edf380746c96e5317f3f0f52
|
7
|
+
data.tar.gz: eefb8f79a50289e91bbe662e1afae427d46a9ad492c21a76497c0fa7eb1d6d9fe9e69fd2bc89fb47b4c02771ce51792013a7ce47e6b3da08c05a1c3dba943ad9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
module KnapsackPro
|
2
2
|
class Allocator
|
3
|
-
def initialize(
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
@
|
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(
|
8
|
-
|
9
|
-
|
10
|
-
@
|
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(
|
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(
|
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
|
data/lib/knapsack_pro/version.rb
CHANGED
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.
|
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
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|