lucie-cmd 0.0.17 → 0.0.18

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: 5537cb96d16031222139051be054987547495fa2
4
- data.tar.gz: 45d42fac474693b0dcdcd33c9f9ef2f110a22c86
3
+ metadata.gz: 4958971b4d46b874b201b7c3f7dc71b19332a2ec
4
+ data.tar.gz: 8d79bf77eb1b5e7dfa1d2490223eff9df1293582
5
5
  SHA512:
6
- metadata.gz: ea3d0d167e371a8240bad8a5317815e2c853d420782dde1f5496fe4f803b0b622ebf106d58413cbbc038a04f65de458ccfff310c5ef2ba623d8c83bf5371a7fe
7
- data.tar.gz: 991256bafd7ec65ab0311f3c7b228d45b18dadb6a0d0b189141f22fc61ee4c91e112d5e6d9c5d3208515e6c4e328401b0c8b623f74de2fb06e623d75c8ebc045
6
+ metadata.gz: d834f7797e6c19d7bce612ec3e3d159b80f506b7192df54da01faa9d5de6a661e5854f0713e3ae5a1100e2e8afbdb5700784bd223af99d79d84da9601e65948f
7
+ data.tar.gz: 673665098f3b5d9b2f3e87baf7586d92f495bff3c1f4f57ea486847bf9fbbe6b68cb73ae17a80041c10daedfee812e6f5424dea6170342279974eef4fa590f76
@@ -1,4 +1,4 @@
1
- require 'open4'
1
+ require 'open3'
2
2
 
3
3
  module Lucie
4
4
  module Commands
@@ -80,24 +80,20 @@ module Lucie
80
80
  puts "$ #{command}"
81
81
  end
82
82
 
83
- @status = Open4::popen4("cd \"#{pwd}\" && #{command}") do |pid, stdin, stdout, stderr|
84
- @pid = pid
85
- @output = ""
86
- if !stdout.eof
87
- new_content = stdout.read
88
- if @opts.include? :live_output
89
- print new_content
90
- end
91
- @output << new_content
92
- end
93
- if !stderr.eof
94
- new_content = stderr.read
95
- if @opts.include? :live_output
96
- @stderr.print new_content
97
- end
98
- @output << new_content
83
+ @output = ""
84
+
85
+ Open3.popen3("cd \"#{pwd}\" && #{command}") {|stdin, stdout, stderr, wait_thr|
86
+ @pid = wait_thr.pid # pid of the started process.
87
+
88
+ if @opts.include? :live_output
89
+ puts stdout.read if !stdout.eof
90
+ @stderr << stderr.read if !stderr.eof
99
91
  end
100
- end
92
+ @output << stdout.read if !stdout.eof
93
+ @output << stderr.read if !stderr.eof
94
+
95
+ @status = wait_thr.value # Process::Status object returned.
96
+ }
101
97
  end
102
98
 
103
99
  def output
data/lucie-cmd.gemspec CHANGED
@@ -22,5 +22,4 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "minitest", "4.6"
23
23
  s.add_development_dependency "mini_shoulda", "0.4.0"
24
24
  s.add_development_dependency "sdoc"
25
- s.add_dependency "open4", "1.3.0"
26
25
  end
@@ -25,7 +25,7 @@ class CdTest < MiniTest::Spec
25
25
  end
26
26
 
27
27
  it "should log the cd path on console when live_output is on" do
28
- out, err = capture_io do
28
+ out, _ = capture_io do
29
29
  set :live_output
30
30
  cd "/tmp"
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucie-cmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nucc
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: open4
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 1.3.0
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 1.3.0
83
69
  description: Shell command for Lucie command line utility framework
84
70
  email:
85
71
  - nucc@bteam.hu