gemika 0.8.2 → 0.8.3

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: b533117c01bb5d6011e1e2f41291be1e6aa14af11eb876cba896ed0a4f2630f7
4
- data.tar.gz: 53f1415288ad8653657966277cab42c128dfd2cb8ddf5e2aeb811a01b518043c
3
+ metadata.gz: f432a0cff504e477f6450ed48da82894a00daa92efa9b0789d4e6af8d0eafef8
4
+ data.tar.gz: 1eb9b92aba01e07cd4419addd13a11e0cd98d6e6d184007ebe0712b92e2f9bce
5
5
  SHA512:
6
- metadata.gz: bb8b3695cd7dc1c01fdf9a558b0795d8590f90876350f65aee69348927f987a4e92b818f57c2895dcffc0b0a807745137a7f3151e549f88508b478f4d2735834
7
- data.tar.gz: 3d28afbc37f5492990f55034aa0889e10506db61c427a816f0f072ec1e35cf4e9fbde658176593f1c24c881d12f9a44c75c912f8a48f0638622edbe8d84f3cfd
6
+ metadata.gz: 8215d8b44032c9dc6fcf9402054f498b7f70c9899bc56b579b80f5e1c56533821c7c1360d2def99def659fc4b0ee5e4c8e2b5b9913d790b30fa619de2a8a679b
7
+ data.tar.gz: 788d206f09144015868f90462c677df51495c9dbce64ff23289a0b1cf67e26330a50664a977a22e6dd65ab4844f051b5996cdfcb8798f5d9c7eec28218b7204b
data/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
13
13
 
14
14
  -
15
15
 
16
+ ## 0.8.3 - 2024-01-04
17
+
18
+ ### Compatible changes
19
+
20
+ - handle missing rbenv-aliases plugin
21
+
16
22
 
17
23
  ## 0.8.2 - 2023-07-13
18
24
 
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gemika (0.8.2)
4
+ gemika (0.8.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/gemika/matrix.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'open3'
1
2
  require 'yaml'
2
3
  require 'gemika/errors'
3
4
  require 'gemika/env'
@@ -89,11 +90,15 @@ module Gemika
89
90
  end
90
91
 
91
92
  ##
92
- # Returns the list of rbenv aliases, if rbenv is installed.
93
+ # Returns the list of rbenv aliases, if rbenv is installed with rbenv-aliases plugin.
93
94
  #
94
95
  def rbenv_aliases
95
- if `which rbenv` != ''
96
- `rbenv alias --list`
96
+ _output, status = Open3.capture2e('which', 'rbenv')
97
+ return '' unless status.success?
98
+
99
+ output, status = Open3.capture2e('rbenv', 'alias', '--list')
100
+ if status.success?
101
+ output
97
102
  else
98
103
  ''
99
104
  end
@@ -1,3 +1,3 @@
1
1
  module Gemika
2
- VERSION = '0.8.2'
2
+ VERSION = '0.8.3'
3
3
  end
@@ -57,6 +57,19 @@ describe Gemika::Matrix::Row do
57
57
  end
58
58
  end
59
59
 
60
+ context 'when rbenv is installed without rbenv-aliases plugin' do
61
+ before do
62
+ allow(Open3).to receive(:capture2e).with('which', 'rbenv').and_return(['/path/to/rbenv', double(success?: true, exitstatus: 0)])
63
+ allow(Open3).to receive(:capture2e).with('rbenv', 'alias', '--list').and_return(['rbenv: no such command `alias', double(success?: false, exitstatus: 1)])
64
+ end
65
+
66
+ it 'does not crash and does not print errors' do
67
+ expect do
68
+ expect(subject.compatible_with_ruby?('3.0.3')).to eq(true)
69
+ end.to output('').to_stdout_from_any_process.and output('').to_stderr_from_any_process
70
+ end
71
+ end
72
+
60
73
  end
61
74
 
62
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemika
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Helpers for testing Ruby gems
14
14
  email: henning.koch@makandra.de
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.4.14
107
+ rubygems_version: 3.4.13
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Helpers for testing Ruby gems