teapot 1.0.0.pre.rc6 → 1.0.0.pre.rc7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef91d2c537e308cf449f142702c24e4ac5a20e4a
4
- data.tar.gz: f45f0837983ac6075d89c01f378e6bdfdadd675b
3
+ metadata.gz: 89ec99bb9d6d04670ccda7c53e838c9ac266372e
4
+ data.tar.gz: b6ee7d9d431b290ec697a19a76674a5a9e82bd98
5
5
  SHA512:
6
- metadata.gz: b3895f15934a5b63272262a6c74541ed94a24242191914179b44201b03cf8e54efe7a60c696f7ec3ac3bec6a95bf9acee09a4033dca50702a3c7b06d304cb0c0
7
- data.tar.gz: 9d03e7ee50e14df5903ccc2415063c74e1b948de5498f4eb587bb1374132ab2f5582d562a759ee2cd78ad443c909b04ad04b950861c7921c38e9c63a7443a016
6
+ metadata.gz: fce6cf29a849f8fc5047dc580b69a46b8153c611a0a89f1374e01407175f30f521e47d4aceb0060a78296586df60ee687f7118869207277b56234a4b64bc20d5
7
+ data.tar.gz: 5e499452699b8f1ed0f5b92409cbc78e862dbf108971dca638254a00fa4d9779a8f653ac17debc1f89512ea89d4091329fe9b9c22191e6e1e74146a50463ae3e
@@ -18,28 +18,27 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'rexec'
22
-
23
21
  module Teapot
24
22
  module Git
23
+ # This module needs to be refactored. Perhaps use Process::Group.
25
24
  module Commands
26
25
  class CommandError < StandardError
27
26
  end
28
27
 
29
28
  def self.run(*args, &block)
30
29
  options = Hash === args.last ? args.pop : {}
31
- options[:passthrough] ||= :all
32
-
30
+
33
31
  args = args.flatten.collect &:to_s
34
-
32
+
35
33
  puts args.join(' ').color(:blue) + " in #{options[:chdir] || Dir.getwd}"
36
-
37
- task = RExec::Task.open(args, options, &block)
38
-
39
- if task.wait == 0
34
+
35
+ pid = Process.spawn(*args, options, &block)
36
+ _, result = Process.wait2(pid)
37
+
38
+ if result.exitstatus == 0
40
39
  true
41
40
  else
42
- raise CommandError.new("Non-zero exit status: #{args.join(' ')}!")
41
+ raise CommandError.new("Non-zero exit status: #{result} while running #{args.join(' ')}!")
43
42
  end
44
43
  end
45
44
 
@@ -107,11 +106,13 @@ module Teapot
107
106
  end
108
107
 
109
108
  def status
110
- Commands.run("git", "status", "--porcelain", :passthrough => [:in, :err]) do |task|
111
- if task.wait == 0
112
- return task.output.readlines.collect{|line| line.chomp.split(/\s+/, 2)}
113
- end
114
- end
109
+ input, output = IO.pipe
110
+
111
+ Commands.run("git", "status", "--porcelain", :out => output)
112
+
113
+ output.close
114
+
115
+ return input.readlines.collect{|line| line.chomp.split(/\s+/, 2)}
115
116
  end
116
117
 
117
118
  private
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Teapot
22
- VERSION = "1.0.0-rc6"
22
+ VERSION = "1.0.0-rc7"
23
23
  end
data/teapot.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.add_dependency "graphviz", "~> 0.0.2"
35
35
 
36
- spec.add_dependency "build-files", "~> 0.2.7"
36
+ spec.add_dependency "build-files", "~> 0.2.8"
37
37
  spec.add_dependency "build-graph", "~> 0.3.5"
38
38
  spec.add_dependency "build-makefile", "~> 0.2.0"
39
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teapot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc6
4
+ version: 1.0.0.pre.rc7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.7
75
+ version: 0.2.8
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.2.7
82
+ version: 0.2.8
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: build-graph
85
85
  requirement: !ruby/object:Gem::Requirement