kommando 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/examples/live_output.rb +7 -0
- data/lib/kommando.rb +4 -1
- data/lib/kommando/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21c7dae7504adc6c8d020d36a15040145cb539b2
|
4
|
+
data.tar.gz: 6e13903d3610a520f87759feefbf810b9f60e8ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20709e235f978d408c0a8b4b0e596a2c3d5b8ebc1dcfe9b3c902737f324450d12423633e4801e12a30b8e29d596bb764a2f6810e0ec80023eb7555b3bb329e70
|
7
|
+
data.tar.gz: 48cb28a22b828a1dd39561b88f9f5bf344453385cbbf4edc304b1e0dba2bbe64279f71a7bcbc19ee8d87d91287474e6f89103e95d1b0065706fa411c8677734b
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.0.3
|
4
|
+
Outputs to standard out while executing.
|
5
|
+
|
6
|
+
- FEAT: Output with `Kommando.new "ping -c 1 google.com", output: true`
|
7
|
+
- EXAMPLES: `live_output` added.
|
8
|
+
|
3
9
|
## 0.0.2
|
4
|
-
Actually useful
|
10
|
+
Actually useful initial release.
|
5
11
|
|
6
12
|
- FEAT: Runs commands with arguments `Kommando.new "ping -c 1 google.com"`
|
7
13
|
- FEAT: Captures error code in `k.code`
|
data/lib/kommando.rb
CHANGED
@@ -6,9 +6,11 @@ require_relative "kommando/buffer"
|
|
6
6
|
|
7
7
|
class Kommando
|
8
8
|
|
9
|
-
def initialize(cmd)
|
9
|
+
def initialize(cmd, opts={})
|
10
10
|
@cmd = cmd
|
11
11
|
@stdout = Buffer.new
|
12
|
+
|
13
|
+
@output = opts[:output] == true
|
12
14
|
end
|
13
15
|
|
14
16
|
def run
|
@@ -23,6 +25,7 @@ class Kommando
|
|
23
25
|
|
24
26
|
c = stdout.getc
|
25
27
|
@stdout.append c if c
|
28
|
+
print c if @output
|
26
29
|
end
|
27
30
|
end
|
28
31
|
thread_stdout.join
|
data/lib/kommando/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kommando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- bin/reinstall
|
103
103
|
- bin/setup
|
104
104
|
- examples/exit.rb
|
105
|
+
- examples/live_output.rb
|
105
106
|
- examples/ping.rb
|
106
107
|
- examples/uptime.rb
|
107
108
|
- kommando.gemspec
|