ramaze 2011.01.30 → 2011.07.25

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 (229) hide show
  1. data/.gitignore +2 -1
  2. data/.mailmap +2 -0
  3. data/.rvmrc +1 -0
  4. data/README.md +119 -197
  5. data/Rakefile +14 -97
  6. data/bin/ramaze +6 -14
  7. data/doc/AUTHORS +8 -4
  8. data/doc/CHANGELOG +3784 -3339
  9. data/examples/app/chat/start.rb +2 -2
  10. data/lib/proto/app.rb +2 -3
  11. data/lib/proto/config.ru +4 -5
  12. data/lib/proto/controller/init.rb +11 -4
  13. data/lib/proto/controller/main.rb +12 -7
  14. data/lib/proto/layout/default.xhtml +56 -23
  15. data/lib/proto/model/init.rb +3 -1
  16. data/lib/proto/public/css/grid.css +107 -0
  17. data/lib/proto/public/css/layout.css +81 -0
  18. data/lib/proto/public/css/reset.css +123 -0
  19. data/lib/proto/public/css/text.css +109 -0
  20. data/lib/proto/public/images/bg.png +0 -0
  21. data/lib/proto/spec/main.rb +2 -2
  22. data/lib/proto/start.rb +11 -1
  23. data/lib/proto/view/index.xhtml +27 -23
  24. data/lib/ramaze.rb +0 -1
  25. data/lib/ramaze/app.rb +85 -12
  26. data/lib/ramaze/app_graph.rb +107 -0
  27. data/lib/ramaze/bin/console.rb +87 -0
  28. data/lib/ramaze/bin/create.rb +94 -0
  29. data/lib/ramaze/bin/helper.rb +107 -0
  30. data/lib/ramaze/bin/restart.rb +95 -0
  31. data/lib/ramaze/bin/runner.rb +141 -0
  32. data/lib/ramaze/bin/start.rb +206 -0
  33. data/lib/ramaze/bin/status.rb +152 -0
  34. data/lib/ramaze/bin/stop.rb +112 -0
  35. data/lib/ramaze/cache.rb +9 -4
  36. data/lib/ramaze/cache/localmemcache.rb +10 -13
  37. data/lib/ramaze/cache/lru.rb +49 -7
  38. data/lib/ramaze/cache/memcache.rb +170 -92
  39. data/lib/ramaze/cache/sequel.rb +301 -118
  40. data/lib/ramaze/controller.rb +108 -9
  41. data/lib/ramaze/controller/default.rb +15 -2
  42. data/lib/ramaze/current.rb +14 -2
  43. data/lib/ramaze/dependencies.rb +46 -0
  44. data/lib/ramaze/files.rb +38 -3
  45. data/lib/ramaze/gestalt.rb +12 -12
  46. data/lib/ramaze/helper.rb +0 -2
  47. data/lib/ramaze/helper/auth.rb +30 -23
  48. data/lib/ramaze/helper/blue_form.rb +175 -126
  49. data/lib/ramaze/helper/csrf.rb +76 -91
  50. data/lib/ramaze/helper/email.rb +105 -0
  51. data/lib/ramaze/helper/erector.rb +16 -15
  52. data/lib/ramaze/helper/gestalt.rb +2 -2
  53. data/lib/ramaze/helper/layout.rb +89 -73
  54. data/lib/ramaze/helper/link.rb +7 -6
  55. data/lib/ramaze/helper/localize.rb +6 -5
  56. data/lib/ramaze/helper/markaby.rb +25 -23
  57. data/lib/ramaze/helper/maruku.rb +3 -3
  58. data/lib/ramaze/helper/paginate.rb +19 -27
  59. data/lib/ramaze/helper/remarkably.rb +3 -3
  60. data/lib/ramaze/helper/request_accessor.rb +3 -3
  61. data/lib/ramaze/helper/send_file.rb +12 -8
  62. data/lib/ramaze/helper/simple_captcha.rb +5 -6
  63. data/lib/ramaze/helper/stack.rb +7 -4
  64. data/lib/ramaze/helper/tagz.rb +10 -11
  65. data/lib/ramaze/helper/thread.rb +19 -16
  66. data/lib/ramaze/helper/ultraviolet.rb +7 -4
  67. data/lib/ramaze/helper/user.rb +40 -21
  68. data/lib/ramaze/helper/xhtml.rb +29 -20
  69. data/lib/ramaze/log.rb +3 -11
  70. data/lib/ramaze/log/analogger.rb +5 -4
  71. data/lib/ramaze/log/growl.rb +9 -7
  72. data/lib/ramaze/log/hub.rb +3 -5
  73. data/lib/ramaze/log/informer.rb +15 -12
  74. data/lib/ramaze/log/knotify.rb +3 -5
  75. data/lib/ramaze/log/logger.rb +3 -5
  76. data/lib/ramaze/log/logging.rb +6 -8
  77. data/lib/ramaze/log/rotatinginformer.rb +27 -17
  78. data/lib/ramaze/log/syslog.rb +7 -7
  79. data/lib/ramaze/log/xosd.rb +3 -5
  80. data/lib/ramaze/middleware_compiler.rb +27 -4
  81. data/lib/ramaze/reloader.rb +50 -12
  82. data/lib/ramaze/reloader/watch_inotify.rb +4 -5
  83. data/lib/ramaze/reloader/watch_stat.rb +3 -3
  84. data/lib/ramaze/request.rb +18 -8
  85. data/lib/ramaze/response.rb +38 -7
  86. data/lib/ramaze/rest.rb +36 -0
  87. data/lib/ramaze/setup.rb +101 -31
  88. data/lib/ramaze/spec.rb +1 -1
  89. data/lib/ramaze/spec/bacon.rb +6 -3
  90. data/lib/ramaze/spec/helper/bacon.rb +0 -1
  91. data/lib/ramaze/version.rb +1 -1
  92. data/lib/ramaze/view.rb +2 -11
  93. data/lib/ramaze/view/erector.rb +46 -31
  94. data/lib/ramaze/view/erubis.rb +7 -3
  95. data/lib/ramaze/view/ezamar.rb +7 -3
  96. data/lib/ramaze/view/gestalt.rb +9 -3
  97. data/lib/ramaze/view/haml.rb +7 -3
  98. data/lib/ramaze/view/liquid.rb +3 -3
  99. data/lib/ramaze/view/lokar.rb +7 -3
  100. data/lib/ramaze/view/mustache.rb +11 -5
  101. data/lib/ramaze/view/nagoro.rb +3 -3
  102. data/lib/ramaze/view/sass.rb +1 -1
  103. data/lib/ramaze/view/slippers.rb +40 -13
  104. data/lib/ramaze/view/tagz.rb +9 -5
  105. data/ramaze.gemspec +23 -128
  106. data/spec/helper.rb +5 -0
  107. data/spec/ramaze/bin/app/config.ru +11 -0
  108. data/spec/ramaze/bin/create.rb +28 -0
  109. data/spec/ramaze/bin/runner.rb +30 -0
  110. data/spec/ramaze/bin/start.rb +38 -0
  111. data/spec/ramaze/cache/memcache.rb +10 -3
  112. data/spec/ramaze/cache/sequel.rb +7 -0
  113. data/spec/ramaze/controller/provide_inheritance.rb +0 -10
  114. data/spec/ramaze/dispatcher/file.rb +19 -15
  115. data/spec/ramaze/helper/auth.rb +10 -9
  116. data/spec/ramaze/helper/blue_form.rb +121 -68
  117. data/spec/ramaze/helper/email.rb +69 -0
  118. data/spec/ramaze/helper/layout.rb +12 -15
  119. data/spec/ramaze/helper/layout/alternative.xhtml +5 -0
  120. data/spec/ramaze/helper/user.rb +2 -0
  121. data/spec/ramaze/log/growl.rb +14 -1
  122. data/spec/{contrib → ramaze}/rest.rb +1 -1
  123. data/spec/ramaze/session/memcache.rb +2 -2
  124. data/spec/ramaze/view/sass.rb +1 -1
  125. data/tasks/bacon.rake +3 -3
  126. data/tasks/gem.rake +17 -18
  127. data/tasks/rcov.rake +2 -3
  128. data/tasks/release.rake +8 -65
  129. data/tasks/setup.rake +10 -8
  130. data/tasks/todo.rake +9 -5
  131. data/tasks/yard.rake +3 -2
  132. metadata +105 -397
  133. data/MANIFEST +0 -532
  134. data/TODO.md +0 -19
  135. data/benchmark/bench_templates/bench.rb +0 -67
  136. data/benchmark/bench_templates/view/large.erb +0 -79
  137. data/benchmark/bench_templates/view/large.haml +0 -41
  138. data/benchmark/bench_templates/view/large.lok +0 -79
  139. data/benchmark/bench_templates/view/large.xhtml +0 -79
  140. data/benchmark/bench_templates/view/small.erb +0 -21
  141. data/benchmark/bench_templates/view/small.haml +0 -12
  142. data/benchmark/bench_templates/view/small.lok +0 -21
  143. data/benchmark/bench_templates/view/small.xhtml +0 -21
  144. data/benchmark/results.txt +0 -131
  145. data/benchmark/run.rb +0 -355
  146. data/benchmark/suite/minimal.rb +0 -11
  147. data/benchmark/suite/no_informer.rb +0 -7
  148. data/benchmark/suite/no_sessions.rb +0 -9
  149. data/benchmark/suite/no_template.rb +0 -7
  150. data/benchmark/suite/simple.rb +0 -5
  151. data/benchmark/suite/template_erubis.rb +0 -8
  152. data/benchmark/suite/template_etanni.rb +0 -8
  153. data/benchmark/suite/template_ezamar.rb +0 -8
  154. data/benchmark/suite/template_haml.rb +0 -13
  155. data/benchmark/suite/template_liquid.rb +0 -11
  156. data/benchmark/suite/template_markaby.rb +0 -9
  157. data/benchmark/suite/template_nagoro.rb +0 -8
  158. data/benchmark/suite/template_redcloth.rb +0 -13
  159. data/benchmark/suite/template_tenjin.rb +0 -8
  160. data/benchmark/test.rb +0 -35
  161. data/doc/FAQ +0 -92
  162. data/doc/INSTALL +0 -92
  163. data/doc/TODO +0 -29
  164. data/doc/meta/announcement.txt +0 -119
  165. data/doc/meta/configuration.txt +0 -163
  166. data/doc/meta/internals.txt +0 -278
  167. data/doc/meta/users.kml +0 -64
  168. data/doc/tutorial/todolist.html +0 -1512
  169. data/doc/tutorial/todolist.txt +0 -920
  170. data/examples/app/sourceview/public/coderay.css +0 -104
  171. data/examples/app/sourceview/public/images/file.gif +0 -0
  172. data/examples/app/sourceview/public/images/folder.gif +0 -0
  173. data/examples/app/sourceview/public/images/tv-collapsable-last.gif +0 -0
  174. data/examples/app/sourceview/public/images/tv-collapsable.gif +0 -0
  175. data/examples/app/sourceview/public/images/tv-expandable-last.gif +0 -0
  176. data/examples/app/sourceview/public/images/tv-expandable.gif +0 -0
  177. data/examples/app/sourceview/public/images/tv-item-last.gif +0 -0
  178. data/examples/app/sourceview/public/images/tv-item.gif +0 -0
  179. data/examples/app/sourceview/public/jquery.js +0 -11
  180. data/examples/app/sourceview/public/jquery.treeview.css +0 -48
  181. data/examples/app/sourceview/public/jquery.treeview.js +0 -223
  182. data/examples/app/sourceview/public/sourceview.js +0 -52
  183. data/examples/app/sourceview/start.rb +0 -79
  184. data/examples/app/sourceview/view/index.haml +0 -59
  185. data/examples/helpers/httpdigest.rb +0 -107
  186. data/lib/proto/public/css/screen.css +0 -30
  187. data/lib/proto/public/js/jquery.js +0 -7179
  188. data/lib/ramaze/contrib/addressable_route.rb +0 -56
  189. data/lib/ramaze/contrib/app_graph.rb +0 -64
  190. data/lib/ramaze/contrib/email.rb +0 -88
  191. data/lib/ramaze/contrib/facebook.rb +0 -23
  192. data/lib/ramaze/contrib/facebook/facebook.rb +0 -171
  193. data/lib/ramaze/contrib/gettext.rb +0 -113
  194. data/lib/ramaze/contrib/gettext/mo.rb +0 -155
  195. data/lib/ramaze/contrib/gettext/parser.rb +0 -46
  196. data/lib/ramaze/contrib/gettext/po.rb +0 -109
  197. data/lib/ramaze/contrib/gzip_filter.rb +0 -1
  198. data/lib/ramaze/contrib/maruku_uv.rb +0 -59
  199. data/lib/ramaze/contrib/profiling.rb +0 -36
  200. data/lib/ramaze/contrib/rest.rb +0 -23
  201. data/lib/ramaze/contrib/sequel/create_join.rb +0 -26
  202. data/lib/ramaze/contrib/sequel/form_field.rb +0 -129
  203. data/lib/ramaze/contrib/sequel/image.rb +0 -196
  204. data/lib/ramaze/contrib/sequel/relation.rb +0 -98
  205. data/lib/ramaze/helper/httpdigest.rb +0 -96
  206. data/lib/ramaze/tool/bin.rb +0 -340
  207. data/lib/ramaze/tool/create.rb +0 -48
  208. data/lib/ramaze/tool/project_creator.rb +0 -120
  209. data/lib/ramaze/view/less.rb +0 -12
  210. data/lib/ramaze/view/maruku.rb +0 -15
  211. data/lib/ramaze/view/redcloth.rb +0 -21
  212. data/spec/contrib/addressable_route.rb +0 -30
  213. data/spec/examples/helpers/httpdigest.rb +0 -64
  214. data/spec/examples/templates/template_redcloth.rb +0 -13
  215. data/spec/ramaze/bin/ramaze.rb +0 -96
  216. data/spec/ramaze/helper/httpdigest.rb +0 -176
  217. data/spec/ramaze/view/less.rb +0 -60
  218. data/spec/ramaze/view/less/file.css.less +0 -8
  219. data/spec/ramaze/view/redcloth.rb +0 -66
  220. data/spec/ramaze/view/redcloth/external.redcloth +0 -8
  221. data/tasks/copyright.rake +0 -21
  222. data/tasks/gem_setup.rake +0 -112
  223. data/tasks/git.rake +0 -46
  224. data/tasks/grancher.rake +0 -12
  225. data/tasks/jquery.rake +0 -15
  226. data/tasks/manifest.rake +0 -4
  227. data/tasks/metric_changes.rake +0 -24
  228. data/tasks/reversion.rake +0 -8
  229. data/tasks/traits.rake +0 -21
data/.gitignore CHANGED
@@ -3,4 +3,5 @@ pkg
3
3
  ydoc
4
4
  *~
5
5
  *.swp
6
- .redcar
6
+ .redcar
7
+ *.rbc
data/.mailmap CHANGED
@@ -28,3 +28,5 @@ Michael Fellinger <m.fellinger@gmail.com> <m.fellinger@gmail.com>
28
28
  Michael Fellinger <m.fellinger@gmail.com> <manveru@sigma.localdomain>
29
29
  Michael Fellinger <m.fellinger@gmail.com> <manveru@weez-int.com>
30
30
  Michael Fellinger <m.fellinger@gmail.com> Michael Fellinger m.fellinger@gmail.com <>
31
+ YorickPeterse <yorickpeterse@gmail.com> YorickPeterse <info@yorickpeterse.com>
32
+ YorickPeterse <yorickpeterse@gmail.com> Yorick Peterse <info@yorickpeterse.com>
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use --create 1.9.2@ramaze
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
2
- All files in this distribution are subject to the terms of the Ruby license.
1
+ Copyright (c) 2009 - 2011 Michael Fellinger m.fellinger@gmail.com
2
+ All files in this distribution are subject to the terms of the Ruby license.
3
3
 
4
4
  # About Ramaze
5
5
 
@@ -22,161 +22,89 @@ web-frameworks, this was made obsolete by the introduction of rack, which
22
22
  provides this feature at a better level without trying to enforce any structural
23
23
  layout of the resulting framework.
24
24
 
25
+ ## Quick Example
25
26
 
26
- # Features Overview
27
+ While Ramaze applications are usually spread across multiple directories for controllers,
28
+ models and views one can quite easily create a very basic application in just a single file:
27
29
 
28
- Ramaze offers following features at the moment:
29
-
30
- * Adapters
31
-
32
- Ramaze takes advantage of the rack library to provide a common way of
33
- handling different ways to serve its content.
34
-
35
- Rack supports at the moment:
36
-
37
- * [Mongrel](http://mongrel.rubyforge.org/)
38
-
39
- Mongrel is a fast HTTP library and server for Ruby that is intended for
40
- hosting Ruby web applications of any kind using plain HTTP rather than
41
- FastCGI or SCGI.
42
-
43
- * [WEBrick](http://www.webrick.org/)
44
-
45
- WEBrick is a Ruby library program to build HTTP servers.
46
-
47
- * CGI
48
-
49
- CGI is the Common Gateway Interface and is one of the most basic ways
50
- to integrate into Webservers like Apache or Lighttpd.
51
-
52
- * FCGI
53
-
54
- Improvment of CGI as it doesn't start up a new connection to Ramaze on
55
- every request.
56
-
57
-
58
- * Templates
59
-
60
- * [Erubis](http://rubyforge.org/projects/erubis)
61
-
62
- Erubis is a fast, secure, and very extensible implementation of eRuby.
30
+ require 'ramaze'
63
31
 
64
- * Ezamar
65
-
66
- A simple homage to [Nitro](http://nitroproject.org)s templating, is shipped
67
- together with Ramaze.
68
-
69
- * Etanni
70
-
71
- A very basic template engine also shipped with Ramaze.
72
-
73
- * [Erector](http://erector.rubyforge.org/)
74
-
75
- Erector is a Builder-like view framework, inspired by Markaby but overcoming some of its flaws. In Erector all views are objects, not template files, which allows the full power of object-oriented programming in views.
76
-
77
- * [Haml](http://haml.hamptoncatlin.com/)
78
-
79
- Haml takes your gross, ugly templates and replaces them with veritable Haiku.
80
-
81
- * [Liquid](http://home.leetsoft.com/liquid)
82
-
83
- Liquid's syntax and parse model are inspired by Django templates, as well
84
- as PHP's smarty.
85
-
86
- * [Markaby](http://code.whytheluckystiff.net/markaby/)
87
-
88
- Markaby means Markup as Ruby.
89
-
90
- * [Remarkably](http://rubyforge.org/projects/remarkably)
91
-
92
- Remarkably is a very tiny Markaby-like XML builder
93
-
94
- * [Sass](http://haml.hamptoncatlin.com/docs/sass)
95
-
96
- Sass is a meta-language on top of CSS that‘s used to describe the style of
97
- a document cleanly and structurally, with more power than flat CSS allows.
32
+ class MyController < Ramaze::Controller
33
+ map '/'
34
+
35
+ def index
36
+ "Hello, Ramaze!"
37
+ end
38
+ end
98
39
 
99
- * And many, many more!
100
-
101
- * Cache
102
- * Hash
103
- * YAML::Store
104
- * MemCache
105
-
106
- * Helper
107
- * Active by default
108
- * CGI
109
-
110
- Shortcuts for escape/unescape of the CGI module.
111
-
112
- * File
113
-
114
- Helps you serving files from your Controller.
115
-
116
- * Flash
117
-
118
- Store a couple of values for one request associated with a session.
119
-
120
- * Link
121
-
122
- Easier linking to the various parts of your applications Controllers and
123
- Actions.
124
-
125
- * Redirect
40
+ Ramaze.start
126
41
 
127
- Easy redirection.
42
+ Once this is saved in a file (you can also run this from IRB) simply execute it using the
43
+ Ruby binary:
128
44
 
129
- * Optional
130
- * Aspect
45
+ $ ruby hello_ramaze.rb
131
46
 
132
- Allows you to wrap different Actions on your Controller with code.
47
+ This starts a WEBRick server listening on localhost:7000.
133
48
 
134
- * Auth
49
+ ## Features Overview
135
50
 
136
- Simple way to add basic authentication.
137
-
138
- * Cache
139
-
140
- Easy caching Actions and values.
141
-
142
- * Identity
143
-
144
- For ease of use of the OpenID authentication mechanism.
145
-
146
- * Inform
51
+ Ramaze offers following features at the moment:
147
52
 
148
- Wrapping the functionality of Ramazes logging facilities.
53
+ ### Adapters
149
54
 
150
- * Nitroform
55
+ Ramaze takes advantage of the Rack library to provide a common way of
56
+ handling different ways to serve its content. A few of the supported Rack adapters are:
57
+
58
+ * Mongrel
59
+ * WEBrick
60
+ * FCGI
61
+ * LiteSpeed
62
+ * Thin
151
63
 
152
- Hooks up on nitros form builder to help you creating forms from Og
153
- objects.
64
+ ### Templates
154
65
 
155
- * OpenID
66
+ Ramaze can in theory support any template engine as long as there's an adapter for it. To
67
+ make your life easier Ramaze ships with adapters for the following template engines:
156
68
 
157
- Authentication via OpenID made easy.
69
+ * [Erubis](http://rubyforge.org/projects/erubis)
70
+ * Etanni (small engine created for Ramaze)
71
+ * [Erector](http://erector.rubyforge.org/)
72
+ * [Haml](http://haml.hamptoncatlin.com/)
73
+ * [Liquid](http://home.leetsoft.com/liquid)
74
+ * [Markaby](http://code.whytheluckystiff.net/markaby/)
75
+ * [Remarkably](http://rubyforge.org/projects/remarkably)
76
+ * [Sass](http://haml.hamptoncatlin.com/docs/sass)
158
77
 
159
- * Pager
78
+ ### Cache
160
79
 
161
- Displays a collection of entitities in multiple pages.
80
+ * Hash
81
+ * YAML::Store
82
+ * LocalMemCache
83
+ * MemCache
84
+ * Sequel
162
85
 
163
- * Partial
86
+ ### Helpers
164
87
 
165
- Renders so-called partials.
88
+ Helpers are modules that can be included in your controllers or other classes to make it easier
89
+ to work with certain classes or systems without having to write the same boilerplate code over
90
+ and over again. Ramaze has a lot of helpers, the following helpers are loaded by default:
166
91
 
167
- * Stack
92
+ * CGI: Shortcuts for escape/unescape of the CGI module.
93
+ * File: Helps you serving files from your Controller.
94
+ * Flash: Store a couple of values for one request associated with a session.
95
+ * Link: Easier linking to the various parts of your applications Controllers and Actions.
96
+ * Redirect: Easy redirection.
168
97
 
169
- Allows you to use a call/answer mechanism for things like redirection to the
170
- site a user entered login-forms from.
98
+ Other helpers worth mentioning are:
171
99
 
172
- * Various
173
- * Sessions
174
- * Global configuration system
175
- * Simple request/response handling
176
- * Custom sophisticated Error-handling
100
+ * CSRF helper: protect your forms from CSRF attacks using a single method.
101
+ * BlueForm: makes working with forms fun again.
102
+ * User: easy authentication using a database model.
103
+ * Identity: makes it easy to work with OpenID systems.
177
104
 
105
+ In total Ramaze itself has 29 helpers!
178
106
 
179
- # Basic Principles
107
+ ## Basic Principles
180
108
 
181
109
  There are some basic principles that Ramaze tries to follow:
182
110
 
@@ -235,99 +163,98 @@ There are some basic principles that Ramaze tries to follow:
235
163
  The specs are checked every time a new patch is pushed into the repository,
236
164
  deciding whether the changes the patch applies are valid and don't break the framework.
237
165
 
166
+ ## Installation
238
167
 
239
- # Installation
168
+ ### RubyGems
240
169
 
241
- ## RubyGems
170
+ The simplest way of installing Ramaze is via the gem.
242
171
 
243
- The simplest way of installing Ramaze is via the gem.
172
+ [Rubygems](http://rubygems.org) is the package manager for ruby apps and
173
+ libraries and provides you with the last tagged version of Ramaze.
244
174
 
245
- [Rubygems](http://rubygems.org) is the package manager for ruby apps and
246
- libraries and provides you with the last tagged version of Ramaze.
175
+ $ gem install ramaze
247
176
 
248
- $ gem install ramaze
177
+ Versions are made as we see fit and get an announcement out (usually that's
178
+ the major obstacle as there is a lot to announce).
249
179
 
250
- Versions are made as we see fit and get an announcement out (usually that's
251
- the major obstacle as there is a lot to announce).
180
+ ### Git
252
181
 
253
- ## Git
182
+ To get the latest and sweetest, you can just pull from the repository and run
183
+ Ramaze that way.
254
184
 
255
- To get the latest and sweetest, you can just pull from the repository and run
256
- Ramaze that way.
185
+ $ git clone git://github.com/ramaze/ramaze.git
257
186
 
258
- $ git clone git://github.com/Ramaze/ramaze.git
187
+ Please read the `man git` or `git help` for more information about updating
188
+ and creating your own patches.
189
+ This is at the moment the premier way to use Ramaze, since it is the way I
190
+ use it.
259
191
 
260
- Please read the `man git` or `git help` for more information about updating
261
- and creating your own patches.
262
- This is at the moment the premier way to use Ramaze, since it is the way I
263
- use it.
192
+ Some hints for the usage of Git.
264
193
 
265
- Some hints for the usage of Git.
194
+ * Use `require 'ramaze'` from everywhere
266
195
 
267
- * use `require 'ramaze'` from everywhere
196
+ Simply add the path to your repository to the RUBYLIB environment variable.
197
+ If you are using bash you can simply put following line into your .bashrc:
268
198
 
269
- Simply add the path to your repository to the RUBYLIB environment variable.
270
- If you are using bash you can simply put following line into your .bashrc:
199
+ $ export RUBYLIB="$HOME/path/to/repo/lib/"
271
200
 
272
- $ export RUBYLIB="$HOME/path/to/repo/lib/"
201
+ Of course you should put the real path instead, you can also add multiple
202
+ paths, or create your personal `site_ruby`:
273
203
 
274
- Of course you should put the real path instead, you can also add multiple
275
- paths, or create your personal `site_ruby`:
204
+ $ export RUBYLIB="$HOME/ruby/ramaze/lib:$HOME/.site_ruby:$HOME/ruby/bacon/lib"
276
205
 
277
- $ export RUBYLIB="$HOME/ruby/ramaze/lib:$HOME/.site_ruby:$HOME/ruby/bacon/lib"
206
+ * Use `require 'ramaze'` system wide from everywhere
278
207
 
279
- * use `require 'ramaze'` system wide from everywhere
208
+ add a file to your `site_ruby` directory named 'ramaze.rb'
209
+ the content should be: `require '/path/to/git/repo/ramaze/lib/ramaze'`
280
210
 
281
- add a file to your `site_ruby` directory named 'ramaze.rb'
282
- the content should be: `require '/path/to/git/repo/ramaze/lib/ramaze'`
211
+ * Pull the latest version
283
212
 
284
- * Pull the latest version
213
+ $ git pull
285
214
 
286
- $ git pull
215
+ * Reset the repo to original state (if you screw up something)
287
216
 
288
- * Reset the repo to original state (if you screw up something)
217
+ $ git reset --hard # resets the whole repo
289
218
 
290
- $ git reset --hard # resets the whole repo
219
+ * Revert changes to (for example) lib/ramaze.rb only
291
220
 
292
- * Revert changes to (for example) lib/ramaze.rb only
221
+ $ git checkout master lib/ramaze.rb
293
222
 
294
- $ git checkout master lib/ramaze.rb
223
+ * Add and commit all changes.
295
224
 
296
- * Add and commit all changes.
225
+ $ git commit -a
297
226
 
298
- $ git commit -a
227
+ * Adding only specific changes.
299
228
 
300
- * Adding only specific changes.
229
+ # Add hunks you want to commit to the staging area (index)
230
+ $ git add -p
301
231
 
302
- # Add hunks you want to commit to the staging area (index)
303
- $ git add -p
232
+ * Commit the changes into the history of your repository
304
233
 
305
- * Commit the changes into the history of your repository
234
+ # Create a commit from the hunks added
235
+ $ git commit
306
236
 
307
- # Create a commit from the hunks added
308
- $ git commit
237
+ * output your patches into a bundle ready to be mailed (compress it before
238
+ sending to make sure it arrives in the way you sent it)
309
239
 
310
- * output your patches into a bundle ready to be mailed (compress it before
311
- sending to make sure it arrives in the way you sent it)
240
+ At the end of this process you will have a tar.bz2 for all your changes
241
+ that you can mail to ramaze@googlegroups.com
312
242
 
313
- At the end of this process you will have a tar.bz2 for all your changes
314
- that you can mail to ramaze@googlegroups.com
243
+ # make sure you are on latest revision to avoid conflicts
244
+ $ git pull
315
245
 
316
- # make sure you are on latest revision to avoid conflicts
317
- $ git pull
246
+ # create 00xx-blah.patch files against the remote repo
247
+ $ git format-patch origin/HEAD
318
248
 
319
- # create 00xx-blah.patch files against the remote repo
320
- $ git format-patch origin/HEAD
249
+ # From here on you can use either git-send-email or go the manual route
250
+ $ tar -cjf ramaze_bundle.tar.bz2 *.patch
321
251
 
322
- # From here on you can use either git-send-email or go the manual route
323
- $ tar -cjf ramaze_bundle.tar.bz2 *.patch
324
-
325
- ## Direct Download
252
+ ### Direct Download
326
253
 
327
254
  You can alternatively download the latest source code in a tarball from
328
- [here](http://github.com/Ramaze/ramaze/tarball/master).
255
+ [here](https://github.com/ramaze/ramaze/tarball/master).
329
256
 
330
- # Getting Started
257
+ ## Getting Started
331
258
 
332
259
  Now that you have a vague idea of what you're about to get into you might just
333
260
  want to get a way to get up and running ASAP.
@@ -347,9 +274,7 @@ Some places to get started are:
347
274
  - Run and read the test cases.
348
275
  - Look at the examples and run/modify them.
349
276
 
350
-
351
-
352
- # A couple of Examples
277
+ ## A couple of Examples
353
278
 
354
279
  There are some examples for your instant pleasure inside the examples-directory
355
280
  in the Ramaze-distribution.
@@ -366,7 +291,6 @@ For more information about the usage of ramaze try:
366
291
 
367
292
  $ ramaze --help
368
293
 
369
-
370
294
  Examples include:
371
295
 
372
296
  * examples/basic/hello.rb
@@ -388,8 +312,7 @@ Examples include:
388
312
 
389
313
  * Many more fully functional examples can be found in the examples folder.
390
314
 
391
-
392
- # How to find Help
315
+ ## How to find Help
393
316
 
394
317
  For help you can:
395
318
 
@@ -397,8 +320,7 @@ For help you can:
397
320
 
398
321
  - Join the Mailinglist at http://groups.google.com/group/ramaze
399
322
 
400
-
401
- # And thanks to...
323
+ ## And thanks to...
402
324
 
403
325
  There are a large number of people who made Ramaze possible by their ongoing
404
326
  efforts in the world of open source and by encouraging and helping me.
data/Rakefile CHANGED
@@ -1,106 +1,16 @@
1
1
  begin; require 'rubygems'; rescue LoadError; end
2
-
3
2
  require 'rake'
4
3
  require 'rake/clean'
5
- require 'rake/gempackagetask'
6
- require 'time'
7
4
  require 'date'
5
+ require 'time'
8
6
 
9
- PROJECT_SPECS = FileList[
10
- 'spec/{contrib,examples,ramaze,snippets}/**/*.rb',
11
- 'lib/proto/spec/*.rb'
12
- ]
13
-
14
- PROJECT_MODULE = 'Ramaze'
15
- PROJECT_JQUERY_FILE = 'lib/proto/public/js/jquery.js'
16
- PROJECT_README = 'README.md'
17
- PROJECT_VERSION = (ENV['VERSION'] || Date.today.strftime('%Y.%m.%d')).dup
18
- PROJECT_COPYRIGHT = [
19
- "# Copyright (c) #{Time.now.year} Michael Fellinger m.fellinger@gmail.com",
20
- "# All files in this distribution are subject to the terms of the Ruby license."
21
- ]
22
-
23
- DEPENDENCIES = {
24
- 'innate' => {:version => '>= 2010.03'},
25
- }
26
-
27
- DEVELOPMENT_DEPENDENCIES = {
28
- "abstract" => {:version => "1.0.0"},
29
- "addressable" => {:version => "2.1.1"},
30
- "bacon" => {:version => "1.1.0"},
31
- "builder" => {:version => "2.1.2"},
32
- "erector" => {:version => "0.7.2"},
33
- "erubis" => {:version => "2.6.5"},
34
- "ezamar" => {:version => "2009.06"},
35
- "haml" => {:version => "2.2.22"},
36
- "hpricot" => {:version => "0.8.2"},
37
- "json" => {:version => "1.2.3"},
38
- "less" => {:version => "1.2.21"},
39
- "liquid" => {:version => "2.0.0"},
40
- "locale" => {:version => "2.0.5"},
41
- "lokar" => {:version => "0.1.0"},
42
- "maruku" => {:version => "0.6.0"},
43
- "memcache-client" => {:version => "1.8.1", :lib => 'memcache'},
44
- "mustache" => {:version => "0.9.2"},
45
- "mutter" => {:version => "0.5.3"},
46
- "nagoro" => {:version => "2009.05"},
47
- "rack-contrib" => {:version => "0.9.2", :lib => 'rack/contrib'},
48
- "rack-test" => {:version => "0.5.3", :lib => 'rack/test'},
49
- "RedCloth" => {:version => "4.2.3"},
50
- "Remarkably" => {:version => "0.5.2", :lib => 'remarkably'},
51
- "RubyInline" => {:version => "3.8.4"},
52
- "sequel" => {:version => "3.9.0"},
53
- "scaffolding_extensions" => {:version => "1.4.0"},
54
- "slippers" => {:version => "0.0.14"},
55
- "sqlite3-ruby" => {:version => "1.2.5", :lib => 'sqlite3'},
56
- "tagz" => {:version => "7.2.3"},
57
- "tenjin" => {:version => "0.6.1"},
58
- }
59
-
60
- # Localmemcache doesn't work properly on OS X so we should ignore it
61
- if !RUBY_PLATFORM.include? 'darwin'
62
- DEVELOPMENT_DEPENDENCIES['localmemcache'] = {:version => "0.4.4"}
63
- end
64
-
65
- GEMSPEC = Gem::Specification.new{|s|
66
- s.name = 'ramaze'
67
- s.author = "Michael 'manveru' Fellinger"
68
- s.summary = "Ramaze is a simple and modular web framework"
69
- s.description = s.summary
70
- s.email = 'm.fellinger@gmail.com'
71
- s.homepage = 'http://ramaze.net'
72
- s.platform = Gem::Platform::RUBY
73
- s.version = PROJECT_VERSION
74
- s.files = `git ls-files`.split("\n").sort
75
- s.has_rdoc = true
76
- s.require_path = 'lib'
77
- s.bindir = "bin"
78
- s.executables = ["ramaze"]
79
- s.rubyforge_project = "ramaze"
80
- s.required_rubygems_version = '>= 1.3.5'
81
-
82
- s.post_install_message = <<MESSAGE.strip
83
- ============================================================
84
-
85
- Thank you for installing Ramaze!
86
- To create a new project:
87
- $ ramaze create yourproject
88
-
89
- ============================================================
90
- MESSAGE
91
- }
92
-
93
- DEPENDENCIES.each do |name, options|
94
- GEMSPEC.add_dependency(name, options[:version])
95
- end
96
-
97
- DEVELOPMENT_DEPENDENCIES.each do |name, options|
98
- GEMSPEC.add_development_dependency(name, options[:version])
99
- end
100
-
101
- Dir['tasks/*.rake'].each{|f| import(f) }
7
+ # All the bacon specifications
8
+ PROJECT_SPECS = Dir.glob(File.expand_path('../spec/ramaze/**/*.rb', __FILE__))
102
9
 
103
- task :default => [:bacon]
10
+ # Load the gemspec so it's details can be used in all the Rake tasks
11
+ GEMSPEC = Gem::Specification::load(
12
+ File.expand_path('../ramaze.gemspec', __FILE__)
13
+ )
104
14
 
105
15
  CLEAN.include %w[
106
16
  **/.*.sw?
@@ -114,3 +24,10 @@ CLEAN.include %w[
114
24
  ydoc
115
25
  *coverage*
116
26
  ]
27
+
28
+ Dir.glob(File.expand_path('../tasks/*.rake', __FILE__)).each do |f|
29
+ import(f)
30
+ end
31
+
32
+ # Set the default task to running all the bacon specifications
33
+ task :default => [:bacon]