runtime_command 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rubocop.yml +8 -1
- data/README.md +13 -4
- data/circle.yml +4 -0
- data/example/sample.rb +1 -0
- data/lib/runtime_command/logger.rb +9 -3
- data/lib/runtime_command/version.rb +1 -1
- data/runtime_command.gemspec +4 -1
- metadata +47 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da5acc910d347224eb5475ab363724f73c3f5d22
|
4
|
+
data.tar.gz: cb5e734ad108c39c63cc23f3114c1be631587f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1fcf0fef50ac5fa936845aa486b50688b0a0c893fb992fe93501f9343ed67be4187c44e828d5266d043d2528954cee5ebb73ef0aa13fea8ae4614f515e40200
|
7
|
+
data.tar.gz: db2f57c135c8b88535218f4bf4ce31068688134bdc6528a16930964c88fbfc61764df03b3d8eb499a3dc3e38a742f71fee814d1e32f2744cc997317fe35a8cab
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,9 +1,16 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'tmp/**/*'
|
4
|
+
Style/BlockComments:
|
5
|
+
Enabled: false
|
1
6
|
Style/Documentation:
|
2
7
|
Enabled: false
|
3
8
|
Style/ExtraSpacing:
|
4
9
|
Enabled: false
|
10
|
+
Style/FrozenStringLiteralComment:
|
11
|
+
Enabled: false
|
5
12
|
Metrics/AbcSize:
|
6
|
-
Max:
|
13
|
+
Max: 64
|
7
14
|
Metrics/BlockLength:
|
8
15
|
Enabled: false
|
9
16
|
Metrics/ClassLength:
|
data/README.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# RuntimeCommand
|
2
2
|
|
3
|
-
|
3
|
+
[](https://badge.fury.io/rb/runtime_command)
|
4
|
+
[](https://codeclimate.com/github/naomichi-y/runtime_command/coverage)
|
5
|
+
[](https://codeclimate.com/github/naomichi-y/runtime_command)
|
6
|
+
[](https://circleci.com/gh/naomichi-y/runtime_command/tree/master)
|
4
7
|
|
5
|
-
|
8
|
+
# Description
|
9
|
+
|
10
|
+
Execute external command and retrive STDIN/STDOUT in real time.
|
6
11
|
|
7
12
|
## Installation
|
8
13
|
|
@@ -14,11 +19,15 @@ gem 'runtime_command'
|
|
14
19
|
|
15
20
|
And then execute:
|
16
21
|
|
17
|
-
|
22
|
+
```
|
23
|
+
$ bundle
|
24
|
+
```
|
18
25
|
|
19
26
|
Or install it yourself as:
|
20
27
|
|
21
|
-
|
28
|
+
```
|
29
|
+
$ gem install runtime_command
|
30
|
+
```
|
22
31
|
|
23
32
|
## Usage
|
24
33
|
|
data/circle.yml
ADDED
data/example/sample.rb
CHANGED
@@ -10,9 +10,15 @@ module RuntimeCommand
|
|
10
10
|
def initialize(output = true, colors = {})
|
11
11
|
@output = output
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
if colors == :default_colors
|
14
|
+
@stdin_color = nil
|
15
|
+
@stdout_color = nil
|
16
|
+
@stderr_color = nil
|
17
|
+
else
|
18
|
+
@stdin_color = colors[:stdin] || HighLine::Style.rgb(204, 204, 0)
|
19
|
+
@stdout_color = colors[:stdout] || HighLine::Style.rgb(64, 64, 64)
|
20
|
+
@stderr_color = colors[:stderr] || HighLine::Style.rgb(255, 51, 51)
|
21
|
+
end
|
16
22
|
|
17
23
|
flash
|
18
24
|
end
|
data/runtime_command.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['n.yamakita@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = 'Execute external command from Ruby.'
|
13
|
-
spec.description = 'Execute external command and retrive STDIN
|
13
|
+
spec.description = 'Execute external command and retrive STDIN/STDOUT in real time.'
|
14
14
|
spec.homepage = 'https://github.com/naomichi-y/runtime_command'
|
15
15
|
|
16
16
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
@@ -32,5 +32,8 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency 'highline'
|
33
33
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
34
34
|
spec.add_development_dependency 'rake', '~> 10.0'
|
35
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
36
|
spec.add_development_dependency 'rubocop'
|
37
|
+
spec.add_development_dependency 'simplecov'
|
38
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
36
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runtime_command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naomichi-y
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rubocop
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +80,35 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: codeclimate-test-reporter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Execute external command and retrive STDIN/STDOUT in real time.
|
70
112
|
email:
|
71
113
|
- n.yamakita@gmail.com
|
72
114
|
executables: []
|
@@ -81,6 +123,7 @@ files:
|
|
81
123
|
- Rakefile
|
82
124
|
- bin/console
|
83
125
|
- bin/setup
|
126
|
+
- circle.yml
|
84
127
|
- example/sample.rb
|
85
128
|
- lib/runtime_command.rb
|
86
129
|
- lib/runtime_command/builder.rb
|
@@ -106,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
149
|
version: '0'
|
107
150
|
requirements: []
|
108
151
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.6.10
|
110
153
|
signing_key:
|
111
154
|
specification_version: 4
|
112
155
|
summary: Execute external command from Ruby.
|
113
156
|
test_files: []
|
114
|
-
has_rdoc:
|