execute_shell 1.0.1 → 1.0.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.
- data/Gemfile +1 -1
- data/Gemfile.lock +5 -5
- data/README.md +20 -14
- data/execute_shell.gemspec +4 -3
- data/lib/execute_shell.rb +1 -1
- data/lib/execute_shell/execute_shell.rb +1 -1
- data/lib/execute_shell/shell_result.rb +1 -1
- data/test/docs/test_documentation.rb +1 -3
- metadata +8 -6
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
execute_shell (1.0.
|
4
|
+
execute_shell (1.0.2)
|
5
5
|
Platform (~> 0.4.0)
|
6
6
|
open4 (~> 1.3.0)
|
7
7
|
win32-open3-19 (~> 0.0.2)
|
@@ -11,8 +11,8 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
Platform (0.4.0)
|
13
13
|
open4 (1.3.0)
|
14
|
-
rake_tasks (2.0.
|
15
|
-
test_unit_helper (0.0.
|
14
|
+
rake_tasks (2.0.6)
|
15
|
+
test_unit_helper (0.0.2)
|
16
16
|
win32-open3-19 (0.0.2)
|
17
17
|
|
18
18
|
PLATFORMS
|
@@ -20,5 +20,5 @@ PLATFORMS
|
|
20
20
|
|
21
21
|
DEPENDENCIES
|
22
22
|
execute_shell!
|
23
|
-
rake_tasks (~> 2.0.
|
24
|
-
test_unit_helper (~> 0.0.
|
23
|
+
rake_tasks (~> 2.0.6)
|
24
|
+
test_unit_helper (~> 0.0.2)
|
data/README.md
CHANGED
@@ -2,51 +2,52 @@ Welcome to ExecuteShell
|
|
2
2
|
=======================
|
3
3
|
|
4
4
|
ExecuteShell provides cross-platform shell command execution.
|
5
|
+
Linux, Windows, and Mac OS X are currently supported.
|
5
6
|
In other words, it lays the smack down like a hungry t-rex
|
6
7
|
in the octagon with a pig.
|
7
8
|
|
8
9
|
Getting Started
|
9
10
|
---------------
|
10
11
|
|
11
|
-
|
12
|
+
1. Install ExecuteShell at the command prompt if you haven't yet:
|
12
13
|
|
13
|
-
|
14
|
+
$ gem install execute_shell
|
14
15
|
|
15
|
-
|
16
|
+
2. Require the gem in your Gemfile:
|
16
17
|
|
17
|
-
|
18
|
+
gem 'execute_shell', '~> 1.0.2'
|
18
19
|
|
19
|
-
|
20
|
+
3. Require the gem wherever you need to use it:
|
20
21
|
|
21
|
-
|
22
|
+
require 'execute_shell'
|
22
23
|
|
23
24
|
Usage
|
24
25
|
-----
|
25
26
|
|
26
|
-
|
27
|
+
Simply call ExecuteShell.run as needed:
|
27
28
|
|
28
29
|
result = ExecuteShell.run('ls ~')
|
29
30
|
|
30
|
-
|
31
|
-
|
31
|
+
In this example, result will be a ShellResult object containing information
|
32
|
+
regarding the executed command.
|
32
33
|
|
33
|
-
|
34
|
+
Available methods include:
|
34
35
|
|
35
36
|
out ...... Standard out.
|
36
37
|
err ...... Standard error.
|
37
38
|
success? . Whether the command was executed successfully.
|
38
39
|
to_s ..... Standard out and standard error concatenated.
|
39
40
|
|
40
|
-
|
41
|
-
|
41
|
+
If you wish to simply get a single success, output, or error value back,
|
42
|
+
you may use calls such as:
|
42
43
|
|
43
44
|
ExecuteShell.run_success?('ls ~')
|
44
45
|
ExecuteShell.run_out('ls ~')
|
45
46
|
ExecuteShell.run_err('ls ~')
|
46
47
|
ExecuteShell.run_to_s('ls ~')
|
47
48
|
|
48
|
-
|
49
|
-
|
49
|
+
These may be chained together and will be returned in an array
|
50
|
+
in the order they are specified:
|
50
51
|
|
51
52
|
ExecuteShell.run_out_err('ls ~')
|
52
53
|
ExecuteShell.run_to_s_success_out('ls ~')
|
@@ -65,6 +66,11 @@ Additional Notes
|
|
65
66
|
Additional Documentation
|
66
67
|
------------------------
|
67
68
|
|
69
|
+
$ gem install yard
|
70
|
+
$ yard
|
71
|
+
|
72
|
+
Or:
|
73
|
+
|
68
74
|
$ rake rdoc:app
|
69
75
|
|
70
76
|
License
|
data/execute_shell.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'execute_shell'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.2'
|
4
4
|
|
5
5
|
s.summary = 'Cross-platform shell commands.'
|
6
6
|
s.description = %Q{
|
7
7
|
ExecuteShell provides cross-platform shell command execution.
|
8
|
+
Linux, Windows, and Mac OS X are currently supported.
|
8
9
|
In other words, it lays the smack down like a hungry t-rex
|
9
10
|
in the octagon with a pig.
|
10
11
|
}.strip
|
@@ -25,8 +26,8 @@ in the octagon with a pig.
|
|
25
26
|
s.add_dependency 'open4', '~> 1.3.0'
|
26
27
|
s.add_dependency 'win32-open3-19', '~> 0.0.2'
|
27
28
|
|
28
|
-
s.add_development_dependency 'rake_tasks', '~> 2.0.
|
29
|
-
s.add_development_dependency 'test_unit_helper', '~> 0.0.
|
29
|
+
s.add_development_dependency 'rake_tasks', '~> 2.0.6'
|
30
|
+
s.add_development_dependency 'test_unit_helper', '~> 0.0.2'
|
30
31
|
|
31
32
|
s.has_rdoc = true
|
32
33
|
end
|
data/lib/execute_shell.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
################################################################################
|
3
|
-
# Copyright (C)
|
3
|
+
# Copyright (C) 2011 Travis Herrick #
|
4
4
|
################################################################################
|
5
5
|
# #
|
6
6
|
# \v^V,^!v\^/ #
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#--
|
4
4
|
################################################################################
|
5
|
-
# Copyright (C)
|
5
|
+
# Copyright (C) 2011 Travis Herrick #
|
6
6
|
################################################################################
|
7
7
|
# #
|
8
8
|
# \v^V,^!v\^/ #
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#--
|
4
4
|
################################################################################
|
5
|
-
# Copyright (C)
|
5
|
+
# Copyright (C) 2011 Travis Herrick #
|
6
6
|
################################################################################
|
7
7
|
# #
|
8
8
|
# \v^V,^!v\^/ #
|
@@ -2,7 +2,7 @@ require_relative '../helper'
|
|
2
2
|
|
3
3
|
class TestDocumentation < Test::Unit::TestCase
|
4
4
|
GEM_NAME = 'execute_shell'
|
5
|
-
VERSION = '1.0.
|
5
|
+
VERSION = '1.0.2'
|
6
6
|
README = 'README.md'
|
7
7
|
LICENSE = [
|
8
8
|
'license/lgplv3.md',
|
@@ -53,8 +53,6 @@ class TestDocumentation < Test::Unit::TestCase
|
|
53
53
|
|
54
54
|
assert_match(/Copyright \(C\) \d{4} Travis Herrick/, content,
|
55
55
|
"Copyright is missing from #{file}")
|
56
|
-
assert_match(/Copyright \(C\) #{Time.now.year} Travis Herrick/, content,
|
57
|
-
"Copyright is out of date in #{file}")
|
58
56
|
assert_match(/GNU Lesser General Public License/, content,
|
59
57
|
"License should be LGPL in #{file}")
|
60
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execute_shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: Platform
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.0.
|
69
|
+
version: 2.0.6
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 2.0.
|
77
|
+
version: 2.0.6
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: test_unit_helper
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.0.
|
85
|
+
version: 0.0.2
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,9 +90,11 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.0.
|
93
|
+
version: 0.0.2
|
94
94
|
description: ! 'ExecuteShell provides cross-platform shell command execution.
|
95
95
|
|
96
|
+
Linux, Windows, and Mac OS X are currently supported.
|
97
|
+
|
96
98
|
In other words, it lays the smack down like a hungry t-rex
|
97
99
|
|
98
100
|
in the octagon with a pig.'
|