rprogram 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.specopts +1 -0
- data/.yardopts +1 -0
- data/ChangeLog.md +103 -0
- data/LICENSE.txt +17 -18
- data/README.md +101 -0
- data/Rakefile +37 -16
- data/lib/rprogram/compat.rb +3 -3
- data/lib/rprogram/nameable/class_methods.rb +84 -0
- data/lib/rprogram/nameable/nameable.rb +34 -0
- data/lib/rprogram/nameable.rb +2 -86
- data/lib/rprogram/option.rb +2 -2
- data/lib/rprogram/options/class_methods.rb +112 -0
- data/lib/rprogram/options/options.rb +39 -0
- data/lib/rprogram/options.rb +2 -146
- data/lib/rprogram/program.rb +7 -6
- data/lib/rprogram/task.rb +6 -6
- data/lib/rprogram/version.rb +1 -1
- data/rprogram.gemspec +104 -0
- data/spec/nameable_spec.rb +28 -0
- data/spec/program_spec.rb +19 -14
- data/spec/spec_helper.rb +1 -1
- metadata +80 -87
- data/History.txt +0 -95
- data/Manifest.txt +0 -44
- data/README.txt +0 -51
- data/lib/rprogram/extensions/meta/object.rb +0 -24
- data/lib/rprogram/extensions/meta.rb +0 -1
- data/lib/rprogram/yard/handlers/ruby/legacy/metaclass_eval_handler.rb +0 -21
- data/lib/rprogram/yard/handlers/ruby/legacy.rb +0 -1
- data/lib/rprogram/yard/handlers/ruby/metaclass_eval_handler.rb +0 -18
- data/lib/rprogram/yard/handlers/ruby.rb +0 -2
- data/lib/rprogram/yard/handlers.rb +0 -1
- data/tasks/spec.rb +0 -10
- data/tasks/yard.rb +0 -18
- data.tar.gz.sig +0 -2
- metadata.gz.sig +0 -0
metadata
CHANGED
@@ -1,157 +1,150 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rprogram
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Postmodern
|
8
13
|
autorequire:
|
9
14
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
- |
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA9wb3N0
|
14
|
-
bW9kZXJuLm1vZDMxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
|
15
|
-
ARkWA2NvbTAeFw0wOTA2MDMwNDU5MDNaFw0xMDA2MDMwNDU5MDNaMEYxGDAWBgNV
|
16
|
-
BAMMD3Bvc3Rtb2Rlcm4ubW9kMzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYK
|
17
|
-
CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
18
|
-
1wvANkTDHFgVih5XLjuTwTZjgBq1lBGybXJiH6Id1lY2JOMqM5FB1DDHVvvij94i
|
19
|
-
mJabN0zkzu6VKWC70y0IwOxY7CPokr0eFdK/D0y7mCq1P8QITv76i2YqAl0eYqIt
|
20
|
-
W+IhIkANQ7E6uMZIZcdnfadC6lPAtlKkqtd9crvRbFgr6e3kyflmohbRnTEJHoRd
|
21
|
-
7SHHsybE6DSn7oTDs6XBTNrNIn5VfZA0z01eeos/+zBm1zKJOK2+/7xtLLDuDU9G
|
22
|
-
+Rd+ltUBbvxUrMNZmDG29pnmN2xTRH+Q8HxD2AxlvM5SRpK6OeZaHV7PaCCAVZ4L
|
23
|
-
T9BFl1sfMvRlABeGEkSyuQIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE
|
24
|
-
sDAdBgNVHQ4EFgQUKwsd+PqEYmBvyaTyoL+uRuk+PhEwDQYJKoZIhvcNAQEFBQAD
|
25
|
-
ggEBAB4TvHsrlbcXcKg6gX5BIb9tI+zGkpzo0Z7jnxMEcNO7NGGwmzafDBI/xZYv
|
26
|
-
xkRH3/HXbGGYDOi6Q6gWt5GujSx0bOImDtYTJTH8jnzN92HzEK5WdScm1QpZKF1e
|
27
|
-
cezArMbxbSPaosxTCtG6LQTkE28lFQsmFZ5xzouugS4h5+LVJiVMmiP+l3EfkjFa
|
28
|
-
GOURU+rNEMPWo8MCWivGW7jes6BMzWHcW7DQ0scNVmIcCIgdyMmpscuAEOSeghy9
|
29
|
-
/fFs57Ey2OXBL55nDOyvN/ZQ2Vab05UH4t+GCxjAPeirzL/29FBtePT6VD44c38j
|
30
|
-
pDj+ws7QjtH/Qcrr1l9jfN0ehDs=
|
31
|
-
-----END CERTIFICATE-----
|
15
|
+
cert_chain: []
|
32
16
|
|
33
|
-
date:
|
17
|
+
date: 2010-10-03 00:00:00 -07:00
|
34
18
|
default_executable:
|
35
19
|
dependencies:
|
36
20
|
- !ruby/object:Gem::Dependency
|
37
21
|
name: rspec
|
38
|
-
|
39
|
-
|
40
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
41
25
|
requirements:
|
42
26
|
- - ">="
|
43
27
|
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 3
|
31
|
+
- 0
|
32
|
+
version: 1.3.0
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
46
35
|
- !ruby/object:Gem::Dependency
|
47
36
|
name: yard
|
48
|
-
|
49
|
-
|
50
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
51
40
|
requirements:
|
52
41
|
- - ">="
|
53
42
|
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
|
56
|
-
-
|
57
|
-
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 5
|
46
|
+
- 3
|
47
|
+
version: 0.5.3
|
58
48
|
type: :development
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 2.4.0
|
65
|
-
version:
|
66
|
-
description: |-
|
67
|
-
RProgram is a library for creating wrappers around command-line programs.
|
68
|
-
RProgram provides a Rubyful interface to programs and all their options
|
69
|
-
or non-options. RProgram can also search for programs installed on a
|
70
|
-
system.
|
71
|
-
email:
|
72
|
-
- postmodern.mod3@gmail.com
|
49
|
+
version_requirements: *id002
|
50
|
+
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.
|
51
|
+
email: postmodern.mod3@gmail.com
|
73
52
|
executables: []
|
74
53
|
|
75
54
|
extensions: []
|
76
55
|
|
77
56
|
extra_rdoc_files:
|
78
|
-
-
|
79
|
-
- Manifest.txt
|
57
|
+
- ChangeLog.md
|
80
58
|
- LICENSE.txt
|
81
|
-
- README.
|
59
|
+
- README.md
|
82
60
|
files:
|
83
|
-
-
|
84
|
-
-
|
61
|
+
- .gitignore
|
62
|
+
- .specopts
|
63
|
+
- .yardopts
|
64
|
+
- ChangeLog.md
|
85
65
|
- LICENSE.txt
|
86
|
-
- README.
|
66
|
+
- README.md
|
87
67
|
- Rakefile
|
88
68
|
- lib/rprogram.rb
|
89
69
|
- lib/rprogram/compat.rb
|
90
|
-
- lib/rprogram/exceptions/program_not_found.rb
|
91
70
|
- lib/rprogram/exceptions.rb
|
92
|
-
- lib/rprogram/
|
93
|
-
- lib/rprogram/extensions/meta.rb
|
71
|
+
- lib/rprogram/exceptions/program_not_found.rb
|
94
72
|
- lib/rprogram/extensions.rb
|
95
|
-
- lib/rprogram/
|
96
|
-
- lib/rprogram/
|
73
|
+
- lib/rprogram/nameable.rb
|
74
|
+
- lib/rprogram/nameable/class_methods.rb
|
75
|
+
- lib/rprogram/nameable/nameable.rb
|
97
76
|
- lib/rprogram/non_option.rb
|
77
|
+
- lib/rprogram/option.rb
|
78
|
+
- lib/rprogram/option_list.rb
|
98
79
|
- lib/rprogram/options.rb
|
99
|
-
- lib/rprogram/
|
100
|
-
- lib/rprogram/
|
80
|
+
- lib/rprogram/options/class_methods.rb
|
81
|
+
- lib/rprogram/options/options.rb
|
101
82
|
- lib/rprogram/program.rb
|
102
83
|
- lib/rprogram/rprogram.rb
|
84
|
+
- lib/rprogram/task.rb
|
103
85
|
- lib/rprogram/version.rb
|
104
86
|
- lib/rprogram/yard.rb
|
105
|
-
-
|
106
|
-
- lib/rprogram/yard/handlers/ruby.rb
|
107
|
-
- lib/rprogram/yard/handlers/ruby/metaclass_eval_handler.rb
|
108
|
-
- lib/rprogram/yard/handlers/ruby/legacy.rb
|
109
|
-
- lib/rprogram/yard/handlers/ruby/legacy/metaclass_eval_handler.rb
|
110
|
-
- tasks/spec.rb
|
111
|
-
- tasks/yard.rb
|
112
|
-
- spec/spec_helper.rb
|
113
|
-
- spec/classes/named_program.rb
|
87
|
+
- rprogram.gemspec
|
114
88
|
- spec/classes/aliased_program.rb
|
115
89
|
- spec/classes/ls_program.rb
|
116
|
-
- spec/classes/ls_task.rb
|
117
90
|
- spec/classes/ls_selinux_task.rb
|
118
|
-
- spec/
|
91
|
+
- spec/classes/ls_task.rb
|
92
|
+
- spec/classes/named_program.rb
|
119
93
|
- spec/compat_spec.rb
|
120
|
-
- spec/
|
121
|
-
- spec/option_spec.rb
|
94
|
+
- spec/nameable_spec.rb
|
122
95
|
- spec/non_option_spec.rb
|
96
|
+
- spec/option_examples.rb
|
123
97
|
- spec/option_list_spec.rb
|
124
|
-
- spec/
|
98
|
+
- spec/option_spec.rb
|
125
99
|
- spec/program_spec.rb
|
100
|
+
- spec/rprogram_spec.rb
|
101
|
+
- spec/spec_helper.rb
|
126
102
|
- spec/task_spec.rb
|
127
103
|
has_rdoc: yard
|
128
|
-
homepage: http://
|
104
|
+
homepage: http://github.com/postmodern/rprogram
|
129
105
|
licenses: []
|
130
106
|
|
131
107
|
post_install_message:
|
132
108
|
rdoc_options:
|
133
|
-
- --
|
134
|
-
- README.txt
|
109
|
+
- --charset=UTF-8
|
135
110
|
require_paths:
|
136
111
|
- lib
|
137
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
138
114
|
requirements:
|
139
115
|
- - ">="
|
140
116
|
- !ruby/object:Gem::Version
|
117
|
+
segments:
|
118
|
+
- 0
|
141
119
|
version: "0"
|
142
|
-
version:
|
143
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
144
122
|
requirements:
|
145
123
|
- - ">="
|
146
124
|
- !ruby/object:Gem::Version
|
125
|
+
segments:
|
126
|
+
- 0
|
147
127
|
version: "0"
|
148
|
-
version:
|
149
128
|
requirements: []
|
150
129
|
|
151
|
-
rubyforge_project:
|
152
|
-
rubygems_version: 1.3.
|
130
|
+
rubyforge_project:
|
131
|
+
rubygems_version: 1.3.7
|
153
132
|
signing_key:
|
154
133
|
specification_version: 3
|
155
|
-
summary:
|
156
|
-
test_files:
|
157
|
-
|
134
|
+
summary: A library for creating wrappers around command-line programs.
|
135
|
+
test_files:
|
136
|
+
- spec/classes/ls_program.rb
|
137
|
+
- spec/classes/named_program.rb
|
138
|
+
- spec/classes/ls_selinux_task.rb
|
139
|
+
- spec/classes/aliased_program.rb
|
140
|
+
- spec/classes/ls_task.rb
|
141
|
+
- spec/nameable_spec.rb
|
142
|
+
- spec/program_spec.rb
|
143
|
+
- spec/rprogram_spec.rb
|
144
|
+
- spec/option_examples.rb
|
145
|
+
- spec/non_option_spec.rb
|
146
|
+
- spec/compat_spec.rb
|
147
|
+
- spec/option_list_spec.rb
|
148
|
+
- spec/spec_helper.rb
|
149
|
+
- spec/option_spec.rb
|
150
|
+
- spec/task_spec.rb
|
data/History.txt
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
=== 0.1.8 / 2009-12-24
|
2
|
-
|
3
|
-
* Allow Program to run commands under sudo:
|
4
|
-
* Added Compat.sudo.
|
5
|
-
* Added Task#sudo.
|
6
|
-
* Added Task#sudo=.
|
7
|
-
* Added Task#sudo?.
|
8
|
-
* Added Program#sudo.
|
9
|
-
|
10
|
-
=== 0.1.7 / 2009-09-21
|
11
|
-
|
12
|
-
* Require Hoe >= 2.3.3.
|
13
|
-
* Require YARD >= 0.2.3.5.
|
14
|
-
* Require RSpec >= 1.2.8.
|
15
|
-
* Use 'hoe/signing' for signed RubyGems.
|
16
|
-
* Moved to YARD based documentation.
|
17
|
-
* All specs pass on JRuby 1.3.1.
|
18
|
-
|
19
|
-
=== 0.1.6 / 2009-06-30
|
20
|
-
|
21
|
-
* Use Hoe 2.2.0.
|
22
|
-
* Removed requirement for 'open3'.
|
23
|
-
* Renamed Compat.PATHS to Compat.paths.
|
24
|
-
* Refactored Option#arguments.
|
25
|
-
* Removed Option#format.
|
26
|
-
* Refactored NonOption#arguments.
|
27
|
-
* Renamed NonOption#leading to NonOption#leading?.
|
28
|
-
* Removed NonOption#tailing.
|
29
|
-
* Added NonOption#tailing?.
|
30
|
-
* Added specs.
|
31
|
-
* All specs pass on Ruby 1.9.1-p0 and 1.8.6-p287.
|
32
|
-
|
33
|
-
=== 0.1.5 / 2009-01-14
|
34
|
-
|
35
|
-
* Use Kernel.system in RProgram::Program#run, instead of Open3.popen3:
|
36
|
-
* popen3 is not well supported on Windows.
|
37
|
-
* win32-open3 does not allow for the execution of single programs with
|
38
|
-
separate command-line arguments. Instead, it merely executes a command
|
39
|
-
string in command.com. This seems to allow arbitrary command injection
|
40
|
-
via command-line arguments.
|
41
|
-
* RProgram::Program#run will now return either +true+ or +false+,
|
42
|
-
depending on the exit status of the program.
|
43
|
-
* Added some missing documentation.
|
44
|
-
|
45
|
-
=== 0.1.4 / 2009-01-07
|
46
|
-
|
47
|
-
* Added <tt>lib/rprogram/rprogram.rb</tt> to the Manifest.
|
48
|
-
* Added more documentation.
|
49
|
-
|
50
|
-
=== 0.1.3 / 2008-01-27
|
51
|
-
|
52
|
-
* Renamed <tt>Program.create_from_path</tt> to
|
53
|
-
<tt>Program.find_with_path</tt>.
|
54
|
-
* Renamed <tt>Program.create_from_paths</tt> to
|
55
|
-
<tt>Program.find_with_paths</tt>.
|
56
|
-
* Renamed <tt>Program.create</tt> to <tt>Program.find</tt>.
|
57
|
-
* Renamed <tt>Program.run_with_task</tt> to <tt>Program.run_task</tt>.
|
58
|
-
|
59
|
-
=== 0.1.2 / 2008-01-18
|
60
|
-
|
61
|
-
* DRY'ed up lib/rprogram/task.
|
62
|
-
* Added Task.define_option.
|
63
|
-
* Added OptionList so that Option may contain sub-options.
|
64
|
-
* Touched up documenation.
|
65
|
-
|
66
|
-
=== 0.1.1 / 2008-01-18
|
67
|
-
|
68
|
-
* Added support for the Option argument separators.
|
69
|
-
|
70
|
-
#
|
71
|
-
# Creates arguments of the form:
|
72
|
-
#
|
73
|
-
# ["-opts","value1:value2:value3"]
|
74
|
-
#
|
75
|
-
long_option :flag => '-opts', :separator => ':'
|
76
|
-
|
77
|
-
* Fixed lib/rprogram.rb file.
|
78
|
-
|
79
|
-
=== 0.1.0 / 2008-01-17
|
80
|
-
|
81
|
-
* Removed redundent methods in Program:
|
82
|
-
* Program.find_by_name
|
83
|
-
* Program.find_by_names
|
84
|
-
* Added Program#create.
|
85
|
-
* Made Program Nameable by default.
|
86
|
-
* Prevented arbitrary command-injection in Program#run.
|
87
|
-
|
88
|
-
=== 0.0.9 / 2008-01-09
|
89
|
-
|
90
|
-
* Initial release.
|
91
|
-
* Provides cross-platform access to the PATH variable.
|
92
|
-
* Supports mapping long and short options.
|
93
|
-
* Supports mapping leading and tailing non-options.
|
94
|
-
* Supports custom formating of options.
|
95
|
-
|
data/Manifest.txt
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
LICENSE.txt
|
4
|
-
README.txt
|
5
|
-
Rakefile
|
6
|
-
lib/rprogram.rb
|
7
|
-
lib/rprogram/compat.rb
|
8
|
-
lib/rprogram/exceptions/program_not_found.rb
|
9
|
-
lib/rprogram/exceptions.rb
|
10
|
-
lib/rprogram/extensions/meta/object.rb
|
11
|
-
lib/rprogram/extensions/meta.rb
|
12
|
-
lib/rprogram/extensions.rb
|
13
|
-
lib/rprogram/option_list.rb
|
14
|
-
lib/rprogram/option.rb
|
15
|
-
lib/rprogram/non_option.rb
|
16
|
-
lib/rprogram/options.rb
|
17
|
-
lib/rprogram/task.rb
|
18
|
-
lib/rprogram/nameable.rb
|
19
|
-
lib/rprogram/program.rb
|
20
|
-
lib/rprogram/rprogram.rb
|
21
|
-
lib/rprogram/version.rb
|
22
|
-
lib/rprogram/yard.rb
|
23
|
-
lib/rprogram/yard/handlers.rb
|
24
|
-
lib/rprogram/yard/handlers/ruby.rb
|
25
|
-
lib/rprogram/yard/handlers/ruby/metaclass_eval_handler.rb
|
26
|
-
lib/rprogram/yard/handlers/ruby/legacy.rb
|
27
|
-
lib/rprogram/yard/handlers/ruby/legacy/metaclass_eval_handler.rb
|
28
|
-
tasks/spec.rb
|
29
|
-
tasks/yard.rb
|
30
|
-
spec/spec_helper.rb
|
31
|
-
spec/classes/named_program.rb
|
32
|
-
spec/classes/aliased_program.rb
|
33
|
-
spec/classes/ls_program.rb
|
34
|
-
spec/classes/ls_task.rb
|
35
|
-
spec/classes/ls_selinux_task.rb
|
36
|
-
spec/rprogram_spec.rb
|
37
|
-
spec/compat_spec.rb
|
38
|
-
spec/option_examples.rb
|
39
|
-
spec/option_spec.rb
|
40
|
-
spec/non_option_spec.rb
|
41
|
-
spec/option_list_spec.rb
|
42
|
-
spec/nameable_spec.rb
|
43
|
-
spec/program_spec.rb
|
44
|
-
spec/task_spec.rb
|
data/README.txt
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
= RProgram
|
2
|
-
|
3
|
-
* http://rprogram.rubyforge.org/
|
4
|
-
* http://github.com/postmodern/rprogram/
|
5
|
-
* Postmodern (postmodern.mod3 at gmail.com)
|
6
|
-
|
7
|
-
== DESCRIPTION:
|
8
|
-
|
9
|
-
RProgram is a library for creating wrappers around command-line programs.
|
10
|
-
RProgram provides a Rubyful interface to programs and all their options
|
11
|
-
or non-options. RProgram can also search for programs installed on a
|
12
|
-
system.
|
13
|
-
|
14
|
-
== FEATURES/PROBLEMS:
|
15
|
-
|
16
|
-
* Uses Kernel.system for safe execution of individual programs and their
|
17
|
-
separate command-line arguments.
|
18
|
-
* Allows running programs under +sudo+.
|
19
|
-
* Provides cross-platform access to the PATH variable.
|
20
|
-
* Supports leading/tailing non-options.
|
21
|
-
* Supports long-options and short-options.
|
22
|
-
* Supports custom formating of options.
|
23
|
-
|
24
|
-
== INSTALL:
|
25
|
-
|
26
|
-
$ sudo gem install rprogram
|
27
|
-
|
28
|
-
== LICENSE:
|
29
|
-
|
30
|
-
The MIT License
|
31
|
-
|
32
|
-
Copyright (c) 2007-2009 Hal Brodigan
|
33
|
-
|
34
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
35
|
-
a copy of this software and associated documentation files (the
|
36
|
-
'Software'), to deal in the Software without restriction, including
|
37
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
38
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
39
|
-
permit persons to whom the Software is furnished to do so, subject to
|
40
|
-
the following conditions:
|
41
|
-
|
42
|
-
The above copyright notice and this permission notice shall be
|
43
|
-
included in all copies or substantial portions of the Software.
|
44
|
-
|
45
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
46
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
47
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
48
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
49
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
50
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
51
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# metaprogramming assistant -- metaid.rb
|
2
|
-
class Object # :nodoc:
|
3
|
-
# The hidden singleton lurks behind everyone
|
4
|
-
def metaclass; class << self; self; end; end
|
5
|
-
def meta_eval(&blk); metaclass.instance_eval(&blk); end
|
6
|
-
|
7
|
-
# A class_eval version of meta_eval
|
8
|
-
def metaclass_eval(&blk); metaclass.class_eval(&blk); end
|
9
|
-
|
10
|
-
# Adds methods to a metaclass
|
11
|
-
def meta_def(name, &blk)
|
12
|
-
meta_eval { define_method(name, &blk) }
|
13
|
-
end
|
14
|
-
|
15
|
-
# Adds class methods to a metaclass
|
16
|
-
def metaclass_def(name, &blk)
|
17
|
-
metaclass_eval { define_method(name, &blk) }
|
18
|
-
end
|
19
|
-
|
20
|
-
# Defines an instance method within a class
|
21
|
-
def class_def(name, &blk)
|
22
|
-
class_eval { define_method(name, &blk) }
|
23
|
-
end
|
24
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'rprogram/extensions/meta/object.rb'
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'yard/handlers/ruby/legacy/base'
|
2
|
-
|
3
|
-
module YARD
|
4
|
-
module Handlers
|
5
|
-
module Ruby
|
6
|
-
module Legacy
|
7
|
-
class MetaclassEvalHandler < Base
|
8
|
-
|
9
|
-
handles /(\A|\.)metaclass_eval(\s+|\()/
|
10
|
-
|
11
|
-
def process
|
12
|
-
if statement.block
|
13
|
-
parse_block(:namespace => namespace, :scope => :class)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'rprogram/yard/handlers/ruby/legacy/metaclass_eval_handler'
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'yard'
|
2
|
-
|
3
|
-
module YARD
|
4
|
-
module Handlers
|
5
|
-
module Ruby
|
6
|
-
class MetaclassEvalHandler < YARD::Handlers::Ruby::Base
|
7
|
-
|
8
|
-
handles method_call(:metaclass_eval)
|
9
|
-
|
10
|
-
def process
|
11
|
-
if (block = statement.jump(:brace_block, :do_block).last)
|
12
|
-
parse_block(block, :namespace => namespace, :scope => :class)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'rprogram/yard/handlers/ruby'
|
data/tasks/spec.rb
DELETED
data/tasks/yard.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
|
2
|
-
unless $LOAD_PATH.include?(lib_dir)
|
3
|
-
$LOAD_PATH.unshift(lib_dir)
|
4
|
-
end
|
5
|
-
|
6
|
-
require 'rprogram/yard/handlers/ruby'
|
7
|
-
|
8
|
-
YARD::Rake::YardocTask.new do |t|
|
9
|
-
t.files = ['lib/**/*.rb']
|
10
|
-
t.options = [
|
11
|
-
'--protected',
|
12
|
-
'--files', 'History.txt',
|
13
|
-
'--title', 'RProgram',
|
14
|
-
'--quiet'
|
15
|
-
]
|
16
|
-
end
|
17
|
-
|
18
|
-
task :docs => :yard
|
data.tar.gz.sig
DELETED
metadata.gz.sig
DELETED
Binary file
|