main 0.0.2 → 2.0.0

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.
metadata CHANGED
@@ -3,12 +3,12 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: main
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.2
7
- date: 2007-03-23 00:00:00 -06:00
6
+ version: 2.0.0
7
+ date: 2007-10-18 00:00:00 -06:00
8
8
  summary: main
9
9
  require_paths:
10
10
  - lib
11
- email: ara.t.howard@noaa.gov
11
+ email: ara.t.howard@gmail.com
12
12
  homepage: http://codeforpeople.com/lib/ruby/main/
13
13
  rubyforge_project:
14
14
  description:
@@ -29,31 +29,39 @@ post_install_message:
29
29
  authors:
30
30
  - Ara T. Howard
31
31
  files:
32
+ - a.rb
33
+ - gemspec.rb
34
+ - gen_readme.rb
35
+ - install.rb
32
36
  - lib
37
+ - lib/arrayfields.rb
33
38
  - lib/main
34
- - lib/main/factories.rb
39
+ - lib/main/arrayfields.rb
40
+ - lib/main/attributes.rb
41
+ - lib/main/base.rb
35
42
  - lib/main/cast.rb
43
+ - lib/main/factories.rb
44
+ - lib/main/getoptlong.rb
45
+ - lib/main/mode.rb
36
46
  - lib/main/parameter.rb
37
- - lib/main/util.rb
47
+ - lib/main/pervasives.rb
48
+ - lib/main/softspoken.rb
49
+ - lib/main/stdext.rb
38
50
  - lib/main/usage.rb
39
- - lib/main/base.rb
40
- - lib/main/getoptlong.rb
41
- - lib/main/proxy.rb
42
- - lib/main/attributes.rb
43
- - lib/main/arrayfields.rb
51
+ - lib/main/util.rb
44
52
  - lib/main.rb
45
- - test
46
- - test/main.rb
47
- - gemspec.rb
48
- - README.tmpl
49
53
  - README
50
- - gen_readme.rb
51
- - install.rb
54
+ - README.tmpl
52
55
  - samples
53
- - samples/c.rb
54
56
  - samples/a.rb
55
57
  - samples/b.rb
58
+ - samples/c.rb
56
59
  - samples/d.rb
60
+ - samples/e.rb
61
+ - samples/f.rb
62
+ - test
63
+ - test/main.rb
64
+ - TODO
57
65
  test_files:
58
66
  - test/main.rb
59
67
  rdoc_options: []
data/lib/main/proxy.rb DELETED
@@ -1,54 +0,0 @@
1
- module Main
2
- class Proxy
3
- instance_methods.each{|m| undef_method m unless m[%r/__/]}
4
-
5
- attribute 'main'
6
-
7
- def initialize main
8
- @main = main
9
- end
10
-
11
- def as_main &b
12
- @main.instance_eval &b
13
- end
14
-
15
- def run
16
- as_main do
17
- parse_parameters
18
-
19
- if params['help'] and params['help'].given?
20
- print usage.to_s
21
- exit
22
- end
23
-
24
- pre_run
25
-
26
- begin
27
- run
28
- rescue Exception => e
29
- if SystemExit === e
30
- exit_status(( e.status ))
31
- else
32
- fatal{ e }
33
- exit_status(( EXIT_FAILURE )) if exit_status == exit_success
34
- end
35
- end
36
-
37
- post_run
38
-
39
- finalize
40
-
41
- exit_status(( Integer(exit_status) rescue(exit_status ? 0 : 1) ))
42
- exit exit_status
43
- end
44
- end
45
-
46
- def method_missing m, *a, &b
47
- if @main.respond_to? m
48
- @main.send m, *a, &b
49
- else
50
- raise
51
- end
52
- end
53
- end
54
- end