waves 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/waves +4 -3
- data/doc/VERSION +1 -1
- data/lib/waves.rb +52 -40
- data/lib/{caches → waves/caches}/file.rb +3 -1
- data/lib/waves/caches/memcached.rb +56 -0
- data/lib/{caches → waves/caches}/simple.rb +6 -7
- data/lib/{caches → waves/caches}/synchronized.rb +15 -1
- data/lib/{commands → waves/commands}/console.rb +4 -4
- data/lib/{commands → waves/commands}/generate.rb +6 -5
- data/lib/{commands → waves/commands}/help.rb +0 -0
- data/lib/{commands → waves/commands}/server.rb +1 -1
- data/lib/{dispatchers → waves/dispatchers}/base.rb +17 -31
- data/lib/waves/dispatchers/default.rb +19 -0
- data/lib/{ext → waves/ext}/float.rb +0 -0
- data/lib/{ext → waves/ext}/hash.rb +0 -0
- data/lib/{ext → waves/ext}/integer.rb +16 -1
- data/lib/{ext → waves/ext}/kernel.rb +3 -7
- data/lib/{ext → waves/ext}/module.rb +3 -3
- data/lib/{ext → waves/ext}/object.rb +2 -0
- data/lib/waves/ext/string.rb +73 -0
- data/lib/{ext → waves/ext}/symbol.rb +0 -1
- data/lib/{ext → waves/ext}/tempfile.rb +0 -0
- data/lib/waves/ext/time.rb +5 -0
- data/lib/{foundations → waves/foundations}/classic.rb +9 -21
- data/lib/{foundations → waves/foundations}/compact.rb +15 -20
- data/lib/waves/foundations/rest.rb +311 -0
- data/lib/waves/helpers/basic.rb +13 -0
- data/lib/{helpers → waves/helpers}/doc_type.rb +3 -0
- data/lib/waves/helpers/form.rb +94 -0
- data/lib/waves/helpers/formatting.rb +14 -0
- data/lib/waves/layers/mvc.rb +65 -0
- data/lib/{layers → waves/layers}/mvc/controllers.rb +0 -0
- data/lib/{layers → waves/layers}/mvc/extensions.rb +23 -11
- data/lib/{layers → waves/layers}/orm/migration.rb +0 -0
- data/lib/{layers → waves/layers}/orm/providers/active_record.rb +2 -5
- data/lib/{layers → waves/layers}/orm/providers/active_record/migrations/empty.rb.erb +0 -0
- data/lib/{layers → waves/layers}/orm/providers/active_record/tasks/generate.rb +1 -1
- data/lib/{layers → waves/layers}/orm/providers/active_record/tasks/schema.rb +1 -1
- data/lib/{layers → waves/layers}/orm/providers/data_mapper.rb +0 -0
- data/lib/{layers → waves/layers}/orm/providers/filebase.rb +0 -0
- data/lib/{layers → waves/layers}/orm/providers/sequel.rb +28 -29
- data/lib/{layers → waves/layers}/orm/providers/sequel/migrations/empty.rb.erb +0 -0
- data/lib/{layers → waves/layers}/orm/providers/sequel/tasks/generate.rb +1 -1
- data/lib/{layers → waves/layers}/orm/providers/sequel/tasks/schema.rb +2 -0
- data/lib/waves/layers/rack/rack_cache.rb +32 -0
- data/lib/waves/layers/renderers/erubis.rb +52 -0
- data/lib/waves/layers/renderers/haml.rb +67 -0
- data/lib/waves/layers/renderers/markaby.rb +41 -0
- data/lib/waves/layers/text/inflect/english.rb +42 -0
- data/lib/waves/matchers/accept.rb +47 -0
- data/lib/waves/matchers/ext.rb +27 -0
- data/lib/waves/matchers/path.rb +72 -0
- data/lib/waves/matchers/query.rb +43 -0
- data/lib/waves/matchers/request.rb +86 -0
- data/lib/waves/matchers/requested.rb +31 -0
- data/lib/{matchers → waves/matchers}/resource.rb +8 -1
- data/lib/waves/matchers/traits.rb +30 -0
- data/lib/waves/matchers/uri.rb +69 -0
- data/lib/waves/media/mime_types.rb +542 -0
- data/lib/waves/renderers/mixin.rb +9 -0
- data/lib/waves/request/accept.rb +92 -0
- data/lib/{runtime → waves/request}/request.rb +77 -61
- data/lib/waves/resources/file_mixin.rb +11 -0
- data/lib/{resources → waves/resources}/mixin.rb +42 -44
- data/lib/waves/resources/paths.rb +132 -0
- data/lib/waves/response/client_errors.rb +10 -0
- data/lib/waves/response/packaged.rb +19 -0
- data/lib/waves/response/redirects.rb +35 -0
- data/lib/{runtime → waves/response}/response.rb +29 -11
- data/lib/{runtime → waves/response}/response_mixin.rb +30 -17
- data/lib/waves/runtime/applications.rb +18 -0
- data/lib/{runtime → waves/runtime}/configuration.rb +31 -25
- data/lib/waves/runtime/console.rb +24 -0
- data/lib/{runtime → waves/runtime}/logger.rb +3 -3
- data/lib/{runtime → waves/runtime}/mocks.rb +2 -2
- data/lib/waves/runtime/rackup.rb +37 -0
- data/lib/waves/runtime/runtime.rb +48 -0
- data/lib/waves/runtime/server.rb +33 -0
- data/lib/{servers → waves/servers}/base.rb +0 -0
- data/lib/{servers → waves/servers}/mongrel.rb +0 -0
- data/lib/{servers → waves/servers}/webrick.rb +0 -0
- data/lib/{tasks → waves/tasks}/gem.rb +0 -0
- data/lib/{tasks → waves/tasks}/generate.rb +0 -0
- data/lib/waves/views/cassy.rb +173 -0
- data/lib/{views → waves/views}/errors.rb +8 -7
- data/lib/waves/views/mixin.rb +23 -0
- data/lib/waves/views/templated.rb +40 -0
- data/samples/basic/basic_startup.rb +70 -0
- data/samples/basic/config.ru +9 -0
- data/samples/blog/configurations/development.rb +17 -16
- data/samples/blog/configurations/production.rb +0 -11
- data/samples/blog/resources/entry.rb +3 -3
- data/samples/blog/resources/map.rb +10 -3
- data/samples/blog/startup.rb +4 -3
- data/templates/classic/Rakefile +28 -29
- data/templates/classic/configurations/default.rb.erb +8 -3
- data/templates/classic/configurations/development.rb.erb +1 -20
- data/templates/classic/configurations/production.rb.erb +2 -16
- data/templates/classic/public/images/favicon.ico +0 -0
- data/templates/classic/resources/server.rb.erb +9 -0
- data/templates/classic/startup.rb.erb +3 -3
- data/templates/classic/views/css.rb.erb +14 -0
- data/templates/classic/views/default.rb.erb +17 -0
- data/templates/classic/views/errors.rb.erb +10 -0
- data/templates/classic/views/pages.rb.erb +14 -0
- data/templates/compact/startup.rb.erb +8 -3
- data/test/ext/object.rb +55 -0
- data/test/ext/shortcuts.rb +73 -0
- data/test/helpers.rb +17 -0
- data/test/match/accept.rb +78 -0
- data/test/match/ext.rb +156 -0
- data/test/match/methods.rb +22 -0
- data/test/match/params.rb +33 -0
- data/test/match/path.rb +106 -0
- data/test/match/query.rb +60 -0
- data/test/match/request.rb +91 -0
- data/test/match/requested.rb +149 -0
- data/test/match/uri.rb +136 -0
- data/test/process/request.rb +75 -0
- data/test/process/resource.rb +53 -0
- data/test/resources/path.rb +166 -0
- data/test/runtime/configurations.rb +19 -0
- data/test/runtime/request.rb +63 -0
- data/test/runtime/response.rb +85 -0
- data/test/views/views.rb +40 -0
- metadata +243 -157
- data/lib/caches/memcached.rb +0 -40
- data/lib/dispatchers/default.rb +0 -25
- data/lib/ext/string.rb +0 -20
- data/lib/helpers/basic.rb +0 -11
- data/lib/helpers/extended.rb +0 -21
- data/lib/helpers/form.rb +0 -42
- data/lib/helpers/formatting.rb +0 -30
- data/lib/helpers/layouts.rb +0 -37
- data/lib/helpers/model.rb +0 -37
- data/lib/helpers/view.rb +0 -22
- data/lib/layers/inflect/english.rb +0 -67
- data/lib/layers/mvc.rb +0 -54
- data/lib/layers/renderers/erubis.rb +0 -60
- data/lib/layers/renderers/haml.rb +0 -47
- data/lib/layers/renderers/markaby.rb +0 -29
- data/lib/matchers/accept.rb +0 -21
- data/lib/matchers/base.rb +0 -30
- data/lib/matchers/content_type.rb +0 -17
- data/lib/matchers/path.rb +0 -67
- data/lib/matchers/query.rb +0 -21
- data/lib/matchers/request.rb +0 -27
- data/lib/matchers/traits.rb +0 -19
- data/lib/matchers/uri.rb +0 -20
- data/lib/renderers/mixin.rb +0 -36
- data/lib/resources/paths.rb +0 -34
- data/lib/runtime/console.rb +0 -23
- data/lib/runtime/mime_types.rb +0 -536
- data/lib/runtime/monitor.rb +0 -32
- data/lib/runtime/runtime.rb +0 -67
- data/lib/runtime/server.rb +0 -20
- data/lib/runtime/session.rb +0 -27
- data/lib/runtime/worker.rb +0 -86
- data/lib/views/mixin.rb +0 -62
- data/samples/blog/blog.db +0 -0
- data/samples/blog/log/waves.production +0 -3
- data/templates/classic/resources/map.rb.erb +0 -8
- data/templates/classic/templates/errors/not_found_404.mab +0 -7
- data/templates/classic/templates/errors/server_error_500.mab +0 -7
- data/templates/classic/templates/layouts/default.mab +0 -14
- data/templates/classic/tmp/sessions/.gitignore +0 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'test/helpers.rb'
|
2
|
+
require 'waves/foundations/compact'
|
3
|
+
|
4
|
+
describe "Application Context" do
|
5
|
+
before do
|
6
|
+
Test = Module.new { include Waves::Foundations::Compact }
|
7
|
+
Waves << Test
|
8
|
+
end
|
9
|
+
|
10
|
+
after do
|
11
|
+
Waves.applications.clear
|
12
|
+
Object.instance_eval { remove_const( :Test ) if const_defined?( :Test ) }
|
13
|
+
end
|
14
|
+
|
15
|
+
feature "Provide acccess to request, response, and session objects" do
|
16
|
+
Test::Resources::Map.new( Waves::Request.new( env('/', :method => 'GET' ) ) ).
|
17
|
+
instance_eval do
|
18
|
+
{ :request => Waves::Request, :response => Waves::Response,
|
19
|
+
:session => Waves::Session, :query => Waves::Request::Query }.
|
20
|
+
each { |k,v| send( k ).class.should == v }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
feature "Shortcuts to the path, url, domain, and session" do
|
25
|
+
Test::Resources::Map.new( Waves::Request.new(
|
26
|
+
env('http://localhost/foo/bar.js', :method => 'GET' ) ) ).
|
27
|
+
instance_eval do
|
28
|
+
{ :url => request.url, :path => request.path,
|
29
|
+
:domain => request.domain, :session => request.session }.
|
30
|
+
each { |k,v| send( k ).should == v }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
feature "Access to path and associated helpers" do
|
35
|
+
Test::Resources::Map.new( Waves::Request.new(
|
36
|
+
env('http://localhost/foo/bar.js', :method => 'GET' ) ) ).
|
37
|
+
instance_eval do
|
38
|
+
{ :url => 'http://localhost/foo/bar.js', :path => '/foo/bar.js',
|
39
|
+
:basename => '/foo/bar', :extension => 'js' }.
|
40
|
+
each { |k,v| send( k ).should == v }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
feature "Access to the application object and name" do
|
45
|
+
Test::Resources::Map.new( Waves::Request.new(
|
46
|
+
env('http://localhost/foo/bar.js', :method => 'GET' ) ) ).
|
47
|
+
instance_eval do
|
48
|
+
{ :app => Test, :app_name => :test }.
|
49
|
+
each { |k,v| send( k ).should == v }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../helpers.rb"
|
2
|
+
require "waves/foundations/compact"
|
3
|
+
|
4
|
+
describe "A path generation method" do
|
5
|
+
|
6
|
+
before do
|
7
|
+
Test = Module.new { include Waves::Foundations::Compact }
|
8
|
+
@resource_class = Test::Resources::Map
|
9
|
+
@paths = @resource_class.new( Waves::Request.new( env( '/', :method => 'GET' ) ) ).paths
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
Waves.applications.clear
|
14
|
+
Object.instance_eval { remove_const(:Test) if const_defined?(:Test) }
|
15
|
+
end
|
16
|
+
|
17
|
+
it "turns an empty template into '/'" do
|
18
|
+
@resource_class.on(:get, :list => [] ) { nil }
|
19
|
+
@paths.list.should == "/"
|
20
|
+
@paths.list("foo").should == "/"
|
21
|
+
end
|
22
|
+
|
23
|
+
it "reproduces strings from the path template" do
|
24
|
+
@resource_class.on(:get, :list => [ 'taller', 'ghost', 'walt' ] ) { nil }
|
25
|
+
@paths.list.should == "/taller/ghost/walt"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "treats symbols as locations for arg interpolation" do
|
29
|
+
@resource_class.on(:get, :show => [ 'hi', 'there', :nickname ]) { nil }
|
30
|
+
@paths.show( 'freckles' ).should == "/hi/there/freckles"
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
it "treats a hash with string or symbol value as location for arg interpolations" do
|
35
|
+
@resource_class.on(:get, :edit => [ 'form', { :filter => 'textile' } ] ) { nil }
|
36
|
+
@paths.edit( 'markdown' ).should == "/form/markdown"
|
37
|
+
@paths.edit( 'markdown' ).should == "/form/markdown"
|
38
|
+
end
|
39
|
+
|
40
|
+
it "interpolates for a hash-with-regex only when the arg matches the regex" do
|
41
|
+
@resource_class.on(:get, :edit => [ 'form', { :filter => /^(textile|markdown|plain)$/ } ] ) { nil }
|
42
|
+
@paths.edit( 'markdown' ).should == "/form/markdown"
|
43
|
+
|
44
|
+
lambda { @paths.edit( 'html' ) }.should.raise ArgumentError
|
45
|
+
end
|
46
|
+
|
47
|
+
it "appends all arguments to the path when it encounters a true" do
|
48
|
+
@resource_class.on(:get, :count_1 => [ 'first', true ]) { nil }
|
49
|
+
@paths.count_1("second", "third", "fourth").should == "/first/second/third/fourth"
|
50
|
+
|
51
|
+
@resource_class.on(:get, :count_2 => [ 'first', { :whatever => true } ]) { nil }
|
52
|
+
@paths.count_2("second", "third", "fourth").should == "/first/second/third/fourth"
|
53
|
+
end
|
54
|
+
|
55
|
+
it "uses hash element value as default in absence of argument" do
|
56
|
+
@resource_class.on(:get, :edit => [ 'form', { :filter => 'textile' } ] ) { nil }
|
57
|
+
@paths.edit.should == "/form/textile"
|
58
|
+
end
|
59
|
+
|
60
|
+
it "uses regexes for argument interpolation if the arg matches" do
|
61
|
+
@resource_class.on(:get, :list => [ "episode", /\d+/ ] ) { nil }
|
62
|
+
@paths.list( 815 ).should == "/episode/815"
|
63
|
+
|
64
|
+
lambda { path = @paths.list( "boar" ) }.should.raise ArgumentError
|
65
|
+
end
|
66
|
+
|
67
|
+
describe "given an (implicit) array of args" do
|
68
|
+
|
69
|
+
it "interpolates its arguments in order" do
|
70
|
+
@resource_class.on(:get, :list => [ :one, :two, :three ] ) { nil }
|
71
|
+
@paths.list( 'one', 'two', 'three').should == '/one/two/three'
|
72
|
+
end
|
73
|
+
|
74
|
+
it "raises an ArgumentError if given more args than interpolables" do
|
75
|
+
@resource_class.on(:get, :list => [ :one ] ) { nil }
|
76
|
+
lambda { @paths.list( "x", "y") }.should.raise ArgumentError
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "given an argument hash" do
|
82
|
+
|
83
|
+
it "interpolates arg pairs that match symbols in the template" do
|
84
|
+
@resource_class.on(:get, :list => [ :one, :two, :three ] ) { nil }
|
85
|
+
@paths.list( :three => 'three', :one => 'one', :two => 'two').should == '/one/two/three'
|
86
|
+
end
|
87
|
+
|
88
|
+
it "interpolates arg pairs that match the keys of hashes in the template" do
|
89
|
+
@resource_class.on(:get, :show => [ {:foo => 'bar'} ] ) { nil }
|
90
|
+
@paths.show( :foo => 'bear' ).should == "/bear"
|
91
|
+
end
|
92
|
+
|
93
|
+
it "interpolates an arg pair for a hash-with-regex only when the arg matches the regex" do
|
94
|
+
@resource_class.on(:get, :show => [ {:foo => /^ba(r|z|t)$/ } ] ) { nil }
|
95
|
+
@paths.show( :foo => 'baz' ).should == "/baz"
|
96
|
+
end
|
97
|
+
|
98
|
+
it "uses hash element value as default in absence of an arg pair" do
|
99
|
+
@resource_class.on(:get, :list => [ :one, { :two => 'two' }, :three ] ) { nil }
|
100
|
+
@paths.list( :three => 'three', :one => 'one').should == "/one/two/three"
|
101
|
+
end
|
102
|
+
|
103
|
+
it "raises when not all necessary interpolations can be performed" do
|
104
|
+
@resource_class.on(:get, :list => [ :one, :two, :three ] ) { nil }
|
105
|
+
lambda { @paths.list( :three => 'three', :one => 'one') }.should.raise ArgumentError
|
106
|
+
end
|
107
|
+
|
108
|
+
it "raises an ArgumentError if the template contains a regex" do
|
109
|
+
@resource_class.on(:get, :list => [ /anything/ ] ) { nil }
|
110
|
+
lambda { @paths.list( :one => 'one' ) }.should.raise ArgumentError
|
111
|
+
end
|
112
|
+
|
113
|
+
it "appends value/s of arg pair matching a template hash-with-true" do
|
114
|
+
@resource_class.on(:get, :list => [ :kind, { :parts => true } ]) { nil }
|
115
|
+
lambda { @paths.list( :kind => 'ghost') }.should.raise ArgumentError
|
116
|
+
@paths.list( :kind => 'ghost', :parts => "walt" ).should == "/ghost/walt"
|
117
|
+
@paths.list( :kind => 'ghost', :parts => ["walt", "boone"]).should == "/ghost/walt/boone"
|
118
|
+
end
|
119
|
+
|
120
|
+
it "raises an ArgumentError if the template contains a true" do
|
121
|
+
@resource_class.on(:get, :list => [ :kind, true ]) { nil }
|
122
|
+
lambda { @paths.list( :kind => 'whuh?' ) }.should.raise ArgumentError
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
describe "A path template" do
|
129
|
+
|
130
|
+
it "is compilable when it contains Strings, Symbols, and Hashes with Strings or Symbols" do
|
131
|
+
@resource_class.on(:get, :one => [ 'taller', 'ghost', 'walt' ] ) { nil }
|
132
|
+
@paths.one
|
133
|
+
|
134
|
+
@resource_class.on(:get, :two => [ 'hi', 'there', :nickname ]) { nil }
|
135
|
+
@paths.two( 'freckles' )
|
136
|
+
|
137
|
+
@resource_class.on(:get, :three => [ 'form', { :filter => 'textile' } ] ) { nil }
|
138
|
+
@paths.three( 'markdown' )
|
139
|
+
|
140
|
+
@resource_class.on(:get, :four => [ 'other_form', { :filter => :textile } ] ) { nil }
|
141
|
+
@paths.four( 'markdown' )
|
142
|
+
|
143
|
+
@paths.compiled_paths.values.sort.should == ["/taller/ghost/walt", "/hi/there/%s", "/form/%s", "/other_form/%s"].sort
|
144
|
+
end
|
145
|
+
|
146
|
+
it "is not compilable if it contains Regexps, true, or Hashes with Regexp or true" do
|
147
|
+
@resource_class.on(:get, :one => [ "episode", /\d+/ ] ) { nil }
|
148
|
+
@paths.one( 815 )
|
149
|
+
|
150
|
+
@resource_class.on(:get, :two => [ true ])
|
151
|
+
@paths.two( "foo" )
|
152
|
+
|
153
|
+
@resource_class.on(:get, :three => [ {:foo => /^ba(r|z|t)$/ } ] ) { nil }
|
154
|
+
@paths.three( :foo => 'baz' )
|
155
|
+
|
156
|
+
@resource_class.on(:get, :four => [ 'first', { :whatever => true } ]) { nil }
|
157
|
+
@paths.four
|
158
|
+
|
159
|
+
@paths.compiled_paths.values.should == []
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../helpers.rb"
|
2
|
+
|
3
|
+
describe "Configuration attributes" do
|
4
|
+
|
5
|
+
class Basic < Waves::Configurations::Base; end
|
6
|
+
|
7
|
+
it "can be declared by developers" do
|
8
|
+
Basic.attribute :smurf
|
9
|
+
Basic.smurf("smurfy")
|
10
|
+
Basic.smurf.should == "smurfy"
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it "must be declared before use" do
|
15
|
+
Basic.should.not.respond_to :gnome
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../helpers.rb"
|
2
|
+
|
3
|
+
describe "A Waves request instance" do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@request = Waves::Request.new(env( '/', :method => 'GET' ))
|
7
|
+
end
|
8
|
+
|
9
|
+
it "has session, response, and blackboard objects" do
|
10
|
+
@request.session.class.should == Waves::Session
|
11
|
+
@request.response.class.should == Waves::Response
|
12
|
+
end
|
13
|
+
|
14
|
+
it "provides an accessor to the Rack request" do
|
15
|
+
@request.rack_request.class.should == Rack::Request
|
16
|
+
end
|
17
|
+
|
18
|
+
it "wraps some useful Rack data in more elegant methods" do
|
19
|
+
@request.path.should == "/"
|
20
|
+
|
21
|
+
@request.domain.should == "example.org"
|
22
|
+
|
23
|
+
# @request.content_type.should == "text/html"
|
24
|
+
end
|
25
|
+
|
26
|
+
# it "delegates unknown methods to the Rack request" do
|
27
|
+
# @request.chitty_bang_bang
|
28
|
+
# end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "The HTTP request method" do
|
33
|
+
|
34
|
+
|
35
|
+
it "is determined in a straightforward manner for straightforward requests" do
|
36
|
+
@get = Waves::Request.new(env("/", :method => 'GET'))
|
37
|
+
@post = Waves::Request.new(env("/", :method => 'POST'))
|
38
|
+
@put = Waves::Request.new(env("/", :method => 'PUT'))
|
39
|
+
@delete = Waves::Request.new(env("/", :method => 'DELETE'))
|
40
|
+
|
41
|
+
@get.method.should == :get
|
42
|
+
@post.method.should == :post
|
43
|
+
@put.method.should == :put
|
44
|
+
@delete.method.should == :delete
|
45
|
+
end
|
46
|
+
|
47
|
+
it "can be set with the '_method' query param on a POST" do
|
48
|
+
@url_put = Waves::Request.new(env("/?_method=put", :method => 'POST'))
|
49
|
+
@url_delete = Waves::Request.new(env("/?_method=delete", :method => 'POST'))
|
50
|
+
|
51
|
+
@url_put.method.should == :put; @url_put.put.should.be.true
|
52
|
+
@url_delete.method.should == :delete; @url_delete.delete.should.be.true
|
53
|
+
end
|
54
|
+
|
55
|
+
it "can be set with the '_method' body param on a POST" do
|
56
|
+
@body_put = Waves::Request.new(env("/", :method => 'POST', :input => '_method=put'))
|
57
|
+
@body_delete = Waves::Request.new(env("/", :method => 'POST', :input => '_method=delete'))
|
58
|
+
|
59
|
+
@body_put.method.should == :put; @body_put.put.should.be.true
|
60
|
+
@body_delete.method.should == :delete
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../helpers.rb"
|
2
|
+
|
3
|
+
describe "An instance of Waves::Response" do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@request = Waves::Request.new(env( '/', :method => 'GET' ))
|
7
|
+
@response = Waves::Response.new(@request)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "has a Rack::Response" do
|
11
|
+
@response.rack_response.class.should == Rack::Response
|
12
|
+
end
|
13
|
+
|
14
|
+
it "has a Waves::Request" do
|
15
|
+
@response.request.class.should == Waves::Request
|
16
|
+
end
|
17
|
+
|
18
|
+
it "can access the session for the current request" do
|
19
|
+
@response.session.class.should == Waves::Session
|
20
|
+
end
|
21
|
+
|
22
|
+
it "provides setter methods for commonly used headers" do
|
23
|
+
@response.rack_response.should.receive(:[]=).with('Content-Type', 'text/javascript')
|
24
|
+
@response.content_type = 'text/javascript'
|
25
|
+
|
26
|
+
@response.rack_response.should.receive(:[]=).with('Content-Length', '42')
|
27
|
+
@response.content_length = '42'
|
28
|
+
|
29
|
+
@response.rack_response.should.receive(:[]=).with('Location', '/here/')
|
30
|
+
@response.location = '/here/'
|
31
|
+
|
32
|
+
@response.rack_response.should.receive(:[]=).with('Expires', 'Thu, 09 Aug 2007 05:22:55 GMT')
|
33
|
+
@response.expires = 'Thu, 09 Aug 2007 05:22:55 GMT'
|
34
|
+
end
|
35
|
+
|
36
|
+
it "delegates unknown methods to the Rack response" do
|
37
|
+
@response.rack_response.should.receive(:mclintock!)
|
38
|
+
@response.mclintock!
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
require 'waves/foundations/compact'
|
43
|
+
describe "Response Content-Type header " do
|
44
|
+
before do
|
45
|
+
Test = Module.new { include Waves::Foundations::Compact }
|
46
|
+
Waves << Test
|
47
|
+
end
|
48
|
+
|
49
|
+
after do
|
50
|
+
Waves.applications.clear
|
51
|
+
Object.instance_eval { remove_const(:Test) if const_defined?(:Test) }
|
52
|
+
end
|
53
|
+
|
54
|
+
it "Should set the default content type to text/html" do
|
55
|
+
Test::Resources::Map.on(:get, ["foo"]) { }
|
56
|
+
|
57
|
+
resp = get "/foo"
|
58
|
+
resp.status.should == 200
|
59
|
+
resp.content_type.should == 'text/html'
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
it "Should return content type of ext when its set." do
|
64
|
+
Test::Resources::Map.on(:get, ["foo"], :ext => [:js], :accept => "text/html") { }
|
65
|
+
|
66
|
+
resp = get "/foo.js", "HTTP_ACCEPT" => "text/html"
|
67
|
+
resp.status.should == 200
|
68
|
+
resp.content_type.should == 'text/javascript'
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
describe "Waves::Response#finish" do
|
74
|
+
|
75
|
+
before do
|
76
|
+
@request = Waves::Request.new(env( '/', :method => 'GET' ))
|
77
|
+
@response = Waves::Response.new(@request)
|
78
|
+
end
|
79
|
+
|
80
|
+
it "saves the request session and calls Rack::Response#finish" do
|
81
|
+
@response.rack_response.should.receive(:finish)
|
82
|
+
@response.finish
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
data/test/views/views.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require "#{here = File.dirname(__FILE__)}/../helpers.rb"
|
2
|
+
require 'waves/foundations/classic'
|
3
|
+
require 'waves/layers/renderers/erubis'
|
4
|
+
require 'waves/layers/renderers/markaby'
|
5
|
+
require 'waves/views/templated'
|
6
|
+
require 'fileutils'
|
7
|
+
|
8
|
+
|
9
|
+
describe "A class which has included Waves::Views::Templated" do
|
10
|
+
|
11
|
+
|
12
|
+
before do
|
13
|
+
Test = Module.new {
|
14
|
+
include Waves::Foundations::Classic
|
15
|
+
}
|
16
|
+
Test::Views::Default.class_eval {
|
17
|
+
include Waves::Views::Templated
|
18
|
+
}
|
19
|
+
Dir.chdir(here) do
|
20
|
+
FileUtils.rm_rf "templates" if File.exist? "templates"
|
21
|
+
FileUtils.mkdir_p "templates/test"
|
22
|
+
File.write "templates/test/smurf.mab", "span 'Smurf'"
|
23
|
+
end
|
24
|
+
@view = Test::Views::Test.new( Waves::Request.new(env( '/', :method => 'GET' ) ))
|
25
|
+
end
|
26
|
+
|
27
|
+
after do
|
28
|
+
Waves.applications.clear
|
29
|
+
Object.instance_eval { remove_const(:Test) if const_defined?(:Test) }
|
30
|
+
end
|
31
|
+
|
32
|
+
it "works" do
|
33
|
+
Dir.chdir(here) do
|
34
|
+
@view.render("smurf").should == "<span>Smurf</span>\n"
|
35
|
+
@view.smurf.should == "<span>Smurf</span>\n"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waves
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Yoder
|
@@ -9,38 +9,48 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-11-21 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: extensions
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 0.6.0
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: functor
|
27
27
|
type: :runtime
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.0
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: mongrel
|
37
37
|
type: :runtime
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "
|
41
|
+
- - "="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.1.5
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: markaby
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0.5"
|
44
54
|
version:
|
45
55
|
- !ruby/object:Gem::Dependency
|
46
56
|
name: rack-cache
|
@@ -52,6 +62,26 @@ dependencies:
|
|
52
62
|
- !ruby/object:Gem::Version
|
53
63
|
version: "0.2"
|
54
64
|
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: choice
|
67
|
+
type: :runtime
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.1.3
|
74
|
+
version:
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: english
|
77
|
+
type: :runtime
|
78
|
+
version_requirement:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.3.1
|
84
|
+
version:
|
55
85
|
- !ruby/object:Gem::Dependency
|
56
86
|
name: rack
|
57
87
|
type: :runtime
|
@@ -60,7 +90,17 @@ dependencies:
|
|
60
90
|
requirements:
|
61
91
|
- - ~>
|
62
92
|
- !ruby/object:Gem::Version
|
63
|
-
version: "0
|
93
|
+
version: "1.0"
|
94
|
+
version:
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: hoshi
|
97
|
+
type: :runtime
|
98
|
+
version_requirement:
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.2.1
|
64
104
|
version:
|
65
105
|
- !ruby/object:Gem::Dependency
|
66
106
|
name: filebase
|
@@ -68,29 +108,69 @@ dependencies:
|
|
68
108
|
version_requirement:
|
69
109
|
version_requirements: !ruby/object:Gem::Requirement
|
70
110
|
requirements:
|
71
|
-
- - "
|
111
|
+
- - "="
|
72
112
|
- !ruby/object:Gem::Version
|
73
|
-
version: 0.3.
|
113
|
+
version: 0.3.10
|
74
114
|
version:
|
75
115
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
116
|
+
name: metaid
|
77
117
|
type: :runtime
|
78
118
|
version_requirement:
|
79
119
|
version_requirements: !ruby/object:Gem::Requirement
|
80
120
|
requirements:
|
81
|
-
- -
|
121
|
+
- - "="
|
82
122
|
- !ruby/object:Gem::Version
|
83
|
-
version: "0
|
123
|
+
version: "1.0"
|
84
124
|
version:
|
85
125
|
- !ruby/object:Gem::Dependency
|
86
|
-
name:
|
126
|
+
name: erubis
|
87
127
|
type: :runtime
|
88
128
|
version_requirement:
|
89
129
|
version_requirements: !ruby/object:Gem::Requirement
|
90
130
|
requirements:
|
91
|
-
- -
|
131
|
+
- - "="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 2.6.4
|
134
|
+
version:
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: dyoder-hive
|
137
|
+
type: :runtime
|
138
|
+
version_requirement:
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 0.1.8
|
144
|
+
version:
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: autocode
|
147
|
+
type: :runtime
|
148
|
+
version_requirement:
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 1.0.1
|
154
|
+
version:
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: daemons
|
157
|
+
type: :runtime
|
158
|
+
version_requirement:
|
159
|
+
version_requirements: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - "="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 1.0.10
|
164
|
+
version:
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: sequel
|
167
|
+
type: :runtime
|
168
|
+
version_requirement:
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "="
|
92
172
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
173
|
+
version: 3.2.0
|
94
174
|
version:
|
95
175
|
- !ruby/object:Gem::Dependency
|
96
176
|
name: RedCloth
|
@@ -98,29 +178,49 @@ dependencies:
|
|
98
178
|
version_requirement:
|
99
179
|
version_requirements: !ruby/object:Gem::Requirement
|
100
180
|
requirements:
|
101
|
-
- -
|
181
|
+
- - "="
|
102
182
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
183
|
+
version: 4.1.9
|
104
184
|
version:
|
105
185
|
- !ruby/object:Gem::Dependency
|
106
|
-
name:
|
186
|
+
name: rakegen
|
107
187
|
type: :runtime
|
108
188
|
version_requirement:
|
109
189
|
version_requirements: !ruby/object:Gem::Requirement
|
110
190
|
requirements:
|
111
|
-
- -
|
191
|
+
- - "="
|
112
192
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
193
|
+
version: 0.6.6
|
114
194
|
version:
|
115
195
|
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
196
|
+
name: cassandra
|
117
197
|
type: :runtime
|
118
198
|
version_requirement:
|
119
199
|
version_requirements: !ruby/object:Gem::Requirement
|
120
200
|
requirements:
|
121
|
-
- - "
|
201
|
+
- - "="
|
122
202
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
203
|
+
version: 0.2.3
|
204
|
+
version:
|
205
|
+
- !ruby/object:Gem::Dependency
|
206
|
+
name: bacon
|
207
|
+
type: :development
|
208
|
+
version_requirement:
|
209
|
+
version_requirements: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - ~>
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: "1.0"
|
214
|
+
version:
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: facon
|
217
|
+
type: :development
|
218
|
+
version_requirement:
|
219
|
+
version_requirements: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ~>
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: "0.4"
|
124
224
|
version:
|
125
225
|
description:
|
126
226
|
email: dan@zeraweb.com
|
@@ -131,37 +231,17 @@ extensions: []
|
|
131
231
|
extra_rdoc_files: []
|
132
232
|
|
133
233
|
files:
|
134
|
-
- templates/classic
|
135
|
-
- templates/classic/configurations
|
136
234
|
- templates/classic/configurations/default.rb.erb
|
137
235
|
- templates/classic/configurations/development.rb.erb
|
138
236
|
- templates/classic/configurations/production.rb.erb
|
139
|
-
- templates/classic/
|
140
|
-
- templates/classic/helpers
|
141
|
-
- templates/classic/lib
|
142
|
-
- templates/classic/lib/tasks
|
143
|
-
- templates/classic/models
|
144
|
-
- templates/classic/public
|
145
|
-
- templates/classic/public/css
|
146
|
-
- templates/classic/public/flash
|
147
|
-
- templates/classic/public/images
|
148
|
-
- templates/classic/public/javascript
|
237
|
+
- templates/classic/public/images/favicon.ico
|
149
238
|
- templates/classic/Rakefile
|
150
|
-
- templates/classic/resources
|
151
|
-
- templates/classic/resources/map.rb.erb
|
152
|
-
- templates/classic/schema
|
153
|
-
- templates/classic/schema/migrations
|
239
|
+
- templates/classic/resources/server.rb.erb
|
154
240
|
- templates/classic/startup.rb.erb
|
155
|
-
- templates/classic/
|
156
|
-
- templates/classic/
|
157
|
-
- templates/classic/
|
158
|
-
- templates/classic/
|
159
|
-
- templates/classic/templates/layouts
|
160
|
-
- templates/classic/templates/layouts/default.mab
|
161
|
-
- templates/classic/tmp
|
162
|
-
- templates/classic/tmp/sessions
|
163
|
-
- templates/classic/views
|
164
|
-
- templates/compact
|
241
|
+
- templates/classic/views/css.rb.erb
|
242
|
+
- templates/classic/views/default.rb.erb
|
243
|
+
- templates/classic/views/errors.rb.erb
|
244
|
+
- templates/classic/views/pages.rb.erb
|
165
245
|
- templates/compact/startup.rb.erb
|
166
246
|
- templates/classic/controllers/.gitignore
|
167
247
|
- templates/classic/helpers/.gitignore
|
@@ -173,140 +253,146 @@ files:
|
|
173
253
|
- templates/classic/public/javascript/.gitignore
|
174
254
|
- templates/classic/resources/.gitignore
|
175
255
|
- templates/classic/schema/migrations/.gitignore
|
176
|
-
- templates/classic/tmp/sessions/.gitignore
|
177
256
|
- templates/classic/views/.gitignore
|
178
|
-
- lib/caches/file.rb
|
179
|
-
- lib/caches/memcached.rb
|
180
|
-
- lib/caches/simple.rb
|
181
|
-
- lib/caches/synchronized.rb
|
182
|
-
- lib/commands/console.rb
|
183
|
-
- lib/commands/generate.rb
|
184
|
-
- lib/commands/help.rb
|
185
|
-
- lib/commands/server.rb
|
186
|
-
- lib/dispatchers/base.rb
|
187
|
-
- lib/dispatchers/default.rb
|
188
|
-
- lib/ext/float.rb
|
189
|
-
- lib/ext/hash.rb
|
190
|
-
- lib/ext/integer.rb
|
191
|
-
- lib/ext/kernel.rb
|
192
|
-
- lib/ext/module.rb
|
193
|
-
- lib/ext/object.rb
|
194
|
-
- lib/ext/string.rb
|
195
|
-
- lib/ext/symbol.rb
|
196
|
-
- lib/ext/tempfile.rb
|
197
|
-
- lib/
|
198
|
-
- lib/foundations/
|
199
|
-
- lib/
|
200
|
-
- lib/
|
201
|
-
- lib/helpers/
|
202
|
-
- lib/helpers/
|
203
|
-
- lib/helpers/
|
204
|
-
- lib/helpers/
|
205
|
-
- lib/
|
206
|
-
- lib/
|
207
|
-
- lib/layers/
|
208
|
-
- lib/layers/
|
209
|
-
- lib/layers/
|
210
|
-
- lib/layers/
|
211
|
-
- lib/layers/orm/
|
212
|
-
- lib/layers/orm/providers/
|
213
|
-
- lib/layers/orm/providers/
|
214
|
-
- lib/layers/orm/providers/
|
215
|
-
- lib/layers/orm/providers/
|
216
|
-
- lib/layers/orm/providers/
|
217
|
-
- lib/layers/
|
218
|
-
- lib/layers/
|
219
|
-
- lib/layers/
|
220
|
-
- lib/layers/renderers/
|
221
|
-
- lib/layers/
|
222
|
-
- lib/
|
223
|
-
- lib/matchers/
|
224
|
-
- lib/matchers/
|
225
|
-
- lib/matchers/
|
226
|
-
- lib/matchers/
|
227
|
-
- lib/matchers/
|
228
|
-
- lib/matchers/
|
229
|
-
- lib/matchers/
|
230
|
-
- lib/matchers/
|
231
|
-
- lib/
|
232
|
-
- lib/renderers/mixin.rb
|
233
|
-
- lib/
|
234
|
-
- lib/
|
235
|
-
- lib/
|
236
|
-
- lib/
|
237
|
-
- lib/
|
238
|
-
- lib/
|
239
|
-
- lib/
|
240
|
-
- lib/
|
241
|
-
- lib/
|
242
|
-
- lib/
|
243
|
-
- lib/runtime/
|
244
|
-
- lib/runtime/
|
245
|
-
- lib/runtime/
|
246
|
-
- lib/runtime/
|
247
|
-
- lib/runtime/
|
248
|
-
- lib/
|
249
|
-
- lib/
|
250
|
-
- lib/
|
251
|
-
- lib/
|
252
|
-
- lib/
|
253
|
-
- lib/
|
254
|
-
- lib/
|
257
|
+
- lib/waves/caches/file.rb
|
258
|
+
- lib/waves/caches/memcached.rb
|
259
|
+
- lib/waves/caches/simple.rb
|
260
|
+
- lib/waves/caches/synchronized.rb
|
261
|
+
- lib/waves/commands/console.rb
|
262
|
+
- lib/waves/commands/generate.rb
|
263
|
+
- lib/waves/commands/help.rb
|
264
|
+
- lib/waves/commands/server.rb
|
265
|
+
- lib/waves/dispatchers/base.rb
|
266
|
+
- lib/waves/dispatchers/default.rb
|
267
|
+
- lib/waves/ext/float.rb
|
268
|
+
- lib/waves/ext/hash.rb
|
269
|
+
- lib/waves/ext/integer.rb
|
270
|
+
- lib/waves/ext/kernel.rb
|
271
|
+
- lib/waves/ext/module.rb
|
272
|
+
- lib/waves/ext/object.rb
|
273
|
+
- lib/waves/ext/string.rb
|
274
|
+
- lib/waves/ext/symbol.rb
|
275
|
+
- lib/waves/ext/tempfile.rb
|
276
|
+
- lib/waves/ext/time.rb
|
277
|
+
- lib/waves/foundations/classic.rb
|
278
|
+
- lib/waves/foundations/compact.rb
|
279
|
+
- lib/waves/foundations/rest.rb
|
280
|
+
- lib/waves/helpers/basic.rb
|
281
|
+
- lib/waves/helpers/doc_type.rb
|
282
|
+
- lib/waves/helpers/form.rb
|
283
|
+
- lib/waves/helpers/formatting.rb
|
284
|
+
- lib/waves/layers/mvc/controllers.rb
|
285
|
+
- lib/waves/layers/mvc/extensions.rb
|
286
|
+
- lib/waves/layers/mvc.rb
|
287
|
+
- lib/waves/layers/orm/migration.rb
|
288
|
+
- lib/waves/layers/orm/providers/active_record/tasks/generate.rb
|
289
|
+
- lib/waves/layers/orm/providers/active_record/tasks/schema.rb
|
290
|
+
- lib/waves/layers/orm/providers/active_record.rb
|
291
|
+
- lib/waves/layers/orm/providers/data_mapper.rb
|
292
|
+
- lib/waves/layers/orm/providers/filebase.rb
|
293
|
+
- lib/waves/layers/orm/providers/sequel/tasks/generate.rb
|
294
|
+
- lib/waves/layers/orm/providers/sequel/tasks/schema.rb
|
295
|
+
- lib/waves/layers/orm/providers/sequel.rb
|
296
|
+
- lib/waves/layers/rack/rack_cache.rb
|
297
|
+
- lib/waves/layers/renderers/erubis.rb
|
298
|
+
- lib/waves/layers/renderers/haml.rb
|
299
|
+
- lib/waves/layers/renderers/markaby.rb
|
300
|
+
- lib/waves/layers/text/inflect/english.rb
|
301
|
+
- lib/waves/matchers/accept.rb
|
302
|
+
- lib/waves/matchers/ext.rb
|
303
|
+
- lib/waves/matchers/path.rb
|
304
|
+
- lib/waves/matchers/query.rb
|
305
|
+
- lib/waves/matchers/request.rb
|
306
|
+
- lib/waves/matchers/requested.rb
|
307
|
+
- lib/waves/matchers/resource.rb
|
308
|
+
- lib/waves/matchers/traits.rb
|
309
|
+
- lib/waves/matchers/uri.rb
|
310
|
+
- lib/waves/media/mime_types.rb
|
311
|
+
- lib/waves/renderers/mixin.rb
|
312
|
+
- lib/waves/request/accept.rb
|
313
|
+
- lib/waves/request/request.rb
|
314
|
+
- lib/waves/resources/file_mixin.rb
|
315
|
+
- lib/waves/resources/mixin.rb
|
316
|
+
- lib/waves/resources/paths.rb
|
317
|
+
- lib/waves/response/client_errors.rb
|
318
|
+
- lib/waves/response/packaged.rb
|
319
|
+
- lib/waves/response/redirects.rb
|
320
|
+
- lib/waves/response/response.rb
|
321
|
+
- lib/waves/response/response_mixin.rb
|
322
|
+
- lib/waves/runtime/applications.rb
|
323
|
+
- lib/waves/runtime/configuration.rb
|
324
|
+
- lib/waves/runtime/console.rb
|
325
|
+
- lib/waves/runtime/logger.rb
|
326
|
+
- lib/waves/runtime/mocks.rb
|
327
|
+
- lib/waves/runtime/rackup.rb
|
328
|
+
- lib/waves/runtime/runtime.rb
|
329
|
+
- lib/waves/runtime/server.rb
|
330
|
+
- lib/waves/servers/base.rb
|
331
|
+
- lib/waves/servers/mongrel.rb
|
332
|
+
- lib/waves/servers/webrick.rb
|
333
|
+
- lib/waves/tasks/gem.rb
|
334
|
+
- lib/waves/tasks/generate.rb
|
335
|
+
- lib/waves/views/cassy.rb
|
336
|
+
- lib/waves/views/errors.rb
|
337
|
+
- lib/waves/views/mixin.rb
|
338
|
+
- lib/waves/views/templated.rb
|
255
339
|
- lib/waves.rb
|
256
|
-
- lib/layers/orm/providers/active_record/migrations/empty.rb.erb
|
257
|
-
- lib/layers/orm/providers/sequel/migrations/empty.rb.erb
|
340
|
+
- lib/waves/layers/orm/providers/active_record/migrations/empty.rb.erb
|
341
|
+
- lib/waves/layers/orm/providers/sequel/migrations/empty.rb.erb
|
258
342
|
- doc/HISTORY
|
259
343
|
- doc/LICENSE
|
260
344
|
- doc/README
|
261
345
|
- doc/VERSION
|
262
|
-
- samples/
|
263
|
-
- samples/
|
264
|
-
- samples/blog/configurations
|
346
|
+
- samples/basic/basic_startup.rb
|
347
|
+
- samples/basic/config.ru
|
265
348
|
- samples/blog/configurations/default.rb
|
266
349
|
- samples/blog/configurations/development.rb
|
267
350
|
- samples/blog/configurations/production.rb
|
268
|
-
- samples/blog/log
|
269
|
-
- samples/blog/log/waves.production
|
270
|
-
- samples/blog/models
|
271
351
|
- samples/blog/models/comment.rb
|
272
352
|
- samples/blog/models/entry.rb
|
273
|
-
- samples/blog/public
|
274
|
-
- samples/blog/public/css
|
275
353
|
- samples/blog/public/css/site.css
|
276
|
-
- samples/blog/public/javascript
|
277
354
|
- samples/blog/public/javascript/jquery-1.2.6.min.js
|
278
355
|
- samples/blog/public/javascript/site.js
|
279
356
|
- samples/blog/Rakefile
|
280
|
-
- samples/blog/resources
|
281
357
|
- samples/blog/resources/entry.rb
|
282
358
|
- samples/blog/resources/map.rb
|
283
|
-
- samples/blog/schema
|
284
|
-
- samples/blog/schema/migrations
|
285
359
|
- samples/blog/schema/migrations/001_initial_schema.rb
|
286
360
|
- samples/blog/schema/migrations/002_add_comments.rb
|
287
|
-
- samples/blog/schema/migrations/templates
|
288
361
|
- samples/blog/schema/migrations/templates/empty.rb.erb
|
289
362
|
- samples/blog/startup.rb
|
290
|
-
- samples/blog/templates
|
291
|
-
- samples/blog/templates/comment
|
292
363
|
- samples/blog/templates/comment/add.mab
|
293
364
|
- samples/blog/templates/comment/list.mab
|
294
|
-
- samples/blog/templates/entry
|
295
365
|
- samples/blog/templates/entry/edit.mab
|
296
366
|
- samples/blog/templates/entry/list.mab
|
297
367
|
- samples/blog/templates/entry/show.mab
|
298
368
|
- samples/blog/templates/entry/summary.mab
|
299
|
-
- samples/blog/templates/errors
|
300
369
|
- samples/blog/templates/errors/not_found_404.mab
|
301
370
|
- samples/blog/templates/errors/server_error_500.mab
|
302
|
-
- samples/blog/templates/layouts
|
303
371
|
- samples/blog/templates/layouts/default.mab
|
304
|
-
- samples/blog/templates/waves
|
305
372
|
- samples/blog/templates/waves/status.mab
|
306
|
-
-
|
307
|
-
-
|
373
|
+
- test/ext/object.rb
|
374
|
+
- test/ext/shortcuts.rb
|
375
|
+
- test/helpers.rb
|
376
|
+
- test/match/accept.rb
|
377
|
+
- test/match/ext.rb
|
378
|
+
- test/match/methods.rb
|
379
|
+
- test/match/params.rb
|
380
|
+
- test/match/path.rb
|
381
|
+
- test/match/query.rb
|
382
|
+
- test/match/request.rb
|
383
|
+
- test/match/requested.rb
|
384
|
+
- test/match/uri.rb
|
385
|
+
- test/process/request.rb
|
386
|
+
- test/process/resource.rb
|
387
|
+
- test/resources/path.rb
|
388
|
+
- test/runtime/configurations.rb
|
389
|
+
- test/runtime/request.rb
|
390
|
+
- test/runtime/response.rb
|
391
|
+
- test/views/views.rb
|
308
392
|
has_rdoc: true
|
309
393
|
homepage: http://rubywaves.com
|
394
|
+
licenses: []
|
395
|
+
|
310
396
|
post_install_message:
|
311
397
|
rdoc_options: []
|
312
398
|
|
@@ -327,9 +413,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
413
|
requirements: []
|
328
414
|
|
329
415
|
rubyforge_project: waves
|
330
|
-
rubygems_version: 1.
|
416
|
+
rubygems_version: 1.3.5
|
331
417
|
signing_key:
|
332
|
-
specification_version:
|
418
|
+
specification_version: 3
|
333
419
|
summary: Open-source framework for building Ruby-based Web applications.
|
334
420
|
test_files: []
|
335
421
|
|