command-builder 0.3.1 → 0.3.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 +7 -0
- data/CHANGES.txt +4 -1
- data/Gemfile +0 -1
- data/Gemfile.lock +43 -11
- data/LICENSE.txt +1 -1
- data/README.md +19 -24
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/command-builder.gemspec +8 -10
- data/lib/command-builder.rb +56 -58
- metadata +16 -43
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6e53978dd419ed520039e31552e486d4fb5071ff
|
4
|
+
data.tar.gz: 56a7bcd301c5f7852dbf1caa0d6320c5533a2f61
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f5e0fbbaf5c352d58d818b946e3da891ed2a61ab327dc654c6c81bec3bd5aada5194c31296777d173695964d5c9faea8c46702364ab49000454372dcd41d4711
|
7
|
+
data.tar.gz: d2af5c0fb4cf94f318376731c3d51fa9eb5e7c6d14376ccf4af83e5192f2fbb2e01722c9ea9002a1f9cd1f7565820d3723bdf084fff275b3588a9b6368dc796f
|
data/CHANGES.txt
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
|
2
|
+
0.3.2 (2015-07-18)
|
3
|
+
* 'hash-utils' dependency removed
|
4
|
+
|
2
5
|
0.3.1 (2012-10-06)
|
3
6
|
* #empty? method added
|
4
7
|
|
@@ -21,5 +24,5 @@
|
|
21
24
|
* #reset method added
|
22
25
|
* internal switch to more modern 'hash-utils'
|
23
26
|
|
24
|
-
0.1.0 (2011-02-16)
|
27
|
+
0.1.0 (2011-02-16)
|
25
28
|
* initial version
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,26 +1,58 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
addressable (2.3.8)
|
5
|
+
builder (3.2.2)
|
6
|
+
descendants_tracker (0.0.4)
|
7
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
8
|
+
faraday (0.9.1)
|
9
|
+
multipart-post (>= 1.2, < 3)
|
10
|
+
git (1.2.9.1)
|
11
|
+
github_api (0.12.3)
|
12
|
+
addressable (~> 2.3)
|
13
|
+
descendants_tracker (~> 0.0.4)
|
14
|
+
faraday (~> 0.8, < 0.10)
|
15
|
+
hashie (>= 3.3)
|
16
|
+
multi_json (>= 1.7.5, < 2.0)
|
17
|
+
nokogiri (~> 1.6.3)
|
18
|
+
oauth2
|
19
|
+
hashie (3.4.2)
|
20
|
+
highline (1.7.2)
|
21
|
+
jeweler (2.0.1)
|
22
|
+
builder
|
23
|
+
bundler (>= 1.0)
|
9
24
|
git (>= 1.2.5)
|
25
|
+
github_api
|
26
|
+
highline (>= 1.6.15)
|
27
|
+
nokogiri (>= 1.5.10)
|
10
28
|
rake
|
11
29
|
rdoc
|
12
|
-
|
30
|
+
jwt (1.5.1)
|
31
|
+
mini_portile (0.6.2)
|
32
|
+
multi_json (1.11.2)
|
33
|
+
multi_xml (0.5.5)
|
34
|
+
multipart-post (2.0.0)
|
35
|
+
nokogiri (1.6.6.2)
|
36
|
+
mini_portile (~> 0.6.0)
|
37
|
+
oauth2 (1.0.0)
|
38
|
+
faraday (>= 0.8, < 0.10)
|
39
|
+
jwt (~> 1.0)
|
40
|
+
multi_json (~> 1.3)
|
41
|
+
multi_xml (~> 0.5)
|
42
|
+
rack (~> 1.2)
|
13
43
|
pipe-run (0.3.0)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
44
|
+
rack (1.6.4)
|
45
|
+
rake (10.4.2)
|
46
|
+
rdoc (4.2.0)
|
47
|
+
thread_safe (0.3.5)
|
18
48
|
|
19
49
|
PLATFORMS
|
20
50
|
ruby
|
21
51
|
|
22
52
|
DEPENDENCIES
|
23
53
|
bundler (>= 1.0.0)
|
24
|
-
hash-utils (>= 0.18.0)
|
25
54
|
jeweler
|
26
55
|
pipe-run (>= 0.2.1)
|
56
|
+
|
57
|
+
BUNDLED WITH
|
58
|
+
1.10.5
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011 -
|
1
|
+
Copyright (c) 2011 - 2015 Martin Kozák (martinkozak@martinkozak.net)
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,25 +1,29 @@
|
|
1
1
|
Command Builder
|
2
2
|
===============
|
3
3
|
|
4
|
-
**command-builder** builds command runnable from shell by simple and
|
5
|
-
ellegant way. Also allows both synchronous executing or asynchronous
|
6
|
-
one using [EventMachine][1]. Here is an real example of call
|
4
|
+
**command-builder** builds command runnable from shell by simple and
|
5
|
+
ellegant way. Also allows both synchronous executing or asynchronous
|
6
|
+
one using [EventMachine][1]. Here is an real example of call
|
7
7
|
to `jpegoptim`:
|
8
8
|
|
9
|
+
```ruby
|
9
10
|
require "command-builder"
|
10
11
|
cmd = CommandBuilder::new(:jpegoptim)
|
11
|
-
|
12
|
+
|
12
13
|
cmd.arg(:m, 2)
|
13
14
|
cmd << :preserve
|
14
15
|
cmd << "image.jpg"
|
15
|
-
|
16
|
+
|
16
17
|
cmd.to_s # will return 'jpegoptim -m 2 --preserve image.jpg'
|
17
|
-
|
18
|
-
|
18
|
+
```
|
19
|
+
|
20
|
+
Value escaping and assignments are supported automatically of sure,
|
19
21
|
so call:
|
20
22
|
|
23
|
+
```ruby
|
21
24
|
cmd.arg(:dest, './it\'s "my" folder')
|
22
|
-
|
25
|
+
```
|
26
|
+
|
23
27
|
…will be interpreted as `jpegoptim --dest="it's \"my\" folder"`. It also
|
24
28
|
takes spaces into the account.
|
25
29
|
|
@@ -31,9 +35,9 @@ Command can be executed directly by call:
|
|
31
35
|
cmd.execute do |output| # ...for asynchronous executing
|
32
36
|
# ...
|
33
37
|
end
|
34
|
-
|
38
|
+
|
35
39
|
Asynchronous executing requires [EventMachine][1] environment to be run.
|
36
|
-
|
40
|
+
|
37
41
|
|
38
42
|
### Flexibility
|
39
43
|
|
@@ -41,31 +45,22 @@ Syntax described above is supported by default, but you can achieve for
|
|
41
45
|
example an Windows like syntax:
|
42
46
|
|
43
47
|
jpegoptim /m:2 -dest "directory"
|
44
|
-
|
48
|
+
|
45
49
|
…simply by assigning:
|
46
50
|
|
51
|
+
```ruby
|
47
52
|
cmd.separators = ["/", ":", "-", " "]
|
53
|
+
```
|
48
54
|
|
49
55
|
For illustration, the default one is `["-", " ", "--", "="]`.
|
50
56
|
|
51
|
-
|
52
|
-
Contributing
|
53
|
-
------------
|
54
|
-
|
55
|
-
1. Fork it.
|
56
|
-
2. Create a branch (`git checkout -b 20101220-my-change`).
|
57
|
-
3. Commit your changes (`git commit -am "Added something"`).
|
58
|
-
4. Push to the branch (`git push origin 20101220-my-change`).
|
59
|
-
5. Create an [Issue][2] with a link to your branch.
|
60
|
-
6. Enjoy a refreshing Diet Coke and wait.
|
61
|
-
|
62
57
|
|
63
58
|
Copyright
|
64
59
|
---------
|
65
60
|
|
66
|
-
Copyright © 2011 [Martin
|
61
|
+
Copyright © 2011 – 2015 [Martin Poljak][3]. See `LICENSE.txt` for
|
67
62
|
further details.
|
68
63
|
|
69
64
|
[1]: http://rubyeventmachine.com/
|
70
65
|
[2]: http://github.com/martinkozak/command-builder/issues
|
71
|
-
[3]: http://www.
|
66
|
+
[3]: http://www.martinpoljak.net/
|
data/Rakefile
CHANGED
@@ -19,8 +19,8 @@ Jeweler::Tasks.new do |gem|
|
|
19
19
|
gem.homepage = "https://github.com/martinkozak/command-builder"
|
20
20
|
gem.license = "MIT"
|
21
21
|
gem.summary = 'Builds command runnable from shell by simple and elegant way. Allows both synchronous executing or asynchronous using EventMachine.'
|
22
|
-
gem.email = "
|
23
|
-
gem.authors = ["Martin
|
22
|
+
gem.email = "martin@poljak.cz"
|
23
|
+
gem.authors = ["Martin Poljak"]
|
24
24
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
25
25
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
26
26
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/command-builder.gemspec
CHANGED
@@ -2,15 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: command-builder 0.3.2 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "command-builder"
|
8
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.2"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Martin Poljak"]
|
14
|
+
s.date = "2015-07-18"
|
15
|
+
s.email = "martin@poljak.cz"
|
14
16
|
s.extra_rdoc_files = [
|
15
17
|
"LICENSE.txt",
|
16
18
|
"README.md"
|
@@ -30,26 +32,22 @@ Gem::Specification.new do |s|
|
|
30
32
|
]
|
31
33
|
s.homepage = "https://github.com/martinkozak/command-builder"
|
32
34
|
s.licenses = ["MIT"]
|
33
|
-
s.
|
34
|
-
s.rubygems_version = "1.8.24"
|
35
|
+
s.rubygems_version = "2.4.5"
|
35
36
|
s.summary = "Builds command runnable from shell by simple and elegant way. Allows both synchronous executing or asynchronous using EventMachine."
|
36
37
|
|
37
38
|
if s.respond_to? :specification_version then
|
38
|
-
s.specification_version =
|
39
|
+
s.specification_version = 4
|
39
40
|
|
40
41
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
-
s.add_runtime_dependency(%q<hash-utils>, [">= 0.18.0"])
|
42
42
|
s.add_runtime_dependency(%q<pipe-run>, [">= 0.2.1"])
|
43
43
|
s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
|
44
44
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
45
45
|
else
|
46
|
-
s.add_dependency(%q<hash-utils>, [">= 0.18.0"])
|
47
46
|
s.add_dependency(%q<pipe-run>, [">= 0.2.1"])
|
48
47
|
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
49
48
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
50
49
|
end
|
51
50
|
else
|
52
|
-
s.add_dependency(%q<hash-utils>, [">= 0.18.0"])
|
53
51
|
s.add_dependency(%q<pipe-run>, [">= 0.2.1"])
|
54
52
|
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
55
53
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
data/lib/command-builder.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
|
-
# (c) 2011-
|
3
|
+
# (c) 2011-2015 Martin Poljak (martin@poljak.cz)
|
4
4
|
# Patched by Jacob Evans (jacob@dekz.net).
|
5
5
|
|
6
|
-
require "hash-utils/object"
|
7
|
-
require "hash-utils/array"
|
8
6
|
require "shellwords"
|
9
7
|
require "pipe-run"
|
10
8
|
|
@@ -21,7 +19,7 @@ class CommandBuilder
|
|
21
19
|
|
22
20
|
attr_accessor :command
|
23
21
|
@command
|
24
|
-
|
22
|
+
|
25
23
|
##
|
26
24
|
# Holds separators matrix. It's four-items array:
|
27
25
|
# - short argument separator,
|
@@ -36,12 +34,12 @@ class CommandBuilder
|
|
36
34
|
#
|
37
35
|
# @return [Array] separators matrix
|
38
36
|
#
|
39
|
-
|
37
|
+
|
40
38
|
attr_accessor :separators
|
41
39
|
@separators
|
42
|
-
|
40
|
+
|
43
41
|
##
|
44
|
-
# Holds arguments array. Each item is array pair with argument
|
42
|
+
# Holds arguments array. Each item is array pair with argument
|
45
43
|
# name and value.
|
46
44
|
#
|
47
45
|
# @return [Array] array of argument pairs
|
@@ -49,13 +47,13 @@ class CommandBuilder
|
|
49
47
|
|
50
48
|
attr_accessor :args
|
51
49
|
@args
|
52
|
-
|
50
|
+
|
53
51
|
##
|
54
52
|
# Holds parameters array.
|
55
53
|
#
|
56
|
-
|
54
|
+
|
57
55
|
@params
|
58
|
-
|
56
|
+
|
59
57
|
##
|
60
58
|
# Constructor.
|
61
59
|
#
|
@@ -63,17 +61,17 @@ class CommandBuilder
|
|
63
61
|
# @param [Array] separators separators matrix
|
64
62
|
# @see #separators
|
65
63
|
#
|
66
|
-
|
64
|
+
|
67
65
|
def initialize(command, separators = ["-", " ", "--", "="])
|
68
66
|
@command = command
|
69
67
|
@separators = separators
|
70
68
|
self.reset!
|
71
69
|
end
|
72
|
-
|
70
|
+
|
73
71
|
##
|
74
72
|
# Adds argument to command.
|
75
73
|
#
|
76
|
-
# One-letter arguments will be treated as "short" arguments for the
|
74
|
+
# One-letter arguments will be treated as "short" arguments for the
|
77
75
|
# syntax purposes, other as "long". See {#separators}.
|
78
76
|
#
|
79
77
|
# @example with default set of {#separators}
|
@@ -87,46 +85,46 @@ class CommandBuilder
|
|
87
85
|
# @cmd[:m] = 2 # will be rendered as 'jpegoptim -m 2'
|
88
86
|
# @cmd[:max] = 2 # will be rendered as 'jpegoptim -m 2 --max=2'
|
89
87
|
#
|
90
|
-
# # But be warn, it pushes to arguments array as you can se, so
|
88
|
+
# # But be warn, it pushes to arguments array as you can se, so
|
91
89
|
# # already existing values will not be replaced!
|
92
90
|
#
|
93
91
|
# @param [String, Symbol] name of the argument
|
94
92
|
# @param [Object] value of the argument
|
95
93
|
#
|
96
|
-
|
94
|
+
|
97
95
|
def argument(name, value = nil)
|
98
96
|
@args << [name, value]
|
99
97
|
@order << :argument
|
100
98
|
end
|
101
|
-
|
99
|
+
|
102
100
|
alias :arg :argument
|
103
101
|
alias :[]= :argument
|
104
|
-
|
102
|
+
|
105
103
|
##
|
106
104
|
# Returns array of argument pairs with given name.
|
107
105
|
#
|
108
106
|
# @param [String, Symbol] name argument name
|
109
107
|
# @return [Array] array of array pairs with this name
|
110
108
|
#
|
111
|
-
|
109
|
+
|
112
110
|
def [](name)
|
113
|
-
@args.select { |k, v| name == k }
|
111
|
+
@args.select { |k, v| name == k }
|
114
112
|
end
|
115
|
-
|
113
|
+
|
116
114
|
##
|
117
115
|
# Adds parameter to command.
|
118
116
|
# @param [Object] value value of the prameter convertable to String.
|
119
|
-
#
|
120
|
-
|
117
|
+
#
|
118
|
+
|
121
119
|
def parameter(value)
|
122
120
|
@params << value
|
123
121
|
@order << :parameter
|
124
122
|
end
|
125
|
-
|
123
|
+
|
126
124
|
alias :param :parameter
|
127
|
-
|
125
|
+
|
128
126
|
##
|
129
|
-
# Adds multiple parameters to command at once. If no values are
|
127
|
+
# Adds multiple parameters to command at once. If no values are
|
130
128
|
# given, returns the current parameters array.
|
131
129
|
#
|
132
130
|
# @overload parameters
|
@@ -137,7 +135,7 @@ class CommandBuilder
|
|
137
135
|
# @param [Array] values array of values
|
138
136
|
# @see #parameter
|
139
137
|
#
|
140
|
-
|
138
|
+
|
141
139
|
def parameters(values = nil)
|
142
140
|
if values.nil?
|
143
141
|
return @params
|
@@ -147,7 +145,7 @@ class CommandBuilder
|
|
147
145
|
@order.push(*orders)
|
148
146
|
end
|
149
147
|
end
|
150
|
-
|
148
|
+
|
151
149
|
alias :params :parameters
|
152
150
|
|
153
151
|
##
|
@@ -174,25 +172,25 @@ class CommandBuilder
|
|
174
172
|
# cmd << :preserve # will be rendered as 'jpegoptim --preserve'
|
175
173
|
# cmd << "file.jpg" # will be rendered as 'jpegoptiom --preserve file.jpg'
|
176
174
|
#
|
177
|
-
|
175
|
+
|
178
176
|
def add(option, value = nil)
|
179
|
-
if option.
|
177
|
+
if option.kind_of? Symbol or not value.nil?
|
180
178
|
self.argument(option, value)
|
181
|
-
elsif option.
|
179
|
+
elsif option.kind_of? Array
|
182
180
|
self.parameters(option)
|
183
181
|
else
|
184
182
|
self.parameter(option)
|
185
183
|
end
|
186
184
|
end
|
187
|
-
|
185
|
+
|
188
186
|
alias :<< :add
|
189
|
-
|
187
|
+
|
190
188
|
##
|
191
189
|
# Quotes value for use in command line.
|
192
190
|
#
|
193
|
-
# Uses some heuristic for setting the right quotation. If both
|
191
|
+
# Uses some heuristic for setting the right quotation. If both
|
194
192
|
# " and ' are found, escapes ' by \ and quotes by ". If only one of
|
195
|
-
# them found, escapes by the second one. If space found in the
|
193
|
+
# them found, escapes by the second one. If space found in the
|
196
194
|
# string, quotes by " too.
|
197
195
|
#
|
198
196
|
# @example
|
@@ -205,21 +203,21 @@ class CommandBuilder
|
|
205
203
|
# @param [String] value string for escaping
|
206
204
|
# @return [String] quoted value
|
207
205
|
#
|
208
|
-
|
206
|
+
|
209
207
|
def quote(value)
|
210
208
|
value = value.to_s
|
211
209
|
Shellwords::escape(value)
|
212
210
|
end
|
213
|
-
|
211
|
+
|
214
212
|
##
|
215
|
-
# Executes the command. If block given, takes it output of the
|
213
|
+
# Executes the command. If block given, takes it output of the
|
216
214
|
# command and runs it asynchronously using EventMachine.
|
217
215
|
#
|
218
216
|
# @see https://github.com/martinkozak/pipe-run
|
219
217
|
# @param [Proc] block if asynchronous run
|
220
218
|
# @return [String] output of the command or nil if asynchronous
|
221
219
|
#
|
222
|
-
|
220
|
+
|
223
221
|
def execute(&block)
|
224
222
|
callback = nil
|
225
223
|
if not block.nil?
|
@@ -227,14 +225,14 @@ class CommandBuilder
|
|
227
225
|
block.call(out, out.strip.empty?)
|
228
226
|
end
|
229
227
|
end
|
230
|
-
|
228
|
+
|
231
229
|
Pipe::run(self.to_s, &callback)
|
232
230
|
end
|
233
|
-
|
231
|
+
|
234
232
|
alias :exec :execute
|
235
233
|
alias :"exec!" :execute
|
236
234
|
alias :"execute!" :execute
|
237
|
-
|
235
|
+
|
238
236
|
##
|
239
237
|
# Converts command to string.
|
240
238
|
# @return [String] command in string form
|
@@ -244,7 +242,7 @@ class CommandBuilder
|
|
244
242
|
cmd = @command.to_s.gsub(" ", "\\ ")
|
245
243
|
args = @args.dup
|
246
244
|
params = @params.dup
|
247
|
-
|
245
|
+
|
248
246
|
@order.each do |type|
|
249
247
|
if type == :argument
|
250
248
|
name, value = args.shift
|
@@ -257,62 +255,62 @@ class CommandBuilder
|
|
257
255
|
|
258
256
|
return cmd
|
259
257
|
end
|
260
|
-
|
258
|
+
|
261
259
|
##
|
262
260
|
# Resets the arguments and parameters so prepares it for new build.
|
263
261
|
#
|
264
262
|
# @return [CommandBuilder] self instance
|
265
263
|
# @since 0.1.1
|
266
264
|
#
|
267
|
-
|
265
|
+
|
268
266
|
def reset!
|
269
267
|
@args = [ ]
|
270
268
|
@params = [ ]
|
271
269
|
@order = [ ]
|
272
270
|
self
|
273
271
|
end
|
274
|
-
|
272
|
+
|
275
273
|
alias :reset :"reset!"
|
276
|
-
|
274
|
+
|
277
275
|
|
278
276
|
##
|
279
277
|
# Returns whether this command has any either arguments or parameters set.
|
280
278
|
# @return [Boolean]
|
281
279
|
#
|
282
|
-
|
280
|
+
|
283
281
|
def empty?
|
284
282
|
@args.empty? and @params.empty?
|
285
283
|
end
|
286
|
-
|
284
|
+
|
287
285
|
private
|
288
|
-
|
286
|
+
|
289
287
|
##
|
290
288
|
# Adds argument to command.
|
291
289
|
#
|
292
|
-
|
290
|
+
|
293
291
|
def __add_arg(cmd, name, value)
|
294
292
|
cmd << " "
|
295
293
|
name = name.to_s
|
296
|
-
|
294
|
+
|
297
295
|
# Name
|
298
296
|
short = (name.length == 1)
|
299
|
-
|
297
|
+
|
300
298
|
if short
|
301
|
-
cmd << @separators
|
299
|
+
cmd << @separators[0]
|
302
300
|
else
|
303
|
-
cmd << @separators
|
301
|
+
cmd << @separators[2]
|
304
302
|
end
|
305
303
|
cmd << name
|
306
|
-
|
304
|
+
|
307
305
|
# Value
|
308
306
|
if not value.nil?
|
309
307
|
if short
|
310
|
-
cmd << @separators
|
308
|
+
cmd << @separators[1]
|
311
309
|
else
|
312
|
-
cmd << @separators
|
310
|
+
cmd << @separators[3]
|
313
311
|
end
|
314
312
|
cmd << self.quote(value.to_s)
|
315
313
|
end
|
316
314
|
end
|
317
|
-
|
315
|
+
|
318
316
|
end
|
metadata
CHANGED
@@ -1,89 +1,66 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
- Martin
|
7
|
+
- Martin Poljak
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-07-18 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: hash-utils
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.18.0
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.18.0
|
30
13
|
- !ruby/object:Gem::Dependency
|
31
14
|
name: pipe-run
|
32
15
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
16
|
requirements:
|
35
|
-
- -
|
17
|
+
- - ">="
|
36
18
|
- !ruby/object:Gem::Version
|
37
19
|
version: 0.2.1
|
38
20
|
type: :runtime
|
39
21
|
prerelease: false
|
40
22
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
23
|
requirements:
|
43
|
-
- -
|
24
|
+
- - ">="
|
44
25
|
- !ruby/object:Gem::Version
|
45
26
|
version: 0.2.1
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
28
|
name: bundler
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - ">="
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: 1.0.0
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- -
|
38
|
+
- - ">="
|
60
39
|
- !ruby/object:Gem::Version
|
61
40
|
version: 1.0.0
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: jeweler
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - ">="
|
68
46
|
- !ruby/object:Gem::Version
|
69
47
|
version: '0'
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- -
|
52
|
+
- - ">="
|
76
53
|
- !ruby/object:Gem::Version
|
77
54
|
version: '0'
|
78
55
|
description:
|
79
|
-
email:
|
56
|
+
email: martin@poljak.cz
|
80
57
|
executables: []
|
81
58
|
extensions: []
|
82
59
|
extra_rdoc_files:
|
83
60
|
- LICENSE.txt
|
84
61
|
- README.md
|
85
62
|
files:
|
86
|
-
- .document
|
63
|
+
- ".document"
|
87
64
|
- CHANGES.txt
|
88
65
|
- Gemfile
|
89
66
|
- Gemfile.lock
|
@@ -97,30 +74,26 @@ files:
|
|
97
74
|
homepage: https://github.com/martinkozak/command-builder
|
98
75
|
licenses:
|
99
76
|
- MIT
|
77
|
+
metadata: {}
|
100
78
|
post_install_message:
|
101
79
|
rdoc_options: []
|
102
80
|
require_paths:
|
103
81
|
- lib
|
104
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
83
|
requirements:
|
107
|
-
- -
|
84
|
+
- - ">="
|
108
85
|
- !ruby/object:Gem::Version
|
109
86
|
version: '0'
|
110
|
-
segments:
|
111
|
-
- 0
|
112
|
-
hash: -4410984132637987331
|
113
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
88
|
requirements:
|
116
|
-
- -
|
89
|
+
- - ">="
|
117
90
|
- !ruby/object:Gem::Version
|
118
91
|
version: '0'
|
119
92
|
requirements: []
|
120
93
|
rubyforge_project:
|
121
|
-
rubygems_version:
|
94
|
+
rubygems_version: 2.4.5
|
122
95
|
signing_key:
|
123
|
-
specification_version:
|
96
|
+
specification_version: 4
|
124
97
|
summary: Builds command runnable from shell by simple and elegant way. Allows both
|
125
98
|
synchronous executing or asynchronous using EventMachine.
|
126
99
|
test_files: []
|