ramaze 2010.03 → 2010.04
Sign up to get free protection for your applications and to get access to all the features.
- data/MANIFEST +2 -0
- data/README.md +9 -12
- data/Rakefile +35 -38
- data/doc/AUTHORS +4 -2
- data/doc/CHANGELOG +115 -0
- data/examples/app/blog/app.rb +2 -2
- data/examples/app/blog/controller/init.rb +2 -0
- data/examples/app/blog/model/init.rb +1 -0
- data/examples/app/blog/start.rb +1 -1
- data/examples/app/todolist/controller/init.rb +4 -2
- data/examples/app/todolist/controller/task.rb +3 -3
- data/examples/app/todolist/model/init.rb +1 -1
- data/examples/app/todolist/start.rb +2 -2
- data/examples/basic/layout.rb +1 -1
- data/examples/basic/partial.rb +1 -1
- data/examples/basic/simple.rb +3 -2
- data/examples/misc/sequel_scaffolding.rb +13 -2
- data/examples/templates/template_mustache.rb +1 -1
- data/lib/proto/public/dispatch.fcgi +1 -1
- data/lib/ramaze/helper/formatting.rb +3 -3
- data/lib/ramaze/helper/paginate.rb +5 -2
- data/lib/ramaze/helper/xhtml.rb +2 -2
- data/lib/ramaze/log/informer.rb +1 -1
- data/lib/ramaze/log/rotatinginformer.rb +1 -1
- data/lib/ramaze/tool/project_creator.rb +1 -1
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view/mustache.rb +2 -2
- data/ramaze.gemspec +23 -32
- data/spec/examples/misc/sequel_scaffolding.rb +18 -0
- data/spec/examples/todolist.rb +33 -0
- data/spec/ramaze/dispatcher/file.rb +11 -6
- metadata +53 -93
data/MANIFEST
CHANGED
@@ -361,6 +361,7 @@ spec/examples/element.rb
|
|
361
361
|
spec/examples/hello.rb
|
362
362
|
spec/examples/helpers/httpdigest.rb
|
363
363
|
spec/examples/linking.rb
|
364
|
+
spec/examples/misc/sequel_scaffolding.rb
|
364
365
|
spec/examples/simple.rb
|
365
366
|
spec/examples/templates/template_erubis.rb
|
366
367
|
spec/examples/templates/template_ezamar.rb
|
@@ -372,6 +373,7 @@ spec/examples/templates/template_nagoro.rb
|
|
372
373
|
spec/examples/templates/template_redcloth.rb
|
373
374
|
spec/examples/templates/template_remarkably.rb
|
374
375
|
spec/examples/templates/template_tenjin.rb
|
376
|
+
spec/examples/todolist.rb
|
375
377
|
spec/helper.rb
|
376
378
|
spec/ramaze/action/render.rb
|
377
379
|
spec/ramaze/action/view/bar.xhtml
|
data/README.md
CHANGED
@@ -347,18 +347,15 @@ Some places to get started are:
|
|
347
347
|
|
348
348
|
There are some examples for your instant pleasure inside the examples-directory
|
349
349
|
in the Ramaze-distribution.
|
350
|
-
|
351
|
-
for example:
|
350
|
+
You can start up an example just as you usually would any other ruby program:
|
352
351
|
|
353
|
-
$
|
352
|
+
$ ruby examples/basic/hello.rb
|
354
353
|
|
355
354
|
Or:
|
356
355
|
|
357
|
-
$ cd examples/blog
|
358
|
-
$
|
359
|
-
|
360
|
-
Since ramaze uses the start.rb by default if you don't pass anything else.
|
361
|
-
|
356
|
+
$ cd examples/app/blog
|
357
|
+
$ ruby start.rb
|
358
|
+
|
362
359
|
For more information about the usage of ramaze try:
|
363
360
|
|
364
361
|
$ ramaze --help
|
@@ -366,16 +363,16 @@ For more information about the usage of ramaze try:
|
|
366
363
|
|
367
364
|
Examples include:
|
368
365
|
|
369
|
-
* examples/hello.rb
|
366
|
+
* examples/basic/hello.rb
|
370
367
|
Hello, World!
|
371
368
|
|
372
|
-
* examples/simple.rb
|
369
|
+
* examples/basic/simple.rb
|
373
370
|
A bit more advanced than the hello-example, but still very basic.
|
374
371
|
|
375
|
-
* examples/blog
|
372
|
+
* examples/app/blog
|
376
373
|
Not yet fully functional, but coming along.
|
377
374
|
|
378
|
-
* examples/whywiki
|
375
|
+
* examples/app/whywiki
|
379
376
|
A basic examples of a minimalistic application, based on the Wiki of \_why in
|
380
377
|
his camping-framework.
|
381
378
|
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ PROJECT_SPECS = FileList[
|
|
14
14
|
PROJECT_MODULE = 'Ramaze'
|
15
15
|
PROJECT_JQUERY_FILE = 'lib/proto/public/js/jquery.js'
|
16
16
|
PROJECT_README = 'README.md'
|
17
|
-
PROJECT_VERSION = ENV['VERSION']
|
17
|
+
PROJECT_VERSION = (ENV['VERSION'] || Date.today.strftime('%Y.%m.%d')).dup
|
18
18
|
PROJECT_COPYRIGHT = [
|
19
19
|
"# Copyright (c) #{Time.now.year} Michael Fellinger m.fellinger@gmail.com",
|
20
20
|
"# All files in this distribution are subject to the terms of the Ruby license."
|
@@ -25,41 +25,38 @@ DEPENDENCIES = {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
DEVELOPMENT_DEPENDENCIES = {
|
28
|
-
"abstract"
|
29
|
-
"addressable"
|
30
|
-
"bacon"
|
31
|
-
"builder"
|
32
|
-
"erector"
|
33
|
-
"erubis"
|
34
|
-
"ezamar"
|
35
|
-
"gemcutter"
|
36
|
-
"haml"
|
37
|
-
"hpricot"
|
38
|
-
"json"
|
39
|
-
"less"
|
40
|
-
"liquid"
|
41
|
-
"locale"
|
42
|
-
"localmemcache"
|
43
|
-
"lokar"
|
44
|
-
"maruku"
|
45
|
-
"memcache-client"
|
46
|
-
"mustache"
|
47
|
-
"mutter"
|
48
|
-
"nagoro"
|
49
|
-
"
|
50
|
-
"rack-
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"tenjin" => {:version => "0.6.1"},
|
61
|
-
"treetop" => {:version => "1.4.4"},
|
62
|
-
"ZenTest" => {:version => "4.2.1"},
|
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
|
+
"gemcutter" => {:version => "0.5.0"},
|
36
|
+
"haml" => {:version => "2.2.22"},
|
37
|
+
"hpricot" => {:version => "0.8.2"},
|
38
|
+
"json" => {:version => "1.2.3"},
|
39
|
+
"less" => {:version => "1.2.21"},
|
40
|
+
"liquid" => {:version => "2.0.0"},
|
41
|
+
"locale" => {:version => "2.0.5"},
|
42
|
+
"localmemcache" => {:version => "0.4.4"},
|
43
|
+
"lokar" => {:version => "0.1.0"},
|
44
|
+
"maruku" => {:version => "0.6.0"},
|
45
|
+
"memcache-client" => {:version => "1.8.1", :lib => 'memcache'},
|
46
|
+
"mustache" => {:version => "0.9.2"},
|
47
|
+
"mutter" => {:version => "0.5.3"},
|
48
|
+
"nagoro" => {:version => "2009.05"},
|
49
|
+
"rack-contrib" => {:version => "0.9.2", :lib => 'rack/contrib'},
|
50
|
+
"rack-test" => {:version => "0.5.3", :lib => 'rack/test'},
|
51
|
+
"RedCloth" => {:version => "4.2.3"},
|
52
|
+
"Remarkably" => {:version => "0.5.2", :lib => 'remarkably'},
|
53
|
+
"RubyInline" => {:version => "3.8.4"},
|
54
|
+
"sequel" => {:version => "3.9.0"},
|
55
|
+
"scaffolding_extensions" => {:version => "1.4.0"},
|
56
|
+
"slippers" => {:version => "0.0.14"},
|
57
|
+
"sqlite3-ruby" => {:version => "1.2.5", :lib => 'sqlite3'},
|
58
|
+
"tagz" => {:version => "7.2.3"},
|
59
|
+
"tenjin" => {:version => "0.6.1"},
|
63
60
|
}
|
64
61
|
|
65
62
|
GEMSPEC = Gem::Specification.new{|s|
|
@@ -83,8 +80,8 @@ GEMSPEC = Gem::Specification.new{|s|
|
|
83
80
|
============================================================
|
84
81
|
|
85
82
|
Thank you for installing Ramaze!
|
86
|
-
|
87
|
-
|
83
|
+
To create a new project:
|
84
|
+
$ ramaze create yourproject
|
88
85
|
|
89
86
|
============================================================
|
90
87
|
MESSAGE
|
data/doc/AUTHORS
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
Following persons have contributed to ramaze.
|
2
2
|
(Sorted by number of submitted patches, then alphabetically)
|
3
3
|
|
4
|
-
|
4
|
+
2689 Michael Fellinger <m.fellinger@gmail.com>
|
5
5
|
216 Aman Gupta <aman@ramaze.net>
|
6
6
|
89 Jonathan Buch <jonathan.buch@gmail.com>
|
7
7
|
77 Pistos <gitsomegrace.5.pistos@geoshell.com>
|
8
8
|
69 Clive Crous <clive@crous.co.za>
|
9
9
|
27 Keita Yamaguchi <keita.yamaguchi@gmail.com>
|
10
10
|
20 Ryan Grove <ryan@wonko.com>
|
11
|
+
19 injekt <injekt.me@gmail.com>
|
11
12
|
16 TJ Vanderpoel <bougy.man@gmail.com>
|
12
13
|
11 Wang, Jinjing <nfjinjing@gmail.com>
|
13
14
|
8 Mario Gutierrez <mgutz@mgutz-mbp.local>
|
@@ -22,12 +23,12 @@ Following persons have contributed to ramaze.
|
|
22
23
|
4 mig <mig@mypeplum.com>
|
23
24
|
3 Chris Duncan <celldee@gmail.com>
|
24
25
|
3 Clinton R. Nixon <clinton.nixon@viget.com>
|
26
|
+
3 Masahiro Nakagawa <repeatedly@gmail.com>
|
25
27
|
3 Riku Raisaenen <riku@helloit.fi>
|
26
28
|
3 starapor <me@sarahtaraporewalla.com>
|
27
29
|
2 Andrew Farmer <xichekolas@gmail.com>
|
28
30
|
2 jShaf <joshua.shaffner@gmail.com>
|
29
31
|
2 Lars Olsson <lasso@lassoweb.se>
|
30
|
-
2 Masahiro Nakagawa <repeatedly@gmail.com>
|
31
32
|
2 Yutaka HARA <yutaka.hara+github@gmail.com>
|
32
33
|
1 Aaron Mueller <mail@aaron-mueller.de>
|
33
34
|
1 Ara T. Howard <ara.t.howard@gmail.com>
|
@@ -35,6 +36,7 @@ Following persons have contributed to ramaze.
|
|
35
36
|
1 Cheah Chu Yeow <chuyeow@gmail.com>
|
36
37
|
1 Christian Neukirchen <chneukirchen@gmail.com>
|
37
38
|
1 Colin Shea <colin@centuar.(none)>
|
39
|
+
1 crab <crabtw@gmail.com>
|
38
40
|
1 Dmitry Gorbik <dmitrygorbik@isengard.local>
|
39
41
|
1 Fabian Buch <fabian.buch@fabian-buch.de>
|
40
42
|
1 Gavin Kistner <gavin@phrogz.net>
|
data/doc/CHANGELOG
CHANGED
@@ -1,3 +1,118 @@
|
|
1
|
+
[8a77923 | Fri Apr 02 15:43:02 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
2
|
+
|
3
|
+
* Version 2010.04
|
4
|
+
|
5
|
+
[f8a2708 | Fri Apr 02 15:41:43 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
6
|
+
|
7
|
+
* Fix Mustache engine
|
8
|
+
|
9
|
+
[a1c7fd6 | Fri Apr 02 15:34:50 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
10
|
+
|
11
|
+
* Update post install message
|
12
|
+
|
13
|
+
[fd3697a | Fri Apr 02 15:34:36 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
14
|
+
|
15
|
+
* Update dependencies
|
16
|
+
|
17
|
+
[135bc90 | Fri Apr 02 07:11:24 UTC 2010] injekt <injekt.me@gmail.com>
|
18
|
+
|
19
|
+
* fixed file dispatcher spec
|
20
|
+
|
21
|
+
[4891e4b | Fri Apr 02 01:35:11 UTC 2010] injekt <injekt.me@gmail.com>
|
22
|
+
|
23
|
+
* added scaffolding_extensions dev dependency
|
24
|
+
|
25
|
+
[f098e58 | Fri Apr 02 01:05:51 UTC 2010] injekt <injekt.me@gmail.com>
|
26
|
+
|
27
|
+
* fixed todolist requires
|
28
|
+
|
29
|
+
[32c33de | Fri Apr 02 00:46:31 UTC 2010] injekt <injekt.me@gmail.com>
|
30
|
+
|
31
|
+
* pagination fixes
|
32
|
+
|
33
|
+
[89080f4 | Fri Apr 02 00:19:34 UTC 2010] injekt <injekt.me@gmail.com>
|
34
|
+
|
35
|
+
* paginate helper to extend sequel with pagination
|
36
|
+
|
37
|
+
[8c1a80a | Fri Apr 02 00:12:21 UTC 2010] injekt <injekt.me@gmail.com>
|
38
|
+
|
39
|
+
* fixed blog example
|
40
|
+
|
41
|
+
[a4cc3cc | Mon Mar 29 15:13:35 UTC 2010] injekt <injekt.me@gmail.com>
|
42
|
+
|
43
|
+
* fixed partial example
|
44
|
+
|
45
|
+
[df28492 | Mon Mar 29 14:59:09 UTC 2010] injekt <injekt.me@gmail.com>
|
46
|
+
|
47
|
+
* fix layout example
|
48
|
+
|
49
|
+
[33fe3d0 | Fri Mar 26 11:49:18 UTC 2010] injekt <injekt.me@gmail.com>
|
50
|
+
|
51
|
+
* fixed path in usage example
|
52
|
+
|
53
|
+
[de80952 | Fri Mar 26 11:45:54 UTC 2010] injekt <injekt.me@gmail.com>
|
54
|
+
|
55
|
+
* fixed a couple of depreciated methods in documentation
|
56
|
+
|
57
|
+
[68682c1 | Fri Mar 26 01:18:05 UTC 2010] injekt <injekt.me@gmail.com>
|
58
|
+
|
59
|
+
* Change app location setting to how it's documented
|
60
|
+
|
61
|
+
[7de6f76 | Fri Mar 26 00:51:35 UTC 2010] injekt <injekt.me@gmail.com>
|
62
|
+
|
63
|
+
* added spec for todolist example
|
64
|
+
|
65
|
+
[1c2848e | Fri Mar 26 00:29:47 UTC 2010] injekt <injekt.me@gmail.com>
|
66
|
+
|
67
|
+
* fixed todolist example
|
68
|
+
|
69
|
+
[fccee57 | Wed Mar 24 14:00:37 UTC 2010] injekt <injekt.me@gmail.com>
|
70
|
+
|
71
|
+
* fixed documention for number_counter, wrong method name used
|
72
|
+
|
73
|
+
[a7ee66f | Wed Mar 24 02:20:19 UTC 2010] injekt <injekt.me@gmail.com>
|
74
|
+
|
75
|
+
* added spec for sequel_scaffolding
|
76
|
+
|
77
|
+
[f19ddf9 | Wed Mar 24 02:11:34 UTC 2010] injekt <injekt.me@gmail.com>
|
78
|
+
|
79
|
+
* fixed sequel_scaffolding example
|
80
|
+
|
81
|
+
[4c36872 | Wed Mar 24 00:05:12 UTC 2010] injekt <injekt.me@gmail.com>
|
82
|
+
|
83
|
+
* xhtml helpers should chomp leading slash from prefix
|
84
|
+
|
85
|
+
[d4dcc8a | Tue Mar 23 16:24:28 UTC 2010] injekt <injekt.me@gmail.com>
|
86
|
+
|
87
|
+
* adapter handler should be fastcgi rack handler
|
88
|
+
|
89
|
+
[d11daa3 | Tue Mar 23 10:07:40 UTC 2010] injekt <injekt.me@gmail.com>
|
90
|
+
|
91
|
+
* Project creator not copying dotfiles (.htaccess) due to globbing
|
92
|
+
|
93
|
+
[bd1ec41 | Fri Mar 19 01:22:55 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
94
|
+
|
95
|
+
* Replace last occurances of Global
|
96
|
+
|
97
|
+
[050a949 | Thu Mar 11 18:44:20 UTC 2010] Masahiro Nakagawa <repeatedly@gmail.com>
|
98
|
+
|
99
|
+
* Fix Mustache template adapter
|
100
|
+
|
101
|
+
Mustache changed template context(latest version doesn't use Hash).
|
102
|
+
So, if template file doesn't find, use Mustache::Context instead of Hash.
|
103
|
+
|
104
|
+
[6df728c | Thu Mar 11 08:14:43 UTC 2010] crab <crabtw@gmail.com>
|
105
|
+
|
106
|
+
* use Ramaze.options.prefix as link prefix
|
107
|
+
|
108
|
+
[1095d18 | Tue Mar 09 01:50:23 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
109
|
+
|
110
|
+
* ramaze is no dependency of ramaze
|
111
|
+
|
112
|
+
[b46443d | Tue Mar 09 01:47:57 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
113
|
+
|
114
|
+
* Fix .dup in Rakefile
|
115
|
+
|
1
116
|
[43a38b8 | Mon Mar 08 13:55:07 UTC 2010] Michael Fellinger <m.fellinger@gmail.com>
|
2
117
|
|
3
118
|
* Version 2010.03
|
data/examples/app/blog/app.rb
CHANGED
data/examples/app/blog/start.rb
CHANGED
@@ -22,17 +22,17 @@ module TodoList
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def open(title)
|
25
|
-
Task[:title => title].open!
|
25
|
+
Task[:title => Ramaze::Helper::CGI.url_decode(title)].open!
|
26
26
|
redirect r('/')
|
27
27
|
end
|
28
28
|
|
29
29
|
def close(title)
|
30
|
-
Task[:title => title].close!
|
30
|
+
Task[:title => Ramaze::Helper::CGI.url_decode(title)].close!
|
31
31
|
redirect r('/')
|
32
32
|
end
|
33
33
|
|
34
34
|
def delete(title)
|
35
|
-
Task[:title => title].destroy
|
35
|
+
Task[:title => Ramaze::Helper::CGI.url_decode(title)].destroy
|
36
36
|
redirect r('/')
|
37
37
|
end
|
38
38
|
end
|
data/examples/basic/layout.rb
CHANGED
data/examples/basic/partial.rb
CHANGED
data/examples/basic/simple.rb
CHANGED
@@ -3,8 +3,9 @@ require 'ramaze'
|
|
3
3
|
|
4
4
|
# A very simple little application, you can simply run it and
|
5
5
|
# point your browser to http://localhost:7000
|
6
|
-
#
|
7
|
-
#
|
6
|
+
#
|
7
|
+
# You can change the port by setting
|
8
|
+
# Ramaze.options.adapter.port = 80
|
8
9
|
# this most likely requires root-privileges though.
|
9
10
|
|
10
11
|
# This example shows following (requests to the mentioned base-url) :
|
@@ -3,8 +3,14 @@ require 'ramaze'
|
|
3
3
|
require 'sequel'
|
4
4
|
require 'scaffolding_extensions'
|
5
5
|
|
6
|
+
# More information on Scaffolding Extensions here: http://scaffolding-ext.rubyforge.org/
|
7
|
+
|
6
8
|
DB = Sequel.sqlite
|
7
9
|
|
10
|
+
# Sequel::Model doesn't support schema creation by default
|
11
|
+
# So we have to load it as a plugin
|
12
|
+
Sequel::Model.plugin :schema
|
13
|
+
|
8
14
|
class User < Sequel::Model(:user)
|
9
15
|
set_schema do
|
10
16
|
primary_key :id
|
@@ -12,12 +18,17 @@ class User < Sequel::Model(:user)
|
|
12
18
|
text :description
|
13
19
|
end
|
14
20
|
|
15
|
-
create_table unless
|
21
|
+
create_table unless table_exists?
|
22
|
+
|
23
|
+
# Add a couple of users to our database
|
24
|
+
create(:name => 'manveru', :description => 'The first user!')
|
25
|
+
create(:name => 'injekt', :description => 'Just another user')
|
16
26
|
end
|
17
27
|
|
18
28
|
ScaffoldingExtensions.all_models = [User]
|
19
29
|
|
20
30
|
class UserController < Ramaze::Controller
|
31
|
+
map '/user'
|
21
32
|
scaffold_all_models :only => [User]
|
22
33
|
end
|
23
34
|
|
@@ -27,7 +38,7 @@ class MainController < Ramaze::Controller
|
|
27
38
|
<a href="http://sequel.rubyforge.org/classes/Sequel/Model.html">
|
28
39
|
Sequel::Model
|
29
40
|
</a> User.
|
30
|
-
You can access the scaffolded Model at #{
|
41
|
+
You can access the scaffolded Model at #{a('/user')}}
|
31
42
|
end
|
32
43
|
end
|
33
44
|
|