matrixeval-ruby 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: 21cd041a53b811584d5ba4c44cc7cca0990add95f39251b566425d8e41b8d5c5
4
- data.tar.gz: 342cb96612cee61f74683af65a150e3b86a574e835dfb8736e7a600ab86e9dc5
3
+ metadata.gz: 3b9b53303cbe3415db346fff54439d7d83ff3564953dc8a73f8e717cad79c076
4
+ data.tar.gz: 8b930d4888aff49ede4a41b9e9f979d4ba40ff3b1a6461f984dcc31a8e66b9e1
5
5
  SHA512:
6
- metadata.gz: 4c058092c0c3279fc1359f6802d7dbb56cb8a7f2057a7af0b3c3967e5459c36cba7316539722c6577821c147cdaf13fabfaa06f24f4847976787c07f6fa09d47
7
- data.tar.gz: faf39d5d47abd8e1af39ab6521c4a719646f10ce016f76c563a516926e7b8554e1ec7646eaac0d6742d58ebada94bbe828ab83fa553486d0aa485e2114315581
6
+ metadata.gz: b6dace8fff5fbcd2e710b65937cd1e28a32aa0d637c0636b446a5463389d0aa8acae2f387db940c60e6a5abcecaf6b2210fc55fae912cfef8ea371d6cdf6c09f
7
+ data.tar.gz: 43bc3e246bcf8ea074bb23c08b61565a6746dcb0f6130712aa523aa354cd021a761287ab791e5112353a2eff47d4c286c13b07e74a7c9b4e6d3da482a7007295
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2022-02-11
4
+
5
+ - Fix a assignment method issue
6
+
3
7
  ## [0.2.0] - 2022-02-10
4
8
 
5
9
  - Change config format from 0.1 to 0.2
@@ -6,7 +6,7 @@ module Matrixeval
6
6
 
7
7
  class CommandLine
8
8
 
9
- attr_accessor :argv
9
+ attr_reader :argv
10
10
 
11
11
  def initialize(argv)
12
12
  @argv = argv
@@ -19,7 +19,7 @@ module Matrixeval
19
19
  end
20
20
 
21
21
  def init?
22
- argv[0] == 'init'
22
+ @argv[0] == 'init'
23
23
  end
24
24
 
25
25
  def all?
@@ -31,19 +31,19 @@ module Matrixeval
31
31
  end
32
32
 
33
33
  def context_arguments
34
- arguments = argv[0...seperator_index]
35
- arguments << "-h" if argv.empty?
34
+ arguments = @argv[0...seperator_index]
35
+ arguments << "-h" if @argv.empty?
36
36
  arguments
37
37
  end
38
38
 
39
39
  def rest_arguments
40
- argv[seperator_index..-1]
40
+ @argv[seperator_index..-1]
41
41
  end
42
42
 
43
43
  private
44
44
 
45
45
  def seperator_index
46
- argv.index do |argument|
46
+ @argv.index do |argument|
47
47
  Config.commands.include?(argument)
48
48
  end
49
49
  end
@@ -16,7 +16,6 @@ module Matrixeval
16
16
  end
17
17
 
18
18
  attr_reader :argv, :command
19
- attr_accessor :threads, :matrixeval_results
20
19
 
21
20
  def initialize(argv)
22
21
  @argv = argv
@@ -88,7 +87,7 @@ module Matrixeval
88
87
  docker_compose = DockerCompose.new(context)
89
88
  success = docker_compose.run(command.rest_arguments)
90
89
 
91
- self.matrixeval_results << [context, !!success]
90
+ @matrixeval_results << [context, !!success]
92
91
  end
93
92
 
94
93
  report
@@ -145,7 +144,7 @@ module Matrixeval
145
144
  table.add_row headers.map { |value| { value: value, alignment: :center } }
146
145
  table.add_separator
147
146
 
148
- matrixeval_results.each do |context, success|
147
+ @matrixeval_results.each do |context, success|
149
148
  success_cell = [success ? Rainbow('Success').green : Rainbow('Failed').red]
150
149
  row = (context.variants.map(&:key) + success_cell).map do |value|
151
150
  { value: value, alignment: :center }
@@ -160,19 +159,19 @@ module Matrixeval
160
159
  end
161
160
 
162
161
  def parallel(collection)
163
- threads = [] unless threads.empty?
164
- matrixeval_results = [] unless matrixeval_results.empty?
162
+ @threads = [] unless @threads.empty?
163
+ @matrixeval_results = [] unless @matrixeval_results.empty?
165
164
 
166
165
  collection.each_slice(per_worker_contexts_count) do |sub_collection|
167
- threads << Thread.new do
166
+ @threads << Thread.new do
168
167
  yield sub_collection
169
168
  end
170
169
  end
171
170
 
172
- threads.each(&:join)
171
+ @threads.each(&:join)
173
172
 
174
- threads.each do |thread|
175
- self.matrixeval_results += (thread[:matrixeval_results] || [])
173
+ @threads.each do |thread|
174
+ @matrixeval_results += (thread[:matrixeval_results] || [])
176
175
  end
177
176
  end
178
177
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Matrixeval
4
4
  module Ruby
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matrixeval-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hopper Gee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -64,7 +64,6 @@ files:
64
64
  - CHANGELOG.md
65
65
  - CODE_OF_CONDUCT.md
66
66
  - Gemfile
67
- - Gemfile.lock
68
67
  - LICENSE.txt
69
68
  - README.md
70
69
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,37 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- matrixeval-ruby (0.1.1)
5
- concurrent-ruby
6
- rainbow (~> 3.1)
7
- terminal-table
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- byebug (11.1.3)
13
- concurrent-ruby (1.1.9)
14
- minitest (5.15.0)
15
- minitest-focus (1.3.1)
16
- minitest (>= 4, < 6)
17
- mocha (1.13.0)
18
- rainbow (3.1.1)
19
- rake (13.0.6)
20
- terminal-table (3.0.2)
21
- unicode-display_width (>= 1.1.1, < 3)
22
- unicode-display_width (2.1.0)
23
-
24
- PLATFORMS
25
- x86_64-darwin-19
26
- x86_64-linux
27
-
28
- DEPENDENCIES
29
- byebug
30
- matrixeval-ruby!
31
- minitest (~> 5.0)
32
- minitest-focus
33
- mocha
34
- rake (~> 13.0)
35
-
36
- BUNDLED WITH
37
- 2.2.32