cr-exec 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -12
- data/Gemfile +4 -0
- data/Gemfile.lock +33 -28
- data/Rakefile +1 -1
- data/lib/cr/exec/version.rb +1 -1
- data/lib/cr/exec.rb +10 -7
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49e57011075a1a20fd3942ac28a9fba2f9007fea0d8e838953d9d3969fea8ac0
|
|
4
|
+
data.tar.gz: aab1ad2d7a458cf143e0c08c204b642f555df6e10326218c0d776d1e35d4057c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2d25ed35e8848d7b960059c5da8bd7af37f0f06a09c6a51cc9814021fa16b14e6a8e0531097c8ed14e78f47f830b82498886e87b7cb34c7899e097ee5816fe4
|
|
7
|
+
data.tar.gz: 6aed02e36903c06280833669225451a4df158e07a240b1008534478f92b6b9325d4b9995d218161987cc9643b11f7fa72dcf5fdcee5b8124f9507dcc1fc40f76
|
data/.rubocop.yml
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
DefaultFormatter: simple
|
|
1
|
+
inherit_gem:
|
|
2
|
+
rubocop-config-crystal: .rubocop.yml
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
Enabled:
|
|
7
|
-
EnforcedStyle: double_quotes
|
|
4
|
+
Metrics/BlockLength:
|
|
5
|
+
Enabled: false
|
|
8
6
|
|
|
9
|
-
Style/
|
|
10
|
-
Enabled:
|
|
11
|
-
EnforcedStyle: double_quotes
|
|
12
|
-
|
|
13
|
-
Layout/LineLength:
|
|
14
|
-
Max: 120
|
|
7
|
+
Style/NonNilCheck:
|
|
8
|
+
Enabled: false
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,63 +1,68 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cr-exec (0.2.
|
|
4
|
+
cr-exec (0.2.2)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
ast (2.4.
|
|
10
|
-
diff-lcs (1.
|
|
11
|
-
json (2.
|
|
12
|
-
language_server-protocol (3.17.0.
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
ast (2.4.3)
|
|
10
|
+
diff-lcs (1.6.2)
|
|
11
|
+
json (2.15.2)
|
|
12
|
+
language_server-protocol (3.17.0.5)
|
|
13
|
+
lint_roller (1.1.0)
|
|
14
|
+
parallel (1.27.0)
|
|
15
|
+
parser (3.3.10.0)
|
|
15
16
|
ast (~> 2.4.1)
|
|
16
17
|
racc
|
|
17
|
-
|
|
18
|
+
prism (1.6.0)
|
|
19
|
+
racc (1.8.1)
|
|
18
20
|
rainbow (3.1.1)
|
|
19
|
-
rake (13.
|
|
20
|
-
regexp_parser (2.
|
|
21
|
-
|
|
22
|
-
strscan
|
|
23
|
-
rspec (3.13.0)
|
|
21
|
+
rake (13.3.1)
|
|
22
|
+
regexp_parser (2.11.3)
|
|
23
|
+
rspec (3.13.2)
|
|
24
24
|
rspec-core (~> 3.13.0)
|
|
25
25
|
rspec-expectations (~> 3.13.0)
|
|
26
26
|
rspec-mocks (~> 3.13.0)
|
|
27
|
-
rspec-core (3.13.
|
|
27
|
+
rspec-core (3.13.6)
|
|
28
28
|
rspec-support (~> 3.13.0)
|
|
29
|
-
rspec-expectations (3.13.
|
|
29
|
+
rspec-expectations (3.13.5)
|
|
30
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
31
31
|
rspec-support (~> 3.13.0)
|
|
32
|
-
rspec-mocks (3.13.
|
|
32
|
+
rspec-mocks (3.13.7)
|
|
33
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
34
34
|
rspec-support (~> 3.13.0)
|
|
35
|
-
rspec-support (3.13.
|
|
36
|
-
rubocop (1.
|
|
35
|
+
rspec-support (3.13.6)
|
|
36
|
+
rubocop (1.81.7)
|
|
37
37
|
json (~> 2.3)
|
|
38
|
-
language_server-protocol (
|
|
38
|
+
language_server-protocol (~> 3.17.0.2)
|
|
39
|
+
lint_roller (~> 1.1.0)
|
|
39
40
|
parallel (~> 1.10)
|
|
40
41
|
parser (>= 3.3.0.2)
|
|
41
42
|
rainbow (>= 2.2.2, < 4.0)
|
|
42
|
-
regexp_parser (>=
|
|
43
|
-
|
|
44
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
43
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
44
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
45
45
|
ruby-progressbar (~> 1.7)
|
|
46
|
-
unicode-display_width (>= 2.4.0, <
|
|
47
|
-
rubocop-ast (1.
|
|
48
|
-
parser (>= 3.3.
|
|
46
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
47
|
+
rubocop-ast (1.47.1)
|
|
48
|
+
parser (>= 3.3.7.2)
|
|
49
|
+
prism (~> 1.4)
|
|
50
|
+
rubocop-config-crystal (0.0.1)
|
|
49
51
|
ruby-progressbar (1.13.0)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
unicode-display_width (3.2.0)
|
|
53
|
+
unicode-emoji (~> 4.1)
|
|
54
|
+
unicode-emoji (4.1.0)
|
|
52
55
|
|
|
53
56
|
PLATFORMS
|
|
54
57
|
x86_64-linux
|
|
55
58
|
|
|
56
59
|
DEPENDENCIES
|
|
60
|
+
bundler (~> 2.4)
|
|
57
61
|
cr-exec!
|
|
58
62
|
rake (~> 13.0)
|
|
59
63
|
rspec (~> 3.0)
|
|
60
64
|
rubocop (~> 1.21)
|
|
65
|
+
rubocop-config-crystal
|
|
61
66
|
|
|
62
67
|
BUNDLED WITH
|
|
63
|
-
2.
|
|
68
|
+
2.4.22
|
data/Rakefile
CHANGED
data/lib/cr/exec/version.rb
CHANGED
data/lib/cr/exec.rb
CHANGED
|
@@ -21,16 +21,15 @@ module Cr
|
|
|
21
21
|
127
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def output(*args, chomp: true)
|
|
25
|
-
|
|
26
|
-
output = `#{command}`
|
|
24
|
+
def output(*args, chomp: true, **options)
|
|
25
|
+
output = IO.popen(*args, **options).read
|
|
27
26
|
return output.chomp if chomp
|
|
28
27
|
|
|
29
28
|
output
|
|
30
29
|
end
|
|
31
30
|
|
|
32
31
|
def each_line(*args, chomp: false, **options, &block)
|
|
33
|
-
if
|
|
32
|
+
if block_given?
|
|
34
33
|
IO.popen(*args, **options) do |pipe|
|
|
35
34
|
pipe.each_line(chomp: chomp, &block)
|
|
36
35
|
end
|
|
@@ -41,10 +40,10 @@ module Cr
|
|
|
41
40
|
|
|
42
41
|
def answer(*args, input: nil, **options)
|
|
43
42
|
IO.popen(*args, **options) do |pipe|
|
|
44
|
-
if input.is_a?
|
|
43
|
+
if input.is_a?(Array)
|
|
45
44
|
input.each { |cmd| pipe.puts(cmd) }
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
elsif input != nil
|
|
46
|
+
pipe.puts(input)
|
|
48
47
|
end
|
|
49
48
|
pipe.close_write
|
|
50
49
|
pipe.read
|
|
@@ -54,5 +53,9 @@ module Cr
|
|
|
54
53
|
def system?(...)
|
|
55
54
|
system(...) ? true : false
|
|
56
55
|
end
|
|
56
|
+
|
|
57
|
+
def system!(*args, **options)
|
|
58
|
+
system(*args, exception: true, **options)
|
|
59
|
+
end
|
|
57
60
|
end
|
|
58
61
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cr-exec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- initdc
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: The improved exec lib inspired from Crystal
|
|
13
13
|
email:
|
|
@@ -34,7 +34,7 @@ metadata:
|
|
|
34
34
|
allowed_push_host: https://rubygems.org
|
|
35
35
|
homepage_uri: https://github.com/initdc/cr-exec
|
|
36
36
|
source_code_uri: https://github.com/initdc/cr-exec.git
|
|
37
|
-
changelog_uri: https://github.com/initdc/cr-exec/blob/
|
|
37
|
+
changelog_uri: https://github.com/initdc/cr-exec/blob/master/CHANGELOG.md
|
|
38
38
|
rdoc_options: []
|
|
39
39
|
require_paths:
|
|
40
40
|
- lib
|
|
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
49
49
|
- !ruby/object:Gem::Version
|
|
50
50
|
version: '0'
|
|
51
51
|
requirements: []
|
|
52
|
-
rubygems_version: 3.6.
|
|
52
|
+
rubygems_version: 3.6.9
|
|
53
53
|
specification_version: 4
|
|
54
54
|
summary: Wrapper for ruby exec
|
|
55
55
|
test_files: []
|