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.
- data/.gitignore +2 -1
- data/.mailmap +2 -0
- data/.rvmrc +1 -0
- data/README.md +119 -197
- data/Rakefile +14 -97
- data/bin/ramaze +6 -14
- data/doc/AUTHORS +8 -4
- data/doc/CHANGELOG +3784 -3339
- data/examples/app/chat/start.rb +2 -2
- data/lib/proto/app.rb +2 -3
- data/lib/proto/config.ru +4 -5
- data/lib/proto/controller/init.rb +11 -4
- data/lib/proto/controller/main.rb +12 -7
- data/lib/proto/layout/default.xhtml +56 -23
- data/lib/proto/model/init.rb +3 -1
- data/lib/proto/public/css/grid.css +107 -0
- data/lib/proto/public/css/layout.css +81 -0
- data/lib/proto/public/css/reset.css +123 -0
- data/lib/proto/public/css/text.css +109 -0
- data/lib/proto/public/images/bg.png +0 -0
- data/lib/proto/spec/main.rb +2 -2
- data/lib/proto/start.rb +11 -1
- data/lib/proto/view/index.xhtml +27 -23
- data/lib/ramaze.rb +0 -1
- data/lib/ramaze/app.rb +85 -12
- data/lib/ramaze/app_graph.rb +107 -0
- data/lib/ramaze/bin/console.rb +87 -0
- data/lib/ramaze/bin/create.rb +94 -0
- data/lib/ramaze/bin/helper.rb +107 -0
- data/lib/ramaze/bin/restart.rb +95 -0
- data/lib/ramaze/bin/runner.rb +141 -0
- data/lib/ramaze/bin/start.rb +206 -0
- data/lib/ramaze/bin/status.rb +152 -0
- data/lib/ramaze/bin/stop.rb +112 -0
- data/lib/ramaze/cache.rb +9 -4
- data/lib/ramaze/cache/localmemcache.rb +10 -13
- data/lib/ramaze/cache/lru.rb +49 -7
- data/lib/ramaze/cache/memcache.rb +170 -92
- data/lib/ramaze/cache/sequel.rb +301 -118
- data/lib/ramaze/controller.rb +108 -9
- data/lib/ramaze/controller/default.rb +15 -2
- data/lib/ramaze/current.rb +14 -2
- data/lib/ramaze/dependencies.rb +46 -0
- data/lib/ramaze/files.rb +38 -3
- data/lib/ramaze/gestalt.rb +12 -12
- data/lib/ramaze/helper.rb +0 -2
- data/lib/ramaze/helper/auth.rb +30 -23
- data/lib/ramaze/helper/blue_form.rb +175 -126
- data/lib/ramaze/helper/csrf.rb +76 -91
- data/lib/ramaze/helper/email.rb +105 -0
- data/lib/ramaze/helper/erector.rb +16 -15
- data/lib/ramaze/helper/gestalt.rb +2 -2
- data/lib/ramaze/helper/layout.rb +89 -73
- data/lib/ramaze/helper/link.rb +7 -6
- data/lib/ramaze/helper/localize.rb +6 -5
- data/lib/ramaze/helper/markaby.rb +25 -23
- data/lib/ramaze/helper/maruku.rb +3 -3
- data/lib/ramaze/helper/paginate.rb +19 -27
- data/lib/ramaze/helper/remarkably.rb +3 -3
- data/lib/ramaze/helper/request_accessor.rb +3 -3
- data/lib/ramaze/helper/send_file.rb +12 -8
- data/lib/ramaze/helper/simple_captcha.rb +5 -6
- data/lib/ramaze/helper/stack.rb +7 -4
- data/lib/ramaze/helper/tagz.rb +10 -11
- data/lib/ramaze/helper/thread.rb +19 -16
- data/lib/ramaze/helper/ultraviolet.rb +7 -4
- data/lib/ramaze/helper/user.rb +40 -21
- data/lib/ramaze/helper/xhtml.rb +29 -20
- data/lib/ramaze/log.rb +3 -11
- data/lib/ramaze/log/analogger.rb +5 -4
- data/lib/ramaze/log/growl.rb +9 -7
- data/lib/ramaze/log/hub.rb +3 -5
- data/lib/ramaze/log/informer.rb +15 -12
- data/lib/ramaze/log/knotify.rb +3 -5
- data/lib/ramaze/log/logger.rb +3 -5
- data/lib/ramaze/log/logging.rb +6 -8
- data/lib/ramaze/log/rotatinginformer.rb +27 -17
- data/lib/ramaze/log/syslog.rb +7 -7
- data/lib/ramaze/log/xosd.rb +3 -5
- data/lib/ramaze/middleware_compiler.rb +27 -4
- data/lib/ramaze/reloader.rb +50 -12
- data/lib/ramaze/reloader/watch_inotify.rb +4 -5
- data/lib/ramaze/reloader/watch_stat.rb +3 -3
- data/lib/ramaze/request.rb +18 -8
- data/lib/ramaze/response.rb +38 -7
- data/lib/ramaze/rest.rb +36 -0
- data/lib/ramaze/setup.rb +101 -31
- data/lib/ramaze/spec.rb +1 -1
- data/lib/ramaze/spec/bacon.rb +6 -3
- data/lib/ramaze/spec/helper/bacon.rb +0 -1
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view.rb +2 -11
- data/lib/ramaze/view/erector.rb +46 -31
- data/lib/ramaze/view/erubis.rb +7 -3
- data/lib/ramaze/view/ezamar.rb +7 -3
- data/lib/ramaze/view/gestalt.rb +9 -3
- data/lib/ramaze/view/haml.rb +7 -3
- data/lib/ramaze/view/liquid.rb +3 -3
- data/lib/ramaze/view/lokar.rb +7 -3
- data/lib/ramaze/view/mustache.rb +11 -5
- data/lib/ramaze/view/nagoro.rb +3 -3
- data/lib/ramaze/view/sass.rb +1 -1
- data/lib/ramaze/view/slippers.rb +40 -13
- data/lib/ramaze/view/tagz.rb +9 -5
- data/ramaze.gemspec +23 -128
- data/spec/helper.rb +5 -0
- data/spec/ramaze/bin/app/config.ru +11 -0
- data/spec/ramaze/bin/create.rb +28 -0
- data/spec/ramaze/bin/runner.rb +30 -0
- data/spec/ramaze/bin/start.rb +38 -0
- data/spec/ramaze/cache/memcache.rb +10 -3
- data/spec/ramaze/cache/sequel.rb +7 -0
- data/spec/ramaze/controller/provide_inheritance.rb +0 -10
- data/spec/ramaze/dispatcher/file.rb +19 -15
- data/spec/ramaze/helper/auth.rb +10 -9
- data/spec/ramaze/helper/blue_form.rb +121 -68
- data/spec/ramaze/helper/email.rb +69 -0
- data/spec/ramaze/helper/layout.rb +12 -15
- data/spec/ramaze/helper/layout/alternative.xhtml +5 -0
- data/spec/ramaze/helper/user.rb +2 -0
- data/spec/ramaze/log/growl.rb +14 -1
- data/spec/{contrib → ramaze}/rest.rb +1 -1
- data/spec/ramaze/session/memcache.rb +2 -2
- data/spec/ramaze/view/sass.rb +1 -1
- data/tasks/bacon.rake +3 -3
- data/tasks/gem.rake +17 -18
- data/tasks/rcov.rake +2 -3
- data/tasks/release.rake +8 -65
- data/tasks/setup.rake +10 -8
- data/tasks/todo.rake +9 -5
- data/tasks/yard.rake +3 -2
- metadata +105 -397
- data/MANIFEST +0 -532
- data/TODO.md +0 -19
- data/benchmark/bench_templates/bench.rb +0 -67
- data/benchmark/bench_templates/view/large.erb +0 -79
- data/benchmark/bench_templates/view/large.haml +0 -41
- data/benchmark/bench_templates/view/large.lok +0 -79
- data/benchmark/bench_templates/view/large.xhtml +0 -79
- data/benchmark/bench_templates/view/small.erb +0 -21
- data/benchmark/bench_templates/view/small.haml +0 -12
- data/benchmark/bench_templates/view/small.lok +0 -21
- data/benchmark/bench_templates/view/small.xhtml +0 -21
- data/benchmark/results.txt +0 -131
- data/benchmark/run.rb +0 -355
- data/benchmark/suite/minimal.rb +0 -11
- data/benchmark/suite/no_informer.rb +0 -7
- data/benchmark/suite/no_sessions.rb +0 -9
- data/benchmark/suite/no_template.rb +0 -7
- data/benchmark/suite/simple.rb +0 -5
- data/benchmark/suite/template_erubis.rb +0 -8
- data/benchmark/suite/template_etanni.rb +0 -8
- data/benchmark/suite/template_ezamar.rb +0 -8
- data/benchmark/suite/template_haml.rb +0 -13
- data/benchmark/suite/template_liquid.rb +0 -11
- data/benchmark/suite/template_markaby.rb +0 -9
- data/benchmark/suite/template_nagoro.rb +0 -8
- data/benchmark/suite/template_redcloth.rb +0 -13
- data/benchmark/suite/template_tenjin.rb +0 -8
- data/benchmark/test.rb +0 -35
- data/doc/FAQ +0 -92
- data/doc/INSTALL +0 -92
- data/doc/TODO +0 -29
- data/doc/meta/announcement.txt +0 -119
- data/doc/meta/configuration.txt +0 -163
- data/doc/meta/internals.txt +0 -278
- data/doc/meta/users.kml +0 -64
- data/doc/tutorial/todolist.html +0 -1512
- data/doc/tutorial/todolist.txt +0 -920
- data/examples/app/sourceview/public/coderay.css +0 -104
- data/examples/app/sourceview/public/images/file.gif +0 -0
- data/examples/app/sourceview/public/images/folder.gif +0 -0
- data/examples/app/sourceview/public/images/tv-collapsable-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-collapsable.gif +0 -0
- data/examples/app/sourceview/public/images/tv-expandable-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-expandable.gif +0 -0
- data/examples/app/sourceview/public/images/tv-item-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-item.gif +0 -0
- data/examples/app/sourceview/public/jquery.js +0 -11
- data/examples/app/sourceview/public/jquery.treeview.css +0 -48
- data/examples/app/sourceview/public/jquery.treeview.js +0 -223
- data/examples/app/sourceview/public/sourceview.js +0 -52
- data/examples/app/sourceview/start.rb +0 -79
- data/examples/app/sourceview/view/index.haml +0 -59
- data/examples/helpers/httpdigest.rb +0 -107
- data/lib/proto/public/css/screen.css +0 -30
- data/lib/proto/public/js/jquery.js +0 -7179
- data/lib/ramaze/contrib/addressable_route.rb +0 -56
- data/lib/ramaze/contrib/app_graph.rb +0 -64
- data/lib/ramaze/contrib/email.rb +0 -88
- data/lib/ramaze/contrib/facebook.rb +0 -23
- data/lib/ramaze/contrib/facebook/facebook.rb +0 -171
- data/lib/ramaze/contrib/gettext.rb +0 -113
- data/lib/ramaze/contrib/gettext/mo.rb +0 -155
- data/lib/ramaze/contrib/gettext/parser.rb +0 -46
- data/lib/ramaze/contrib/gettext/po.rb +0 -109
- data/lib/ramaze/contrib/gzip_filter.rb +0 -1
- data/lib/ramaze/contrib/maruku_uv.rb +0 -59
- data/lib/ramaze/contrib/profiling.rb +0 -36
- data/lib/ramaze/contrib/rest.rb +0 -23
- data/lib/ramaze/contrib/sequel/create_join.rb +0 -26
- data/lib/ramaze/contrib/sequel/form_field.rb +0 -129
- data/lib/ramaze/contrib/sequel/image.rb +0 -196
- data/lib/ramaze/contrib/sequel/relation.rb +0 -98
- data/lib/ramaze/helper/httpdigest.rb +0 -96
- data/lib/ramaze/tool/bin.rb +0 -340
- data/lib/ramaze/tool/create.rb +0 -48
- data/lib/ramaze/tool/project_creator.rb +0 -120
- data/lib/ramaze/view/less.rb +0 -12
- data/lib/ramaze/view/maruku.rb +0 -15
- data/lib/ramaze/view/redcloth.rb +0 -21
- data/spec/contrib/addressable_route.rb +0 -30
- data/spec/examples/helpers/httpdigest.rb +0 -64
- data/spec/examples/templates/template_redcloth.rb +0 -13
- data/spec/ramaze/bin/ramaze.rb +0 -96
- data/spec/ramaze/helper/httpdigest.rb +0 -176
- data/spec/ramaze/view/less.rb +0 -60
- data/spec/ramaze/view/less/file.css.less +0 -8
- data/spec/ramaze/view/redcloth.rb +0 -66
- data/spec/ramaze/view/redcloth/external.redcloth +0 -8
- data/tasks/copyright.rake +0 -21
- data/tasks/gem_setup.rake +0 -112
- data/tasks/git.rake +0 -46
- data/tasks/grancher.rake +0 -12
- data/tasks/jquery.rake +0 -15
- data/tasks/manifest.rake +0 -4
- data/tasks/metric_changes.rake +0 -24
- data/tasks/reversion.rake +0 -8
- data/tasks/traits.rake +0 -21
data/.gitignore
CHANGED
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
130
|
-
* Aspect
|
|
45
|
+
$ ruby hello_ramaze.rb
|
|
131
46
|
|
|
132
|
-
|
|
47
|
+
This starts a WEBRick server listening on localhost:7000.
|
|
133
48
|
|
|
134
|
-
|
|
49
|
+
## Features Overview
|
|
135
50
|
|
|
136
|
-
|
|
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
|
-
|
|
53
|
+
### Adapters
|
|
149
54
|
|
|
150
|
-
|
|
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
|
-
|
|
153
|
-
objects.
|
|
64
|
+
### Templates
|
|
154
65
|
|
|
155
|
-
|
|
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
|
-
|
|
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
|
-
|
|
78
|
+
### Cache
|
|
160
79
|
|
|
161
|
-
|
|
80
|
+
* Hash
|
|
81
|
+
* YAML::Store
|
|
82
|
+
* LocalMemCache
|
|
83
|
+
* MemCache
|
|
84
|
+
* Sequel
|
|
162
85
|
|
|
163
|
-
|
|
86
|
+
### Helpers
|
|
164
87
|
|
|
165
|
-
|
|
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
|
-
|
|
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
|
-
|
|
170
|
-
site a user entered login-forms from.
|
|
98
|
+
Other helpers worth mentioning are:
|
|
171
99
|
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
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
|
-
|
|
168
|
+
### RubyGems
|
|
240
169
|
|
|
241
|
-
|
|
170
|
+
The simplest way of installing Ramaze is via the gem.
|
|
242
171
|
|
|
243
|
-
|
|
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
|
-
|
|
246
|
-
libraries and provides you with the last tagged version of Ramaze.
|
|
175
|
+
$ gem install ramaze
|
|
247
176
|
|
|
248
|
-
|
|
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
|
-
|
|
251
|
-
the major obstacle as there is a lot to announce).
|
|
180
|
+
### Git
|
|
252
181
|
|
|
253
|
-
|
|
182
|
+
To get the latest and sweetest, you can just pull from the repository and run
|
|
183
|
+
Ramaze that way.
|
|
254
184
|
|
|
255
|
-
|
|
256
|
-
Ramaze that way.
|
|
185
|
+
$ git clone git://github.com/ramaze/ramaze.git
|
|
257
186
|
|
|
258
|
-
|
|
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
|
-
|
|
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
|
-
|
|
194
|
+
* Use `require 'ramaze'` from everywhere
|
|
266
195
|
|
|
267
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
206
|
+
* Use `require 'ramaze'` system wide from everywhere
|
|
278
207
|
|
|
279
|
-
|
|
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
|
-
|
|
282
|
-
the content should be: `require '/path/to/git/repo/ramaze/lib/ramaze'`
|
|
211
|
+
* Pull the latest version
|
|
283
212
|
|
|
284
|
-
|
|
213
|
+
$ git pull
|
|
285
214
|
|
|
286
|
-
|
|
215
|
+
* Reset the repo to original state (if you screw up something)
|
|
287
216
|
|
|
288
|
-
|
|
217
|
+
$ git reset --hard # resets the whole repo
|
|
289
218
|
|
|
290
|
-
|
|
219
|
+
* Revert changes to (for example) lib/ramaze.rb only
|
|
291
220
|
|
|
292
|
-
|
|
221
|
+
$ git checkout master lib/ramaze.rb
|
|
293
222
|
|
|
294
|
-
|
|
223
|
+
* Add and commit all changes.
|
|
295
224
|
|
|
296
|
-
|
|
225
|
+
$ git commit -a
|
|
297
226
|
|
|
298
|
-
|
|
227
|
+
* Adding only specific changes.
|
|
299
228
|
|
|
300
|
-
|
|
229
|
+
# Add hunks you want to commit to the staging area (index)
|
|
230
|
+
$ git add -p
|
|
301
231
|
|
|
302
|
-
|
|
303
|
-
$ git add -p
|
|
232
|
+
* Commit the changes into the history of your repository
|
|
304
233
|
|
|
305
|
-
|
|
234
|
+
# Create a commit from the hunks added
|
|
235
|
+
$ git commit
|
|
306
236
|
|
|
307
|
-
|
|
308
|
-
|
|
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
|
-
|
|
311
|
-
|
|
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
|
-
|
|
314
|
-
|
|
243
|
+
# make sure you are on latest revision to avoid conflicts
|
|
244
|
+
$ git pull
|
|
315
245
|
|
|
316
|
-
|
|
317
|
-
|
|
246
|
+
# create 00xx-blah.patch files against the remote repo
|
|
247
|
+
$ git format-patch origin/HEAD
|
|
318
248
|
|
|
319
|
-
|
|
320
|
-
|
|
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
|
-
|
|
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](
|
|
255
|
+
[here](https://github.com/ramaze/ramaze/tarball/master).
|
|
329
256
|
|
|
330
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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]
|