gem_plugin 0.2.2 → 0.2.3

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.
Files changed (36) hide show
  1. data.tar.gz.sig +4 -0
  2. data/CHANGELOG +2 -0
  3. data/Manifest +15 -0
  4. data/gem_plugin.gemspec +53 -0
  5. data/resources/Rakefile +39 -15
  6. data/setup.rb +1360 -0
  7. metadata +79 -72
  8. metadata.gz.sig +0 -0
  9. data/Rakefile +0 -41
  10. data/doc/rdoc/classes/GemPlugin.html +0 -248
  11. data/doc/rdoc/classes/GemPlugin.src/M000001.html +0 -19
  12. data/doc/rdoc/classes/GemPlugin/Base.html +0 -194
  13. data/doc/rdoc/classes/GemPlugin/Base.src/M000002.html +0 -20
  14. data/doc/rdoc/classes/GemPlugin/Base.src/M000003.html +0 -18
  15. data/doc/rdoc/classes/GemPlugin/Base.src/M000004.html +0 -18
  16. data/doc/rdoc/classes/GemPlugin/Manager.html +0 -377
  17. data/doc/rdoc/classes/GemPlugin/Manager.src/M000005.html +0 -23
  18. data/doc/rdoc/classes/GemPlugin/Manager.src/M000006.html +0 -49
  19. data/doc/rdoc/classes/GemPlugin/Manager.src/M000007.html +0 -19
  20. data/doc/rdoc/classes/GemPlugin/Manager.src/M000008.html +0 -29
  21. data/doc/rdoc/classes/GemPlugin/Manager.src/M000009.html +0 -18
  22. data/doc/rdoc/classes/GemPlugin/Manager.src/M000010.html +0 -28
  23. data/doc/rdoc/classes/GemPlugin/Manager.src/M000011.html +0 -28
  24. data/doc/rdoc/classes/GemPlugin/PluginNotLoaded.html +0 -111
  25. data/doc/rdoc/created.rid +0 -1
  26. data/doc/rdoc/files/COPYING.html +0 -756
  27. data/doc/rdoc/files/LICENSE.html +0 -168
  28. data/doc/rdoc/files/README.html +0 -265
  29. data/doc/rdoc/files/lib/gem_plugin_rb.html +0 -109
  30. data/doc/rdoc/fr_class_index.html +0 -30
  31. data/doc/rdoc/fr_file_index.html +0 -30
  32. data/doc/rdoc/fr_method_index.html +0 -37
  33. data/doc/rdoc/index.html +0 -24
  34. data/doc/rdoc/rdoc-style.css +0 -208
  35. data/resources/tools/rakehelp.rb +0 -106
  36. data/tools/rakehelp.rb +0 -106
metadata CHANGED
@@ -1,104 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
3
- specification_version: 1
2
+ rubygems_version: 0.9.4.6
3
+ specification_version: 2
4
4
  name: gem_plugin
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.2
7
- date: 2007-01-19 00:00:00 -08:00
8
- summary: A plugin system based only on rubygems that uses dependencies only
6
+ version: 0.2.3
7
+ date: 2007-10-26 00:00:00 -04:00
8
+ summary: A plugin system based on rubygems that uses dependencies only
9
9
  require_paths:
10
10
  - lib
11
- email:
12
- homepage:
13
- rubyforge_project:
14
- description: A plugin system based only on rubygems that uses dependencies only
11
+ email: ""
12
+ homepage: ""
13
+ rubyforge_project: mongrel
14
+ description: A plugin system based on rubygems that uses dependencies only
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
19
+ required_ruby_version: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ">"
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.0.0
23
+ version: "0"
24
+ version:
25
+ required_rubygems_version: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: "0"
24
30
  version:
25
31
  platform: ruby
26
32
  signing_key:
27
33
  cert_chain:
34
+ - |
35
+ -----BEGIN CERTIFICATE-----
36
+ MIIDUDCCAjigAwIBAgIBADANBgkqhkiG9w0BAQUFADBOMRwwGgYDVQQDDBNtb25n
37
+ cmVsLWRldmVsb3BtZW50MRkwFwYKCZImiZPyLGQBGRYJcnVieWZvcmdlMRMwEQYK
38
+ CZImiZPyLGQBGRYDb3JnMB4XDTA3MDkxNjEwM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wo3
73
+ yyGLTHlRYn2c9PSbM1B63Yg+LqSSAa4QSU3Wv9pNdffVpvwHPVEQpO7ZDo5slQFL
74
+ Gf6+gbD/eZAvhpvmn8JlXb+LxKaFVMs2Yvrk1xOuT76SsPjEGWxkr7jZCIpsYfgQ
75
+ ALN3mi/9z0Mf1YroliUgF0v5Yw==
76
+ -----END CERTIFICATE-----
77
+
28
78
  post_install_message:
29
79
  authors:
30
80
  - Zed A. Shaw
31
81
  files:
32
- - COPYING
33
- - LICENSE
34
- - README
35
- - Rakefile
36
- - bin/gpgen
37
- - doc/rdoc/files
38
- - doc/rdoc/index.html
39
- - doc/rdoc/rdoc-style.css
40
- - doc/rdoc/fr_method_index.html
41
- - doc/rdoc/fr_class_index.html
42
- - doc/rdoc/fr_file_index.html
43
- - doc/rdoc/created.rid
44
- - doc/rdoc/classes
45
- - doc/rdoc/files/lib
46
- - doc/rdoc/files/LICENSE.html
47
- - doc/rdoc/files/README.html
48
- - doc/rdoc/files/COPYING.html
49
- - doc/rdoc/files/lib/gem_plugin_rb.html
50
- - doc/rdoc/classes/GemPlugin.html
51
- - doc/rdoc/classes/GemPlugin.src
52
- - doc/rdoc/classes/GemPlugin
53
- - doc/rdoc/classes/GemPlugin.src/M000001.html
54
- - doc/rdoc/classes/GemPlugin/Manager.html
55
- - doc/rdoc/classes/GemPlugin/PluginNotLoaded.html
56
- - doc/rdoc/classes/GemPlugin/Base.html
57
- - doc/rdoc/classes/GemPlugin/Base.src
58
- - doc/rdoc/classes/GemPlugin/Manager.src
59
- - doc/rdoc/classes/GemPlugin/Base.src/M000002.html
60
- - doc/rdoc/classes/GemPlugin/Base.src/M000003.html
61
- - doc/rdoc/classes/GemPlugin/Base.src/M000004.html
62
- - doc/rdoc/classes/GemPlugin/Manager.src/M000008.html
63
- - doc/rdoc/classes/GemPlugin/Manager.src/M000009.html
64
- - doc/rdoc/classes/GemPlugin/Manager.src/M000010.html
65
- - doc/rdoc/classes/GemPlugin/Manager.src/M000011.html
66
- - doc/rdoc/classes/GemPlugin/Manager.src/M000005.html
67
- - doc/rdoc/classes/GemPlugin/Manager.src/M000006.html
68
- - doc/rdoc/classes/GemPlugin/Manager.src/M000007.html
69
82
  - test/test_plugins.rb
70
- - lib/gem_plugin.rb
71
- - tools/rakehelp.rb
72
- - resources/lib
73
- - resources/LICENSE
74
- - resources/Rakefile
75
- - resources/tools
83
+ - setup.rb
84
+ - resources/resources/defaults.yaml
76
85
  - resources/README
77
- - resources/resources
78
- - resources/COPYING
79
- - resources/lib/project
86
+ - resources/Rakefile
87
+ - resources/LICENSE
80
88
  - resources/lib/project/init.rb
81
- - resources/tools/rakehelp.rb
82
- - resources/resources/defaults.yaml
89
+ - resources/COPYING
90
+ - README
91
+ - Manifest
92
+ - LICENSE
93
+ - lib/gem_plugin.rb
94
+ - COPYING
95
+ - CHANGELOG
96
+ - bin/gpgen
97
+ - gem_plugin.gemspec
83
98
  test_files:
84
99
  - test/test_plugins.rb
85
100
  rdoc_options: []
86
101
 
87
- extra_rdoc_files:
88
- - README
102
+ extra_rdoc_files: []
103
+
89
104
  executables:
90
105
  - gpgen
91
106
  extensions: []
92
107
 
93
108
  requirements: []
94
109
 
95
- dependencies:
96
- - !ruby/object:Gem::Dependency
97
- name: rake
98
- version_requirement:
99
- version_requirements: !ruby/object:Gem::Version::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: "0.7"
104
- version:
110
+ dependencies: []
111
+
Binary file
data/Rakefile DELETED
@@ -1,41 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/clean'
4
- require 'rake/gempackagetask'
5
- require 'rake/rdoctask'
6
- require 'tools/rakehelp'
7
- require 'fileutils'
8
- include FileUtils
9
-
10
- setup_tests
11
- setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"]
12
-
13
- setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
14
-
15
- desc "Does a full compile, test run"
16
- task :default => [:test, :package]
17
-
18
- version = "0.2.2"
19
- name="gem_plugin"
20
-
21
- setup_gem(name, version) do |spec|
22
- spec.author="Zed A. Shaw"
23
- spec.summary = "A plugin system based only on rubygems that uses dependencies only"
24
- spec.description = spec.summary
25
- spec.test_file = "test/test_plugins.rb"
26
- spec.files += Dir.glob("resources/**/*")
27
- spec.executables=["gpgen"]
28
- spec.add_dependency("rake", ">= 0.7")
29
- end
30
-
31
- task :install => [:test, :package] do
32
- sh %{gem install pkg/#{name}-#{version}}
33
- end
34
-
35
- task :uninstall => [:clean] do
36
- sh %{gem uninstall #{name}}
37
- end
38
-
39
- task :site => [:rerdoc] do
40
- sh %{ rsync -r doc/rdoc/* rubyforge.org:/var/www/gforge-projects/mongrel/gem_plugin_rdoc/ }
41
- end
@@ -1,248 +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: GemPlugin</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">GemPlugin</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/gem_plugin_rb.html">
59
- lib/gem_plugin.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Implements a dynamic plugin loading, configuration, and discovery system
78
- based on RubyGems and a simple additional name space that looks like a URI.
79
- </p>
80
- <p>
81
- A plugin is created and put into a category with the following code:
82
- </p>
83
- <pre>
84
- class MyThing &lt; GemPlugin::Plugin &quot;/things&quot;
85
- ...
86
- end
87
- </pre>
88
- <p>
89
- What this does is sets up your MyThing in the plugin registry via <a
90
- href="GemPlugin/Manager.html">GemPlugin::Manager</a>. You can then later
91
- get this plugin with <a
92
- href="GemPlugin/Manager.html#M000008">GemPlugin::Manager.create</a>(&quot;/things/mything&quot;)
93
- and can also pass in options as a second parameter.
94
- </p>
95
- <p>
96
- This isn&#8216;t such a big deal, but the power is really from the <a
97
- href="GemPlugin/Manager.html#M000006">GemPlugin::Manager.load</a> method.
98
- This method will go through the installed gems and require_gem any that
99
- depend on the gem_plugin RubyGem. You can arbitrarily include or exclude
100
- gems based on what they also depend on, thus letting you load these gems
101
- when appropriate.
102
- </p>
103
- <p>
104
- Since this system was written originally for the Mongrel project
105
- that&#8216;ll be the best example of using it.
106
- </p>
107
- <p>
108
- Imagine you have a neat plugin for Mongrel called snazzy_command that gives
109
- the mongrel_rails a new command snazzy (like: mongrel_rails snazzy).
110
- You&#8216;d like people to be able to grab this plugin if they want and use
111
- it, because it&#8216;s snazzy.
112
- </p>
113
- <p>
114
- First thing you do is create a gem of your project and make sure that it
115
- depends on &quot;mongrel&quot; AND &quot;gem_plugin&quot;. This signals to
116
- the <a href="GemPlugin.html">GemPlugin</a> system that this is a plugin for
117
- mongrel.
118
- </p>
119
- <p>
120
- Next you put this code into a file like lib/init.rb (can be anything
121
- really):
122
- </p>
123
- <pre>
124
- class Snazzy &lt; GemPlugin::Plugin &quot;/commands&quot;
125
- ...
126
- end
127
- </pre>
128
- <p>
129
- Then when you create your gem you have the following bits in your Rakefile:
130
- </p>
131
- <pre>
132
- spec.add_dependency('mongrel', '&gt;= 0.3.9')
133
- spec.add_dependency('gem_plugin', '&gt;= 0.1')
134
- spec.autorequire = 'init.rb'
135
- </pre>
136
- <p>
137
- Finally, you just have to now publish this gem for people to install and
138
- Mongrel will &quot;magically&quot; be able to install it.
139
- </p>
140
- <p>
141
- The &quot;magic&quot; part though is pretty simple and done via the <a
142
- href="GemPlugin/Manager.html#M000006">GemPlugin::Manager.load</a> method.
143
- Read that to see how it is really done.
144
- </p>
145
-
146
- </div>
147
-
148
-
149
- </div>
150
-
151
- <div id="method-list">
152
- <h3 class="section-bar">Methods</h3>
153
-
154
- <div class="name-list">
155
- <a href="#M000001">Plugin</a>&nbsp;&nbsp;
156
- </div>
157
- </div>
158
-
159
- </div>
160
-
161
-
162
- <!-- if includes -->
163
-
164
- <div id="section">
165
-
166
- <div id="class-list">
167
- <h3 class="section-bar">Classes and Modules</h3>
168
-
169
- Class <a href="GemPlugin/Base.html" class="link">GemPlugin::Base</a><br />
170
- Class <a href="GemPlugin/Manager.html" class="link">GemPlugin::Manager</a><br />
171
- Class <a href="GemPlugin/PluginNotLoaded.html" class="link">GemPlugin::PluginNotLoaded</a><br />
172
-
173
- </div>
174
-
175
- <div id="constants-list">
176
- <h3 class="section-bar">Constants</h3>
177
-
178
- <div class="name-list">
179
- <table summary="Constants">
180
- <tr class="top-aligned-row context-row">
181
- <td class="context-item-name">EXCLUDE</td>
182
- <td>=</td>
183
- <td class="context-item-value">true</td>
184
- </tr>
185
- <tr class="top-aligned-row context-row">
186
- <td class="context-item-name">INCLUDE</td>
187
- <td>=</td>
188
- <td class="context-item-value">false</td>
189
- </tr>
190
- </table>
191
- </div>
192
- </div>
193
-
194
-
195
-
196
-
197
-
198
-
199
- <!-- if method_list -->
200
- <div id="methods">
201
- <h3 class="section-bar">Public Class methods</h3>
202
-
203
- <div id="method-M000001" class="method-detail">
204
- <a name="M000001"></a>
205
-
206
- <div class="method-heading">
207
- <a href="GemPlugin.src/M000001.html" target="Code" class="method-signature"
208
- onclick="popupCode('GemPlugin.src/M000001.html');return false;">
209
- <span class="method-name">Plugin</span><span class="method-args">(c)</span>
210
- </a>
211
- </div>
212
-
213
- <div class="method-description">
214
- <p>
215
- This nifty function works with the <a
216
- href="GemPlugin/Base.html">GemPlugin::Base</a> to give you the syntax:
217
- </p>
218
- <pre>
219
- class MyThing &lt; GemPlugin::Plugin &quot;/things&quot;
220
- ...
221
- end
222
- </pre>
223
- <p>
224
- What it does is temporarily sets the GemPlugin::Base.category, and then
225
- returns <a href="GemPlugin/Base.html">GemPlugin::Base</a>. Since the next
226
- immediate thing Ruby does is use this returned class to create the new
227
- class, <a href="GemPlugin/Base.html#M000002">GemPlugin::Base.inherited</a>
228
- gets called. <a
229
- href="GemPlugin/Base.html#M000002">GemPlugin::Base.inherited</a> then uses
230
- the set category, class name, and class to register the plugin in the right
231
- way.
232
- </p>
233
- </div>
234
- </div>
235
-
236
-
237
- </div>
238
-
239
-
240
- </div>
241
-
242
-
243
- <div id="validator-badges">
244
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
245
- </div>
246
-
247
- </body>
248
- </html>