manveru-ramaze 2009.04.08 → 2009.04.18
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +113 -0
- data/MANIFEST +2 -3
- data/Rakefile +5 -1
- data/bin/ramaze +107 -25
- data/examples/misc/rapp.rb +28 -17
- data/lib/proto/app.rb +15 -0
- data/lib/proto/config.ru +3 -4
- data/lib/proto/controller/init.rb +2 -2
- data/lib/proto/spec/main.rb +7 -8
- data/lib/proto/start.rb +6 -10
- data/lib/ramaze/contrib/email.rb +2 -0
- data/lib/ramaze/contrib/sequel/create_join.rb +1 -0
- data/lib/ramaze/contrib/sequel/form_field.rb +4 -4
- data/lib/ramaze/contrib/sequel/image.rb +9 -11
- data/lib/ramaze/contrib/sequel/relation.rb +17 -3
- data/lib/ramaze/helper/localize.rb +13 -3
- data/lib/ramaze/helper/paginate.rb +1 -0
- data/lib/ramaze/request.rb +2 -1
- data/lib/ramaze/spec.rb +5 -8
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view/haml.rb +1 -0
- data/lib/ramaze/view/nagoro/render_partial.rb +9 -9
- data/lib/ramaze.rb +2 -0
- data/ramaze.gemspec +5 -5
- data/spec/examples/helpers/httpdigest.rb +42 -67
- data/spec/ramaze/dispatcher/file.rb +22 -20
- data/spec/ramaze/error.rb +1 -1
- data/spec/ramaze/helper/auth.rb +29 -40
- data/spec/ramaze/helper/flash.rb +10 -14
- data/spec/ramaze/helper/httpdigest.rb +47 -65
- data/spec/ramaze/helper/localize.rb +9 -9
- data/spec/ramaze/helper/simple_captcha.rb +9 -13
- data/spec/ramaze/helper/stack.rb +31 -39
- data/spec/ramaze/helper/user.rb +15 -13
- data/spec/ramaze/request.rb +12 -0
- data/tasks/release.rake +4 -22
- data/tasks/setup.rake +44 -0
- metadata +5 -6
- data/lib/proto/view/page.xhtml +0 -27
- data/lib/ramaze/snippets/string/each.rb +0 -19
- data/spec/ramaze/helper/partial.rb +0 -40
data/spec/ramaze/helper/auth.rb
CHANGED
@@ -49,46 +49,35 @@ class SpecHelperAuthLambda < SpecHelperAuth
|
|
49
49
|
end
|
50
50
|
|
51
51
|
describe Ramaze::Helper::Auth do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
52
|
+
%w[ hash lambda method ].each do |prefix|
|
53
|
+
describe "login" do
|
54
|
+
behaves_like :mock
|
55
|
+
|
56
|
+
it "uses a #{prefix}" do
|
57
|
+
get "/#{prefix}/secured"
|
58
|
+
follow_redirect!
|
59
|
+
last_response.status.should == 200
|
60
|
+
last_response.body.should =~ (/<form/)
|
61
|
+
|
62
|
+
post("/#{prefix}/login", 'username' => 'manveru', 'password' => 'pass')
|
63
|
+
follow_redirect!
|
64
|
+
last_response.status.should == 200
|
65
|
+
last_response.body.should == 'Secret content'
|
66
|
+
|
67
|
+
get "/#{prefix}/secured"
|
68
|
+
last_response.status.should == 200
|
69
|
+
last_response.body.should == 'Secret content'
|
70
|
+
|
71
|
+
get "/#{prefix}/logout"
|
72
|
+
follow_redirect!
|
73
|
+
last_response.status.should == 200
|
74
|
+
last_response.body.should == 'SpecHelperAuth'
|
75
|
+
|
76
|
+
get "/#{prefix}/secured"
|
77
|
+
follow_redirect!
|
78
|
+
last_response.status.should == 200
|
79
|
+
last_response.body.should =~ (/<form/)
|
80
|
+
end
|
80
81
|
end
|
81
82
|
end
|
82
|
-
|
83
|
-
it 'authenticates by looking into a hash' do
|
84
|
-
procedure('/hash')
|
85
|
-
end
|
86
|
-
|
87
|
-
it 'authenticates by looking into a lambda' do
|
88
|
-
procedure('/lambda')
|
89
|
-
end
|
90
|
-
|
91
|
-
it 'authenticates by looking into a method' do
|
92
|
-
procedure('/method')
|
93
|
-
end
|
94
83
|
end
|
data/spec/ramaze/helper/flash.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'spec/helper'
|
5
5
|
|
6
6
|
class SpecHelperFlash < Ramaze::Controller
|
7
|
-
map
|
7
|
+
map '/'
|
8
8
|
helper :flash
|
9
9
|
trait :flashbox => "%key : %value"
|
10
10
|
|
@@ -23,23 +23,19 @@ class SpecHelperFlash < Ramaze::Controller
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe Ramaze::Helper::Flash do
|
26
|
-
behaves_like :
|
26
|
+
behaves_like :mock
|
27
27
|
|
28
28
|
it 'displays a flashbox with one item' do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
got.body.should == 'one : for starters'
|
34
|
-
end
|
29
|
+
get('/populate_one')
|
30
|
+
get('/box')
|
31
|
+
last_response.status.should == 200
|
32
|
+
last_response.body.should == 'one : for starters'
|
35
33
|
end
|
36
34
|
|
37
35
|
it 'displays a flashbox with two items' do
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
got.body.split("\n").sort.should == ['one : this one', 'two : and this']
|
43
|
-
end
|
36
|
+
get('/populate_two')
|
37
|
+
get('/box')
|
38
|
+
last_response.status.should == 200
|
39
|
+
last_response.body.split("\n").sort.should == ['one : this one', 'two : and this']
|
44
40
|
end
|
45
41
|
end
|
@@ -26,7 +26,7 @@ class PlainTextController < Ramaze::Controller
|
|
26
26
|
|
27
27
|
protected
|
28
28
|
|
29
|
-
def httpdigest_lookup_plaintext_password
|
29
|
+
def httpdigest_lookup_plaintext_password(username)
|
30
30
|
username.reverse
|
31
31
|
end
|
32
32
|
end
|
@@ -48,85 +48,67 @@ class PasswordLookupController < Ramaze::Controller
|
|
48
48
|
end
|
49
49
|
|
50
50
|
describe Ramaze::Helper::HttpDigest do
|
51
|
-
|
51
|
+
describe 'headers' do
|
52
|
+
behaves_like :mock
|
52
53
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
nc = 1
|
58
|
-
nonce = authorization['nonce']
|
59
|
-
|
60
|
-
authorization['cnonce'] = cnonce
|
61
|
-
authorization['nc'] = nc
|
62
|
-
authorization['uri'] = uri
|
63
|
-
authorization['username'] = username
|
64
|
-
authorization['qop'] = qop_type
|
65
|
-
|
66
|
-
ha1 = Digest::MD5.hexdigest([username, REALM, password].join(':'))
|
67
|
-
a2 = ['GET',uri]
|
68
|
-
a2 << Digest::MD5.hexdigest('') if qop_type == "auth-int"
|
69
|
-
ha2 = Digest::MD5.hexdigest( a2.join(':') )
|
70
|
-
|
71
|
-
authorization['response'] = Digest::MD5.hexdigest([ha1, nonce, nc, cnonce, qop_type, ha2].join(':'))
|
72
|
-
|
73
|
-
"Digest #{authorization}"
|
74
|
-
end
|
75
|
-
|
76
|
-
def get_auth( uri, username, password, qop_type = "auth" )
|
77
|
-
got = nil
|
78
|
-
session do |mock|
|
79
|
-
got = mock.get( uri )
|
80
|
-
got.status.should == 401
|
81
|
-
got.body.should == 'Unauthorized'
|
82
|
-
got = mock.get( uri , 'HTTP_AUTHORIZATION' => auth_for(got, uri, username, password, qop_type ) )
|
83
|
-
end
|
84
|
-
got
|
85
|
-
end
|
86
|
-
|
87
|
-
it 'sends out all the required header information' do
|
88
|
-
session do |mock|
|
89
|
-
got = mock.get('/authenticate')
|
90
|
-
authorization = Rack::Auth::Digest::Params.parse(got.headers['WWW-Authenticate'])
|
54
|
+
it 'sends out all the required header information' do
|
55
|
+
get '/authenticate'
|
56
|
+
www_authenticate = last_response.headers['WWW-Authenticate']
|
57
|
+
authorization = Rack::Auth::Digest::Params.parse(www_authenticate)
|
91
58
|
authorization["opaque"].should.not.be.empty
|
92
59
|
authorization["nonce"].should.not.be.empty
|
93
60
|
authorization["realm"].should == REALM
|
94
61
|
authorization["qop"].should == "auth,auth-int"
|
95
|
-
|
96
|
-
|
62
|
+
|
63
|
+
digest_authorize 'foo', 'oof'
|
64
|
+
get '/authenticate'
|
65
|
+
last_response.headers.should.satisfy do |headers|
|
97
66
|
!headers.has_key?( "WWW-Authenticate" )
|
98
67
|
end
|
99
68
|
end
|
100
69
|
end
|
70
|
+
end
|
101
71
|
|
102
|
-
|
103
|
-
got = get_auth( '/authenticate', 'foo', 'oof' )
|
104
|
-
got.status.should == 200
|
105
|
-
got.body.should == "Hello foo"
|
106
|
-
end
|
72
|
+
__END__
|
107
73
|
|
108
|
-
|
109
|
-
|
110
|
-
got.status.should == 401
|
111
|
-
got.body.should == "Unauthorized"
|
112
|
-
end
|
74
|
+
describe 'Digest authentication' do
|
75
|
+
behaves_like :mock
|
113
76
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
77
|
+
it 'authenticates a user with a block' do
|
78
|
+
digest_authorize 'foo', 'oof'
|
79
|
+
get '/authenticate'
|
80
|
+
last_response.status.should == 200
|
81
|
+
last_response.body.should == "Hello foo"
|
82
|
+
end
|
119
83
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
84
|
+
it 'fails to authenticate an incorrect password with a block' do
|
85
|
+
digest_authorize 'foo', 'bar'
|
86
|
+
get '/authenticate'
|
87
|
+
last_response.status.should == 401
|
88
|
+
last_response.body.should == "Unauthorized"
|
89
|
+
end
|
124
90
|
end
|
125
91
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
92
|
+
describe 'Plaintext authentication' do
|
93
|
+
behaves_like :mock
|
94
|
+
|
95
|
+
it 'authenticates a user with the plaintext method' do
|
96
|
+
get '/plaintext/authenticate'
|
97
|
+
last_response.status.should == 401
|
98
|
+
last_response.body.should == 'Unauthorized'
|
99
|
+
|
100
|
+
authorize 'foo', 'oof'
|
101
|
+
get '/plaintext/authenticate'
|
102
|
+
last_response.status.should == 200
|
103
|
+
last_response.body.should == "Hello foo"
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'fails to authenticate an incorrect password with the plaintext method' do
|
107
|
+
authorize 'foo', 'bar'
|
108
|
+
get '/plaintext/authenticate'
|
109
|
+
last_response.status.should == 401
|
110
|
+
last_response.body.should == "Unauthorized"
|
111
|
+
end
|
130
112
|
end
|
131
113
|
|
132
114
|
it 'authenticates a user with the password lookup method' do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# * Encoding: UTF-8
|
2
|
-
$KCODE = 'u' if
|
2
|
+
$KCODE = 'u' if /regexp/.respond_to?(:kcode)
|
3
3
|
require 'spec/helper'
|
4
4
|
spec_requires 'locale/tag', 'locale'
|
5
5
|
|
@@ -35,26 +35,26 @@ describe Ramaze::Helper::Localize do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
should 'override language by ?lang' do
|
38
|
-
get('
|
38
|
+
get('/', :lang => :de).body.should == 'de'
|
39
39
|
end
|
40
40
|
|
41
41
|
should 'override language by cookie' do
|
42
|
-
get('/',
|
42
|
+
get('/', {}, :cookie => 'lang=ja').body.should == 'ja'
|
43
43
|
end
|
44
44
|
|
45
45
|
should 'not fail if language is invalid' do
|
46
|
-
get('
|
46
|
+
get('/', :lang => :foobar).body.should == 'foobar'
|
47
47
|
end
|
48
48
|
|
49
49
|
should 'use dictionary to translate' do
|
50
50
|
get('/translate/one').body.should == 'one'
|
51
|
-
get('/translate/one
|
52
|
-
get('/translate/one
|
53
|
-
get('/translate/one
|
51
|
+
get('/translate/one', :lang => :en).body.should == 'one'
|
52
|
+
get('/translate/one', :lang => :ja).body.should == '一'
|
53
|
+
get('/translate/one', :lang => :de).body.should == 'eins'
|
54
54
|
end
|
55
55
|
|
56
56
|
it "falls back to default language if string wasn't found in dictionary" do
|
57
|
-
get('/translate/two
|
58
|
-
get('/translate/three
|
57
|
+
get('/translate/two', :lang => :ja).body.should == 'two'
|
58
|
+
get('/translate/three', :lang => :ja).body.should == '三'
|
59
59
|
end
|
60
60
|
end
|
@@ -25,25 +25,21 @@ class SpecCustomCaptcha < SpecSimpleCaptcha
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe Ramaze::Helper::SimpleCaptcha do
|
28
|
-
behaves_like :
|
28
|
+
behaves_like :mock
|
29
29
|
|
30
30
|
should 'ask question' do
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
get('/ask_question')
|
32
|
+
question = last_response.body
|
33
|
+
question.should =~ /^\d+ [+-] \d+$/
|
34
34
|
|
35
|
-
|
36
|
-
|
35
|
+
lh, m, rh = question.split
|
36
|
+
answer = lh.to_i.send(m, rh.to_i)
|
37
37
|
|
38
|
-
|
39
|
-
end
|
38
|
+
get("/answer_question/#{answer}").body.should == 'correct'
|
40
39
|
end
|
41
40
|
|
42
41
|
should 'ask custom question' do
|
43
|
-
|
44
|
-
|
45
|
-
question.body.should == 'the answer to everything'
|
46
|
-
mock.get('/fish/answer_question/42').body.should == 'correct'
|
47
|
-
end
|
42
|
+
get('/fish/ask_question').body.should == 'the answer to everything'
|
43
|
+
get('/fish/answer_question/42').body.should == 'correct'
|
48
44
|
end
|
49
45
|
end
|
data/spec/ramaze/helper/stack.rb
CHANGED
@@ -39,56 +39,48 @@ class SpecStackHelper < Ramaze::Controller
|
|
39
39
|
end
|
40
40
|
|
41
41
|
describe Ramaze::Helper::Stack do
|
42
|
-
behaves_like :
|
42
|
+
behaves_like :mock
|
43
43
|
@uri = 'http://example.org'
|
44
44
|
|
45
45
|
should 'login directly' do
|
46
|
-
|
47
|
-
mock.get('/secure').body.should == 'please login'
|
46
|
+
get('/secure').body.should == 'please login'
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
got['Location'].should == "#@uri/secure"
|
48
|
+
get('/login').status.should == 302
|
49
|
+
last_response['Location'].should == "#@uri/secure"
|
52
50
|
|
53
|
-
|
54
|
-
|
55
|
-
got.body.should == 'secret content'
|
51
|
+
get('/secure').status.should == 200
|
52
|
+
last_response.body.should == 'secret content'
|
56
53
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
54
|
+
get('/secure').body.should == 'secret content'
|
55
|
+
get('/logout')
|
56
|
+
get('/secure').body.should == 'please login'
|
61
57
|
end
|
62
58
|
|
63
59
|
should 'login via redirects' do
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
got.body.should == 'the logged in page'
|
76
|
-
end
|
60
|
+
get('/logged_in_page').status.should == 302
|
61
|
+
last_response['Location'].should == 'http://example.org/login'
|
62
|
+
|
63
|
+
get('/login').status.should == 302
|
64
|
+
last_response['Location'].should == 'http://example.org/logged_in_page'
|
65
|
+
|
66
|
+
get('/logged_in_page').status.should == 200
|
67
|
+
last_response.body.should == 'the logged in page'
|
68
|
+
|
69
|
+
get('/logout')
|
70
|
+
get('/secure').body.should == 'please login'
|
77
71
|
end
|
78
72
|
|
79
73
|
should 'login with params via redirects' do
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
got.body.should == {'x' => 'y'}.inspect
|
92
|
-
end
|
74
|
+
get('/logged_in_params?x=y').status.should == 302
|
75
|
+
last_response['Location'].should == 'http://example.org/login'
|
76
|
+
|
77
|
+
get('/login').status.should == 302
|
78
|
+
last_response['Location'].should == 'http://example.org/logged_in_params?x=y'
|
79
|
+
|
80
|
+
get('/logged_in_params?x=y').status.should == 200
|
81
|
+
last_response.body.should == {'x' => 'y'}.inspect
|
82
|
+
|
83
|
+
get('/logout')
|
84
|
+
get('/secure').body.should == 'please login'
|
93
85
|
end
|
94
86
|
end
|
data/spec/ramaze/helper/user.rb
CHANGED
@@ -23,6 +23,10 @@ class SpecUserHelper < Ramaze::Controller
|
|
23
23
|
user_login ? 'logged in' : 'failed login'
|
24
24
|
end
|
25
25
|
|
26
|
+
def logout
|
27
|
+
user_logout
|
28
|
+
end
|
29
|
+
|
26
30
|
def profile
|
27
31
|
user.profile
|
28
32
|
end
|
@@ -48,23 +52,21 @@ class SpecUserHelperCallback < SpecUserHelper
|
|
48
52
|
end
|
49
53
|
|
50
54
|
describe Ramaze::Helper::User do
|
51
|
-
behaves_like :
|
55
|
+
behaves_like :mock
|
52
56
|
|
53
57
|
should 'login' do
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
58
|
+
get('/status').body.should == 'no'
|
59
|
+
get('/login', :name => :arthur, :password => 42).body.should == 'logged in'
|
60
|
+
get('/status').body.should == 'yes'
|
61
|
+
get('/profile').body.should == MockSequelUser.new.profile
|
62
|
+
get('/logout').status.should == 200
|
60
63
|
end
|
61
64
|
|
62
65
|
should 'login via the callback' do
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
66
|
+
get('/callback/status').body.should == 'no'
|
67
|
+
get('/callback/login', :name => :arthur, :password => 42).body.should == 'logged in'
|
68
|
+
get('/callback/status').body.should == 'yes'
|
69
|
+
get('/callback/profile').body.should == MockSequelUser.new.profile
|
70
|
+
get('/logout').status.should == 200
|
69
71
|
end
|
70
72
|
end
|
data/spec/ramaze/request.rb
CHANGED
@@ -46,4 +46,16 @@ describe 'Ramaze::Request' do
|
|
46
46
|
should 'provide #accept_charset' do
|
47
47
|
request(@env).accept_charset.should == 'UTF-8'
|
48
48
|
end
|
49
|
+
|
50
|
+
should 'properly parse requested locale' do
|
51
|
+
header = { "HTTP_ACCEPT_LANGUAGE" => "sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3" }
|
52
|
+
request(@env.merge(header)).accept_language_with_weight.should == [
|
53
|
+
['sv-se', 1.0], ['sv', 0.8], ['en-us', 0.5], ['en', 0.3]
|
54
|
+
]
|
55
|
+
|
56
|
+
header = { "HTTP_ACCEPT_LANGUAGE" => "nl-nl" }
|
57
|
+
request(@env.merge(header)).accept_language_with_weight.should == [
|
58
|
+
['nl-nl', 1.0]
|
59
|
+
]
|
60
|
+
end
|
49
61
|
end
|
data/tasks/release.rake
CHANGED
@@ -2,7 +2,7 @@ namespace :release do
|
|
2
2
|
task :all => [:release_github, :release_rubyforge]
|
3
3
|
|
4
4
|
desc 'Display instructions to release on github'
|
5
|
-
task :github => [:reversion, :gemspec] do
|
5
|
+
task :github => [:jquery, :reversion, :gemspec] do
|
6
6
|
name, version = GEMSPEC.name, GEMSPEC.version
|
7
7
|
|
8
8
|
puts <<INSTRUCTIONS
|
@@ -22,14 +22,14 @@ INSTRUCTIONS
|
|
22
22
|
|
23
23
|
# TODO: Not tested
|
24
24
|
desc 'Display instructions to release on rubyforge'
|
25
|
-
task :rubyforge => [:reversion, :gemspec, :package] do
|
25
|
+
task :rubyforge => [:jquery, :reversion, :gemspec, :package] do
|
26
26
|
name, version = GEMSPEC.name, GEMSPEC.version
|
27
27
|
|
28
28
|
puts <<INSTRUCTIONS
|
29
29
|
To publish to rubyforge do following:
|
30
30
|
|
31
31
|
rubyforge login
|
32
|
-
rubyforge add_release #{name} #{version} pkg/#{name}-#{version}.gem
|
32
|
+
rubyforge add_release #{name} '#{version}' pkg/#{name}-#{version}.gem
|
33
33
|
|
34
34
|
After you have done these steps, see:
|
35
35
|
|
@@ -40,30 +40,12 @@ INSTRUCTIONS
|
|
40
40
|
|
41
41
|
desc 'Display instructions to add archives after release:rubyforge'
|
42
42
|
task :rubyforge_archives do
|
43
|
-
release_id = latest_release_id
|
44
|
-
|
45
43
|
puts "Adding archives for distro packagers is:", ""
|
46
44
|
|
47
45
|
Dir["pkg/#{name}-#{version}.{gz,zip}"].each do |file|
|
48
|
-
puts "rubyforge add_file #{name} #{name} #{
|
46
|
+
puts "rubyforge add_file #{name} #{name} '#{version}' '#{file}'"
|
49
47
|
end
|
50
48
|
|
51
49
|
puts
|
52
50
|
end
|
53
51
|
end
|
54
|
-
|
55
|
-
# Use URI and proper XPATH, something along these lines:
|
56
|
-
#
|
57
|
-
# a = doc.at('a[@href=~"release_id"]')[:href]
|
58
|
-
# release_id = URI(a).query[/release_id=(\w+)/, 1]
|
59
|
-
def latest_release_id
|
60
|
-
require 'open-uri'
|
61
|
-
require 'hpricot'
|
62
|
-
|
63
|
-
url = "http://rubyforge.org/frs/?group_id=#{PROJECT_RUBYFORGE_GROUP_ID}"
|
64
|
-
doc = Hpricot(open(url))
|
65
|
-
a = (doc/:a).find{|a| a[:href] =~ /release_id/}
|
66
|
-
|
67
|
-
version = a.inner_html
|
68
|
-
release_id = Hash[*a[:href].split('?').last.split('=').flatten]['release_id']
|
69
|
-
end
|
data/tasks/setup.rake
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Currently, Ramaze is not usable without Rack from the master branch head.
|
2
|
+
# Also, our specs now depend on the latest rack-test.
|
3
|
+
#
|
4
|
+
# In order to make setup simpler for folks, I'll put up some gemspecs on github
|
5
|
+
# and use their automatic building to provide development versions of these
|
6
|
+
# libraries as gems for easier deployment.
|
7
|
+
#
|
8
|
+
# Once the libraries are officially released in a usable state I'll switch
|
9
|
+
# dependencies to the official ones again.
|
10
|
+
#
|
11
|
+
# Please note that this makes running in environments that enforce their own
|
12
|
+
# Rack (like jruby-rack) still quite difficult, but should allow for easier
|
13
|
+
# development.
|
14
|
+
#
|
15
|
+
# Please be patient.
|
16
|
+
|
17
|
+
desc 'install all possible dependencies'
|
18
|
+
task :setup do
|
19
|
+
GemInstaller.new do
|
20
|
+
# misc
|
21
|
+
gem 'bacon', '>= 1.0'
|
22
|
+
gem 'json', '>= 1.1.3'
|
23
|
+
gem 'memcache', '~> 1.7.0'
|
24
|
+
|
25
|
+
# templating engines
|
26
|
+
gem 'Remarkably', '~> 0.5.2'
|
27
|
+
gem 'erubis', '>= 2.6.4'
|
28
|
+
gem 'haml', '~> 2.0.9'
|
29
|
+
gem 'hpricot', '>= 0.7'
|
30
|
+
gem 'liquid', '~> 2.0.0'
|
31
|
+
gem 'sequel', '>= 2.11.0'
|
32
|
+
gem 'tagz', '>= 5.0.1'
|
33
|
+
gem 'tenjin', '~> 0.6.1'
|
34
|
+
|
35
|
+
# mine
|
36
|
+
gem 'manveru-innate', '>= 2009.04.10', :lib => 'innate', :source => github
|
37
|
+
gem 'manveru-ezamar', '>= 2009.03.10', :lib => 'ezamar', :source => github
|
38
|
+
gem 'manveru-nagoro', '>= 2009.03.28', :lib => 'nagoro', :source => github
|
39
|
+
gem 'manveru-rack-test', '> 0.1.0', :lib => 'rack-test', :source => github
|
40
|
+
gem 'manveru-rack', '>= 0.9.9', :lib => 'rack', :source => github
|
41
|
+
|
42
|
+
setup
|
43
|
+
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manveru-ramaze
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2009.04.
|
4
|
+
version: 2009.04.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael 'manveru' Fellinger
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-18 00:00:00 -07:00
|
13
13
|
default_executable: ramaze
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -206,6 +206,7 @@ files:
|
|
206
206
|
- examples/templates/view/external.rhtml
|
207
207
|
- examples/templates/view/external.tenjin
|
208
208
|
- examples/templates/view/external.zmr
|
209
|
+
- lib/proto/app.rb
|
209
210
|
- lib/proto/config.ru
|
210
211
|
- lib/proto/controller/init.rb
|
211
212
|
- lib/proto/controller/main.rb
|
@@ -220,7 +221,6 @@ files:
|
|
220
221
|
- lib/proto/spec/main.rb
|
221
222
|
- lib/proto/start.rb
|
222
223
|
- lib/proto/view/index.xhtml
|
223
|
-
- lib/proto/view/page.xhtml
|
224
224
|
- lib/ramaze.rb
|
225
225
|
- lib/ramaze/app.rb
|
226
226
|
- lib/ramaze/cache.rb
|
@@ -323,7 +323,6 @@ files:
|
|
323
323
|
- lib/ramaze/snippets/ramaze/struct.rb
|
324
324
|
- lib/ramaze/snippets/string/camel_case.rb
|
325
325
|
- lib/ramaze/snippets/string/color.rb
|
326
|
-
- lib/ramaze/snippets/string/each.rb
|
327
326
|
- lib/ramaze/snippets/string/end_with.rb
|
328
327
|
- lib/ramaze/snippets/string/esc.rb
|
329
328
|
- lib/ramaze/snippets/string/ord.rb
|
@@ -421,7 +420,6 @@ files:
|
|
421
420
|
- spec/ramaze/helper/maruku.rb
|
422
421
|
- spec/ramaze/helper/pager.rb
|
423
422
|
- spec/ramaze/helper/paginate.rb
|
424
|
-
- spec/ramaze/helper/partial.rb
|
425
423
|
- spec/ramaze/helper/request_accessor.rb
|
426
424
|
- spec/ramaze/helper/sequel_form.rb
|
427
425
|
- spec/ramaze/helper/simple_captcha.rb
|
@@ -506,6 +504,7 @@ files:
|
|
506
504
|
- tasks/rcov.rake
|
507
505
|
- tasks/release.rake
|
508
506
|
- tasks/reversion.rake
|
507
|
+
- tasks/setup.rake
|
509
508
|
- tasks/todo.rake
|
510
509
|
- tasks/traits.rake
|
511
510
|
- tasks/yard.rake
|
@@ -540,7 +539,7 @@ requirements: []
|
|
540
539
|
rubyforge_project: ramaze
|
541
540
|
rubygems_version: 1.2.0
|
542
541
|
signing_key:
|
543
|
-
specification_version:
|
542
|
+
specification_version: 3
|
544
543
|
summary: Ramaze is a simple and modular web framework
|
545
544
|
test_files: []
|
546
545
|
|