ramaze 2011.12.28 → 2012.03.07
Sign up to get free protection for your applications and to get access to all the features.
- data/.gems +34 -0
- data/.travis.yml +0 -1
- data/.yardopts +3 -2
- data/README.md +8 -6
- data/examples/app/blog/controller/init.rb +0 -1
- data/examples/app/blog/controller/posts.rb +0 -9
- data/examples/app/blog/controller/users.rb +0 -8
- data/examples/app/blog/model/comment.rb +0 -3
- data/examples/app/blog/model/post.rb +0 -2
- data/examples/app/blog/model/user.rb +1 -6
- data/examples/app/wikore/spec/wikore.rb +2 -2
- data/examples/app/wikore/src/model.rb +2 -8
- data/examples/app/wikore/start.rb +2 -2
- data/examples/misc/memleak_detector.rb +1 -1
- data/guide/AUTHORS +5 -2
- data/guide/CHANGELOG +203 -0
- data/guide/LICENSE +19 -0
- data/guide/general/contributing.md +74 -1
- data/guide/general/helpers.md +14 -0
- data/guide/general/middlewares.md +35 -16
- data/guide/general/sessions.md +39 -13
- data/lib/proto/layout/default.xhtml +1 -1
- data/lib/ramaze.rb +1 -1
- data/lib/ramaze/cache.rb +1 -1
- data/lib/ramaze/cache/localmemcache.rb +1 -1
- data/lib/ramaze/cache/lru.rb +1 -1
- data/lib/ramaze/controller.rb +1 -1
- data/lib/ramaze/dependencies.rb +3 -2
- data/lib/ramaze/gestalt.rb +1 -1
- data/lib/ramaze/helper.rb +1 -1
- data/lib/ramaze/helper/auth.rb +1 -1
- data/lib/ramaze/helper/cache.rb +1 -1
- data/lib/ramaze/helper/csrf.rb +14 -21
- data/lib/ramaze/helper/erector.rb +1 -1
- data/lib/ramaze/helper/flash.rb +1 -1
- data/lib/ramaze/helper/formatting.rb +1 -1
- data/lib/ramaze/helper/identity.rb +1 -1
- data/lib/ramaze/helper/link.rb +1 -1
- data/lib/ramaze/helper/markaby.rb +1 -1
- data/lib/ramaze/helper/stack.rb +1 -1
- data/lib/ramaze/helper/tagz.rb +1 -1
- data/lib/ramaze/helper/thread.rb +1 -1
- data/lib/ramaze/helper/user.rb +68 -30
- data/lib/ramaze/log.rb +1 -1
- data/lib/ramaze/log/analogger.rb +1 -1
- data/lib/ramaze/log/growl.rb +1 -1
- data/lib/ramaze/log/hub.rb +1 -1
- data/lib/ramaze/log/informer.rb +1 -1
- data/lib/ramaze/log/knotify.rb +1 -1
- data/lib/ramaze/log/logger.rb +1 -1
- data/lib/ramaze/log/logging.rb +1 -1
- data/lib/ramaze/log/syslog.rb +1 -1
- data/lib/ramaze/log/xosd.rb +1 -1
- data/lib/ramaze/plugin.rb +1 -1
- data/lib/ramaze/reloader.rb +1 -1
- data/lib/ramaze/request.rb +1 -1
- data/lib/ramaze/response.rb +1 -1
- data/lib/ramaze/snippets.rb +1 -1
- data/lib/ramaze/snippets/array/put_within.rb +1 -1
- data/lib/ramaze/snippets/kernel/pretty_inspect.rb +1 -1
- data/lib/ramaze/snippets/numeric/filesize_format.rb +1 -1
- data/lib/ramaze/snippets/object/__dir__.rb +1 -1
- data/lib/ramaze/snippets/object/instance_variable_defined.rb +1 -1
- data/lib/ramaze/snippets/ordered_set.rb +1 -1
- data/lib/ramaze/snippets/ramaze/acquire.rb +1 -1
- data/lib/ramaze/snippets/ramaze/struct.rb +1 -1
- data/lib/ramaze/snippets/string/camel_case.rb +1 -1
- data/lib/ramaze/snippets/string/color.rb +1 -1
- data/lib/ramaze/snippets/string/end_with.rb +1 -1
- data/lib/ramaze/snippets/string/ord.rb +1 -1
- data/lib/ramaze/snippets/string/snake_case.rb +1 -1
- data/lib/ramaze/snippets/thread/into.rb +1 -1
- data/lib/ramaze/spec/helper/template_examples.rb +1 -1
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view.rb +3 -2
- data/lib/ramaze/view/erector.rb +16 -14
- data/lib/ramaze/view/erubis.rb +4 -3
- data/lib/ramaze/view/ezamar.rb +3 -1
- data/lib/ramaze/view/haml.rb +4 -0
- data/lib/ramaze/view/liquid.rb +4 -3
- data/lib/ramaze/view/lokar.rb +3 -1
- data/lib/ramaze/view/mustache.rb +3 -1
- data/lib/ramaze/view/nagoro.rb +4 -1
- data/lib/ramaze/view/remarkably.rb +4 -0
- data/lib/ramaze/view/sass.rb +5 -1
- data/lib/ramaze/view/slim.rb +45 -0
- data/lib/ramaze/view/slippers.rb +8 -6
- data/lib/ramaze/view/tagz.rb +3 -1
- data/lib/ramaze/view/tenjin.rb +3 -1
- data/ramaze.gemspec +1 -1
- data/spec/examples/templates/template_erubis.rb +1 -1
- data/spec/examples/templates/template_ezamar.rb +1 -1
- data/spec/examples/templates/template_haml.rb +1 -1
- data/spec/examples/templates/template_liquid.rb +1 -1
- data/spec/examples/templates/template_markaby.rb +1 -1
- data/spec/examples/templates/template_mustache.rb +1 -1
- data/spec/examples/templates/template_nagoro.rb +1 -1
- data/spec/examples/templates/template_remarkably.rb +1 -1
- data/spec/examples/templates/template_tenjin.rb +1 -1
- data/spec/ramaze/action/render.rb +1 -1
- data/spec/ramaze/app.rb +1 -1
- data/spec/ramaze/app/location.rb +1 -1
- data/spec/ramaze/cache/localmemcache.rb +1 -1
- data/spec/ramaze/cache/lru.rb +1 -1
- data/spec/ramaze/cache/memcache.rb +1 -1
- data/spec/ramaze/cache/redis.rb +1 -1
- data/spec/ramaze/cache/sequel.rb +1 -1
- data/spec/ramaze/controller/actionless_templates.rb +1 -1
- data/spec/ramaze/controller/lonely_mapping.rb +1 -1
- data/spec/ramaze/controller/mapping.rb +1 -1
- data/spec/ramaze/controller/provide_inheritance.rb +1 -1
- data/spec/ramaze/controller/resolve.rb +1 -1
- data/spec/ramaze/controller/subclass.rb +1 -1
- data/spec/ramaze/controller/template_resolving.rb +1 -1
- data/spec/ramaze/dispatcher/directory.rb +1 -1
- data/spec/ramaze/dispatcher/file.rb +1 -1
- data/spec/ramaze/error.rb +1 -1
- data/spec/ramaze/files.rb +1 -1
- data/spec/ramaze/gestalt.rb +1 -1
- data/spec/ramaze/helper/auth.rb +1 -1
- data/spec/ramaze/helper/bench.rb +1 -1
- data/spec/ramaze/helper/cache.rb +1 -1
- data/spec/ramaze/helper/csrf.rb +10 -19
- data/spec/ramaze/helper/flash.rb +1 -1
- data/spec/ramaze/helper/formatting.rb +1 -1
- data/spec/ramaze/helper/gestalt.rb +1 -1
- data/spec/ramaze/helper/gravatar.rb +1 -1
- data/spec/ramaze/helper/layout.rb +1 -1
- data/spec/ramaze/helper/link.rb +1 -1
- data/spec/ramaze/helper/localize.rb +1 -1
- data/spec/ramaze/helper/maruku.rb +1 -1
- data/spec/ramaze/helper/paginate.rb +1 -1
- data/spec/ramaze/helper/request_accessor.rb +1 -1
- data/spec/ramaze/helper/simple_captcha.rb +1 -1
- data/spec/ramaze/helper/stack.rb +1 -1
- data/spec/ramaze/helper/user.rb +1 -1
- data/spec/ramaze/helper/xhtml.rb +1 -1
- data/spec/ramaze/log/informer.rb +1 -1
- data/spec/ramaze/log/logging.rb +1 -1
- data/spec/ramaze/log/syslog.rb +1 -1
- data/spec/ramaze/params.rb +1 -1
- data/spec/ramaze/request.rb +1 -1
- data/spec/ramaze/session/memcache.rb +1 -1
- data/spec/ramaze/struct.rb +1 -1
- data/spec/ramaze/view.rb +1 -1
- data/spec/ramaze/view/erubis.rb +1 -1
- data/spec/ramaze/view/ezamar.rb +1 -1
- data/spec/ramaze/view/gestalt.rb +1 -1
- data/spec/ramaze/view/haml.rb +1 -1
- data/spec/ramaze/view/liquid.rb +1 -1
- data/spec/ramaze/view/lokar.rb +1 -1
- data/spec/ramaze/view/mustache.rb +1 -1
- data/spec/ramaze/view/nagoro.rb +1 -1
- data/spec/ramaze/view/remarkably.rb +1 -1
- data/spec/ramaze/view/sass.rb +1 -1
- data/spec/ramaze/view/slim.rb +49 -0
- data/spec/ramaze/view/slim/external.slim +5 -0
- data/spec/ramaze/view/slim/external_vars.slim +5 -0
- data/spec/ramaze/view/tagz.rb +1 -1
- data/spec/ramaze/view/tenjin.rb +1 -1
- data/spec/snippets/array/put_within.rb +1 -1
- data/spec/snippets/binding/locals.rb +1 -1
- data/spec/snippets/numeric/filesize_format.rb +1 -1
- data/spec/snippets/numeric/time.rb +1 -1
- data/spec/snippets/object/__dir__.rb +1 -1
- data/spec/snippets/ordered_set.rb +1 -1
- data/spec/snippets/ramaze/acquire.rb +1 -1
- data/spec/snippets/ramaze/dictionary.rb +1 -1
- data/spec/snippets/ramaze/lru_hash.rb +1 -1
- data/spec/snippets/ramaze/struct.rb +1 -1
- data/spec/snippets/string/camel_case.rb +1 -1
- data/spec/snippets/string/color.rb +1 -1
- data/spec/snippets/string/snake_case.rb +1 -1
- data/spec/snippets/string/unindent.rb +1 -1
- data/spec/snippets/thread/into.rb +1 -1
- metadata +75 -60
- data/guide/GPL_LICENSE +0 -339
- data/guide/RUBY_LICENSE +0 -53
data/.gems
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# .gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator
|
2
|
+
bacon -v1.1.0
|
3
|
+
dalli -v1.1.4
|
4
|
+
erector -v0.8.3
|
5
|
+
erubis -v2.7.0
|
6
|
+
ezamar -v2009.06
|
7
|
+
haml -v3.1.4
|
8
|
+
hpricot -v0.8.5
|
9
|
+
innate -v2011.12
|
10
|
+
liquid -v2.3.0
|
11
|
+
locale -v2.0.5
|
12
|
+
localmemcache -v0.4.4
|
13
|
+
lokar -v0.2.1
|
14
|
+
maruku -v0.6.0
|
15
|
+
mustache -v0.99.4
|
16
|
+
nagoro -v2009.05
|
17
|
+
nokogiri -v1.5.0
|
18
|
+
polyglot -v0.3.3
|
19
|
+
rack -v1.4.0
|
20
|
+
rack-contrib -v1.1.0
|
21
|
+
rack-test -v0.6.1
|
22
|
+
ramaze -v2011.12.28
|
23
|
+
rdiscount -v1.6.8
|
24
|
+
redis -v2.2.2
|
25
|
+
Remarkably -v0.6.1
|
26
|
+
sass -v3.1.12
|
27
|
+
sequel -v3.30.0
|
28
|
+
slippers -v0.0.14
|
29
|
+
sqlite3 -v1.3.5
|
30
|
+
syntax -v1.0.0
|
31
|
+
tagz -v9.0.0
|
32
|
+
tenjin -v0.7.1
|
33
|
+
treetop -v1.4.10
|
34
|
+
yard -v0.7.4
|
data/.travis.yml
CHANGED
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -37,12 +37,6 @@ Installing Ramaze is as easy as the following command:
|
|
37
37
|
|
38
38
|
For more information see the chapter {file:installation Installation}.
|
39
39
|
|
40
|
-
Ramaze is dual licensed under the GPL/Ruby license and is copyrighted 2009 -
|
41
|
-
2011 by Michael Fellinger (m.fellinger@gmail.com). A copy of the Ruby license
|
42
|
-
can be found in the file "guide/RUBY_LICENSE", a copy of the GPL license can be
|
43
|
-
found in the file "guide/GPL_LICENSE". Both these files can be displayed by
|
44
|
-
clicking the "Files" button at the top right.
|
45
|
-
|
46
40
|
<div class="note todo">
|
47
41
|
<p>
|
48
42
|
<strong>Note:</strong> if you spot any mistakes made such as spelling
|
@@ -84,6 +78,14 @@ This starts a WEBRick server listening on localhost:7000.
|
|
84
78
|
* A Rack server such as Thin or Unicorn.
|
85
79
|
* Basic knowledge of Ruby.
|
86
80
|
|
81
|
+
## License
|
82
|
+
|
83
|
+
Ramaze is licensed under the MIT license, a copy of this license can be found in
|
84
|
+
``guide/LICENSE``. If you happen to view this README using YARD (this is what
|
85
|
+
you see on <http://ramaze.net/documentation/index.html>) you can also view this
|
86
|
+
license by clicking the "Files" button at the top right and then clicking on the
|
87
|
+
"LICENSE" item.
|
88
|
+
|
87
89
|
## Community
|
88
90
|
|
89
91
|
* \#ramaze on the Freenode IRC network
|
@@ -2,7 +2,6 @@
|
|
2
2
|
# The Posts controller is used to display a list of all the posts that have been
|
3
3
|
# added as well as providing a way of adding, removing and updating posts.
|
4
4
|
#
|
5
|
-
# @author Yorick Peterse
|
6
5
|
# @since 26-09-2011
|
7
6
|
#
|
8
7
|
class Posts < BaseController
|
@@ -41,7 +40,6 @@ class Posts < BaseController
|
|
41
40
|
# Shows an overview of all the posts that have been added. These posts are
|
42
41
|
# paginated using the Paginate helper.
|
43
42
|
#
|
44
|
-
# @author Yorick Peterse
|
45
43
|
# @since 26-09-2011
|
46
44
|
#
|
47
45
|
def index
|
@@ -52,7 +50,6 @@ class Posts < BaseController
|
|
52
50
|
##
|
53
51
|
# Returns a list of all posts as either an RSS feed or an Atom feed.
|
54
52
|
#
|
55
|
-
# @author Yorick Peterse
|
56
53
|
# @since 27-09-2011
|
57
54
|
#
|
58
55
|
def feed
|
@@ -64,7 +61,6 @@ class Posts < BaseController
|
|
64
61
|
##
|
65
62
|
# Shows a single post along with all it's comments.
|
66
63
|
#
|
67
|
-
# @author Yorick Peterse
|
68
64
|
# @since 26-09-2011
|
69
65
|
# @param [Fixnum] id The ID of the post to view.
|
70
66
|
#
|
@@ -84,7 +80,6 @@ class Posts < BaseController
|
|
84
80
|
##
|
85
81
|
# Allows users to create a new post, given the user is logged in.
|
86
82
|
#
|
87
|
-
# @author Yorick Peterse
|
88
83
|
# @since 26-09-2011
|
89
84
|
#
|
90
85
|
def new
|
@@ -97,7 +92,6 @@ class Posts < BaseController
|
|
97
92
|
##
|
98
93
|
# Allows a user to edit an existing blog post.
|
99
94
|
#
|
100
|
-
# @author Yorick Peterse
|
101
95
|
# @since 26-09-2011
|
102
96
|
# @param [Fixnum] id The ID of the blog post to edit.
|
103
97
|
#
|
@@ -119,7 +113,6 @@ class Posts < BaseController
|
|
119
113
|
# Adds a new comment to an existing post and redirects the user back to the
|
120
114
|
# post.
|
121
115
|
#
|
122
|
-
# @author Yorick Peterse
|
123
116
|
# @since 27-09-2011
|
124
117
|
#
|
125
118
|
def add_comment
|
@@ -151,7 +144,6 @@ class Posts < BaseController
|
|
151
144
|
# methods could have their own methods for saving the data the entire process
|
152
145
|
# is almost identical and thus this would be somewhat useless.
|
153
146
|
#
|
154
|
-
# @author Yorick Peterse
|
155
147
|
# @since 26-09-2011
|
156
148
|
#
|
157
149
|
def save
|
@@ -211,7 +203,6 @@ class Posts < BaseController
|
|
211
203
|
##
|
212
204
|
# Removes a single post from the database.
|
213
205
|
#
|
214
|
-
# @author Yorick Peterse
|
215
206
|
# @since 26-09-2011
|
216
207
|
# @param [Fixnum] id The ID of the post to remove.
|
217
208
|
#
|
@@ -2,7 +2,6 @@
|
|
2
2
|
# The Users controller is used for managing users and allowing existing users to
|
3
3
|
# log in.
|
4
4
|
#
|
5
|
-
# @author Yorick Peterse
|
6
5
|
# @since 26-09-2011
|
7
6
|
#
|
8
7
|
class Users < BaseController
|
@@ -20,7 +19,6 @@ class Users < BaseController
|
|
20
19
|
##
|
21
20
|
# Shows an overview of all the users that have been added to the database.
|
22
21
|
#
|
23
|
-
# @author Yorick Peterse
|
24
22
|
# @since 27-09-2011
|
25
23
|
#
|
26
24
|
def index
|
@@ -31,7 +29,6 @@ class Users < BaseController
|
|
31
29
|
##
|
32
30
|
# Allows users to add another user to the database.
|
33
31
|
#
|
34
|
-
# @author Yorick Peterse
|
35
32
|
# @since 27-09-2011
|
36
33
|
#
|
37
34
|
def new
|
@@ -45,7 +42,6 @@ class Users < BaseController
|
|
45
42
|
# Edits an existing user. If the specified user ID is invalid the user is
|
46
43
|
# redirected back to the previous page.
|
47
44
|
#
|
48
|
-
# @author Yorick Peterse
|
49
45
|
# @since 27-09-2011
|
50
46
|
# @param [Fixnum] id The ID of the user to edit.
|
51
47
|
#
|
@@ -67,7 +63,6 @@ class Users < BaseController
|
|
67
63
|
# Posts#save() this method is used for both methods since the actions required
|
68
64
|
# for adding/updating the data is pretty much identical.
|
69
65
|
#
|
70
|
-
# @author Yorick Peterse
|
71
66
|
# @since 27-09-2011
|
72
67
|
#
|
73
68
|
def save
|
@@ -109,7 +104,6 @@ class Users < BaseController
|
|
109
104
|
##
|
110
105
|
# Deletes a single user and redirects the user back to the overview.
|
111
106
|
#
|
112
|
-
# @author Yorick Peterse
|
113
107
|
# @since 27-09-2011
|
114
108
|
# @param [Fixnum] id The ID of the user to delete.
|
115
109
|
#
|
@@ -129,7 +123,6 @@ class Users < BaseController
|
|
129
123
|
# Allows a user to log in. Once logged in the user is able to manage existing
|
130
124
|
# users and edit posts.
|
131
125
|
#
|
132
|
-
# @author Yorick Peterse
|
133
126
|
# @since 27-09-2011
|
134
127
|
#
|
135
128
|
def login
|
@@ -148,7 +141,6 @@ class Users < BaseController
|
|
148
141
|
##
|
149
142
|
# Logs the user out and destroys the session.
|
150
143
|
#
|
151
|
-
# @author Yorick Peterse
|
152
144
|
# @since 27-09-2011
|
153
145
|
#
|
154
146
|
def logout
|
@@ -1,7 +1,6 @@
|
|
1
1
|
##
|
2
2
|
# The Comment model is used for creating and managing comments.
|
3
3
|
#
|
4
|
-
# @author Yorick Peterse
|
5
4
|
# @since 26-09-2011
|
6
5
|
#
|
7
6
|
class Comment < Sequel::Model
|
@@ -14,7 +13,6 @@ class Comment < Sequel::Model
|
|
14
13
|
##
|
15
14
|
# Validates a comment before saving it to the database.
|
16
15
|
#
|
17
|
-
# @author Yorick Peterse
|
18
16
|
# @since 26-09-2011
|
19
17
|
#
|
20
18
|
def validate
|
@@ -31,7 +29,6 @@ class Comment < Sequel::Model
|
|
31
29
|
# Gets the name of the author from either an associated user or the "name"
|
32
30
|
# field.
|
33
31
|
#
|
34
|
-
# @author Yorick Peterse
|
35
32
|
# @since 26-09-2011
|
36
33
|
# @return [String]
|
37
34
|
#
|
@@ -3,7 +3,6 @@
|
|
3
3
|
# table is called "posts". For more information on how Sequel works see the
|
4
4
|
# following page: http://sequel.rubyforge.org/documentation.html
|
5
5
|
#
|
6
|
-
# @author Yorick Peterse
|
7
6
|
# @since 26-09-2011
|
8
7
|
#
|
9
8
|
class Post < Sequel::Model
|
@@ -26,7 +25,6 @@ class Post < Sequel::Model
|
|
26
25
|
# these validation methods can't be used in a model's class declaration, they
|
27
26
|
# have to be placed inside the #validate() method.
|
28
27
|
#
|
29
|
-
# @author Yorick Peterse
|
30
28
|
# @since 26-09-2011
|
31
29
|
#
|
32
30
|
def validate
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# * http://yorickpeterse.com/articles/use-bcrypt-fool/
|
8
8
|
# * https://github.com/codahale/bcrypt-ruby
|
9
9
|
#
|
10
|
-
# @author Yorick Peterse
|
11
10
|
# @since 26-09-2011
|
12
11
|
#
|
13
12
|
class User < Sequel::Model
|
@@ -22,7 +21,6 @@ class User < Sequel::Model
|
|
22
21
|
# object in case the specified details were correct or something that
|
23
22
|
# evaluates to false if this wasn't the case.
|
24
23
|
#
|
25
|
-
# @author Yorick Peterse
|
26
24
|
# @since 26-09-2011
|
27
25
|
# @param [Hash] creds A hash containing the username and password of the
|
28
26
|
# currently logged in user.
|
@@ -42,7 +40,7 @@ class User < Sequel::Model
|
|
42
40
|
# compared as plain text this is not the case. The bcrypt class
|
43
41
|
# automatically converts the given password to a bcrypt hash. If these
|
44
42
|
# hashes are the same the specified password is correct.
|
45
|
-
if !user.nil?
|
43
|
+
if !user.nil? and user.password == password
|
46
44
|
return user
|
47
45
|
else
|
48
46
|
return false
|
@@ -54,7 +52,6 @@ class User < Sequel::Model
|
|
54
52
|
# password() methods to return a correct bcrypt hash/object rather than
|
55
53
|
# whatever was stored in the database as a String instance.
|
56
54
|
#
|
57
|
-
# @author Yorick Peterse
|
58
55
|
# @since 26-09-2011
|
59
56
|
# @param [String] password The new password of a user.
|
60
57
|
#
|
@@ -77,7 +74,6 @@ class User < Sequel::Model
|
|
77
74
|
# containing the bcrypt hash and thus wouldn't be able to properly compare it
|
78
75
|
# to other passwords.
|
79
76
|
#
|
80
|
-
# @author Yorick Peterse
|
81
77
|
# @since 26-09-2011
|
82
78
|
# @return [BCrypt::Password|NilClass]
|
83
79
|
#
|
@@ -95,7 +91,6 @@ class User < Sequel::Model
|
|
95
91
|
# Validates an instance of this model. See Post#validate() for some extra
|
96
92
|
# details on how this works.
|
97
93
|
#
|
98
|
-
# @author Yorick Peterse
|
99
94
|
# @since 26-09-2011
|
100
95
|
#
|
101
96
|
def validate
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'ramaze'
|
2
|
-
require 'ramaze/spec'
|
2
|
+
require 'ramaze/spec/bacon'
|
3
3
|
|
4
4
|
spec_requires 'hpricot', 'sequel'
|
5
5
|
|
@@ -7,7 +7,7 @@ $LOAD_PATH.unshift base = __DIR__('..')
|
|
7
7
|
require 'start'
|
8
8
|
|
9
9
|
describe 'Wikore' do
|
10
|
-
behaves_like :
|
10
|
+
behaves_like :rack_test
|
11
11
|
|
12
12
|
def check_redirect(to = '/')
|
13
13
|
response = yield
|
@@ -10,7 +10,7 @@ end
|
|
10
10
|
Sequel::Model.plugin :schema
|
11
11
|
|
12
12
|
module Model
|
13
|
-
PAGE_SCHEMA = lambda{
|
13
|
+
PAGE_SCHEMA = lambda{|db|
|
14
14
|
primary_key :id
|
15
15
|
boolean :active, :default => true
|
16
16
|
text :text
|
@@ -45,12 +45,6 @@ module Model
|
|
45
45
|
end
|
46
46
|
|
47
47
|
[Page, OldPage].each do |klass|
|
48
|
-
|
49
|
-
klass.create_table
|
50
|
-
rescue Sequel::DatabaseError => e
|
51
|
-
if e.message !~ /table.*already exists/
|
52
|
-
raise e
|
53
|
-
end
|
54
|
-
end
|
48
|
+
klass.create_table?
|
55
49
|
end
|
56
50
|
end
|
data/guide/AUTHORS
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Following persons have contributed to ramaze.
|
2
2
|
(Sorted by number of submitted patches, then alphabetically)
|
3
3
|
|
4
|
-
|
4
|
+
2732 Michael Fellinger <m.fellinger@gmail.com>
|
5
5
|
216 Aman Gupta <aman@ramaze.net>
|
6
|
-
|
6
|
+
164 Yorick Peterse <yorickpeterse@gmail.com>
|
7
7
|
89 Jonathan Buch <jonathan.buch@gmail.com>
|
8
8
|
77 Pistos <gitsomegrace.5.pistos@geoshell.com>
|
9
9
|
69 Clive Crous <clive@crous.co.za>
|
@@ -24,6 +24,7 @@ Following persons have contributed to ramaze.
|
|
24
24
|
5 mwlang <mwlang@cybrains.net>
|
25
25
|
4 Andreas Karlsson <andreas@proxel.se>
|
26
26
|
4 James Tucker <jftucker@gmail.com>
|
27
|
+
4 John Pagonis <john@pagonis.org>
|
27
28
|
4 Masahiro Nakagawa <repeatedly@gmail.com>
|
28
29
|
4 mig <mig@mypeplum.com>
|
29
30
|
3 Chris Duncan <celldee@gmail.com>
|
@@ -31,6 +32,7 @@ Following persons have contributed to ramaze.
|
|
31
32
|
3 Riku Raisaenen <riku@helloit.fi>
|
32
33
|
3 starapor <me@sarahtaraporewalla.com>
|
33
34
|
3 Stas SUȘCOV <stas@net.utcluj.ro>
|
35
|
+
3 Yorick Peterse <yorick@isset.nl>
|
34
36
|
2 Andrew Farmer <xichekolas@gmail.com>
|
35
37
|
2 jShaf <joshua.shaffner@gmail.com>
|
36
38
|
2 Yutaka HARA <yutaka.hara+github@gmail.com>
|
@@ -52,6 +54,7 @@ Following persons have contributed to ramaze.
|
|
52
54
|
1 Jean-Francois Chevrette <jfchevrette@iweb.ca>
|
53
55
|
1 Jeremy Evans <code@jeremyevans.net>
|
54
56
|
1 kez <kdobson@gmail.com>
|
57
|
+
1 Marc Weber <marco-oweber@gmx.de>
|
55
58
|
1 Martin Hilbig <blueonyx@dev-area.net>
|
56
59
|
1 Matt Rubens <mrubens@goldencookie.localdomain>
|
57
60
|
1 Pistos <github.pistos@purepistos.net>
|
data/guide/CHANGELOG
CHANGED
@@ -1,3 +1,206 @@
|
|
1
|
+
[aa5d48f | Mon Mar 05 19:08:01 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
2
|
+
|
3
|
+
* Updated the list of authors and the changelog.
|
4
|
+
|
5
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
6
|
+
|
7
|
+
[8040c21 | Mon Mar 05 19:04:17 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
8
|
+
|
9
|
+
* Ramaze is now licensed under the MIT license.
|
10
|
+
|
11
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
12
|
+
|
13
|
+
[b1e5d5c | Fri Mar 02 15:21:37 UTC 2012] John Pagonis <john@pagonis.org>
|
14
|
+
|
15
|
+
* Explains how to reuse the existing middlewares stack with own middleware.
|
16
|
+
|
17
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
18
|
+
|
19
|
+
[556597f | Fri Mar 02 12:41:53 UTC 2012] John Pagonis <john@pagonis.org>
|
20
|
+
|
21
|
+
* Added a reference to the popular default Innate helpers to ramaze, to stop us wasting time looking for them.
|
22
|
+
|
23
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
24
|
+
|
25
|
+
[df6bd77 | Fri Mar 02 11:01:37 UTC 2012] Yorick Peterse <yorick@isset.nl>
|
26
|
+
|
27
|
+
* Added a general Git workflow link.
|
28
|
+
|
29
|
+
As suggested by @pagojo I've added a link to a guide that describes the various
|
30
|
+
steps of contributing to Github projects.
|
31
|
+
|
32
|
+
Issue: #33
|
33
|
+
|
34
|
+
Signed-off-by: Yorick Peterse <yorick@isset.nl>
|
35
|
+
|
36
|
+
[5ecdb93 | Thu Mar 01 19:05:56 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
37
|
+
|
38
|
+
* Woops, YARD can't resolve to Ramaze.start.
|
39
|
+
|
40
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
41
|
+
|
42
|
+
[3f6168a | Thu Mar 01 18:58:17 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
43
|
+
|
44
|
+
* Expanded the sessions guide.
|
45
|
+
|
46
|
+
It now includes a list of the available drivers (copied from the caching guide)
|
47
|
+
as well as some instructions on how to change the adapter to use for session
|
48
|
+
data.
|
49
|
+
|
50
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
51
|
+
|
52
|
+
[7d5f8a0 | Thu Mar 01 18:48:42 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
53
|
+
|
54
|
+
* Describe how to write/test documentation.
|
55
|
+
|
56
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
57
|
+
|
58
|
+
[d8a3cc4 | Thu Mar 01 13:46:44 UTC 2012] Yorick Peterse <yorick@isset.nl>
|
59
|
+
|
60
|
+
* Small formatting changes for the middlewares guide
|
61
|
+
|
62
|
+
See #33
|
63
|
+
|
64
|
+
Signed-off-by: Yorick Peterse <yorick@isset.nl>
|
65
|
+
|
66
|
+
[346a202 | Thu Mar 01 13:45:02 UTC 2012] Yorick Peterse <yorick@isset.nl>
|
67
|
+
|
68
|
+
* Removed trailing whitespace.
|
69
|
+
|
70
|
+
See #33 for more information.
|
71
|
+
|
72
|
+
Signed-off-by: Yorick Peterse <yorick@isset.nl>
|
73
|
+
|
74
|
+
[e125277 | Thu Mar 01 12:17:21 UTC 2012] John Pagonis <john@pagonis.org>
|
75
|
+
|
76
|
+
* Clarified the middlewares documentation a bit.
|
77
|
+
|
78
|
+
Signed-off-by: Yorick Peterse <yorick@isset.nl>
|
79
|
+
|
80
|
+
[5e9f80d | Wed Feb 29 20:12:54 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
81
|
+
|
82
|
+
* Updated the list of authors.
|
83
|
+
|
84
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
85
|
+
|
86
|
+
[cd11c7f | Mon Feb 20 20:45:12 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
87
|
+
|
88
|
+
* Fixed the formatting of the User helper docs.
|
89
|
+
|
90
|
+
See #32 for more information.
|
91
|
+
|
92
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
93
|
+
|
94
|
+
[e9225b4 | Fri Feb 17 13:31:21 UTC 2012] John Pagonis <john@pagonis.org>
|
95
|
+
|
96
|
+
* Corrected the user_login documentation.
|
97
|
+
|
98
|
+
Signed-off-by: Yorick Peterse <yorick@isset.nl>
|
99
|
+
|
100
|
+
[846a4b3 | Thu Feb 16 19:22:14 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
101
|
+
|
102
|
+
* Improved the docs for the User helper a bit.
|
103
|
+
|
104
|
+
See #30 for more information.
|
105
|
+
|
106
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
107
|
+
|
108
|
+
[2475a04 | Sat Feb 04 13:04:04 UTC 2012] Michael Fellinger <m.fellinger@gmail.com>
|
109
|
+
|
110
|
+
* update travis config
|
111
|
+
|
112
|
+
[4cfea2b | Wed Jan 25 14:35:19 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
113
|
+
|
114
|
+
* Re-generate CSRF tokens for valid requests.
|
115
|
+
|
116
|
+
Re-generating the CSRF tokens on each valid request fixes the annoying issue of
|
117
|
+
the tokens *always* expiring after 15 minutes. This is very annoying if you're
|
118
|
+
trying to edit some content and all of a sudden you're unable to submit a form
|
119
|
+
as the token has expired.
|
120
|
+
|
121
|
+
See #27 for more information.
|
122
|
+
|
123
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
124
|
+
|
125
|
+
[2e98ff1 | Wed Jan 25 14:29:20 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
126
|
+
|
127
|
+
* Removed a few more useless comments.
|
128
|
+
|
129
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
130
|
+
|
131
|
+
[5cdc51c | Wed Jan 25 14:28:44 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
132
|
+
|
133
|
+
* No need to brush my ego that much.
|
134
|
+
|
135
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
136
|
+
|
137
|
+
[b24669f | Wed Jan 25 14:26:27 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
138
|
+
|
139
|
+
* Removed some useless code.
|
140
|
+
|
141
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
142
|
+
|
143
|
+
[e435ceb | Wed Jan 25 14:10:21 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
144
|
+
|
145
|
+
* Use Ramaze.setup for the view adapters.
|
146
|
+
|
147
|
+
Using Ramaze.setup() for installing and loading the gems required for various
|
148
|
+
view adapters should make it easier for developers to get started as they no
|
149
|
+
longer have to deal with errors related to certain Gems not being installed.
|
150
|
+
|
151
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
152
|
+
|
153
|
+
[17c909e | Wed Jan 25 14:03:37 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
154
|
+
|
155
|
+
* Added a few specifications for Slim.
|
156
|
+
|
157
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
158
|
+
|
159
|
+
[969a02c | Wed Jan 25 13:42:20 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
160
|
+
|
161
|
+
* Docs for the Slim engine and cleaned it up a bit.
|
162
|
+
|
163
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
164
|
+
|
165
|
+
[023d6cd | Wed Jan 25 13:35:36 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
166
|
+
|
167
|
+
* Removed a tab.
|
168
|
+
|
169
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
170
|
+
|
171
|
+
[37f0f73 | Thu Jan 19 05:52:52 UTC 2012] Marc Weber <marco-oweber@gmx.de>
|
172
|
+
|
173
|
+
* adding support for slim template engine
|
174
|
+
|
175
|
+
thanks to yorickpeterse, manveru
|
176
|
+
|
177
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
178
|
+
|
179
|
+
[561d528 | Tue Jan 17 18:23:19 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
180
|
+
|
181
|
+
* Fixed a small statement bug in the blog example.
|
182
|
+
|
183
|
+
This bug would cause an exception to be raised whenever a user would try to log
|
184
|
+
in with invalid details. Thanks to MarcWeber for reporting the issue.
|
185
|
+
|
186
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
187
|
+
|
188
|
+
[e8b3786 | Tue Jan 17 17:14:52 UTC 2012] Yorick Peterse <yorickpeterse@gmail.com>
|
189
|
+
|
190
|
+
* No need to boost my ego that much.
|
191
|
+
|
192
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
193
|
+
|
194
|
+
[b33c13c | Tue Jan 17 17:04:10 UTC 2012] Michael Fellinger <m.fellinger@gmail.com>
|
195
|
+
|
196
|
+
* fix some wikore bugs
|
197
|
+
|
198
|
+
[fb84aea | Wed Dec 28 17:29:21 UTC 2011] Yorick Peterse <yorickpeterse@gmail.com>
|
199
|
+
|
200
|
+
* Release 2011.12.28
|
201
|
+
|
202
|
+
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
|
203
|
+
|
1
204
|
[4553e0b | Wed Dec 28 05:13:22 UTC 2011] Michael Fellinger <m.fellinger@gmail.com>
|
2
205
|
|
3
206
|
* Wrap Rack::File so we can continue to use Rack::Cascade
|