sbtpretty 0.2.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42671141f4cdbfcd901c7cfbc111ec2ba2715a97
4
- data.tar.gz: cf0feb9641ea18eca330a6a645279cdc6ee7dcb7
3
+ metadata.gz: c2b21f5af1e5e621bd80d1538b4bcdd0b7b33dbc
4
+ data.tar.gz: 01c3e41073cfd82708552af0b24ed7892cc1f52b
5
5
  SHA512:
6
- metadata.gz: 7ab8a8c2d5182e7b95a7491792a6e3d32796457bc5be986a82b485fcd35317420901290529f5945df93a8355c4bf3fc6da18a7808bd685cfac1defc56c4c4f57
7
- data.tar.gz: d020da9b63fb4ed1f24aeaaf38d9907bc4c4d464c5f4d8064e4a5e2a72e50144266a984279f2c1a3016cabad301818e87bf7a6e65939147ddfc33e46296a2066
6
+ metadata.gz: d7b370e609b0fa3c57169cf3da0b3825e0fa6df1b6a89d61afcb5ce2d53815d1fe391e154af0824024543e3f3c8251e94d639dbe474e3c37d8d65b988650fdc1
7
+ data.tar.gz: f2c6dab35caf18ea1e5eacead6a08505f601b9c393f0ed17d074a875da9a840cc94ae2c4df6e0d85852443f360dfeff26ebca0626a558d29b30419bbd4bbfc28
data/bin/sbtpretty CHANGED
@@ -7,3 +7,9 @@ printer.print("hello")
7
7
  STDIN.each_line do |line|
8
8
  printer.print(line)
9
9
  end
10
+
11
+ #http://robdodson.me/how-to-write-a-command-line-ruby-gem/
12
+ #https://blog.faodailtechnology.com/step-by-step-guide-to-publish-your-first-ruby-gem-bae3291aeab4
13
+
14
+ # gem build sbtpretty
15
+ # gem push sbtpretty-0.2.1.gem
@@ -1,3 +1,3 @@
1
1
  module Sbtpretty
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/sbtpretty.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "sbtpretty/version"
2
2
  require 'colorize'
3
+ require 'open3'
3
4
  module Sbtpretty
4
5
  class Printer
5
6
  :info
@@ -148,7 +149,11 @@ module Sbtpretty
148
149
  def print(line)
149
150
  line = line.chomp
150
151
  line = "echo '#{line}' | sed \"s,$(printf '\\033')\\\\[[0-9;]*[a-zA-Z],,g\" 2> /dev/null"
151
- line = `#{line}`
152
+ stdin, stdout, stderr, wait_thr = Open3.popen3(line)
153
+ val = stdout.gets
154
+ stdout.close
155
+ stderr.gets(nil)
156
+ stderr.closeline
152
157
  STDOUT.print(format(line,get_type(line)))
153
158
  STDOUT.flush
154
159
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbtpretty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avner Barr