rprogram 0.2.1 → 0.2.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/.gemtest +0 -0
- data/ChangeLog.md +6 -0
- data/LICENSE.txt +1 -3
- data/README.md +4 -3
- data/Rakefile +3 -2
- data/gemspec.yml +2 -3
- data/lib/rprogram/compat.rb +5 -7
- data/lib/rprogram/version.rb +1 -1
- data/rprogram.gemspec +7 -2
- data/spec/spec_helper.rb +1 -1
- metadata +13 -27
data/.gemtest
ADDED
File without changes
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
### 0.2.2 / 2011-01-22
|
2
|
+
|
3
|
+
* Deprecated {RProgram::Compat.platform}.
|
4
|
+
* Use `File::PATH_SEPARATOR` to separate the `PATH` environment variable
|
5
|
+
in {RProgram::Compat.paths}.
|
6
|
+
|
1
7
|
### 0.2.1 / 2010-10-27
|
2
8
|
|
3
9
|
* Allow the formatter block passed to {RProgram::Option} to return `nil`.
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
Copyright (c) 2007-2010 Hal Brodigan
|
1
|
+
Copyright (c) 2007-2011 Hal Brodigan
|
3
2
|
|
4
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
5
4
|
a copy of this software and associated documentation files (the
|
@@ -19,4 +18,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
19
18
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
20
19
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
21
20
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
-
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# RProgram
|
2
2
|
|
3
|
-
* [
|
4
|
-
* [
|
3
|
+
* [Source](http://github.com/postmodern/rprogram)
|
4
|
+
* [Issues](http://github.com/postmodern/rprogram/issues)
|
5
|
+
* [Documentation](http://rubydoc.info/gems/rprogram)
|
5
6
|
* Postmodern (postmodern.mod3 at gmail.com)
|
6
7
|
|
7
8
|
## Description
|
@@ -16,7 +17,7 @@ system.
|
|
16
17
|
* Uses Kernel.system for safe execution of individual programs and their
|
17
18
|
separate command-line arguments.
|
18
19
|
* Allows running programs under `sudo`.
|
19
|
-
* Provides cross-platform access to the PATH variable.
|
20
|
+
* Provides cross-platform access to the `PATH` environment variable.
|
20
21
|
* Supports leading/tailing non-options.
|
21
22
|
* Supports long-options and short-options.
|
22
23
|
* Supports custom formating of options.
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
begin
|
5
|
-
gem 'ore-tasks', '~> 0.
|
5
|
+
gem 'ore-tasks', '~> 0.3.0'
|
6
6
|
require 'ore/tasks'
|
7
7
|
|
8
8
|
Ore::Tasks.new
|
@@ -12,7 +12,7 @@ rescue LoadError => e
|
|
12
12
|
end
|
13
13
|
|
14
14
|
begin
|
15
|
-
gem 'rspec', '~> 2.
|
15
|
+
gem 'rspec', '~> 2.4.0'
|
16
16
|
require 'rspec/core/rake_task'
|
17
17
|
|
18
18
|
RSpec::Core::RakeTask.new
|
@@ -21,6 +21,7 @@ rescue LoadError => e
|
|
21
21
|
abort "Please run `gem install rspec` to install RSpec."
|
22
22
|
end
|
23
23
|
end
|
24
|
+
task :test => :spec
|
24
25
|
task :default => :spec
|
25
26
|
|
26
27
|
begin
|
data/gemspec.yml
CHANGED
data/lib/rprogram/compat.rb
CHANGED
@@ -11,6 +11,8 @@ module RProgram
|
|
11
11
|
# @example
|
12
12
|
# Compat.arch #=> "linux"
|
13
13
|
#
|
14
|
+
# @deprecated Will be removed in 0.3.0.
|
15
|
+
#
|
14
16
|
def Compat.platform
|
15
17
|
RUBY_PLATFORM.split('-').last
|
16
18
|
end
|
@@ -25,14 +27,10 @@ module RProgram
|
|
25
27
|
# Compat.paths #=> ["/bin", "/usr/bin"]
|
26
28
|
#
|
27
29
|
def Compat.paths
|
28
|
-
|
29
|
-
|
30
|
-
return [] unless ENV['PATH']
|
31
|
-
|
32
|
-
if Compat.platform =~ /mswin(32|64)/
|
33
|
-
return ENV['PATH'].split(';')
|
30
|
+
if ENV['PATH']
|
31
|
+
ENV['PATH'].split(File::PATH_SEPARATOR)
|
34
32
|
else
|
35
|
-
|
33
|
+
[]
|
36
34
|
end
|
37
35
|
end
|
38
36
|
|
data/lib/rprogram/version.rb
CHANGED
data/rprogram.gemspec
CHANGED
@@ -5,6 +5,11 @@ begin
|
|
5
5
|
# custom logic here
|
6
6
|
end
|
7
7
|
rescue NameError
|
8
|
-
|
9
|
-
|
8
|
+
begin
|
9
|
+
require 'ore/specification'
|
10
|
+
retry
|
11
|
+
rescue LoadError
|
12
|
+
STDERR.puts "The 'rprogram.gemspec' file requires Ore."
|
13
|
+
STDERR.puts "Run `gem install ore-core` to install Ore."
|
14
|
+
end
|
10
15
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Postmodern
|
@@ -14,11 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-22 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: ore
|
21
|
+
name: ore-tasks
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
@@ -27,45 +27,30 @@ dependencies:
|
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
29
|
- 0
|
30
|
-
-
|
30
|
+
- 3
|
31
31
|
- 0
|
32
|
-
version: 0.
|
32
|
+
version: 0.3.0
|
33
33
|
type: :development
|
34
34
|
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: ore-tasks
|
37
|
-
prerelease: false
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 1
|
46
|
-
- 2
|
47
|
-
version: 0.1.2
|
48
|
-
type: :development
|
49
|
-
version_requirements: *id002
|
50
35
|
- !ruby/object:Gem::Dependency
|
51
36
|
name: rspec
|
52
37
|
prerelease: false
|
53
|
-
requirement: &
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
40
|
requirements:
|
56
41
|
- - ~>
|
57
42
|
- !ruby/object:Gem::Version
|
58
43
|
segments:
|
59
44
|
- 2
|
45
|
+
- 4
|
60
46
|
- 0
|
61
|
-
|
62
|
-
version: 2.0.0
|
47
|
+
version: 2.4.0
|
63
48
|
type: :development
|
64
|
-
version_requirements: *
|
49
|
+
version_requirements: *id002
|
65
50
|
- !ruby/object:Gem::Dependency
|
66
51
|
name: yard
|
67
52
|
prerelease: false
|
68
|
-
requirement: &
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
69
54
|
none: false
|
70
55
|
requirements:
|
71
56
|
- - ~>
|
@@ -76,7 +61,7 @@ dependencies:
|
|
76
61
|
- 0
|
77
62
|
version: 0.6.0
|
78
63
|
type: :development
|
79
|
-
version_requirements: *
|
64
|
+
version_requirements: *id003
|
80
65
|
description: RProgram is a library for creating wrappers around command-line programs. RProgram provides a Rubyful interface to programs and all their options or non-options. RProgram can also search for programs installed on a system. files without having to use YAML or define classes named like the file.
|
81
66
|
email: postmodern.mod3@gmail.com
|
82
67
|
executables: []
|
@@ -86,6 +71,7 @@ extensions: []
|
|
86
71
|
extra_rdoc_files:
|
87
72
|
- README.md
|
88
73
|
files:
|
74
|
+
- .gemtest
|
89
75
|
- .rspec
|
90
76
|
- .yardopts
|
91
77
|
- ChangeLog.md
|