bivouac 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +15 -0
- data/bin/bivouac +5 -10
- data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +46 -37
- data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +27 -20
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +45 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +1 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +1 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +1 -1
- data/examples/bivouac_sample/Rakefile +0 -0
- data/examples/bivouac_sample/app/controllers/toggle_sortable.rb +2 -1
- data/examples/bivouac_sample/app/views/_sortable_result.rb +1 -1
- data/examples/bivouac_sample/script/console +0 -0
- data/examples/bivouac_sample/script/generate +0 -0
- data/examples/bivouac_sample/script/plugin +0 -0
- data/examples/bivouac_sample/script/server +0 -0
- data/examples/blog/Rakefile +56 -0
- data/examples/blog/app/blog.rb +107 -0
- data/examples/blog/app/controllers/comment.rb +17 -0
- data/examples/blog/app/controllers/index.rb +15 -0
- data/examples/blog/app/controllers/login.rb +33 -0
- data/examples/blog/app/controllers/logout.rb +15 -0
- data/examples/blog/app/controllers/not_found.rb +14 -0
- data/examples/blog/app/controllers/post.rb +48 -0
- data/examples/blog/app/helpers/_helpers.rb +30 -0
- data/examples/blog/app/helpers/blog.rb +14 -0
- data/examples/blog/app/models/comment.rb +18 -0
- data/examples/blog/app/models/post.rb +19 -0
- data/examples/blog/app/models/user.rb +12 -0
- data/examples/blog/app/views/_partials.rb +81 -0
- data/examples/blog/app/views/index/index.rb +23 -0
- data/examples/blog/app/views/layouts/default_layout.rb +40 -0
- data/examples/blog/app/views/login/login.rb +27 -0
- data/examples/blog/app/views/not_found.rb +13 -0
- data/examples/blog/app/views/post/add.rb +12 -0
- data/examples/blog/app/views/post/edit.rb +12 -0
- data/examples/blog/app/views/post/view.rb +14 -0
- data/examples/blog/config/console.rc +12 -0
- data/examples/blog/config/database.yml +3 -0
- data/examples/blog/config/environment.rb +58 -0
- data/examples/blog/db/blog.db +0 -0
- data/examples/blog/db/create.rb +11 -0
- data/examples/blog/db/migrate/001_users.rb +22 -0
- data/examples/blog/db/migrate/002_posts.rb +24 -0
- data/examples/blog/db/migrate/003_comments.rb +24 -0
- data/examples/blog/log/Blog.log +382 -0
- data/examples/{blog_goh → blog}/public/images/camping.png +0 -0
- data/examples/{blog_goh → blog}/public/index.html +3 -2
- data/examples/blog/public/javascripts/builder.js +136 -0
- data/examples/blog/public/javascripts/controls.js +965 -0
- data/examples/blog/public/javascripts/dragdrop.js +974 -0
- data/examples/blog/public/javascripts/effects.js +1122 -0
- data/examples/blog/public/javascripts/prototype.js +4320 -0
- data/examples/blog/public/javascripts/scriptaculous.js +58 -0
- data/examples/blog/public/javascripts/slider.js +275 -0
- data/examples/blog/public/javascripts/sound.js +55 -0
- data/examples/blog/public/javascripts/unittest.js +568 -0
- data/examples/blog/public/stylesheets/autocomplete.css +22 -0
- data/examples/blog/public/stylesheets/blog.css +107 -0
- data/examples/blog/script/console +12 -0
- data/examples/blog/script/generate +17 -0
- data/examples/blog/script/plugin +16 -0
- data/examples/blog/script/server +135 -0
- data/examples/blog/test/test_comment.rb +22 -0
- data/examples/blog/test/test_index.rb +22 -0
- data/examples/blog/test/test_login.rb +22 -0
- data/examples/blog/test/test_logout.rb +18 -0
- data/examples/blog/test/test_post.rb +30 -0
- data/examples/blog/test/test_post_new.rb +22 -0
- data/lib/bivouac.rb +2 -2
- data/lib/bivouac/commands/generate.rb +48 -8
- data/lib/bivouac/commands/plugin.rb +30 -15
- data/lib/bivouac/ext/filtering_camping.rb +46 -0
- data/lib/bivouac/helpers/view/goh/html.rb +9 -0
- data/lib/bivouac/helpers/view/goh/scriptaculous.rb +12 -8
- data/lib/bivouac/tasks/bivouac.rb +1 -0
- data/lib/bivouac/tasks/framework.rake +8 -8
- data/lib/bivouac/tasks/plugins.rake +17 -1
- data/lib/bivouac/template.rb +0 -0
- data/lib/bivouac/template/{application_goh.rb → application.rb} +36 -12
- data/lib/bivouac/template/application/{helpers_goh.rb → helpers.rb} +1 -1
- data/lib/bivouac/template/console.rb +2 -4
- data/lib/bivouac/template/environment.rb +1 -1
- data/lib/bivouac/template/generate.rb +0 -0
- data/lib/bivouac/template/generate/create.rb +0 -0
- data/lib/bivouac/template/generate/helper.rb +12 -0
- data/lib/bivouac/template/generate/migrate.rb +0 -0
- data/lib/bivouac/template/generate/migrate_end.rb +1 -0
- data/lib/bivouac/template/plugin.rb +6 -1
- data/lib/bivouac/template/server.rb +124 -3
- data/lib/bivouac/template/static/builder.js +19 -19
- data/lib/bivouac/template/static/controls.js +74 -74
- data/lib/bivouac/template/static/dragdrop.js +167 -166
- data/lib/bivouac/template/static/effects.js +171 -163
- data/lib/bivouac/template/static/not_found_controller.rb +8 -4
- data/lib/bivouac/template/static/prototype.js +218 -119
- data/lib/bivouac/template/static/scriptaculous.js +22 -20
- data/lib/bivouac/template/static/slider.js +39 -39
- data/lib/bivouac/template/static/sound.js +11 -11
- data/lib/bivouac/template/static/unittest.js +16 -16
- metadata +96 -60
- data/examples/blog_goh/app/blog.rb +0 -72
- data/examples/blog_goh/app/controllers/add.rb +0 -19
- data/examples/blog_goh/app/controllers/comment.rb +0 -9
- data/examples/blog_goh/app/controllers/edit.rb +0 -18
- data/examples/blog_goh/app/controllers/index.rb +0 -8
- data/examples/blog_goh/app/controllers/info.rb +0 -11
- data/examples/blog_goh/app/controllers/login.rb +0 -15
- data/examples/blog_goh/app/controllers/logout.rb +0 -8
- data/examples/blog_goh/app/controllers/view.rb +0 -9
- data/examples/blog_goh/app/models/comment.rb +0 -5
- data/examples/blog_goh/app/models/post.rb +0 -5
- data/examples/blog_goh/app/models/user.rb +0 -4
- data/examples/blog_goh/app/views/_form.rb +0 -16
- data/examples/blog_goh/app/views/_login.rb +0 -13
- data/examples/blog_goh/app/views/_post.rb +0 -9
- data/examples/blog_goh/app/views/add.rb +0 -9
- data/examples/blog_goh/app/views/edit.rb +0 -9
- data/examples/blog_goh/app/views/index.rb +0 -12
- data/examples/blog_goh/app/views/layout.rb +0 -18
- data/examples/blog_goh/app/views/login.rb +0 -6
- data/examples/blog_goh/app/views/logout.rb +0 -6
- data/examples/blog_goh/app/views/view.rb +0 -20
- data/examples/blog_goh/config/environment.rb +0 -27
- data/examples/blog_goh/db/Blog.db +0 -0
- data/examples/blog_goh/db/create.rb +0 -8
- data/examples/blog_goh/db/migrate/comment.rb +0 -15
- data/examples/blog_goh/db/migrate/post.rb +0 -15
- data/examples/blog_goh/db/migrate/user.rb +0 -15
- data/examples/blog_goh/log/Blog.log +0 -75
- data/examples/blog_goh/public/stylesheets/style.css +0 -10
- data/examples/blog_goh/script/generate +0 -3
- data/examples/blog_goh/script/server +0 -5
- data/lib/bivouac/template/application/postamble.rb +0 -195
- data/lib/camping/cookies_sessions.rb +0 -39
@@ -0,0 +1,22 @@
|
|
1
|
+
div.autocomplete {
|
2
|
+
position:absolute;
|
3
|
+
width:250px;
|
4
|
+
background-color:white;
|
5
|
+
border:1px solid #888;
|
6
|
+
margin:0px;
|
7
|
+
padding:0px;
|
8
|
+
}
|
9
|
+
div.autocomplete ul {
|
10
|
+
list-style-type:none;
|
11
|
+
margin:0px;
|
12
|
+
padding:0px;
|
13
|
+
}
|
14
|
+
div.autocomplete ul li.selected { background-color: #ffb;}
|
15
|
+
div.autocomplete ul li {
|
16
|
+
list-style-type:none;
|
17
|
+
display:block;
|
18
|
+
margin:0;
|
19
|
+
padding:2px;
|
20
|
+
height:32px;
|
21
|
+
cursor:pointer;
|
22
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
* {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
}
|
5
|
+
|
6
|
+
body {
|
7
|
+
font: normal 14px Arial, 'Bitstream Vera Sans', Helvetica, sans-serif;
|
8
|
+
line-height: 1.5;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1, h2, h3, h4 {
|
12
|
+
font-family: Georgia, serif;
|
13
|
+
font-weight: normal;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
background-color: #EEE;
|
18
|
+
border-bottom: 5px solid #6F812D;
|
19
|
+
outline: 5px solid #9CB441;
|
20
|
+
font-weight: normal;
|
21
|
+
font-size: 3em;
|
22
|
+
padding: 0.5em 0;
|
23
|
+
text-align: center;
|
24
|
+
}
|
25
|
+
|
26
|
+
h1 a { color: #143D55; text-decoration: none }
|
27
|
+
h1 a:hover { color: #143D55; text-decoration: underline }
|
28
|
+
|
29
|
+
h2 {
|
30
|
+
font-size: 2em;
|
31
|
+
color: #287AA9;
|
32
|
+
}
|
33
|
+
|
34
|
+
#wrapper {
|
35
|
+
margin: 3em auto;
|
36
|
+
width: 700px;
|
37
|
+
}
|
38
|
+
|
39
|
+
p {
|
40
|
+
margin-bottom: 1em;
|
41
|
+
}
|
42
|
+
|
43
|
+
p.info, p#footer {
|
44
|
+
color: #999;
|
45
|
+
margin-left: 1em;
|
46
|
+
}
|
47
|
+
|
48
|
+
p.info a, p#footer a {
|
49
|
+
color: #999;
|
50
|
+
}
|
51
|
+
|
52
|
+
p.info a:hover, p#footer a:hover {
|
53
|
+
text-decoration: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
div.comment {
|
57
|
+
border: 1px solid #999;
|
58
|
+
padding: 5px;
|
59
|
+
}
|
60
|
+
|
61
|
+
div.comment p.cinfo {
|
62
|
+
color: #999;
|
63
|
+
}
|
64
|
+
|
65
|
+
a {
|
66
|
+
color: #6F812D;
|
67
|
+
}
|
68
|
+
|
69
|
+
a:hover {
|
70
|
+
color: #9CB441;
|
71
|
+
}
|
72
|
+
|
73
|
+
hr {
|
74
|
+
border-width: 5px 0;
|
75
|
+
border-style: solid;
|
76
|
+
border-color: #9CB441;
|
77
|
+
border-bottom-color: #6F812D;
|
78
|
+
height: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
p#footer {
|
82
|
+
font-size: 0.9em;
|
83
|
+
margin: 0;
|
84
|
+
padding: 1em;
|
85
|
+
text-align: center;
|
86
|
+
}
|
87
|
+
|
88
|
+
label {
|
89
|
+
display: inline-block;
|
90
|
+
width: 100%;
|
91
|
+
}
|
92
|
+
|
93
|
+
input, textarea {
|
94
|
+
margin-bottom: 1em;
|
95
|
+
width: 200px;
|
96
|
+
}
|
97
|
+
|
98
|
+
input.submit {
|
99
|
+
float: left;
|
100
|
+
width: auto;
|
101
|
+
}
|
102
|
+
|
103
|
+
textarea {
|
104
|
+
font: normal 14px Arial, 'Bitstream Vera Sans', Helvetica, sans-serif;
|
105
|
+
height: 300px;
|
106
|
+
width: 400px;
|
107
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Project Blog
|
4
|
+
#
|
5
|
+
# Created using bivouac on Thu Nov 13 11:58:26 +0100 2008.
|
6
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
7
|
+
#
|
8
|
+
# DO NOT EDIT THIS FILE OR YOU REALLY KNOW WHAT YOU ARE DOING
|
9
|
+
#
|
10
|
+
require 'rubygems'
|
11
|
+
server = File.dirname(__FILE__) + "/server"
|
12
|
+
system "ruby #{server} -C #{ARGV.join(' ')}"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Project Blog
|
4
|
+
#
|
5
|
+
# Created using bivouac on Thu Nov 13 11:58:26 +0100 2008.
|
6
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
7
|
+
#
|
8
|
+
# DO NOT EDIT THIS FILE OR YOU REALLY KNOW WHAT YOU ARE DOING
|
9
|
+
#
|
10
|
+
require 'rubygems'
|
11
|
+
|
12
|
+
def filePath( from, *data )
|
13
|
+
File.join File.expand_path(File.dirname(from)), data
|
14
|
+
end
|
15
|
+
|
16
|
+
Dir.glob( filePath( __FILE__, '../plugins/**/generators/*.rb' ) ).each { |p| require p }
|
17
|
+
require 'bivouac/commands/generate'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Project Blog
|
4
|
+
#
|
5
|
+
# Created using bivouac on Thu Nov 13 11:58:26 +0100 2008.
|
6
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
7
|
+
#
|
8
|
+
# DO NOT EDIT THIS FILE OR YOU REALLY KNOW WHAT YOU ARE DOING
|
9
|
+
#
|
10
|
+
require 'rubygems'
|
11
|
+
DIRNAME = File.expand_path( File.dirname(__FILE__) )
|
12
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( DIRNAME + "/../" )
|
13
|
+
require ENV['BIVOUAC_ROOT'] + '/config/environment.rb'
|
14
|
+
require 'bivouac/commands/plugin'
|
15
|
+
|
16
|
+
Bivouac::Plugin.new( ARGV ).run( )
|
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Project Blog
|
4
|
+
#
|
5
|
+
# Created using bivouac on Thu Nov 13 11:58:26 +0100 2008.
|
6
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
7
|
+
#
|
8
|
+
# DO NOT EDIT THIS FILE OR YOU REALLY KNOW WHAT YOU ARE DOING
|
9
|
+
#
|
10
|
+
#!/usr/bin/env ruby
|
11
|
+
|
12
|
+
trap("INT") { exit }
|
13
|
+
require 'rubygems'
|
14
|
+
require 'optparse'
|
15
|
+
require 'ostruct'
|
16
|
+
require 'stringio'
|
17
|
+
require 'camping'
|
18
|
+
require 'camping/server'
|
19
|
+
|
20
|
+
## If the app run on Windows, check if win32/process is installed
|
21
|
+
windows_process = false
|
22
|
+
if /Windows/.match( ENV['OS'] )
|
23
|
+
begin
|
24
|
+
require 'win32/process'
|
25
|
+
windows_process = true
|
26
|
+
rescue LoadError => e
|
27
|
+
warn "`win32-process' is not installed!"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
require 'simple-daemon'
|
31
|
+
|
32
|
+
# Set environment
|
33
|
+
DIRNAME = File.expand_path( File.dirname(__FILE__) )
|
34
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( DIRNAME + "/../" )
|
35
|
+
bivouac_app = File.expand_path( ENV['BIVOUAC_ROOT'] + "/app/blog.rb" )
|
36
|
+
|
37
|
+
# Daemonize ?
|
38
|
+
server_daemonize = nil
|
39
|
+
|
40
|
+
# Read configuration
|
41
|
+
require( ENV['BIVOUAC_ROOT'] + "/config/environment.rb" )
|
42
|
+
config = Bivouac::Environment.new( )
|
43
|
+
|
44
|
+
# Initialize database connection
|
45
|
+
database_connection = config.environment.db
|
46
|
+
if database_connection[:adapter] =~ /sqlite/
|
47
|
+
database_connection[:database] = ENV['BIVOUAC_ROOT'] + "/" + database_connection[:database]
|
48
|
+
end
|
49
|
+
|
50
|
+
# Create config structure for camping server
|
51
|
+
cs_conf = OpenStruct.new(
|
52
|
+
:host => config.environment.host,
|
53
|
+
:port => config.environment.port,
|
54
|
+
:database => database_connection,
|
55
|
+
:log => ENV['BIVOUAC_ROOT'] + "/log/Blog.log"
|
56
|
+
)
|
57
|
+
|
58
|
+
# Force server if specified
|
59
|
+
camping_server_configuration.server = config.environment.server_force if config.environment.server_force
|
60
|
+
|
61
|
+
# Parse options
|
62
|
+
opts = OptionParser.new do |opts|
|
63
|
+
opts.banner = "Usage: server [options]"
|
64
|
+
opts.separator ""
|
65
|
+
opts.separator "Specific options:"
|
66
|
+
|
67
|
+
opts.on("-h", "--host HOSTNAME", "Host for web server to bind to (#{cs_conf.host})") { |cs_conf.host| }
|
68
|
+
opts.on("-p", "--port NUM", "Port for web server (defaults to #{cs_conf.port})") { |cs_conf.port| }
|
69
|
+
opts.on("-C", "--console", "Run in console mode with IRB") {
|
70
|
+
cs_conf.server = "console";
|
71
|
+
ENV['IRBRC'] = ENV['BIVOUAC_ROOT'] + "/config/console.rc"
|
72
|
+
}
|
73
|
+
server_list = ["mongrel", "webrick", "console"]
|
74
|
+
opts.on("-s", "--server NAME", server_list, "Server to force (#{server_list.join(', ')})") { |cs_conf.server| }
|
75
|
+
opts.on("-d", "--daemon STATUS", ["start","stop","restart"], "Make server run as a Daemon.") { |server_daemonize| }
|
76
|
+
|
77
|
+
opts.separator ""
|
78
|
+
opts.separator "Common options:"
|
79
|
+
|
80
|
+
# No argument, shows at tail. This will print an options summary.
|
81
|
+
# Try it and see!
|
82
|
+
opts.on_tail("-?", "--help", "Show this message") do
|
83
|
+
puts opts
|
84
|
+
exit
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
begin
|
89
|
+
opts.parse! ARGV
|
90
|
+
rescue OptionParser::ParseError => ex
|
91
|
+
STDERR.puts "!! #{ex.message}"
|
92
|
+
puts "** use `server --help` for more details..."
|
93
|
+
exit 1
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check that mongrel exists
|
97
|
+
if cs_conf.server.nil? || cs_conf.server == "mongrel"
|
98
|
+
begin
|
99
|
+
require 'mongrel'
|
100
|
+
cs_conf.server = "mongrel"
|
101
|
+
rescue LoadError
|
102
|
+
puts "!! could not load mongrel. Falling back to webrick."
|
103
|
+
cs_conf.server = "webrick"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# Create SimpleDaemon class
|
108
|
+
SimpleDaemon::WORKING_DIRECTORY = ENV['BIVOUAC_ROOT'] + "/log/"
|
109
|
+
class BlogDaemon < SimpleDaemon::Base
|
110
|
+
@@server = nil
|
111
|
+
|
112
|
+
def self.server=(s)
|
113
|
+
@@server = s
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.start
|
117
|
+
@@server.start
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.stop
|
121
|
+
@@server = nil
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Setup Camping Server
|
126
|
+
server = Camping::Server::Base.new(cs_conf, bivouac_app)
|
127
|
+
|
128
|
+
# Start or demonize
|
129
|
+
unless server_daemonize.nil?
|
130
|
+
silence_warnings { ARGV = [server_daemonize] }
|
131
|
+
BlogDaemon.server = server
|
132
|
+
BlogDaemon.daemonize
|
133
|
+
else
|
134
|
+
server.start
|
135
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 14:17:05 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
def test_comment_add
|
19
|
+
get '/comment/add'
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 12:28:11 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
def test_index_index
|
19
|
+
get '/index/index'
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 12:47:18 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
def test_login_login
|
19
|
+
get '/login/login'
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 12:46:12 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 12:39:41 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
def test_post_add
|
19
|
+
get '/post/add'
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
def test_post_view
|
23
|
+
get '/post/view'
|
24
|
+
assert_response :success
|
25
|
+
end
|
26
|
+
def test_post_edit
|
27
|
+
get '/post/edit'
|
28
|
+
assert_response :success
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Project Blog
|
3
|
+
#
|
4
|
+
# Created using bivouac on Thu Nov 13 12:33:11 +0100 2008.
|
5
|
+
# Copyright (c) 2008 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'mosquito'
|
10
|
+
|
11
|
+
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
12
|
+
require ENV['BIVOUAC_ROOT'] + "/app/blog"
|
13
|
+
|
14
|
+
Blog.create if Blog.respond_to? :create
|
15
|
+
include Blog::Models
|
16
|
+
|
17
|
+
class TestsBlog < Camping::FunctionalTest
|
18
|
+
def test_post_new_add
|
19
|
+
get '/post_new/add'
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
end
|