frontkick 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +6 -5
- data/lib/frontkick/command.rb +0 -5
- data/lib/frontkick/command_result.rb +2 -0
- data/lib/frontkick/error.rb +3 -0
- data/lib/frontkick/version.rb +1 -1
- data/lib/frontkick.rb +6 -0
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2703d236dbe02b6835724780a85a7760e5771988
|
4
|
+
data.tar.gz: 3e649cb4c5805b5cf1c46acbe571f343eae52bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb378e4fbb3f54e16dd19a1dc5f302a9c1fd2d2591fe7885db3d0cb0b3ad2446bab88a7ee551265cd03922d1114541a0b2ef81749807f6dd8fc5ab7265d3b2be
|
7
|
+
data.tar.gz: 1536fd3ce09cdea8926986e83f374650febef704c71cade14c463c55b2382ee4dd54861ea46dede86f9e1e6317b84a6cee49f5f185672809d377ae3d4202349a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
testing ruby: 1.9.2, 1.9.3, 2.0.0;
|
4
4
|
|
5
|
-
Frontkick is a gem to execute a command and obtain
|
5
|
+
Frontkick is a gem to execute a command and obtain exit\_code, stdout, stderr simply, wheres, `system` does not provide all of them.
|
6
6
|
|
7
7
|
## USAGE
|
8
8
|
|
@@ -10,26 +10,27 @@ Frontkick is a gem to execute a command and obtain status code, stdout, stderr s
|
|
10
10
|
|
11
11
|
### Basic Usage
|
12
12
|
|
13
|
-
result = Frontkick
|
13
|
+
result = Frontkick.exec("echo *")
|
14
14
|
puts result.successful? #=> true if exit_code is 0
|
15
15
|
puts result.stdout #=> stdout output of the command
|
16
16
|
puts result.stderr #=> stderr output of the command
|
17
17
|
puts result.exit_code #=> exit_code of the command
|
18
18
|
puts result.duration #=> the time used to execute the command
|
19
|
+
puts result.status #=> alias to exit_code
|
19
20
|
|
20
21
|
### Escape Command
|
21
22
|
|
22
|
-
result = Frontkick
|
23
|
+
result = Frontkick.exec(["echo", "*"]) #=> echo the asterisk character
|
23
24
|
|
24
25
|
### Timeout Option
|
25
26
|
|
26
|
-
Frontkick
|
27
|
+
Frontkick.exec("sleep 2 && ls /hoge", :timeout => 1)
|
27
28
|
|
28
29
|
### Exclusive Option
|
29
30
|
|
30
31
|
Prohibit another process to run a command concurrently
|
31
32
|
|
32
|
-
Frontkick
|
33
|
+
Frontkick.exec("sleep 2 && ls /hoge", :exclusive => "/tmp/frontkick.lock") # raises Fontkick::Locked if locked
|
33
34
|
|
34
35
|
## Contributing
|
35
36
|
|
data/lib/frontkick/command.rb
CHANGED
data/lib/frontkick/version.rb
CHANGED
data/lib/frontkick.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frontkick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Execute a command simply!
|
@@ -59,9 +59,9 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
63
|
-
- .rspec
|
64
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
65
|
- CHANGELOG.md
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- lib/frontkick.rb
|
72
72
|
- lib/frontkick/command.rb
|
73
73
|
- lib/frontkick/command_result.rb
|
74
|
+
- lib/frontkick/error.rb
|
74
75
|
- lib/frontkick/version.rb
|
75
76
|
- spec/spec_helper.rb
|
76
77
|
homepage: https://github.com/sonots/frontkick
|
@@ -82,17 +83,17 @@ require_paths:
|
|
82
83
|
- lib
|
83
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
85
|
requirements:
|
85
|
-
- -
|
86
|
+
- - ">="
|
86
87
|
- !ruby/object:Gem::Version
|
87
88
|
version: '0'
|
88
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
90
|
requirements:
|
90
|
-
- -
|
91
|
+
- - ">="
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
95
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.2.2
|
96
97
|
signing_key:
|
97
98
|
specification_version: 4
|
98
99
|
summary: Execute a command simply!
|