execute_shell 1.0.0 → 1.0.1

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.
File without changes
data/license/lgplv3.md ADDED
@@ -0,0 +1,171 @@
1
+ This version of the GNU Lesser General Public License incorporates
2
+ the terms and conditions of version 3 of the GNU General Public
3
+ License, supplemented by the additional permissions listed below.
4
+
5
+
6
+ 0. Additional Definitions.
7
+ --------------------------
8
+
9
+ As used herein, "this License" refers to version 3 of the GNU Lesser
10
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
11
+ General Public License.
12
+
13
+ "The Library" refers to a covered work governed by this License,
14
+ other than an Application or a Combined Work as defined below.
15
+
16
+ An "Application" is any work that makes use of an interface provided
17
+ by the Library, but which is not otherwise based on the Library.
18
+ Defining a subclass of a class defined by the Library is deemed a mode
19
+ of using an interface provided by the Library.
20
+
21
+ A "Combined Work" is a work produced by combining or linking an
22
+ Application with the Library. The particular version of the Library
23
+ with which the Combined Work was made is also called the "Linked
24
+ Version".
25
+
26
+ The "Minimal Corresponding Source" for a Combined Work means the
27
+ Corresponding Source for the Combined Work, excluding any source code
28
+ for portions of the Combined Work that, considered in isolation, are
29
+ based on the Application, and not on the Linked Version.
30
+
31
+ The "Corresponding Application Code" for a Combined Work means the
32
+ object code and/or source code for the Application, including any data
33
+ and utility programs needed for reproducing the Combined Work from the
34
+ Application, but excluding the System Libraries of the Combined Work.
35
+
36
+
37
+ 1. Exception to Section 3 of the GNU GPL.
38
+ --------------------------------------------------------------------------------
39
+
40
+ You may convey a covered work under sections 3 and 4 of this License
41
+ without being bound by section 3 of the GNU GPL.
42
+
43
+
44
+ 2. Conveying Modified Versions.
45
+ --------------------------------------------------------------------------------
46
+
47
+ If you modify a copy of the Library, and, in your modifications, a
48
+ facility refers to a function or data to be supplied by an Application
49
+ that uses the facility (other than as an argument passed when the
50
+ facility is invoked), then you may convey a copy of the modified
51
+ version:
52
+
53
+ * a) under this License, provided that you make a good faith effort to
54
+ ensure that, in the event an Application does not supply the
55
+ function or data, the facility still operates, and performs
56
+ whatever part of its purpose remains meaningful, or
57
+
58
+ * b) under the GNU GPL, with none of the additional permissions of
59
+ this License applicable to that copy.
60
+
61
+
62
+ 3. Object Code Incorporating Material from Library Header Files.
63
+ --------------------------------------------------------------------------------
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ * a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ * b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+
80
+ 4. Combined Works.
81
+ --------------------------------------------------------------------------------
82
+
83
+ You may convey a Combined Work under terms of your choice that,
84
+ taken together, effectively do not restrict modification of the
85
+ portions of the Library contained in the Combined Work and reverse
86
+ engineering for debugging such modifications, if you also do each of
87
+ the following:
88
+
89
+ * a) Give prominent notice with each copy of the Combined Work that
90
+ the Library is used in it and that the Library and its use are
91
+ covered by this License.
92
+
93
+ * b) Accompany the Combined Work with a copy of the GNU GPL and this license
94
+ document.
95
+
96
+ * c) For a Combined Work that displays copyright notices during
97
+ execution, include the copyright notice for the Library among
98
+ these notices, as well as a reference directing the user to the
99
+ copies of the GNU GPL and this license document.
100
+
101
+ * d) Do one of the following:
102
+
103
+ * 0) Convey the Minimal Corresponding Source under the terms of this
104
+ License, and the Corresponding Application Code in a form
105
+ suitable for, and under terms that permit, the user to
106
+ recombine or relink the Application with a modified version of
107
+ the Linked Version to produce a modified Combined Work, in the
108
+ manner specified by section 6 of the GNU GPL for conveying
109
+ Corresponding Source.
110
+
111
+ * 1) Use a suitable shared library mechanism for linking with the
112
+ Library. A suitable mechanism is one that (a) uses at run time
113
+ a copy of the Library already present on the user's computer
114
+ system, and (b) will operate properly with a modified version
115
+ of the Library that is interface-compatible with the Linked
116
+ Version.
117
+
118
+ * e) Provide Installation Information, but only if you would otherwise
119
+ be required to provide such information under section 6 of the
120
+ GNU GPL, and only to the extent that such information is
121
+ necessary to install and execute a modified version of the
122
+ Combined Work produced by recombining or relinking the
123
+ Application with a modified version of the Linked Version. (If
124
+ you use option 4d0, the Installation Information must accompany
125
+ the Minimal Corresponding Source and Corresponding Application
126
+ Code. If you use option 4d1, you must provide the Installation
127
+ Information in the manner specified by section 6 of the GNU GPL
128
+ for conveying Corresponding Source.)
129
+
130
+
131
+ 5. Combined Libraries.
132
+ --------------------------------------------------------------------------------
133
+
134
+ You may place library facilities that are a work based on the
135
+ Library side by side in a single library together with other library
136
+ facilities that are not Applications and are not covered by this
137
+ License, and convey such a combined library under terms of your
138
+ choice, if you do both of the following:
139
+
140
+ * a) Accompany the combined library with a copy of the same work based
141
+ on the Library, uncombined with any other library facilities,
142
+ conveyed under the terms of this License.
143
+
144
+ * b) Give prominent notice with the combined library that part of it
145
+ is a work based on the Library, and explaining where to find the
146
+ accompanying uncombined form of the same work.
147
+
148
+
149
+ 6. Revised Versions of the GNU Lesser General Public License.
150
+ --------------------------------------------------------------------------------
151
+
152
+ The Free Software Foundation may publish revised and/or new versions
153
+ of the GNU Lesser General Public License from time to time. Such new
154
+ versions will be similar in spirit to the present version, but may
155
+ differ in detail to address new problems or concerns.
156
+
157
+ Each version is given a distinguishing version number. If the
158
+ Library as you received it specifies that a certain numbered version
159
+ of the GNU Lesser General Public License "or any later version"
160
+ applies to it, you have the option of following the terms and
161
+ conditions either of that published version or of any later version
162
+ published by the Free Software Foundation. If the Library as you
163
+ received it does not specify a version number of the GNU Lesser
164
+ General Public License, you may choose any version of the GNU Lesser
165
+ General Public License ever published by the Free Software Foundation.
166
+
167
+ If the Library as you received it specifies that a proxy can decide
168
+ whether future versions of the GNU Lesser General Public License shall
169
+ apply, that proxy's public statement of acceptance of any version is
170
+ permanent authorization for you to choose that version for the
171
+ Library.
data/rakefile CHANGED
File without changes
@@ -0,0 +1,77 @@
1
+ require_relative '../helper'
2
+
3
+ class TestDocumentation < Test::Unit::TestCase
4
+ GEM_NAME = 'execute_shell'
5
+ VERSION = '1.0.1'
6
+ README = 'README.md'
7
+ LICENSE = [
8
+ 'license/lgplv3.md',
9
+ 'license/gplv3.md'
10
+ ]
11
+
12
+ test 'gemspec exists' do
13
+ assert FileTest.file?(File.join(Dir.pwd, gemspec_file)),
14
+ "#{gemspec_file} does not exist"
15
+ end
16
+
17
+ test "gemspec is version #{VERSION}" do
18
+ assert_equal VERSION, gemspec.version.to_s
19
+ end
20
+
21
+ test 'gemspec has the correct gem names' do
22
+ assert_equal GEM_NAME, gemspec.name
23
+ assert_match gem_name_proper, gemspec.description,
24
+ "#{gem_name_proper} does not match:\n#{gemspec.description}"
25
+ end
26
+
27
+ test "#{README} exists" do
28
+ assert FileTest.file?(File.join(Dir.pwd, README)),
29
+ "#{README} does not exist"
30
+ end
31
+
32
+ test 'README contains accurate information' do
33
+ readme = File.open(File.join(Dir.pwd, README), 'r') { |f| f.read }
34
+
35
+ assert_match gem_name_proper, readme,
36
+ "#{gem_name_proper} does not match the contents of #{README}"
37
+ assert_match GEM_NAME, readme,
38
+ "#{GEM_NAME} does not match the contents of #{README}"
39
+ assert_match gemspec.version.to_s, readme,
40
+ "#{gemspec.version} does not match the contents of #{README}"
41
+ end
42
+
43
+ test 'license files exist' do
44
+ LICENSE.each do |license|
45
+ file = File.join(Dir.pwd, license)
46
+ assert FileTest.file?(file), "#{file} does not exist"
47
+ end
48
+ end
49
+
50
+ test 'files in lib have license text' do
51
+ Dir["#{Dir.pwd}/lib/**/*.rb"].each do |file|
52
+ content = File.open(file, 'r') { |f| f.read }
53
+
54
+ assert_match(/Copyright \(C\) \d{4} Travis Herrick/, content,
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
+ assert_match(/GNU Lesser General Public License/, content,
59
+ "License should be LGPL in #{file}")
60
+ end
61
+ end
62
+
63
+ private
64
+
65
+ def gemspec
66
+ return @gemspec if defined?(@gemspec)
67
+ @gemspec = Gem::Specification.load(gemspec_file)
68
+ end
69
+
70
+ def gemspec_file
71
+ "#{GEM_NAME}.gemspec"
72
+ end
73
+
74
+ def gem_name_proper
75
+ GEM_NAME.capitalize.gsub(/(_[a-z])/) { $1[-1].upcase }
76
+ end
77
+ end
data/test/helper.rb CHANGED
File without changes
@@ -35,6 +35,7 @@ class ExecuteShellTest < Test::Unit::TestCase
35
35
  :ls => {
36
36
  :linux => 'ls',
37
37
  :mingw => 'dir',
38
+ :macosx => 'ls',
38
39
  }
39
40
  }
40
41
 
@@ -46,7 +47,7 @@ class ExecuteShellTest < Test::Unit::TestCase
46
47
  end
47
48
 
48
49
  def test_supported_systems
49
- assert_equal [:linux, :mingw], @class.supported_systems
50
+ assert_equal [:linux, :mingw, :macosx], @class.supported_systems
50
51
  end
51
52
 
52
53
  def test_supported_flag
File without changes
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.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: Platform
16
- requirement: &14839660 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,32 +21,47 @@ dependencies:
21
21
  version: 0.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14839660
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.4.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: open4
27
- requirement: &14839060 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
31
36
  - !ruby/object:Gem::Version
32
- version: 1.0.1
37
+ version: 1.3.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *14839060
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: win32-open3-19
38
- requirement: &14853660 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
43
- version: 0.0.1
53
+ version: 0.0.2
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *14853660
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.0.2
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rake_tasks
49
- requirement: &14851340 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: 2.0.5
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *14851340
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.0.5
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: test_unit_helper
60
- requirement: &14850100 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ~>
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: 0.0.1
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *14850100
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.0.1
69
94
  description: ! 'ExecuteShell provides cross-platform shell command execution.
70
95
 
71
96
  In other words, it lays the smack down like a hungry t-rex
@@ -75,25 +100,25 @@ email: tthetoad@gmail.com
75
100
  executables: []
76
101
  extensions: []
77
102
  extra_rdoc_files:
78
- - README
79
- - license/gpl
80
- - license/lgpl
103
+ - license/gplv3.md
81
104
  - license/lgplv3-88x31.png
105
+ - license/lgplv3.md
82
106
  files:
83
- - Gemfile.lock
84
- - README
85
- - execute_shell.gemspec
86
- - Gemfile
87
107
  - rakefile
108
+ - Gemfile
109
+ - execute_shell.gemspec
110
+ - README.md
111
+ - Gemfile.lock
88
112
  - lib/execute_shell.rb
89
113
  - lib/execute_shell/execute_shell.rb
90
114
  - lib/execute_shell/shell_result.rb
91
- - license/gpl
92
- - license/lgpl
115
+ - license/gplv3.md
93
116
  - license/lgplv3-88x31.png
94
- - test/helper.rb
117
+ - license/lgplv3.md
118
+ - test/docs/test_documentation.rb
95
119
  - test/unit/execute_shell_test.rb
96
120
  - test/unit/shell_result_test.rb
121
+ - test/helper.rb
97
122
  homepage: http://www.bitbucket.org/ToadJamb/gems_execute_shell
98
123
  licenses:
99
124
  - LGPLv3
@@ -115,11 +140,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
140
  version: '0'
116
141
  requirements: []
117
142
  rubyforge_project:
118
- rubygems_version: 1.8.17
143
+ rubygems_version: 1.8.24
119
144
  signing_key:
120
145
  specification_version: 3
121
146
  summary: Cross-platform shell commands.
122
147
  test_files:
123
- - test/helper.rb
148
+ - test/docs/test_documentation.rb
124
149
  - test/unit/execute_shell_test.rb
125
150
  - test/unit/shell_result_test.rb
151
+ - test/helper.rb
data/license/lgpl DELETED
@@ -1,157 +0,0 @@
1
- This version of the GNU Lesser General Public License incorporates
2
- the terms and conditions of version 3 of the GNU General Public
3
- License, supplemented by the additional permissions listed below.
4
-
5
- 0. Additional Definitions.
6
-
7
- As used herein, "this License" refers to version 3 of the GNU Lesser
8
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
9
- General Public License.
10
-
11
- "The Library" refers to a covered work governed by this License,
12
- other than an Application or a Combined Work as defined below.
13
-
14
- An "Application" is any work that makes use of an interface provided
15
- by the Library, but which is not otherwise based on the Library.
16
- Defining a subclass of a class defined by the Library is deemed a mode
17
- of using an interface provided by the Library.
18
-
19
- A "Combined Work" is a work produced by combining or linking an
20
- Application with the Library. The particular version of the Library
21
- with which the Combined Work was made is also called the "Linked
22
- Version".
23
-
24
- The "Minimal Corresponding Source" for a Combined Work means the
25
- Corresponding Source for the Combined Work, excluding any source code
26
- for portions of the Combined Work that, considered in isolation, are
27
- based on the Application, and not on the Linked Version.
28
-
29
- The "Corresponding Application Code" for a Combined Work means the
30
- object code and/or source code for the Application, including any data
31
- and utility programs needed for reproducing the Combined Work from the
32
- Application, but excluding the System Libraries of the Combined Work.
33
-
34
- 1. Exception to Section 3 of the GNU GPL.
35
-
36
- You may convey a covered work under sections 3 and 4 of this License
37
- without being bound by section 3 of the GNU GPL.
38
-
39
- 2. Conveying Modified Versions.
40
-
41
- If you modify a copy of the Library, and, in your modifications, a
42
- facility refers to a function or data to be supplied by an Application
43
- that uses the facility (other than as an argument passed when the
44
- facility is invoked), then you may convey a copy of the modified
45
- version:
46
-
47
- a) under this License, provided that you make a good faith effort to
48
- ensure that, in the event an Application does not supply the
49
- function or data, the facility still operates, and performs
50
- whatever part of its purpose remains meaningful, or
51
-
52
- b) under the GNU GPL, with none of the additional permissions of
53
- this License applicable to that copy.
54
-
55
- 3. Object Code Incorporating Material from Library Header Files.
56
-
57
- The object code form of an Application may incorporate material from
58
- a header file that is part of the Library. You may convey such object
59
- code under terms of your choice, provided that, if the incorporated
60
- material is not limited to numerical parameters, data structure
61
- layouts and accessors, or small macros, inline functions and templates
62
- (ten or fewer lines in length), you do both of the following:
63
-
64
- a) Give prominent notice with each copy of the object code that the
65
- Library is used in it and that the Library and its use are
66
- covered by this License.
67
-
68
- b) Accompany the object code with a copy of the GNU GPL and this license
69
- document.
70
-
71
- 4. Combined Works.
72
-
73
- You may convey a Combined Work under terms of your choice that,
74
- taken together, effectively do not restrict modification of the
75
- portions of the Library contained in the Combined Work and reverse
76
- engineering for debugging such modifications, if you also do each of
77
- the following:
78
-
79
- a) Give prominent notice with each copy of the Combined Work that
80
- the Library is used in it and that the Library and its use are
81
- covered by this License.
82
-
83
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
84
- document.
85
-
86
- c) For a Combined Work that displays copyright notices during
87
- execution, include the copyright notice for the Library among
88
- these notices, as well as a reference directing the user to the
89
- copies of the GNU GPL and this license document.
90
-
91
- d) Do one of the following:
92
-
93
- 0) Convey the Minimal Corresponding Source under the terms of this
94
- License, and the Corresponding Application Code in a form
95
- suitable for, and under terms that permit, the user to
96
- recombine or relink the Application with a modified version of
97
- the Linked Version to produce a modified Combined Work, in the
98
- manner specified by section 6 of the GNU GPL for conveying
99
- Corresponding Source.
100
-
101
- 1) Use a suitable shared library mechanism for linking with the
102
- Library. A suitable mechanism is one that (a) uses at run time
103
- a copy of the Library already present on the user's computer
104
- system, and (b) will operate properly with a modified version
105
- of the Library that is interface-compatible with the Linked
106
- Version.
107
-
108
- e) Provide Installation Information, but only if you would otherwise
109
- be required to provide such information under section 6 of the
110
- GNU GPL, and only to the extent that such information is
111
- necessary to install and execute a modified version of the
112
- Combined Work produced by recombining or relinking the
113
- Application with a modified version of the Linked Version. (If
114
- you use option 4d0, the Installation Information must accompany
115
- the Minimal Corresponding Source and Corresponding Application
116
- Code. If you use option 4d1, you must provide the Installation
117
- Information in the manner specified by section 6 of the GNU GPL
118
- for conveying Corresponding Source.)
119
-
120
- 5. Combined Libraries.
121
-
122
- You may place library facilities that are a work based on the
123
- Library side by side in a single library together with other library
124
- facilities that are not Applications and are not covered by this
125
- License, and convey such a combined library under terms of your
126
- choice, if you do both of the following:
127
-
128
- a) Accompany the combined library with a copy of the same work based
129
- on the Library, uncombined with any other library facilities,
130
- conveyed under the terms of this License.
131
-
132
- b) Give prominent notice with the combined library that part of it
133
- is a work based on the Library, and explaining where to find the
134
- accompanying uncombined form of the same work.
135
-
136
- 6. Revised Versions of the GNU Lesser General Public License.
137
-
138
- The Free Software Foundation may publish revised and/or new versions
139
- of the GNU Lesser General Public License from time to time. Such new
140
- versions will be similar in spirit to the present version, but may
141
- differ in detail to address new problems or concerns.
142
-
143
- Each version is given a distinguishing version number. If the
144
- Library as you received it specifies that a certain numbered version
145
- of the GNU Lesser General Public License "or any later version"
146
- applies to it, you have the option of following the terms and
147
- conditions either of that published version or of any later version
148
- published by the Free Software Foundation. If the Library as you
149
- received it does not specify a version number of the GNU Lesser
150
- General Public License, you may choose any version of the GNU Lesser
151
- General Public License ever published by the Free Software Foundation.
152
-
153
- If the Library as you received it specifies that a proxy can decide
154
- whether future versions of the GNU Lesser General Public License shall
155
- apply, that proxy's public statement of acceptance of any version is
156
- permanent authorization for you to choose that version for the
157
- Library.