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.
Files changed (241) hide show
  1. data/CHANGELOG +12 -1
  2. data/README.textile +38 -104
  3. data/Rakefile +17 -54
  4. data/TODO.txt +11 -6
  5. data/examples/merb/README.textile +7 -0
  6. data/examples/merb/Rakefile +30 -0
  7. data/examples/merb/application.rb +13 -0
  8. data/examples/merb/config/framework.rb +7 -0
  9. data/examples/merb/config/init.rb +48 -0
  10. data/examples/{blog/media/pupu/autocompleter → merb/public}/javascripts/initializers/autocompleter.js +0 -0
  11. data/examples/{blog/media/pupu/flash → merb/public}/javascripts/initializers/flash.js +0 -0
  12. data/examples/{blog/media/pupu/lighter → merb/public/javascripts}/initializers/lighter.js +0 -0
  13. data/examples/{blog/media → merb/public}/pupu/autocompleter/CHANGELOG +0 -0
  14. data/examples/{blog/media → merb/public}/pupu/autocompleter/LICENSE +0 -0
  15. data/examples/{blog/media → merb/public}/pupu/autocompleter/README.textile +0 -0
  16. data/examples/{blog/media → merb/public}/pupu/autocompleter/Rakefile +0 -0
  17. data/examples/{blog/media → merb/public}/pupu/autocompleter/TODO +0 -0
  18. data/examples/{blog/media → merb/public}/pupu/autocompleter/config.rb +0 -0
  19. data/examples/{blog/media → merb/public}/pupu/autocompleter/images/spinner.gif +0 -0
  20. data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.js +0 -0
  21. data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.local.js +0 -0
  22. data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/autocompleter.request.js +0 -0
  23. data/examples/{blog/media → merb/public}/pupu/autocompleter/javascripts/observer.js +0 -0
  24. data/examples/{blog/media → merb/public}/pupu/autocompleter/metadata.yml +0 -0
  25. data/examples/{blog/media → merb/public}/pupu/autocompleter/stylesheets/autocompleter.css +0 -0
  26. data/examples/{blog/media → merb/public}/pupu/blueprint/CHANGELOG +0 -0
  27. data/examples/{blog/media → merb/public}/pupu/blueprint/LICENSE +0 -0
  28. data/examples/{blog/media → merb/public}/pupu/blueprint/README.textile +0 -0
  29. data/examples/{blog/media → merb/public}/pupu/blueprint/Rakefile +0 -0
  30. data/examples/{blog/media → merb/public}/pupu/blueprint/TODO +0 -0
  31. data/examples/{blog/media → merb/public}/pupu/blueprint/config.rb +0 -0
  32. data/examples/{blog/media → merb/public}/pupu/blueprint/metadata.yml +0 -0
  33. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/ie.css +0 -0
  34. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
  35. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
  36. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
  37. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +0 -0
  38. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/buttons/screen.css +0 -0
  39. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +0 -0
  40. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +0 -0
  41. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
  42. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
  43. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
  44. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
  45. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
  46. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
  47. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
  48. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
  49. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +0 -0
  50. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +0 -0
  51. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +0 -0
  52. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/plugins/rtl/screen.css +0 -0
  53. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/print.css +0 -0
  54. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/screen.css +0 -0
  55. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/forms.css +0 -0
  56. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.css +0 -0
  57. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/grid.png +0 -0
  58. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/ie.css +0 -0
  59. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/print.css +0 -0
  60. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/reset.css +0 -0
  61. data/examples/{blog/media → merb/public}/pupu/blueprint/stylesheets/src/typography.css +0 -0
  62. data/examples/{blog/media → merb/public}/pupu/flash/CHANGELOG +0 -0
  63. data/examples/{blog/media → merb/public}/pupu/flash/LICENSE +0 -0
  64. data/examples/{blog/media → merb/public}/pupu/flash/README.textile +0 -0
  65. data/examples/{blog/media → merb/public}/pupu/flash/Rakefile +0 -0
  66. data/examples/{blog/media → merb/public}/pupu/flash/TODO +0 -0
  67. data/examples/{blog/media → merb/public}/pupu/flash/config.rb +0 -0
  68. data/examples/{blog/media → merb/public}/pupu/flash/javascripts/flash.js +0 -0
  69. data/examples/{blog/media → merb/public}/pupu/flash/metadata.yml +0 -0
  70. data/examples/{blog/media → merb/public}/pupu/lighter/CHANGELOG +0 -0
  71. data/examples/{blog/media → merb/public}/pupu/lighter/LICENSE +0 -0
  72. data/examples/{blog/media → merb/public}/pupu/lighter/README.textile +0 -0
  73. data/examples/{blog/media → merb/public}/pupu/lighter/TODO.txt +0 -0
  74. data/examples/{blog/media → merb/public}/pupu/lighter/config.rb +0 -0
  75. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.css.js +0 -0
  76. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.html.js +0 -0
  77. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.js.js +0 -0
  78. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.md.js +0 -0
  79. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.php.js +0 -0
  80. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.ruby.js +0 -0
  81. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.shell.js +0 -0
  82. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.sql.js +0 -0
  83. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/Fuel.template.js +0 -0
  84. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/ZeroClipboard.js +0 -0
  85. data/examples/{blog/media → merb/public}/pupu/lighter/javascripts/lighter.js +0 -0
  86. data/examples/{blog/media → merb/public}/pupu/lighter/media/ZeroClipboard.swf +0 -0
  87. data/examples/{blog/media → merb/public}/pupu/lighter/metadata.yml +0 -0
  88. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.git.css +0 -0
  89. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.mocha.css +0 -0
  90. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.panic.css +0 -0
  91. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.standard.css +0 -0
  92. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.template.css +0 -0
  93. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.tutti.css +0 -0
  94. data/examples/{blog/media → merb/public}/pupu/lighter/stylesheets/Flame.twilight.css +0 -0
  95. data/examples/{blog/media → merb/public}/pupu/mootools/CHANGELOG +0 -0
  96. data/examples/{blog/media → merb/public}/pupu/mootools/LICENSE +0 -0
  97. data/examples/{blog/media → merb/public}/pupu/mootools/README.textile +0 -0
  98. data/examples/{blog/media → merb/public}/pupu/mootools/Rakefile +0 -0
  99. data/examples/{blog/media → merb/public}/pupu/mootools/TODO +0 -0
  100. data/examples/{blog/media → merb/public}/pupu/mootools/config.rb +0 -0
  101. data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-core.js +0 -0
  102. data/examples/{blog/media → merb/public}/pupu/mootools/javascripts/mootools-1.2-more.js +0 -0
  103. data/examples/{blog/media → merb/public}/pupu/mootools/metadata.yml +0 -0
  104. data/examples/{blog/media/pupu/flash → merb/public}/stylesheets/initializers/flash.css +0 -0
  105. data/examples/merb/spec/application_spec.rb +37 -0
  106. data/examples/merb/spec/spec_helper.rb +16 -0
  107. data/examples/merb/views/examples/arguments.html.erb +0 -0
  108. data/examples/merb/views/examples/dependencies.html.erb +0 -0
  109. data/examples/merb/views/examples/simple.html.erb +4 -0
  110. data/examples/merb/views/index.html.erb +7 -0
  111. data/examples/merb/views/layout.html.erb +12 -0
  112. data/examples/rango/README.textile +7 -0
  113. data/examples/{blog → rango}/Rakefile +0 -0
  114. data/examples/{blog → rango}/config.ru +2 -3
  115. data/examples/{blog → rango}/init.rb +6 -5
  116. data/examples/{blog → rango}/media/javascripts/initializers/lighter.js +0 -0
  117. data/examples/rango/media/pupu/autocompleter/CHANGELOG +1 -0
  118. data/examples/rango/media/pupu/autocompleter/LICENSE +20 -0
  119. data/examples/rango/media/pupu/autocompleter/README.textile +26 -0
  120. data/examples/rango/media/pupu/autocompleter/Rakefile +29 -0
  121. data/examples/rango/media/pupu/autocompleter/TODO +1 -0
  122. data/examples/rango/media/pupu/autocompleter/config.rb +12 -0
  123. data/examples/rango/media/pupu/autocompleter/images/spinner.gif +0 -0
  124. data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.js +442 -0
  125. data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.local.js +31 -0
  126. data/examples/rango/media/pupu/autocompleter/javascripts/autocompleter.request.js +109 -0
  127. data/examples/rango/media/pupu/autocompleter/javascripts/initializers/autocompleter.js +26 -0
  128. data/examples/rango/media/pupu/autocompleter/javascripts/observer.js +69 -0
  129. data/examples/rango/media/pupu/autocompleter/metadata.yml +5 -0
  130. data/examples/rango/media/pupu/autocompleter/stylesheets/autocompleter.css +68 -0
  131. data/examples/rango/media/pupu/blueprint/CHANGELOG +1 -0
  132. data/examples/rango/media/pupu/blueprint/LICENSE +20 -0
  133. data/examples/rango/media/pupu/blueprint/README.textile +22 -0
  134. data/examples/rango/media/pupu/blueprint/Rakefile +29 -0
  135. data/examples/rango/media/pupu/blueprint/TODO +3 -0
  136. data/examples/rango/media/pupu/blueprint/config.rb +18 -0
  137. data/examples/rango/media/pupu/blueprint/metadata.yml +5 -0
  138. data/examples/rango/media/pupu/blueprint/stylesheets/ie.css +26 -0
  139. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/cross.png +0 -0
  140. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/key.png +0 -0
  141. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/icons/tick.png +0 -0
  142. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/readme.txt +32 -0
  143. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/buttons/screen.css +97 -0
  144. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/readme.txt +14 -0
  145. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/fancy-type/screen.css +71 -0
  146. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/doc.png +0 -0
  147. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/email.png +0 -0
  148. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/external.png +0 -0
  149. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/feed.png +0 -0
  150. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/im.png +0 -0
  151. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/pdf.png +0 -0
  152. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/visited.png +0 -0
  153. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/icons/xls.png +0 -0
  154. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/readme.txt +18 -0
  155. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/link-icons/screen.css +40 -0
  156. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/readme.txt +10 -0
  157. data/examples/rango/media/pupu/blueprint/stylesheets/plugins/rtl/screen.css +109 -0
  158. data/examples/rango/media/pupu/blueprint/stylesheets/print.css +30 -0
  159. data/examples/rango/media/pupu/blueprint/stylesheets/screen.css +251 -0
  160. data/examples/rango/media/pupu/blueprint/stylesheets/src/forms.css +49 -0
  161. data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.css +212 -0
  162. data/examples/rango/media/pupu/blueprint/stylesheets/src/grid.png +0 -0
  163. data/examples/rango/media/pupu/blueprint/stylesheets/src/ie.css +59 -0
  164. data/examples/rango/media/pupu/blueprint/stylesheets/src/print.css +85 -0
  165. data/examples/rango/media/pupu/blueprint/stylesheets/src/reset.css +38 -0
  166. data/examples/rango/media/pupu/blueprint/stylesheets/src/typography.css +105 -0
  167. data/examples/rango/media/pupu/flash/CHANGELOG +1 -0
  168. data/examples/rango/media/pupu/flash/LICENSE +20 -0
  169. data/examples/rango/media/pupu/flash/README.textile +22 -0
  170. data/examples/rango/media/pupu/flash/Rakefile +37 -0
  171. data/examples/rango/media/pupu/flash/TODO +1 -0
  172. data/examples/rango/media/pupu/flash/config.rb +11 -0
  173. data/examples/rango/media/pupu/flash/javascripts/flash.js +63 -0
  174. data/examples/rango/media/pupu/flash/javascripts/initializers/flash.js +12 -0
  175. data/examples/rango/media/pupu/flash/metadata.yml +5 -0
  176. data/examples/rango/media/pupu/flash/stylesheets/initializers/flash.css +21 -0
  177. data/examples/rango/media/pupu/lighter/CHANGELOG +2 -0
  178. data/examples/rango/media/pupu/lighter/LICENSE +20 -0
  179. data/examples/rango/media/pupu/lighter/README.textile +19 -0
  180. data/examples/rango/media/pupu/lighter/TODO.txt +4 -0
  181. data/examples/rango/media/pupu/lighter/config.rb +20 -0
  182. data/examples/rango/media/pupu/lighter/initializers/lighter.js +11 -0
  183. data/examples/rango/media/pupu/lighter/javascripts/Fuel.css.js +1 -0
  184. data/examples/rango/media/pupu/lighter/javascripts/Fuel.html.js +1 -0
  185. data/examples/rango/media/pupu/lighter/javascripts/Fuel.js.js +1 -0
  186. data/examples/rango/media/pupu/lighter/javascripts/Fuel.md.js +1 -0
  187. data/examples/rango/media/pupu/lighter/javascripts/Fuel.php.js +1 -0
  188. data/examples/rango/media/pupu/lighter/javascripts/Fuel.ruby.js +1 -0
  189. data/examples/rango/media/pupu/lighter/javascripts/Fuel.shell.js +1 -0
  190. data/examples/rango/media/pupu/lighter/javascripts/Fuel.sql.js +1 -0
  191. data/examples/rango/media/pupu/lighter/javascripts/Fuel.template.js +45 -0
  192. data/examples/rango/media/pupu/lighter/javascripts/ZeroClipboard.js +1 -0
  193. data/examples/rango/media/pupu/lighter/javascripts/lighter.js +1 -0
  194. data/examples/rango/media/pupu/lighter/media/ZeroClipboard.swf +0 -0
  195. data/examples/rango/media/pupu/lighter/metadata.yml +5 -0
  196. data/examples/rango/media/pupu/lighter/stylesheets/Flame.git.css +1 -0
  197. data/examples/rango/media/pupu/lighter/stylesheets/Flame.mocha.css +1 -0
  198. data/examples/rango/media/pupu/lighter/stylesheets/Flame.panic.css +1 -0
  199. data/examples/rango/media/pupu/lighter/stylesheets/Flame.standard.css +1 -0
  200. data/examples/rango/media/pupu/lighter/stylesheets/Flame.template.css +101 -0
  201. data/examples/rango/media/pupu/lighter/stylesheets/Flame.tutti.css +1 -0
  202. data/examples/rango/media/pupu/lighter/stylesheets/Flame.twilight.css +1 -0
  203. data/examples/rango/media/pupu/mootools/CHANGELOG +2 -0
  204. data/examples/rango/media/pupu/mootools/LICENSE +20 -0
  205. data/examples/rango/media/pupu/mootools/README.textile +19 -0
  206. data/examples/rango/media/pupu/mootools/Rakefile +29 -0
  207. data/examples/rango/media/pupu/mootools/TODO +1 -0
  208. data/examples/rango/media/pupu/mootools/config.rb +8 -0
  209. data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-core.js +350 -0
  210. data/examples/rango/media/pupu/mootools/javascripts/mootools-1.2-more.js +154 -0
  211. data/examples/rango/media/pupu/mootools/metadata.yml +5 -0
  212. data/examples/rango/spec/pupu_spec.rb +37 -0
  213. data/examples/rango/spec/spec_helper.rb +15 -0
  214. data/examples/{blog → rango}/templates/base.html.haml +2 -3
  215. data/examples/rango/templates/examples/arguments.html.haml +7 -0
  216. data/examples/{blog → rango}/templates/examples/base.html.haml +3 -3
  217. data/examples/{blog → rango}/templates/examples/dependencies.html.haml +1 -1
  218. data/examples/{blog → rango}/templates/examples/simple.html.haml +1 -1
  219. data/examples/{blog → rango}/templates/index.html.haml +0 -0
  220. data/lib/pupu.rb +1 -1
  221. data/lib/pupu/adapters/merb.rb +4 -10
  222. data/lib/pupu/adapters/rails.rb +6 -0
  223. data/lib/pupu/adapters/rango.rb +0 -1
  224. data/lib/pupu/cli.rb +7 -3
  225. data/lib/pupu/github.rb +1 -1
  226. data/pupu.pre.gemspec +44 -0
  227. data/script/spec +2 -0
  228. data/tasks/benchmark.rake +11 -0
  229. data/tasks/gem.rake +23 -0
  230. data/tasks/hooks.rake +12 -0
  231. data/tasks/release.rake +68 -0
  232. data/tasks/spec.rake +27 -0
  233. data/tasks/submodules.rake +33 -0
  234. data/tasks/yardoc.rake +9 -0
  235. metadata +227 -115
  236. data/examples/blog/Thorfile +0 -9
  237. data/examples/blog/bin/pupu +0 -4
  238. data/examples/blog/config/pupu.rb +0 -4
  239. data/examples/blog/templates/examples/arguments.html.haml +0 -7
  240. data/url.rb +0 -20
  241. data/url_spec.rb +0 -35
data/CHANGELOG CHANGED
@@ -1 +1,12 @@
1
- [12/2/2008] First root release
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 & CSS frameworks, plugins for the JS & CSS frameworks, icon sets etc. It knows dependencies and it has CLI interface, so it's really easy to bundle such plugins into your app.
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
- h2. Specify @--media-root=path/to/media/directory@ and Optionally @--strategy=copy|submodules@
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
- You don't have to do anything with environment, just specify @--media-root=path@ and it will work. Example: @pupu install mootools --media-root=media@
20
-
21
- h2. Using System @pupu@ and Configuration File
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
- h2. Using Your Own Wrapper
27
+ # search for pupu matching mootools in its name (you can use regexp)
28
+ pupu search mootools
27
29
 
28
- If you have bundled application
29
- The only thing you need to do is just load your environment before pupu starts, example
30
+ # install autocompleter and its dependencies from my github repo
31
+ pupu install botanicus/autocompleter
30
32
 
31
- Rango:
32
- <pre>
33
- #!init
33
+ # or uninstall, it's the same
34
+ pupu uninstall autocompleter
34
35
 
35
- load File.dirname(__FILE__) + "/gems/gems/pupu-0.0.1/bin/pupu"
36
+ # list all installed pupus
37
+ pupu list
36
38
  </pre>
37
39
 
38
- Rails/Merb
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
- h2. Wrapper Tasks
42
+ Command-line interface doesn't require any setup, runtime needs some.
46
43
 
47
- Pupu provides Rake & Thor tasks
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
- <pre>
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
- <pre>
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
- # install autocompleter and its dependencies from my github repo
63
- pupu install botanicus/autocompleter
51
+ require "myframework"
52
+ require "pupu"
53
+ require "pupu/helpers"
64
54
 
65
- # or uninstall, it's the same
66
- pupu remove autocompleter
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
- h1. Storing Pupus in Your Project
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. Views
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>root/javascripts/initializers</code> and <code>root/stylesheets/initializers</code>. In contrary of files in <code>root/pupu</code>, initializers are intended for user editing.
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
- <pre>
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
- # http://support.runcoderun.com/faqs/builds/how-do-i-run-rake-with-trace-enabled
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
- desc "Update submodules"
16
- task :update do
17
- Dir["vendor/*"].each do |path|
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
- task :gem do
32
- sh "gem build pupu.gemspec"
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
- desc "Push gem to Gemcutter"
49
- task :gemcutter => :gem do
50
- puts "Pushing to Gemcutter ..."
51
- sh "gem push #{Dir["*.gem"].last}"
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
- metadata vzdycky, dat je do ignore
3
- pupu has a license, but the stuff we want to put into pupu probably has also a license (MooTools is under MIT etc)
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,7 @@
1
+ h1. Merb Example
2
+
3
+ * Dependencies for running: @merb-core@
4
+ * Run with @merb -a webrick@ (will start at @http://localhost:4000@)
5
+
6
+ * Dependencies for testing: @rspec@, @webrat@
7
+ * Specs: @spec spec/application_spec.rb --colour@
@@ -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,7 @@
1
+ Merb::Config[:framework] = {
2
+ :application => Merb.root / "application.rb",
3
+ :config => [Merb.root / "config", nil],
4
+ :public => [Merb.root / "public", nil],
5
+ :view => Merb.root / "views"
6
+ }
7
+
@@ -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