pupu 0.0.1 → 0.0.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +12 -1
- data/README.textile +38 -104
- data/Rakefile +17 -54
- data/TODO.txt +11 -6
- data/examples/merb/README.textile +7 -0
- data/examples/merb/Rakefile +30 -0
- data/examples/merb/application.rb +13 -0
- data/examples/merb/config/framework.rb +7 -0
- data/examples/merb/config/init.rb +48 -0
- data/examples/{blog/media/pupu/autocompleter → merb/public}/javascripts/initializers/autocompleter.js +0 -0
- data/examples/{blog/media/pupu/flash → merb/public}/javascripts/initializers/flash.js +0 -0
- data/examples/{blog/media/pupu/lighter → merb/public/javascripts}/initializers/lighter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/images/spinner.gif +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.local.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.request.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/observer.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/autocompleter/stylesheets/autocompleter.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/ie.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/print.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/screen.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/forms.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.png +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/ie.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/print.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/reset.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/typography.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/javascripts/flash.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/flash/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/TODO.txt +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.css.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.html.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.js.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.md.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.php.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.ruby.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.shell.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.sql.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.template.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/ZeroClipboard.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/lighter.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/media/ZeroClipboard.swf +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/metadata.yml +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.git.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.mocha.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.panic.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.standard.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.template.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.tutti.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.twilight.css +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/CHANGELOG +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/LICENSE +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/README.textile +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/Rakefile +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/TODO +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/config.rb +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-core.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-more.js +0 -0
- data/examples/{blog/media → merb/public}/pupu/mootools/metadata.yml +0 -0
- data/examples/{blog/media/pupu/flash → merb/public}/stylesheets/initializers/flash.css +0 -0
- data/examples/merb/spec/application_spec.rb +37 -0
- data/examples/merb/spec/spec_helper.rb +16 -0
- data/examples/merb/views/examples/arguments.html.erb +0 -0
- data/examples/merb/views/examples/dependencies.html.erb +0 -0
- data/examples/merb/views/examples/simple.html.erb +4 -0
- data/examples/merb/views/index.html.erb +7 -0
- data/examples/merb/views/layout.html.erb +12 -0
- data/examples/rango/README.textile +7 -0
- data/examples/{blog → rango}/Rakefile +0 -0
- data/examples/{blog → rango}/config.ru +2 -3
- data/examples/{blog → rango}/init.rb +6 -5
- data/examples/{blog → rango}/media/javascripts/initializers/lighter.js +0 -0
- data/examples/rango/media/pupu/autocompleter/CHANGELOG +1 -0
- data/examples/rango/media/pupu/autocompleter/LICENSE +20 -0
- data/examples/rango/media/pupu/autocompleter/README.textile +26 -0
- data/examples/rango/media/pupu/autocompleter/Rakefile +29 -0
- data/examples/rango/media/pupu/autocompleter/TODO +1 -0
- data/examples/rango/media/pupu/autocompleter/config.rb +12 -0
- data/examples/rango/media/pupu/autocompleter/images/spinner.gif +0 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.js +442 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.local.js +31 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.request.js +109 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/initializers/autocompleter.js +26 -0
- data/examples/rango/media/pupu/autocompleter/javascripts/observer.js +69 -0
- data/examples/rango/media/pupu/autocompleter/metadata.yml +5 -0
- data/examples/rango/media/pupu/autocompleter/stylesheets/autocompleter.css +68 -0
- data/examples/rango/media/pupu/blueprint/CHANGELOG +1 -0
- data/examples/rango/media/pupu/blueprint/LICENSE +20 -0
- data/examples/rango/media/pupu/blueprint/README.textile +22 -0
- data/examples/rango/media/pupu/blueprint/Rakefile +29 -0
- data/examples/rango/media/pupu/blueprint/TODO +3 -0
- data/examples/rango/media/pupu/blueprint/config.rb +18 -0
- data/examples/rango/media/pupu/blueprint/metadata.yml +5 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/ie.css +26 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +32 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/screen.css +97 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +14 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +71 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +18 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +40 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +10 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/screen.css +109 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/print.css +30 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/screen.css +251 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/forms.css +49 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.css +212 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.png +0 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/ie.css +59 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/print.css +85 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/reset.css +38 -0
- data/examples/rango/media/pupu/blueprint/stylesheets/src/typography.css +105 -0
- data/examples/rango/media/pupu/flash/CHANGELOG +1 -0
- data/examples/rango/media/pupu/flash/LICENSE +20 -0
- data/examples/rango/media/pupu/flash/README.textile +22 -0
- data/examples/rango/media/pupu/flash/Rakefile +37 -0
- data/examples/rango/media/pupu/flash/TODO +1 -0
- data/examples/rango/media/pupu/flash/config.rb +11 -0
- data/examples/rango/media/pupu/flash/javascripts/flash.js +63 -0
- data/examples/rango/media/pupu/flash/javascripts/initializers/flash.js +12 -0
- data/examples/rango/media/pupu/flash/metadata.yml +5 -0
- data/examples/rango/media/pupu/flash/stylesheets/initializers/flash.css +21 -0
- data/examples/rango/media/pupu/lighter/CHANGELOG +2 -0
- data/examples/rango/media/pupu/lighter/LICENSE +20 -0
- data/examples/rango/media/pupu/lighter/README.textile +19 -0
- data/examples/rango/media/pupu/lighter/TODO.txt +4 -0
- data/examples/rango/media/pupu/lighter/config.rb +20 -0
- data/examples/rango/media/pupu/lighter/initializers/lighter.js +11 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.css.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.html.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.js.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.md.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.php.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.ruby.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.shell.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.sql.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/Fuel.template.js +45 -0
- data/examples/rango/media/pupu/lighter/javascripts/ZeroClipboard.js +1 -0
- data/examples/rango/media/pupu/lighter/javascripts/lighter.js +1 -0
- data/examples/rango/media/pupu/lighter/media/ZeroClipboard.swf +0 -0
- data/examples/rango/media/pupu/lighter/metadata.yml +5 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.git.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.mocha.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.panic.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.standard.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.template.css +101 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.tutti.css +1 -0
- data/examples/rango/media/pupu/lighter/stylesheets/Flame.twilight.css +1 -0
- data/examples/rango/media/pupu/mootools/CHANGELOG +2 -0
- data/examples/rango/media/pupu/mootools/LICENSE +20 -0
- data/examples/rango/media/pupu/mootools/README.textile +19 -0
- data/examples/rango/media/pupu/mootools/Rakefile +29 -0
- data/examples/rango/media/pupu/mootools/TODO +1 -0
- data/examples/rango/media/pupu/mootools/config.rb +8 -0
- data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-core.js +350 -0
- data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-more.js +154 -0
- data/examples/rango/media/pupu/mootools/metadata.yml +5 -0
- data/examples/rango/spec/pupu_spec.rb +37 -0
- data/examples/rango/spec/spec_helper.rb +15 -0
- data/examples/{blog → rango}/templates/base.html.haml +2 -3
- data/examples/rango/templates/examples/arguments.html.haml +7 -0
- data/examples/{blog → rango}/templates/examples/base.html.haml +3 -3
- data/examples/{blog → rango}/templates/examples/dependencies.html.haml +1 -1
- data/examples/{blog → rango}/templates/examples/simple.html.haml +1 -1
- data/examples/{blog → rango}/templates/index.html.haml +0 -0
- data/lib/pupu.rb +1 -1
- data/lib/pupu/adapters/merb.rb +4 -10
- data/lib/pupu/adapters/rails.rb +6 -0
- data/lib/pupu/adapters/rango.rb +0 -1
- data/lib/pupu/cli.rb +7 -3
- data/lib/pupu/github.rb +1 -1
- data/pupu.pre.gemspec +44 -0
- data/script/spec +2 -0
- data/tasks/benchmark.rake +11 -0
- data/tasks/gem.rake +23 -0
- data/tasks/hooks.rake +12 -0
- data/tasks/release.rake +68 -0
- data/tasks/spec.rake +27 -0
- data/tasks/submodules.rake +33 -0
- data/tasks/yardoc.rake +9 -0
- metadata +227 -115
- data/examples/blog/Thorfile +0 -9
- data/examples/blog/bin/pupu +0 -4
- data/examples/blog/config/pupu.rb +0 -4
- data/examples/blog/templates/examples/arguments.html.haml +0 -7
- data/url.rb +0 -20
- data/url_spec.rb +0 -35
data/CHANGELOG
CHANGED
@@ -1 +1,12 @@
|
|
1
|
-
|
1
|
+
= Version 0.0.1
|
2
|
+
* CLI interface with search, install & uninstall
|
3
|
+
* Rake & Thor tasks wrapping the CLI interface
|
4
|
+
* Helpers
|
5
|
+
* Dependencies handling
|
6
|
+
* Metadata handling
|
7
|
+
* Rango & Merb support
|
8
|
+
* Rango & Merb examples
|
9
|
+
|
10
|
+
= Version 0.0.2
|
11
|
+
* Rails support
|
12
|
+
* Better documentation
|
data/README.textile
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
h1. About
|
1
|
+
h1. About Pupu
|
2
2
|
|
3
|
-
Pupu is a plugin system for media stuff like JS
|
3
|
+
"Pupu":http://github.com/botanicus/pupu is a framework-agnostic plugin system for media stuff like JS/CSS frameworks and its plugins, icon sets etc. You can "search GitHub":http://github.com/search?type=Repositories&language=&q=pupu&repo=&langOverride=&x=9&y=24&start_value=1 for more examples. It provides CLI interface for searching, installing and updating pupus from GitHub and it also provides a helper for including static files from pupu into your HTML page. Both CLI and helper can handle dependencies.
|
4
|
+
|
5
|
+
CLI example:
|
6
|
+
|
7
|
+
<pre>
|
8
|
+
pupu install botanicus/autocompleter
|
9
|
+
~ Downloading botanicus/autocompleter
|
10
|
+
~ Downloading dependency botanicus/mootools
|
11
|
+
</pre>
|
4
12
|
|
5
13
|
h1. Why I wrote it
|
6
14
|
|
@@ -8,72 +16,50 @@ In my apps the root/ stuff always get bloated and messy when I have all javascri
|
|
8
16
|
|
9
17
|
Another thing which really annoyed me was the bloody <code>js_include_tag</code> and <code>css_include_tag</code>. There are so stupid that they do not throw exception when the JS or CSS file do not exists! So you are surprised why you fancy script do not work and then you realized that it's not correctly included at all!
|
10
18
|
|
11
|
-
h1. What can be presented in pupu?
|
12
|
-
|
13
|
-
Everything what can be put into root directory. Some examples: blueprint css, mootools, autocompleter for mootools, icon set ...
|
14
|
-
|
15
19
|
h1. CLI interface
|
16
20
|
|
17
|
-
|
21
|
+
If you are storing your media files in different directory than in @public@ or @media@ or if you want to use submodules strategy, you will need some "setup":http://wiki.github.com/botanicus/pupu/setup. *In case you are using defaults, everything should just work out of the box.*
|
18
22
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- pupu executable will find it
|
24
|
-
- you will require it in your environment file so it will be available in runtime
|
23
|
+
<pre>
|
24
|
+
# list all available pupus
|
25
|
+
pupu search
|
25
26
|
|
26
|
-
|
27
|
+
# search for pupu matching mootools in its name (you can use regexp)
|
28
|
+
pupu search mootools
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
+
# install autocompleter and its dependencies from my github repo
|
31
|
+
pupu install botanicus/autocompleter
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
#!init
|
33
|
+
# or uninstall, it's the same
|
34
|
+
pupu uninstall autocompleter
|
34
35
|
|
35
|
-
|
36
|
+
# list all installed pupus
|
37
|
+
pupu list
|
36
38
|
</pre>
|
37
39
|
|
38
|
-
|
39
|
-
<pre>
|
40
|
-
#!/usr/bin/env ruby1.9
|
41
|
-
|
42
|
-
load File.dirname(__FILE__) + "../config/environment.rb"
|
43
|
-
</pre>
|
40
|
+
h1. Runtime Setup
|
44
41
|
|
45
|
-
|
42
|
+
Command-line interface doesn't require any setup, runtime needs some.
|
46
43
|
|
47
|
-
|
44
|
+
At the moment "Rango":http://github.com/botanicus/rango, "Merb":http://github.com/merb/merb and Rails are supported directly. If you are using one of these frameworks, just use @require "pupu/adapters/rango"@ in your environment file.
|
48
45
|
|
49
|
-
|
50
|
-
task "pupu:setup" => :environment
|
51
|
-
</pre>
|
46
|
+
Rango actually will have stack generator in "upcoming version 0.2":http://wiki.github.com/botanicus/rango/roadmap, so then you can just run @rango create stack my_blog@ and it will work with Pupu out of the box.
|
52
47
|
|
53
|
-
|
54
|
-
Pupu::Tasks.class_eval do
|
55
|
-
def setup
|
56
|
-
load "config/environment.rb"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
</pre>
|
48
|
+
If your framework isn't supported, just:
|
60
49
|
|
61
50
|
<pre>
|
62
|
-
|
63
|
-
pupu
|
51
|
+
require "myframework"
|
52
|
+
require "pupu"
|
53
|
+
require "pupu/helpers"
|
64
54
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
# list all installed pupus
|
69
|
-
pupu list
|
55
|
+
Pupu.root = MyFramework.root
|
56
|
+
Pupu.media_root = File.join(MyFramework.root, "media") # you don't have to set it if you are using public or media
|
57
|
+
MyFrameworkHelpersModule.send(:include, Pupu::Helpers)
|
70
58
|
</pre>
|
71
59
|
|
72
|
-
|
73
|
-
|
74
|
-
copy/submodules
|
60
|
+
And it should work. Check existing "Rango":http://github.com/botanicus/pupu/blob/master/lib/pupu/adapters/rango.rb, "Merb":http://github.com/botanicus/pupu/blob/master/lib/pupu/adapters/merb.rb resp. "Rails":http://github.com/botanicus/pupu/blob/master/lib/pupu/adapters/rails.rb adapter for inspiration.
|
75
61
|
|
76
|
-
h1.
|
62
|
+
h1. Helpers
|
77
63
|
|
78
64
|
In your views you can include all the plugin-related files this way:
|
79
65
|
|
@@ -96,65 +82,13 @@ Plugin[:autocompleter].image("spinner.gif")
|
|
96
82
|
|
97
83
|
h1. Initializers
|
98
84
|
|
99
|
-
Initializers are the only part of pupu which are not stored in <code>root/pupu</code>, but are copyied to <code>
|
100
|
-
|
101
|
-
<pre>
|
102
|
-
window.addEvent("domready", function() {
|
103
|
-
// do the init stuff
|
104
|
-
})
|
105
|
-
</pre>
|
106
|
-
|
107
|
-
h1. Available pupus
|
108
|
-
|
109
|
-
* "MooTools":http://github.com/botanicus/pupu-mootools
|
110
|
-
* "Autocompleter":http://github.com/botanicus/pupu-autocompleter
|
111
|
-
* "Squeezebox":http://github.com/botanicus/pupu-squeezebox
|
112
|
-
* "Blueprint CSS":http://github.com/botanicus/pupu-blueprint
|
113
|
-
* "Mooeditable":http://github.com/botanicus/pupu-mooeditable
|
114
|
-
* "Tips":http://github.com/botanicus/pupu-tips
|
115
|
-
* "Growl":http://github.com/botanicus/pupu-growl
|
116
|
-
* "Ratings":http://github.com/botanicus/pupu-ratings
|
117
|
-
* "Form defaults":http://github.com/botanicus/pupu-form-defaults
|
118
|
-
* icon sets
|
119
|
-
|
120
|
-
h1. I'd like to write my own pupu!
|
121
|
-
|
122
|
-
h2. Plugin generator
|
85
|
+
Initializers are the only part of pupu which are not stored in <code>root/pupu</code>, but are copyied to <code>[media_root]/javascripts/initializers</code> resp. <code>[media_root]/stylesheets/initializers</code>. In contrary to files in <code>[media_root]/pupu</code>, initializers are intended for user editing.
|
123
86
|
|
124
|
-
|
125
|
-
pupu-gen pupu chunky_bacon
|
126
|
-
# chunky_bacon/README
|
127
|
-
# chunky_bacon/LICENSE
|
128
|
-
# chunky_bacon/initializers/chunky_bacon.js
|
129
|
-
# chunky_bacon/initializers/chunky_bacon.css
|
130
|
-
# chunky_bacon/lib
|
131
|
-
# chunky_bacon/lib/chunky_bacon.js
|
132
|
-
# chunky_bacon/stylesheets
|
133
|
-
# chunky_bacon/stylesheets/chunky_bacon.css
|
134
|
-
</pre>
|
135
|
-
|
136
|
-
<pre>
|
137
|
-
pupu-gen pupu chunky_bacon helpers.js blue.css
|
138
|
-
</pre>
|
139
|
-
|
140
|
-
h2. Configuration file
|
141
|
-
|
142
|
-
File config.rb in your pupu root is intended to put package metadata there. You can define dependencies of pupu, arguments of pupu method and define which javascripts and stylesheets will be included in which order.
|
143
|
-
|
144
|
-
<pre>
|
145
|
-
# autocompleter depends on mootools
|
146
|
-
dependencies :mootools
|
147
|
-
|
148
|
-
# javascripts for loading
|
149
|
-
javascripts "observer", "autocompleter", :in => "lib"
|
150
|
-
|
151
|
-
parameter :type, :optional => ["local", "request"] do |type|
|
152
|
-
javascript "lib/autocompleter.#{type}"
|
153
|
-
end
|
154
|
-
</pre>
|
87
|
+
Example from "botanicus/flash":http://github.com/botanicus/pupu-flash: "flash.js":http://github.com/botanicus/pupu-flash/blob/master/initializers/flash.js, "flash.css":http://github.com/botanicus/pupu-flash/blob/master/initializers/flash.css
|
155
88
|
|
156
89
|
h1. Links
|
157
90
|
|
158
91
|
- "Wiki":http://wiki.github.com/botanicus/pupu
|
159
92
|
- "Source Code":http://github.com/botanicus/pupu
|
160
93
|
- "API Documentation":http://rdoc.info/projects/botanicus/pupu
|
94
|
+
- Examples: "Rango":http://github.com/botanicus/pupu/tree/master/examples/rango, "Merb":http://github.com/botanicus/pupu/tree/master/examples/merb
|
data/Rakefile
CHANGED
@@ -1,61 +1,24 @@
|
|
1
|
-
#!/usr/bin/env rake1.9
|
2
1
|
# encoding: utf-8
|
3
2
|
|
4
|
-
|
5
|
-
Rake.application.options.trace = true
|
6
|
-
|
7
|
-
task :setup => ["submodules:init"]
|
8
|
-
|
9
|
-
namespace :submodules do
|
10
|
-
desc "Init submodules"
|
11
|
-
task :init do
|
12
|
-
sh "git submodule init"
|
13
|
-
end
|
3
|
+
require_relative "lib/pupu"
|
14
4
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
if File.directory?(path) && File.directory?(File.join(path, ".git"))
|
19
|
-
Dir.chdir(path) do
|
20
|
-
puts "=> #{path}"
|
21
|
-
puts %x[git reset --hard]
|
22
|
-
puts %x[git fetch]
|
23
|
-
puts %x[git reset origin/master --hard]
|
24
|
-
puts
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
5
|
+
# ENV setup for external commands
|
6
|
+
ENV["RUBYLIB"] = Dir["vendor/*/lib"].join(":")
|
7
|
+
$LOAD_PATH.clear.push(*Dir["vendor/*/lib"])
|
30
8
|
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
desc "Release new version of pupu"
|
36
|
-
task release: ["release:tag", "release:gemcutter"]
|
37
|
-
|
38
|
-
namespace :release do
|
39
|
-
desc "Create Git tag"
|
40
|
-
task :tag do
|
41
|
-
require_relative "lib/pupu"
|
42
|
-
puts "Creating new git tag #{Pupu::VERSION} and pushing it online ..."
|
43
|
-
sh "git tag -a -m 'Version #{Pupu::VERSION}' #{Pupu::VERSION}"
|
44
|
-
sh "git push --tags"
|
45
|
-
puts "Tag #{Pupu::VERSION} was created and pushed to GitHub."
|
46
|
-
end
|
9
|
+
# http://support.runcoderun.com/faqs/builds/how-do-i-run-rake-with-trace-enabled
|
10
|
+
Rake.application.options.trace = true
|
47
11
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
12
|
+
# default task for RunCodeRun.com
|
13
|
+
task :default => ["submodules:init", :spec]
|
14
|
+
|
15
|
+
# load tasks
|
16
|
+
Dir["tasks/*.rake"].each do |taskfile|
|
17
|
+
begin
|
18
|
+
load File.join(Dir.pwd, taskfile)
|
19
|
+
rescue Exception => exception
|
20
|
+
puts "Exception #{exception.class} occured during loading #{taskfile}:"
|
21
|
+
puts exception.message
|
22
|
+
puts exception.backtrace
|
52
23
|
end
|
53
24
|
end
|
54
|
-
|
55
|
-
desc "Run specs"
|
56
|
-
task :default => :setup do
|
57
|
-
rubylib = (ENV["RUBYLIB"] || String.new).split(":")
|
58
|
-
libdirs = Dir["vendor/*/lib"]
|
59
|
-
ENV["RUBYLIB"] = (libdirs + rubylib).join(":")
|
60
|
-
exec "./script/spec --options spec/spec.opts spec"
|
61
|
-
end
|
data/TODO.txt
CHANGED
@@ -1,15 +1,20 @@
|
|
1
1
|
=== Version 0.1 ===
|
2
|
-
|
3
|
-
|
2
|
+
- Pupu.framework_root: "."
|
3
|
+
- Pupu.media_root: "media"
|
4
|
+
- Pupu.root: "media/pupu"
|
5
|
+
- @pupu.root: "media/pupu/mootools"
|
6
|
+
|
7
|
+
- rango & merb apps: both with same functionality include specs
|
8
|
+
|
9
|
+
- THERE SHOULD BE A CONVETION TO NAME PUPU WITH PUPU-FRAMEWORK-PLUGIN, FOR EXAMPLE PUPU-MOOTOOLS-FLASH because of search
|
10
|
+
- install each dependency just once
|
11
|
+
- how to handle metadata if we have it as submodules? (suggestions: media/pupu/metadata.yml for all) or on the fly from .git/config & config.rb etc
|
12
|
+
- pupu has a license, but the stuff we want to put into pupu probably has also a license (MooTools is under MIT etc)
|
4
13
|
- media support (.swf): media helper
|
5
|
-
- adapters for Rango, Merb, Rails (helpers registration)
|
6
14
|
- media vs. root vs. custom
|
7
15
|
- how to handle metadata? Generate metadata.yml from config.rb (dependencies) or generate it through merb-gen and write it by hand?
|
8
16
|
- what about ruby helpers such as flash :notice, :error for flash <divs
|
9
|
-
- custom messages on errors
|
10
|
-
- install dependencies if any
|
11
17
|
- add array with loaded plugins, do not load plugin which is already loaded
|
12
|
-
- pupu view helper should works with dependencies (pupu :autocompleter should add mootools as well)
|
13
18
|
|
14
19
|
=== Version 0.2 ===
|
15
20
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "rake/rdoctask"
|
3
|
+
|
4
|
+
require "merb-core"
|
5
|
+
require "merb-core/tasks/merb"
|
6
|
+
|
7
|
+
load "pupu/tasks/pupu.rake"
|
8
|
+
|
9
|
+
# Load the basic runtime dependencies; this will include
|
10
|
+
# any plugins and therefore plugin rake tasks.
|
11
|
+
init_env = ENV["MERB_ENV"] || "development"
|
12
|
+
Merb.load_dependencies(:environment => init_env)
|
13
|
+
|
14
|
+
# Get Merb plugins and dependencies
|
15
|
+
Merb::Plugins.rakefiles.each { |r| require r }
|
16
|
+
|
17
|
+
# Load any app level custom rakefile extensions from lib/tasks
|
18
|
+
tasks_path = File.join(File.dirname(__FILE__), "lib", "tasks")
|
19
|
+
rake_files = Dir["#{tasks_path}/*.rake"]
|
20
|
+
rake_files.each{|rake_file| load rake_file }
|
21
|
+
|
22
|
+
desc "Start runner environment"
|
23
|
+
task :merb_env do
|
24
|
+
Merb.start_environment(:environment => init_env, :adapter => "runner")
|
25
|
+
end
|
26
|
+
|
27
|
+
require "spec/rake/spectask"
|
28
|
+
require "merb-core/test/tasks/spectasks"
|
29
|
+
desc "Default: run spec examples"
|
30
|
+
task :default => "spec"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class MerbExample < Merb::Controller
|
2
|
+
def _template_location(action, type = nil, controller = controller_name)
|
3
|
+
controller == "layout" ? "layout.#{type}" : "#{action}.#{type}"
|
4
|
+
end
|
5
|
+
|
6
|
+
def index
|
7
|
+
render
|
8
|
+
end
|
9
|
+
|
10
|
+
def static
|
11
|
+
render params[:template]
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Go to http://wiki.merbivore.com/pages/init-rb
|
2
|
+
|
3
|
+
# setup $:
|
4
|
+
pupu_libdir = File.expand_path("../../lib")
|
5
|
+
raise Errno::ENOENT, "#{pupu_libdir} doesn't exist" unless File.directory?(pupu_libdir)
|
6
|
+
$:.unshift(pupu_libdir)
|
7
|
+
|
8
|
+
require "pupu/adapters/merb"
|
9
|
+
|
10
|
+
use_orm :none
|
11
|
+
use_test :rspec
|
12
|
+
use_template_engine :erb
|
13
|
+
|
14
|
+
# Specify a specific version of a dependency
|
15
|
+
# dependency "RedCloth", "> 3.0"
|
16
|
+
|
17
|
+
Merb::BootLoader.before_app_loads do
|
18
|
+
# This will get executed after dependencies have been loaded but before your app"s classes have loaded.
|
19
|
+
end
|
20
|
+
|
21
|
+
Merb::BootLoader.after_app_loads do
|
22
|
+
# This will get executed after your app"s classes have been loaded.
|
23
|
+
end
|
24
|
+
|
25
|
+
# Move this to application.rb if you want it to be reloadable in dev mode.
|
26
|
+
Merb::Router.prepare do
|
27
|
+
with(controller: "merb_example") do
|
28
|
+
match("/").to(action: "index")
|
29
|
+
match("/examples/:template").to(action: "static")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
Merb::Config.use do |config|
|
34
|
+
config[:environment] = "development",
|
35
|
+
config[:framework] = {},
|
36
|
+
config[:log_level] = :debug,
|
37
|
+
config[:log_stream] = STDOUT,
|
38
|
+
# or use file for logging:
|
39
|
+
# config[:log_file] = Merb.root / "log" / "merb.log",
|
40
|
+
config[:use_mutex] = false,
|
41
|
+
config[:session_store] = "cookie",
|
42
|
+
config[:session_id_key] = "_merb_session_id",
|
43
|
+
config[:session_secret_key] = "55e74673c6b671fbcd32a405d9f41ab30fdc8ba3",
|
44
|
+
config[:exception_details] = true,
|
45
|
+
config[:reload_classes] = true,
|
46
|
+
config[:reload_templates] = true,
|
47
|
+
config[:reload_time] = 0.5
|
48
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.local.js
RENAMED
File without changes
|