command-builder 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,4 +1,7 @@
1
1
 
2
+ 0.2.1 (2011-10-18)
3
+ * #execute yields both output and done indicator
4
+
2
5
  0.2.0 (2011-07-30)
3
6
  * asynchronous executing support using 'pipe-run'
4
7
  * two more aliases for the #execute method
data/Gemfile.lock CHANGED
@@ -2,13 +2,15 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  git (1.2.5)
5
- hash-utils (0.18.0)
5
+ hash-utils (0.19.0)
6
+ ruby-version
6
7
  jeweler (1.6.4)
7
8
  bundler (~> 1.0)
8
9
  git (>= 1.2.5)
9
10
  rake
10
11
  pipe-run (0.2.1)
11
12
  rake (0.9.2)
13
+ ruby-version (0.3.1)
12
14
 
13
15
  PLATFORMS
14
16
  ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -4,13 +4,13 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{command-builder}
8
- s.version = "0.2.0"
7
+ s.name = "command-builder"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Martin Kozák}]
12
- s.date = %q{2011-07-30}
13
- s.email = %q{martinkozak@martinkozak.net}
11
+ s.authors = ["Martin Koz\u{e1}k"]
12
+ s.date = "2011-10-18"
13
+ s.email = "martinkozak@martinkozak.net"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
16
16
  "README.md"
@@ -28,11 +28,11 @@ Gem::Specification.new do |s|
28
28
  "lib/command-builder.rb",
29
29
  "test.rb"
30
30
  ]
31
- s.homepage = %q{https://github.com/martinkozak/command-builder}
32
- s.licenses = [%q{MIT}]
33
- s.require_paths = [%q{lib}]
34
- s.rubygems_version = %q{1.8.5}
35
- s.summary = %q{Builds command runnable from shell by simple and ellegant way. Also allows both synchronous executing or asynchronous one using EventMachine.}
31
+ s.homepage = "https://github.com/martinkozak/command-builder"
32
+ s.licenses = ["MIT"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = "1.8.11"
35
+ s.summary = "Builds command runnable from shell by simple and ellegant way. Also allows both synchronous executing or asynchronous one using EventMachine."
36
36
 
37
37
  if s.respond_to? :specification_version then
38
38
  s.specification_version = 3
@@ -234,7 +234,14 @@ class CommandBuilder
234
234
  #
235
235
 
236
236
  def execute(&block)
237
- Pipe::run(self.to_s, &block)
237
+ callback = nil
238
+ if not block.nil?
239
+ callback = Proc::new do |out|
240
+ block.call(out, out.strip.empty?)
241
+ end
242
+ end
243
+
244
+ Pipe::run(self.to_s, &callback)
238
245
  end
239
246
 
240
247
  alias :exec :execute
metadata CHANGED
@@ -1,71 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: command-builder
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
4
5
  prerelease:
5
- version: 0.2.0
6
6
  platform: ruby
7
- authors:
8
- - "Martin Koz\xC3\xA1k"
7
+ authors:
8
+ - Martin Kozák
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-30 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: hash-utils
17
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &24378480 !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
22
21
  version: 0.18.0
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *24378480
25
+ - !ruby/object:Gem::Dependency
27
26
  name: pipe-run
28
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &24377300 !ruby/object:Gem::Requirement
29
28
  none: false
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
33
32
  version: 0.2.1
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *24377300
36
+ - !ruby/object:Gem::Dependency
38
37
  name: bundler
39
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &24351440 !ruby/object:Gem::Requirement
40
39
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
44
43
  version: 1.0.0
45
44
  type: :development
46
45
  prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *24351440
47
+ - !ruby/object:Gem::Dependency
49
48
  name: jeweler
50
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &24350620 !ruby/object:Gem::Requirement
51
50
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
55
54
  version: 1.5.2
56
55
  type: :development
57
56
  prerelease: false
58
- version_requirements: *id004
57
+ version_requirements: *24350620
59
58
  description:
60
59
  email: martinkozak@martinkozak.net
61
60
  executables: []
62
-
63
61
  extensions: []
64
-
65
- extra_rdoc_files:
62
+ extra_rdoc_files:
66
63
  - LICENSE.txt
67
64
  - README.md
68
- files:
65
+ files:
69
66
  - .document
70
67
  - CHANGES.txt
71
68
  - Gemfile
@@ -78,34 +75,32 @@ files:
78
75
  - lib/command-builder.rb
79
76
  - test.rb
80
77
  homepage: https://github.com/martinkozak/command-builder
81
- licenses:
78
+ licenses:
82
79
  - MIT
83
80
  post_install_message:
84
81
  rdoc_options: []
85
-
86
- require_paths:
82
+ require_paths:
87
83
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
84
+ required_ruby_version: !ruby/object:Gem::Requirement
89
85
  none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- hash: -3638148640227519764
94
- segments:
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ segments:
95
91
  - 0
96
- version: "0"
97
- required_rubygems_version: !ruby/object:Gem::Requirement
92
+ hash: 2847174649961894634
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
94
  none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: "0"
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
103
99
  requirements: []
104
-
105
100
  rubyforge_project:
106
- rubygems_version: 1.8.5
101
+ rubygems_version: 1.8.11
107
102
  signing_key:
108
103
  specification_version: 3
109
- summary: Builds command runnable from shell by simple and ellegant way. Also allows both synchronous executing or asynchronous one using EventMachine.
104
+ summary: Builds command runnable from shell by simple and ellegant way. Also allows
105
+ both synchronous executing or asynchronous one using EventMachine.
110
106
  test_files: []
111
-