reap 0.5.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/ANN-0.6.1 +3 -0
  2. data/Rakefile +19 -0
  3. data/Reapfile +46 -33
  4. data/data/site_ruby/reap/template.yaml +94 -0
  5. data/lib/reap/announce-task.rb +159 -0
  6. data/lib/reap/chmod-task.rb +82 -0
  7. data/lib/reap/package-task.rb +165 -0
  8. data/lib/reap/publish-task.rb +53 -0
  9. data/lib/reap/rdoc-task.rb +70 -0
  10. data/lib/reap/reap-all.rb +15 -0
  11. data/lib/reap/task.rb +177 -118
  12. data/lib/reap/template-task.rb +40 -0
  13. data/lib/reap/test-task.rb +159 -0
  14. data/pub/www/Reapfile +99 -0
  15. data/pub/www/images/appleboy.jpg +0 -0
  16. data/pub/www/index.html +49 -5
  17. data/{doc/files/LICENSE.html → pub/www/rdoc/classes/Reap.html} +32 -33
  18. data/pub/www/rdoc/classes/Reap/AnnounceTask.html +154 -0
  19. data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000031.html +111 -0
  20. data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000032.html +46 -0
  21. data/pub/www/rdoc/classes/Reap/ChmodTask.html +220 -0
  22. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000015.html +21 -0
  23. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000016.html +21 -0
  24. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000017.html +42 -0
  25. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000018.html +26 -0
  26. data/pub/www/rdoc/classes/Reap/PackageTask.html +181 -0
  27. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000001.html +49 -0
  28. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000002.html +74 -0
  29. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000003.html +51 -0
  30. data/pub/www/rdoc/classes/Reap/PublishTask.html +160 -0
  31. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000019.html +24 -0
  32. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000020.html +38 -0
  33. data/pub/www/rdoc/classes/Reap/RDocTask.html +220 -0
  34. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html +24 -0
  35. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000005.html +21 -0
  36. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000006.html +53 -0
  37. data/pub/www/rdoc/classes/Reap/Task.html +319 -0
  38. data/pub/www/rdoc/classes/Reap/Task.src/M000024.html +21 -0
  39. data/pub/www/rdoc/classes/Reap/Task.src/M000025.html +18 -0
  40. data/pub/www/rdoc/classes/Reap/Task.src/M000026.html +18 -0
  41. data/pub/www/rdoc/classes/Reap/Task.src/M000027.html +28 -0
  42. data/pub/www/rdoc/classes/Reap/Task.src/M000028.html +16 -0
  43. data/pub/www/rdoc/classes/Reap/Task.src/M000029.html +18 -0
  44. data/pub/www/rdoc/classes/Reap/Task.src/M000030.html +19 -0
  45. data/pub/www/rdoc/classes/Reap/TemplateTask.html +182 -0
  46. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000021.html +18 -0
  47. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000022.html +21 -0
  48. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000023.html +34 -0
  49. data/pub/www/rdoc/classes/Reap/TestTask.html +228 -0
  50. data/pub/www/rdoc/classes/Reap/TestTask.src/M000007.html +25 -0
  51. data/pub/www/rdoc/classes/Reap/TestTask.src/M000008.html +21 -0
  52. data/pub/www/rdoc/classes/Reap/TestTask.src/M000009.html +77 -0
  53. data/pub/www/rdoc/classes/Reap/TestTask.src/M000010.html +27 -0
  54. data/pub/www/rdoc/classes/Reap/TestTask.src/M000011.html +36 -0
  55. data/{doc → pub/www/rdoc}/classes/Reap/TestTask/TestResults.html +23 -55
  56. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000012.html +21 -0
  57. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000013.html +21 -0
  58. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000014.html +23 -0
  59. data/pub/www/rdoc/created.rid +1 -0
  60. data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/announce-task_rb.html +3 -3
  61. data/{doc/files/lib/reap/task_rb.html → pub/www/rdoc/files/lib/reap2/chmod-task_rb.html} +5 -5
  62. data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/package-task_rb.html +3 -3
  63. data/pub/www/{doc/files/lib/reap/template_rb.html → rdoc/files/lib/reap2/publish-task_rb.html} +10 -4
  64. data/pub/www/{doc/files/lib/reap/task_rb.html → rdoc/files/lib/reap2/rdoc-task_rb.html} +5 -5
  65. data/pub/www/{doc/files/lib/reap/reap_rb.html → rdoc/files/lib/reap2/reap-all_rb.html} +7 -7
  66. data/{doc/files/lib/reap/runner_rb.html → pub/www/rdoc/files/lib/reap2/task_rb.html} +7 -8
  67. data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/template-task_rb.html +4 -4
  68. data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/test-task_rb.html +10 -4
  69. data/{doc → pub/www/rdoc}/fr_class_index.html +0 -1
  70. data/pub/www/rdoc/fr_file_index.html +35 -0
  71. data/pub/www/rdoc/fr_method_index.html +58 -0
  72. data/{doc → pub/www/rdoc}/index.html +1 -1
  73. data/{doc → pub/www/rdoc}/rdoc-style.css +0 -0
  74. data/test/tc_reap.rb +11 -0
  75. metadata +98 -112
  76. data/bin/reap +0 -103
  77. data/doc/classes/Reap.html +0 -184
  78. data/doc/classes/Reap/AnnounceTask.html +0 -339
  79. data/doc/classes/Reap/ChmodTask.html +0 -277
  80. data/doc/classes/Reap/PackageTask.html +0 -374
  81. data/doc/classes/Reap/PublishTask.html +0 -237
  82. data/doc/classes/Reap/RDocTask.html +0 -254
  83. data/doc/classes/Reap/Runner.html +0 -299
  84. data/doc/classes/Reap/Task.html +0 -438
  85. data/doc/classes/Reap/TemplateTask.html +0 -226
  86. data/doc/classes/Reap/TestTask.html +0 -354
  87. data/doc/created.rid +0 -1
  88. data/doc/files/README.html +0 -194
  89. data/doc/files/lib/reap/reap_rb.html +0 -111
  90. data/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
  91. data/doc/files/lib/reap/tasks/package-task_rb.html +0 -108
  92. data/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
  93. data/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
  94. data/doc/files/lib/reap/tasks/template-task_rb.html +0 -109
  95. data/doc/fr_file_index.html +0 -38
  96. data/doc/fr_method_index.html +0 -73
  97. data/lib/reap/reap.rb +0 -13
  98. data/lib/reap/runner.rb +0 -90
  99. data/lib/reap/tasks/announce-task.rb +0 -149
  100. data/lib/reap/tasks/chmod-task.rb +0 -69
  101. data/lib/reap/tasks/package-task.rb +0 -157
  102. data/lib/reap/tasks/publish-task.rb +0 -39
  103. data/lib/reap/tasks/rdoc-task.rb +0 -55
  104. data/lib/reap/tasks/template-task.rb +0 -39
  105. data/lib/reap/tasks/test-task.rb +0 -140
  106. data/pub/www/doc/classes/Reap.html +0 -184
  107. data/pub/www/doc/classes/Reap/AnnounceTask.html +0 -331
  108. data/pub/www/doc/classes/Reap/ChmodTask.html +0 -278
  109. data/pub/www/doc/classes/Reap/PackageTask.html +0 -372
  110. data/pub/www/doc/classes/Reap/PublishTask.html +0 -231
  111. data/pub/www/doc/classes/Reap/RDocTask.html +0 -254
  112. data/pub/www/doc/classes/Reap/Runner.html +0 -307
  113. data/pub/www/doc/classes/Reap/Task.html +0 -390
  114. data/pub/www/doc/classes/Reap/TemplateTask.html +0 -233
  115. data/pub/www/doc/classes/Reap/TestTask.html +0 -242
  116. data/pub/www/doc/created.rid +0 -1
  117. data/pub/www/doc/files/LICENSE.html +0 -119
  118. data/pub/www/doc/files/README.html +0 -194
  119. data/pub/www/doc/files/lib/reap/runner_rb.html +0 -113
  120. data/pub/www/doc/files/lib/reap/tasks/announce-task_rb.html +0 -113
  121. data/pub/www/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
  122. data/pub/www/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
  123. data/pub/www/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
  124. data/pub/www/doc/files/lib/reap/tasks/test-task_rb.html +0 -101
  125. data/pub/www/doc/fr_class_index.html +0 -36
  126. data/pub/www/doc/fr_file_index.html +0 -39
  127. data/pub/www/doc/fr_method_index.html +0 -69
  128. data/pub/www/doc/index.html +0 -24
  129. data/pub/www/doc/rdoc-style.css +0 -208
  130. data/test/tc_require.rb +0 -11
data/bin/reap DELETED
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'getoptlong'
4
- require 'reap/reap'
5
-
6
- # dislpay the help information
7
- def show_help
8
-
9
- puts <<-HERE
10
-
11
- reap v#{Reap::VERSION}
12
-
13
- USAGE: reap [options...] <command> [arguments...]
14
-
15
- COMMANDS:
16
-
17
- help
18
- Displays this help information.
19
-
20
- HERE
21
-
22
- Reap::Task.registry.each do |t|
23
- puts " #{t.task}"
24
- puts " #{t.desc}\n\n"
25
- end
26
-
27
- puts <<-HERE
28
-
29
- OPTIONS:
30
-
31
- -v --verbose
32
- Provides extra verbose processing information.
33
-
34
- -u --use <file>
35
- Use the specified configuration file rather than
36
- the default 'Reapfile'.
37
-
38
- -p --pretend (NOT YET IMPLEMENTED)
39
- Pretend, just to see what would happen, but don't
40
- actually do anything.
41
-
42
- --version
43
- Display the current version.
44
-
45
- --help
46
- Display this help information.
47
-
48
- HERE
49
-
50
- end
51
-
52
- # START OF EXECUTION
53
-
54
- opts = GetoptLong.new(
55
- [ "-v", "--verbose", GetoptLong::NO_ARGUMENT ],
56
- [ "-p", "--pretend", GetoptLong::NO_ARGUMENT ],
57
- [ "-d", "--debug", GetoptLong::NO_ARGUMENT ],
58
- [ "-u", "--use", GetoptLong::REQUIRED_ARGUMENT ],
59
- [ "--version", GetoptLong::NO_ARGUMENT ],
60
- [ "--help", GetoptLong::NO_ARGUMENT ]
61
- )
62
-
63
- cmd = ARGV[0]
64
- args = ARGV[1..-1]
65
- config = nil
66
-
67
- opts.each do |o, a|
68
- case o
69
- when '-v'
70
- $VERBOSE = true
71
- when '-p'
72
- $PRETEND = true
73
- when '-u'
74
- config = a
75
- when '-d'
76
- $DEBUG = true
77
- when '--help'
78
- cmd = 'help'
79
- when '--version'
80
- cmd = 'version'
81
- end
82
- end
83
-
84
- cmd = cmd.downcase if cmd
85
- if cmd == nil or cmd == 'help'
86
- show_help
87
- exit 0
88
- end
89
- if cmd == 'version'
90
- puts Reap::VERSION
91
- exit 0
92
- end
93
-
94
- runner = Reap::Runner.new( config )
95
- if runner.task?( cmd.downcase.to_sym )
96
- cmd = cmd.to_s.downcase.to_sym
97
- runner.call( cmd, *args )
98
- else
99
- puts "Unknown command. Try 'reap help' for assitance."
100
- exit 0
101
- end
102
-
103
-
@@ -1,184 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Reap</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Reap</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/reap/reap_rb.html">
59
- lib/reap/reap.rb
60
- </a>
61
- <br />
62
- <a href="../files/lib/reap/task_rb.html">
63
- lib/reap/task.rb
64
- </a>
65
- <br />
66
- <a href="../files/lib/reap/runner_rb.html">
67
- lib/reap/runner.rb
68
- </a>
69
- <br />
70
- <a href="../files/lib/reap/tasks/template-task_rb.html">
71
- lib/reap/tasks/template-task.rb
72
- </a>
73
- <br />
74
- <a href="../files/lib/reap/tasks/test-task_rb.html">
75
- lib/reap/tasks/test-task.rb
76
- </a>
77
- <br />
78
- <a href="../files/lib/reap/tasks/announce-task_rb.html">
79
- lib/reap/tasks/announce-task.rb
80
- </a>
81
- <br />
82
- <a href="../files/lib/reap/tasks/publish-task_rb.html">
83
- lib/reap/tasks/publish-task.rb
84
- </a>
85
- <br />
86
- <a href="../files/lib/reap/tasks/rdoc-task_rb.html">
87
- lib/reap/tasks/rdoc-task.rb
88
- </a>
89
- <br />
90
- <a href="../files/lib/reap/tasks/package-task_rb.html">
91
- lib/reap/tasks/package-task.rb
92
- </a>
93
- <br />
94
- <a href="../files/lib/reap/tasks/chmod-task_rb.html">
95
- lib/reap/tasks/chmod-task.rb
96
- </a>
97
- <br />
98
- </td>
99
- </tr>
100
-
101
- </table>
102
- </div>
103
- <!-- banner header -->
104
-
105
- <div id="bodyContent">
106
-
107
-
108
-
109
- <div id="contextContent">
110
-
111
- <div id="description">
112
- <p>
113
- class Hash
114
- </p>
115
- <pre>
116
- def downcase_keys!
117
- new_hash = {}
118
- self.each_pair { |k,v| new_hash[k.to_s.downcase] = v }
119
- self.replace( new_hash )
120
- end
121
- </pre>
122
- <p>
123
- end
124
- </p>
125
-
126
- </div>
127
-
128
-
129
- </div>
130
-
131
-
132
- </div>
133
-
134
-
135
- <!-- if includes -->
136
-
137
- <div id="section">
138
-
139
- <div id="class-list">
140
- <h3 class="section-bar">Classes and Modules</h3>
141
-
142
- Class <a href="Reap/AnnounceTask.html" class="link">Reap::AnnounceTask</a><br />
143
- Class <a href="Reap/ChmodTask.html" class="link">Reap::ChmodTask</a><br />
144
- Class <a href="Reap/PackageTask.html" class="link">Reap::PackageTask</a><br />
145
- Class <a href="Reap/PublishTask.html" class="link">Reap::PublishTask</a><br />
146
- Class <a href="Reap/RDocTask.html" class="link">Reap::RDocTask</a><br />
147
- Class <a href="Reap/Runner.html" class="link">Reap::Runner</a><br />
148
- Class <a href="Reap/Task.html" class="link">Reap::Task</a><br />
149
- Class <a href="Reap/TemplateTask.html" class="link">Reap::TemplateTask</a><br />
150
- Class <a href="Reap/TestTask.html" class="link">Reap::TestTask</a><br />
151
-
152
- </div>
153
-
154
- <div id="constants-list">
155
- <h3 class="section-bar">Constants</h3>
156
-
157
- <div class="name-list">
158
- <table summary="Constants">
159
- <tr class="top-aligned-row context-row">
160
- <td class="context-item-name">VERSION</td>
161
- <td>=</td>
162
- <td class="context-item-value">&quot;0.5.0&quot;</td>
163
- </tr>
164
- </table>
165
- </div>
166
- </div>
167
-
168
-
169
-
170
-
171
-
172
-
173
- <!-- if method_list -->
174
-
175
-
176
- </div>
177
-
178
-
179
- <div id="validator-badges">
180
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
181
- </div>
182
-
183
- </body>
184
- </html>
@@ -1,339 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Reap::AnnounceTask</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Reap::AnnounceTask</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/reap/tasks/announce-task_rb.html">
59
- lib/reap/tasks/announce-task.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Task.html">
69
- Task
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000045">desc</a>&nbsp;&nbsp;
92
- <a href="#M000047">run</a>&nbsp;&nbsp;
93
- <a href="#M000046">setup</a>&nbsp;&nbsp;
94
- <a href="#M000044">task</a>&nbsp;&nbsp;
95
- </div>
96
- </div>
97
-
98
- </div>
99
-
100
-
101
- <!-- if includes -->
102
-
103
- <div id="section">
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <!-- if method_list -->
113
- <div id="methods">
114
- <h3 class="section-bar">Public Class methods</h3>
115
-
116
- <div id="method-M000045" class="method-detail">
117
- <a name="M000045"></a>
118
-
119
- <div class="method-heading">
120
- <a href="#M000045" class="method-signature">
121
- <span class="method-name">desc</span><span class="method-args">()</span>
122
- </a>
123
- </div>
124
-
125
- <div class="method-description">
126
- <p><a class="source-toggle" href="#"
127
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
128
- <div class="method-source-code" id="M000045-source">
129
- <pre>
130
- <span class="ruby-comment cmt"># File lib/reap/tasks/announce-task.rb, line 16</span>
131
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">desc</span> ; <span class="ruby-value str">&quot;Sends [ANN] email to ruby-talk or other list.&quot;</span> ; <span class="ruby-keyword kw">end</span>
132
- </pre>
133
- </div>
134
- </div>
135
- </div>
136
-
137
- <div id="method-M000044" class="method-detail">
138
- <a name="M000044"></a>
139
-
140
- <div class="method-heading">
141
- <a href="#M000044" class="method-signature">
142
- <span class="method-name">task</span><span class="method-args">()</span>
143
- </a>
144
- </div>
145
-
146
- <div class="method-description">
147
- <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000044-source">
150
- <pre>
151
- <span class="ruby-comment cmt"># File lib/reap/tasks/announce-task.rb, line 14</span>
152
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span> ; <span class="ruby-identifier">:announce</span> ; <span class="ruby-keyword kw">end</span>
153
- </pre>
154
- </div>
155
- </div>
156
- </div>
157
-
158
- <h3 class="section-bar">Public Instance methods</h3>
159
-
160
- <div id="method-M000047" class="method-detail">
161
- <a name="M000047"></a>
162
-
163
- <div class="method-heading">
164
- <a href="#M000047" class="method-signature">
165
- <span class="method-name">run</span><span class="method-args">()</span>
166
- </a>
167
- </div>
168
-
169
- <div class="method-description">
170
- <p><a class="source-toggle" href="#"
171
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
172
- <div class="method-source-code" id="M000047-source">
173
- <pre>
174
- <span class="ruby-comment cmt"># File lib/reap/tasks/announce-task.rb, line 116</span>
175
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
176
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\n#{@message}\n\n&quot;</span>
177
- <span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;Send? [Y/n] &quot;</span>
178
- <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">inp</span> = <span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">gets</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] ; <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> ; <span class="ruby-keyword kw">end</span>
179
- <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">inp</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'y'</span>).<span class="ruby-identifier">downcase</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'y'</span>
180
- <span class="ruby-comment cmt"># ask for password</span>
181
- <span class="ruby-identifier">print</span> <span class="ruby-node">&quot;Password for #{@account}: &quot;</span>
182
- <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">passwd</span> = <span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">gets</span>.<span class="ruby-identifier">strip</span> ; <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> ; <span class="ruby-keyword kw">end</span>
183
- <span class="ruby-identifier">mail</span> = <span class="ruby-node">%Q{
184
- |From: #{@from}
185
- |To: #{@address}
186
- |Subject: #{@subject}
187
- |
188
- |#{@message}
189
- }</span>.<span class="ruby-identifier">margin</span>
190
- <span class="ruby-keyword kw">begin</span>
191
- <span class="ruby-comment cmt"># --- Send using SMTP object and an adaptor</span>
192
- <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SMTP</span>.<span class="ruby-identifier">enable_tls</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SMTP</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:enable_tls</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@tls</span>
193
- <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SMTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-ivar">@server</span>, <span class="ruby-ivar">@port</span>, <span class="ruby-ivar">@domain</span>, <span class="ruby-ivar">@account</span>, <span class="ruby-identifier">passwd</span>, <span class="ruby-ivar">@authtype</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
194
- <span class="ruby-identifier">s</span>.<span class="ruby-identifier">send_message</span> <span class="ruby-identifier">mail</span>, <span class="ruby-ivar">@from</span>, <span class="ruby-ivar">@address</span>
195
- <span class="ruby-keyword kw">end</span>
196
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Email sent successfully to #{@address}.&quot;</span>
197
- <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
198
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Email delivery failed.&quot;</span>
199
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>
200
- <span class="ruby-keyword kw">end</span>
201
- <span class="ruby-keyword kw">else</span>
202
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reap announce task canceled.&quot;</span>
203
- <span class="ruby-identifier">exit</span> <span class="ruby-value">0</span>
204
- <span class="ruby-keyword kw">end</span>
205
- <span class="ruby-keyword kw">end</span>
206
- </pre>
207
- </div>
208
- </div>
209
- </div>
210
-
211
- <div id="method-M000046" class="method-detail">
212
- <a name="M000046"></a>
213
-
214
- <div class="method-heading">
215
- <a href="#M000046" class="method-signature">
216
- <span class="method-name">setup</span><span class="method-args">()</span>
217
- </a>
218
- </div>
219
-
220
- <div class="method-description">
221
- <p><a class="source-toggle" href="#"
222
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
223
- <div class="method-source-code" id="M000046-source">
224
- <pre>
225
- <span class="ruby-comment cmt"># File lib/reap/tasks/announce-task.rb, line 19</span>
226
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
227
- <span class="ruby-ivar">@address</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'to'</span>]
228
- <span class="ruby-ivar">@from</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'from'</span>].<span class="ruby-identifier">to_s</span>
229
- <span class="ruby-ivar">@server</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'server'</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">strip</span>
230
- <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'port'</span>] <span class="ruby-operator">||</span> <span class="ruby-value">25</span>
231
- <span class="ruby-ivar">@domain</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'domain'</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">strip</span>
232
- <span class="ruby-ivar">@account</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'account'</span>].<span class="ruby-identifier">to_s</span>
233
- <span class="ruby-ivar">@authtype</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'authtype'</span>].<span class="ruby-identifier">to_sym</span>
234
- <span class="ruby-ivar">@tls</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'tls'</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
235
-
236
- <span class="ruby-ivar">@title</span> = <span class="ruby-identifier">master</span>[<span class="ruby-value str">'title'</span>]
237
- <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">master</span>[<span class="ruby-value str">'version'</span>]
238
- <span class="ruby-ivar">@summary</span> = <span class="ruby-identifier">master</span>[<span class="ruby-value str">'summary'</span>]
239
-
240
- <span class="ruby-ivar">@subject</span> = <span class="ruby-node">&quot;[ANN] #{@title}, v#{@version}&quot;</span>
241
-
242
- <span class="ruby-comment cmt">#raise &quot;DOMAIN is a required field&quot; if @domain.empty?</span>
243
-
244
- <span class="ruby-comment cmt"># header</span>
245
- <span class="ruby-identifier">announce</span> = <span class="ruby-node">%Q{
246
- |
247
- |A N N O U N C I N G
248
- |
249
- |#{@title}, v#{@version}
250
- |
251
- |#{@summary}
252
- |
253
- }</span>.<span class="ruby-identifier">margin</span>.<span class="ruby-identifier">center_lines</span>(<span class="ruby-value">66</span>)
254
-
255
- <span class="ruby-comment cmt"># abstract</span>
256
- <span class="ruby-identifier">abstract</span> = <span class="ruby-value str">''</span>
257
- <span class="ruby-identifier">desc</span> = <span class="ruby-identifier">description</span>
258
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">desc</span>
259
- <span class="ruby-identifier">abstract</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n\n&quot;</span>
260
- <span class="ruby-identifier">abstract</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;ABSTRACT: #{desc}&quot;</span>.<span class="ruby-identifier">word_wrap</span>(<span class="ruby-value">72</span>)
261
- <span class="ruby-identifier">abstract</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
262
- <span class="ruby-keyword kw">end</span>
263
-
264
- <span class="ruby-comment cmt"># more info</span>
265
- <span class="ruby-identifier">info</span> = <span class="ruby-value str">''</span>
266
- <span class="ruby-identifier">info_arr</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'info'</span>]
267
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">info_arr</span>.<span class="ruby-identifier">empty?</span>
268
- <span class="ruby-identifier">info</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
269
- <span class="ruby-identifier">info</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;For More Information&quot;</span>.<span class="ruby-identifier">center</span>(<span class="ruby-value">67</span>)
270
- <span class="ruby-identifier">info</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
271
- <span class="ruby-identifier">info_arr</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">mi</span><span class="ruby-operator">|</span> <span class="ruby-identifier">info</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{mi}&quot;</span>.<span class="ruby-identifier">center</span>(<span class="ruby-value">67</span>) }
272
- <span class="ruby-identifier">info</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n\n&quot;</span>
273
- <span class="ruby-keyword kw">end</span>
274
-
275
- <span class="ruby-comment cmt"># slogan</span>
276
- <span class="ruby-identifier">slogan</span> = <span class="ruby-value str">''</span>
277
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'slogan'</span>]
278
- <span class="ruby-identifier">slogan</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n\n&quot;</span>
279
- <span class="ruby-identifier">slogan</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'slogan'</span>].<span class="ruby-identifier">center</span>(<span class="ruby-value">67</span>)
280
- <span class="ruby-identifier">slogan</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n\n&quot;</span>
281
- <span class="ruby-keyword kw">end</span>
282
-
283
- <span class="ruby-comment cmt"># memo</span>
284
- <span class="ruby-identifier">memo</span> = <span class="ruby-value str">''</span>
285
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'memo'</span>]
286
- <span class="ruby-identifier">memo</span> = <span class="ruby-value str">''</span>
287
- <span class="ruby-identifier">memo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value str">'-'</span> <span class="ruby-operator">*</span> <span class="ruby-value">72</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
288
- <span class="ruby-identifier">memo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;(Memo)\n\n&quot;</span>
289
- <span class="ruby-identifier">memo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'memo'</span>].<span class="ruby-identifier">fold</span>.<span class="ruby-identifier">word_wrap</span>(<span class="ruby-value">72</span>)
290
- <span class="ruby-comment cmt">#memo &lt;&lt; &quot;\n&quot;</span>
291
- <span class="ruby-keyword kw">end</span>
292
-
293
- <span class="ruby-comment cmt"># msg file</span>
294
- <span class="ruby-identifier">msg</span> = <span class="ruby-value str">''</span>
295
- <span class="ruby-identifier">msg_file</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'file'</span>]
296
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg_file</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>( <span class="ruby-identifier">msg_file</span> )
297
- <span class="ruby-identifier">msg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value str">&quot;-&quot;</span> <span class="ruby-operator">*</span> <span class="ruby-value">72</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
298
- <span class="ruby-identifier">msg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;(from #{msg_file})\n\n&quot;</span>
299
- <span class="ruby-identifier">mg</span> = <span class="ruby-value str">''</span>
300
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">msg_file</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">gets</span>(<span class="ruby-keyword kw">nil</span>) }
301
- <span class="ruby-identifier">msg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">mg</span>.<span class="ruby-identifier">fold</span>.<span class="ruby-identifier">word_wrap</span>(<span class="ruby-value">72</span>)
302
- <span class="ruby-keyword kw">end</span>
303
-
304
- <span class="ruby-comment cmt"># stamp</span>
305
- <span class="ruby-identifier">stamp</span> = <span class="ruby-value str">''</span>
306
- <span class="ruby-identifier">stamp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value str">&quot;-&quot;</span> <span class="ruby-operator">*</span> <span class="ruby-value">72</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
307
- <span class="ruby-identifier">stamp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">%Q{
308
- |Generated by Reap, a dedicated Ruby Packaging Assistant.
309
- |Do you Ruby? (http://www.ruby-lang.org)
310
- }</span>.<span class="ruby-identifier">margin</span>
311
- <span class="ruby-identifier">stamp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n\n&quot;</span>
312
-
313
- <span class="ruby-ivar">@message</span> = <span class="ruby-value str">''</span>
314
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">announce</span>
315
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">abstract</span>
316
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">info</span>
317
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">slogan</span>
318
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">memo</span>
319
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">msg</span>
320
- <span class="ruby-ivar">@message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stamp</span>
321
- <span class="ruby-keyword kw">end</span>
322
- </pre>
323
- </div>
324
- </div>
325
- </div>
326
-
327
-
328
- </div>
329
-
330
-
331
- </div>
332
-
333
-
334
- <div id="validator-badges">
335
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
336
- </div>
337
-
338
- </body>
339
- </html>