runtime_command 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1223e519d09d6ac6f450c8d85015a70c5c5d2cff
4
- data.tar.gz: e34753557dba141fb12510a2603d7eed244ec6c9
3
+ metadata.gz: da5acc910d347224eb5475ab363724f73c3f5d22
4
+ data.tar.gz: cb5e734ad108c39c63cc23f3114c1be631587f62
5
5
  SHA512:
6
- metadata.gz: 06a809fb7e82b69c48a53cce54e2587a6c15101d1c72ae3ad9559ef9591435898ffd74abbb00f8e83f35dd2ceaa7eb3ae55fad4968770eec1f1d2a2e81130a42
7
- data.tar.gz: 15379de1b55a75e74f2419916efa9105c2e2f20b844ed0265909b60a688eae10b32574ad18d7cf2f02b3950d3031c8474beb1e3e387cd11d6aa31804a31d5ce3
6
+ metadata.gz: d1fcf0fef50ac5fa936845aa486b50688b0a0c893fb992fe93501f9343ed67be4187c44e828d5266d043d2528954cee5ebb73ef0aa13fea8ae4614f515e40200
7
+ data.tar.gz: db2f57c135c8b88535218f4bf4ce31068688134bdc6528a16930964c88fbfc61764df03b3d8eb499a3dc3e38a742f71fee814d1e32f2744cc997317fe35a8cab
data/.gitignore CHANGED
@@ -2,8 +2,10 @@
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
4
  /_yardoc/
5
- /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
@@ -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: 20
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
- Execute external command and retrive STDIN / STDOUT in real time.
3
+ [![Gem Version](https://badge.fury.io/rb/runtime_command.svg)](https://badge.fury.io/rb/runtime_command)
4
+ [![Test Coverage](https://codeclimate.com/github/naomichi-y/runtime_command/badges/coverage.svg)](https://codeclimate.com/github/naomichi-y/runtime_command/coverage)
5
+ [![Code Climate](https://codeclimate.com/github/naomichi-y/runtime_command/badges/gpa.svg)](https://codeclimate.com/github/naomichi-y/runtime_command)
6
+ [![CircleCI](https://circleci.com/gh/naomichi-y/runtime_command/tree/master.svg?style=svg)](https://circleci.com/gh/naomichi-y/runtime_command/tree/master)
4
7
 
5
- TODO: Delete this and the text above, and describe your gem
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
- $ bundle
22
+ ```
23
+ $ bundle
24
+ ```
18
25
 
19
26
  Or install it yourself as:
20
27
 
21
- $ gem install runtime_command
28
+ ```
29
+ $ gem install runtime_command
30
+ ```
22
31
 
23
32
  ## Usage
24
33
 
@@ -0,0 +1,4 @@
1
+ test:
2
+ override:
3
+ - bundle exec rspec
4
+ - bundle exec codeclimate-test-reporter tmp/coverage/.resultset.json
@@ -2,6 +2,7 @@ require 'bundler/setup'
2
2
  require 'runtime_command'
3
3
 
4
4
  command = RuntimeCommand::Builder.new
5
+ # command.colors = :default_colors
5
6
  command.exec('echo "wait 3" sec; sleep 3; echo "hello world!"')
6
7
 
7
8
  # command.output = false
@@ -10,9 +10,15 @@ module RuntimeCommand
10
10
  def initialize(output = true, colors = {})
11
11
  @output = output
12
12
 
13
- @stdin_color = colors[:stdin] || HighLine::Style.rgb(204, 204, 0)
14
- @stdout_color = colors[:stdout] || HighLine::Style.rgb(64, 64, 64)
15
- @stderr_color = colors[:stderr] || HighLine::Style.rgb(255, 51, 51)
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
@@ -1,3 +1,3 @@
1
1
  module RuntimeCommand
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
@@ -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 / STDOUT in real time.'
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.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-15 00:00:00.000000000 Z
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
- description: Execute external command and retrive STDIN / STDOUT in real time.
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.5.1
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: