bivouac 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/AUTHORS +0 -0
  2. data/COPYING +0 -0
  3. data/README +14 -2
  4. data/bin/bivouac +0 -0
  5. data/examples/blog_erb/app/controllers/add.rb +19 -0
  6. data/examples/blog_erb/app/controllers/blog.rb +84 -0
  7. data/examples/blog_erb/app/controllers/comment.rb +9 -0
  8. data/examples/blog_erb/app/controllers/edit.rb +18 -0
  9. data/examples/blog_erb/app/controllers/index.rb +8 -0
  10. data/examples/blog_erb/app/controllers/info.rb +11 -0
  11. data/examples/blog_erb/app/controllers/login.rb +15 -0
  12. data/examples/blog_erb/app/controllers/logout.rb +8 -0
  13. data/examples/blog_erb/app/controllers/view.rb +9 -0
  14. data/examples/blog_erb/app/models/comment.rb +5 -0
  15. data/examples/blog_erb/app/models/post.rb +5 -0
  16. data/examples/blog_erb/app/models/user.rb +4 -0
  17. data/examples/blog_erb/app/views/add.html +18 -0
  18. data/examples/blog_erb/app/views/edit.html +18 -0
  19. data/examples/blog_erb/app/views/index.html +12 -0
  20. data/examples/blog_erb/app/views/layout.html +12 -0
  21. data/examples/blog_erb/app/views/login.html +2 -0
  22. data/examples/blog_erb/app/views/logout.html +2 -0
  23. data/examples/blog_erb/app/views/view.html +20 -0
  24. data/examples/blog_erb/config/environment.rb +27 -0
  25. data/examples/blog_erb/db/create.rb +8 -0
  26. data/examples/blog_erb/db/migrate/comment.rb +15 -0
  27. data/examples/blog_erb/db/migrate/post.rb +15 -0
  28. data/examples/blog_erb/db/migrate/user.rb +15 -0
  29. data/examples/blog_erb/log/Blog.log +112 -0
  30. data/examples/blog_erb/public/images/camping.png +0 -0
  31. data/examples/blog_erb/public/index.html +242 -0
  32. data/examples/blog_erb/public/stylesheets/style.css +10 -0
  33. data/examples/blog_erb/script/generate +3 -0
  34. data/examples/blog_erb/script/server +5 -0
  35. data/examples/blog_goh/app/controllers/add.rb +19 -0
  36. data/examples/blog_goh/app/controllers/blog.rb +76 -0
  37. data/examples/blog_goh/app/controllers/comment.rb +9 -0
  38. data/examples/blog_goh/app/controllers/edit.rb +18 -0
  39. data/examples/blog_goh/app/controllers/index.rb +8 -0
  40. data/examples/blog_goh/app/controllers/info.rb +11 -0
  41. data/examples/blog_goh/app/controllers/login.rb +15 -0
  42. data/examples/blog_goh/app/controllers/logout.rb +8 -0
  43. data/examples/blog_goh/app/controllers/view.rb +9 -0
  44. data/examples/blog_goh/app/models/comment.rb +5 -0
  45. data/examples/blog_goh/app/models/post.rb +5 -0
  46. data/examples/blog_goh/app/models/user.rb +4 -0
  47. data/examples/blog_goh/app/views/_form.rb +16 -0
  48. data/examples/blog_goh/app/views/_login.rb +13 -0
  49. data/examples/blog_goh/app/views/_post.rb +9 -0
  50. data/examples/blog_goh/app/views/add.rb +9 -0
  51. data/examples/blog_goh/app/views/edit.rb +9 -0
  52. data/examples/blog_goh/app/views/index.rb +12 -0
  53. data/examples/blog_goh/app/views/layout.rb +18 -0
  54. data/examples/blog_goh/app/views/login.rb +6 -0
  55. data/examples/blog_goh/app/views/logout.rb +6 -0
  56. data/examples/blog_goh/app/views/view.rb +20 -0
  57. data/examples/blog_goh/config/environment.rb +27 -0
  58. data/examples/blog_goh/db/create.rb +4 -0
  59. data/examples/blog_goh/db/migrate/comment.rb +15 -0
  60. data/examples/blog_goh/db/migrate/post.rb +15 -0
  61. data/examples/blog_goh/db/migrate/user.rb +15 -0
  62. data/examples/blog_goh/log/camping.log +19 -0
  63. data/examples/blog_goh/public/images/camping.png +0 -0
  64. data/examples/blog_goh/public/index.html +242 -0
  65. data/examples/blog_goh/public/stylesheets/style.css +10 -0
  66. data/examples/blog_goh/script/generate +3 -0
  67. data/examples/blog_goh/script/server +5 -0
  68. data/lib/bivouac/commands/generate.rb +87 -40
  69. data/lib/bivouac/commands/server.rb +0 -0
  70. data/lib/bivouac/template/application/postamble_cgi.rb +2 -2
  71. data/lib/bivouac/template/application/postamble_fastcgi.rb +2 -2
  72. data/lib/bivouac/template/application/postamble_mongrel.rb +0 -0
  73. data/lib/bivouac/template/application/postamble_none.rb +0 -0
  74. data/lib/bivouac/template/application/postamble_webrick.rb +2 -2
  75. data/lib/bivouac/template/application_erb.rb +3 -1
  76. data/lib/bivouac/template/application_goh.rb +1 -0
  77. data/lib/bivouac/template/application_jof.rb +5 -0
  78. data/lib/bivouac/template/environment.rb +0 -0
  79. data/lib/bivouac/template/generate/controller.rb +1 -1
  80. data/lib/bivouac/template/generate/create.rb +5 -1
  81. data/lib/bivouac/template/generate/migrate.rb +0 -0
  82. data/lib/bivouac/template/generate/model.rb +0 -0
  83. data/lib/bivouac/template/generate/view_erb.rb +2 -0
  84. data/lib/bivouac/template/generate/{view.rb → view_goh.rb} +0 -0
  85. data/lib/bivouac/template/generate.rb +0 -0
  86. data/lib/bivouac/template/server.rb +0 -0
  87. data/lib/bivouac/template/static/camping.png +0 -0
  88. data/lib/bivouac/template/static/index.html +0 -0
  89. data/lib/bivouac/template/static/index.rb +0 -0
  90. data/lib/bivouac/template.rb +0 -0
  91. data/lib/bivouac.rb +0 -0
  92. data/setup.rb +1585 -0
  93. data/test/test_bivouac.rb +0 -0
  94. data/test/test_template.rb +0 -0
  95. metadata +99 -14
  96. data/doc/created.rid +0 -1
  97. data/doc/files/AUTHORS.html +0 -95
  98. data/doc/files/COPYING.html +0 -519
  99. data/doc/files/README.html +0 -160
  100. data/doc/index.html +0 -10
  101. data/doc/permalink.gif +0 -0
  102. data/doc/rdoc-style.css +0 -106
  103. data/doc/rubyfr.png +0 -0
data/AUTHORS CHANGED
File without changes
data/COPYING CHANGED
File without changes
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = Bivouac - 0.0.1
1
+ = Bivouac - 0.0.3
2
2
 
3
3
  Copyright (C) 2007 Gregoire Lejeune
4
4
 
@@ -8,10 +8,22 @@ Copyright (C) 2007 Gregoire Lejeune
8
8
 
9
9
  == DESCRIPTION:
10
10
 
11
- Bivouac is a simple generator for camping.
11
+ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/camping].
12
12
 
13
13
  == FEATURES/PROBLEMS:
14
14
 
15
+ === 0.0.3:
16
+ * Model generation is now ok (i hope)
17
+ * It's now possible to create "Get Out of Hand" and "Eruby/Erb" projects
18
+ * script/generate have 3 new options :
19
+ * <tt>-v</tt> if you don't want to create the view
20
+ * <tt>-d</tt> if you don't want the default route
21
+ * <tt>-r</tt> if you want to add more routes
22
+ * Only sqlite3 is supported
23
+
24
+ === 0.0.2:
25
+ * So many problems!
26
+
15
27
  === 0.0.1:
16
28
  * Can't generate models and migrates
17
29
 
data/bin/bivouac CHANGED
File without changes
@@ -0,0 +1,19 @@
1
+ module Blog::Controllers
2
+ class Add
3
+ def get
4
+ unless @state.user_id.blank?
5
+ @user = User.find @state.user_id
6
+ @post = Post.new
7
+ end
8
+ render :add, true
9
+ end
10
+ def post
11
+ unless @state.user_id.blank?
12
+ post = Post.create :title => input.post_title,
13
+ :body => input.post_body,
14
+ :user_id => @state.user_id
15
+ redirect View, post
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ #
4
+ # Project Blog
5
+ #
6
+ # Created using bivouac on Tue Jul 31 18:19:12 +0200 2007.
7
+ # Copyright (c) 2007 __My__. All rights reserved.
8
+ #
9
+
10
+ require 'rubygems'
11
+ require 'camping'
12
+ require 'camping/session'
13
+ require 'mime/types'
14
+ require 'bivouac'
15
+
16
+ include Bivouac
17
+
18
+ begin
19
+ require 'erubis'
20
+ ERB = Erubis::Eruby
21
+ rescue MissingSourceFile
22
+ require 'erb'
23
+ end
24
+
25
+ Camping.goes :Blog
26
+
27
+ module Blog
28
+ def render(m, layout=false)
29
+ content = ERB.new(IO.read("#{File.dirname(__FILE__)}/../views/#{m}.html")).result(binding)
30
+ content = ERB.new(IO.read("#{File.dirname(__FILE__)}/../views/layout.html")).result(binding) if layout
31
+ return content
32
+ end
33
+ end
34
+
35
+ # Load helpers from app/helpers
36
+ files( '../helpers' ) { |file| require( file ) }
37
+
38
+ # Load models from app/models
39
+ files( '../models' ) { |file| require( file ) }
40
+
41
+ # Load database schema from db/migrate
42
+ files( '../../db/migrate' ) { |file| require( file ) }
43
+
44
+ # Load controllers from app/controllers
45
+ files( '../controllers', :except => [File.basename(__FILE__)] ) { |file| require( file ) }
46
+
47
+ module Blog::Controllers
48
+ class Public < R '/public/(.+)'
49
+ PATH = File.expand_path(File.dirname(__FILE__))
50
+
51
+ def get file
52
+ if file.include? '..'
53
+ @status = '403'
54
+ return '403 - Invalid path'
55
+ else
56
+ type = (MIME::Types.type_for(file)[0] || '/text/plain').to_s
57
+ @headers['Content-Type'] = type
58
+ @headers['X-Sendfile'] = File.join PATH, '..', '..', 'public', file
59
+ end
60
+ end
61
+ end
62
+ end
63
+
64
+ # Load create
65
+ files( '../../db' ) { |file| require( file ) }
66
+
67
+ # WEBrick postamble
68
+ if __FILE__ == $0
69
+ require 'webrick/httpserver'
70
+ require 'camping/webrick'
71
+
72
+ Blog::Models::Base.establish_connection :adapter => 'sqlite3', :database => File.dirname(__FILE__) + "/../../db/Blog.db"
73
+ Blog::Models::Base.logger = Logger.new(File.dirname(__FILE__) + "/../../log/Blog.log")
74
+ Blog.create if Blog.respond_to? :create
75
+ s = WEBrick::HTTPServer.new :BindAddress => "0.0.0.0", :Port => 3301
76
+ s.mount "/", WEBrick::CampingHandler, Blog
77
+
78
+ # This lets Ctrl+C shut down your server
79
+ trap(:INT) do
80
+ s.shutdown
81
+ end
82
+
83
+ s.start
84
+ end
@@ -0,0 +1,9 @@
1
+ module Blog::Controllers
2
+ class Comment
3
+ def post
4
+ Models::Comment.create(:username => input.post_username,
5
+ :body => input.post_body, :post_id => input.post_id)
6
+ redirect View, input.post_id
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,18 @@
1
+ module Blog::Controllers
2
+ class Edit < R '/edit/(\d+)', '/edit'
3
+ def get post_id
4
+ unless @state.user_id.blank?
5
+ @user = User.find @state.user_id
6
+ end
7
+ @post = Post.find post_id
8
+ render :edit, true
9
+ end
10
+ def post
11
+ unless @state.user_id.blank?
12
+ @post = Post.find input.post_id
13
+ @post.update_attributes :title => input.post_title, :body => input.post_body
14
+ redirect View, @post
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,8 @@
1
+ module Blog::Controllers
2
+ class Index < R '/'
3
+ def get
4
+ @posts = Post.find :all
5
+ render :index, true
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ module Blog::Controllers
2
+ class Info < R '/info/(\d+)', '/info/(\w+)/(\d+)', '/info', '/info/(\d+)/(\d+)/(\d+)/([\w-]+)'
3
+ def get(*args)
4
+ div do
5
+ code args.inspect; br; br
6
+ code @env.inspect; br
7
+ code "Link: #{R(Info, 1, 2)}"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ module Blog::Controllers
2
+ class Login
3
+ def post
4
+ @user = User.find :first, :conditions => ['username = ? AND password = ?', input.username, input.password]
5
+
6
+ if @user
7
+ @login = 'login success !'
8
+ @state.user_id = @user.id
9
+ else
10
+ @login = 'wrong user name or password'
11
+ end
12
+ render :login, true
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ module Blog::Controllers
2
+ class Logout
3
+ def get
4
+ @state.user_id = nil
5
+ render :logout, true
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ module Blog::Controllers
2
+ class View < R '/view/(\d+)'
3
+ def get post_id
4
+ @post = Post.find post_id
5
+ @comments = Models::Comment.find :all, :conditions => ['post_id = ?', post_id]
6
+ render :view, true
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Blog::Models
2
+ class Comment < Base
3
+ belongs_to :post
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Blog::Models
2
+ class Post < Base
3
+ belongs_to :user
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module Blog::Models
2
+ class User < Base
3
+ end
4
+ end
@@ -0,0 +1,18 @@
1
+ <% if @user %>
2
+ <p>You are logged in as <%= @user.username %> | <a href="/logout">Logout</a></p>
3
+ <form method="post" action="/add">
4
+ Title : <br />
5
+ <input name="post_title" type="text" value="<%= @post.title %>"><br />
6
+ Body : <br />
7
+ <textarea name="post_body"><%= @post.body %></textarea><br />
8
+ <input type="hidden" name="post_id" value="<%= @post.id %>">
9
+ <input type="submit">
10
+ <% else %>
11
+ <form action="/login" method="post">
12
+ Username : <br />
13
+ <input type="text" name="username" /><br />
14
+ Password : <br />
15
+ <input type="text" name="password" /><br />
16
+ <input type="submit" name="login" value="Login">
17
+ </form>
18
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <% if @user %>
2
+ <p>You are logged in as <%= @user.username %> | <a href="/logout">Logout</a></p>
3
+ <form method="post" action="/edit">
4
+ Title : <br />
5
+ <input name="post_title" type="text" value="<%= @post.title %>"><br />
6
+ Body : <br />
7
+ <textarea name="post_body"><%= @post.body %></textarea><br />
8
+ <input type="hidden" name="post_id" value="<%= @post.id %>">
9
+ <input type="submit">
10
+ <% else %>
11
+ <form action="/login" method="post">
12
+ Username : <br />
13
+ <input type="text" name="username" /><br />
14
+ Password : <br />
15
+ <input type="text" name="password" /><br />
16
+ <input type="submit" name="login" value="Login">
17
+ </form>
18
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% if @posts.empty? %>
2
+ <p>No posts found.</p>
3
+ <p><a href="/add">Add</a></p>
4
+ <% else %>
5
+ <% for post in @posts %>
6
+ <h1><%= post.title %></h1>
7
+ <p><%= post.body %></p>
8
+ <p>
9
+ <a href="/edit/<%= post.id %>">Edit</a> | <a href="/view/<%= post.id %>">View</a>
10
+ </p>
11
+ <% end%>
12
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <html>
2
+ <head>
3
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
4
+ <title>blog</title>
5
+ <link type="text/css" rel="stylesheet" href="/public/stylesheets/style.css" media="screen"/>
6
+ </head>
7
+ <body>
8
+ <h1 class="header"><a href="/">blog</a></h1>
9
+ <div class="content">
10
+ <%= content %>
11
+ </div>
12
+ </body>
@@ -0,0 +1,2 @@
1
+ <p><b><%= @login %></b></p>
2
+ <p><a href="/add">Continue</a></p>
@@ -0,0 +1,2 @@
1
+ <p>You have been logged out.</p>
2
+ <p><a href="/">Continue</a></p>
@@ -0,0 +1,20 @@
1
+ <h1><%= @post.title %></h1>
2
+ <p><%= @post.body %></p>
3
+ <p>
4
+ <a href="/edit/<%= @post.id %>">Edit</a> | <a href="/view/<%= @post.id %>">View</a>
5
+ </p>
6
+
7
+ <p>Comment for this post:</p>
8
+
9
+ <% for c in @comments %>
10
+ <h1><%= c.username %></h1>
11
+ <p><%= c.body %></p>
12
+ <% end %>
13
+
14
+ <form action="/comment" method="post">
15
+ Name : <input name="post_username" type="text"><br />
16
+ Comment :<br />
17
+ <textarea name="post_body"></textarea><br />
18
+ <input type="hidden" name="post_id" value="<%= @post.id %>">
19
+ <input type="submit">
20
+ </form>
@@ -0,0 +1,27 @@
1
+ #
2
+ # Project Blog
3
+ #
4
+ # Created using bivouac on Tue Jul 31 18:01:08 +0200 2007.
5
+ # Copyright (c) 2007 __My__. All rights reserved.
6
+ #
7
+ # DO NOT EDIT THIS FILE, OR YOU REALLY KNOW WHAT YOU ARE DOING !
8
+ #
9
+
10
+ require 'ostruct'
11
+
12
+ module Bivouac
13
+ class Environment
14
+
15
+ attr_reader :environment
16
+
17
+ def initialize
18
+ @environment = OpenStruct.new( )
19
+
20
+ @environment.appname = "Blog"
21
+ @environment.db = "sqlite3"
22
+ @environment.appdir = "blog"
23
+ @environment.orgtype = "ERB"
24
+ @environment.postamble = "webrick"
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,8 @@
1
+ module Blog
2
+ include Camping::Session
3
+ end
4
+
5
+ def Blog.create
6
+ Camping::Models::Session.create_schema
7
+ Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists? ? 1.0 : 0.0)
8
+ end
@@ -0,0 +1,15 @@
1
+ module Blog::Models
2
+ class CreateComment < V 1.0
3
+ def self.up
4
+ create_table :blog_comments do |t|
5
+ t.column :id , :integer , :null => false
6
+ t.column :post_id , :integer , :null => false
7
+ t.column :username , :string
8
+ t.column :body , :text
9
+ end
10
+ end
11
+ def self.down
12
+ drop_table :blog_comments
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Blog::Models
2
+ class CreatePost < V 1.0
3
+ def self.up
4
+ create_table :blog_posts do |t|
5
+ t.column :id , :integer , :null => false
6
+ t.column :user_id , :integer , :null => false
7
+ t.column :title , :string , :limit => 255
8
+ t.column :body , :text
9
+ end
10
+ end
11
+ def self.down
12
+ drop_table :blog_posts
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Blog::Models
2
+ class CreateUser < V 1.0
3
+ def self.up
4
+ create_table :blog_users do |t|
5
+ t.column :id , :integer , :null => false
6
+ t.column :username , :string
7
+ t.column :password , :string
8
+ end
9
+ User.create :username => 'admin', :password => 'bivouac'
10
+ end
11
+ def self.down
12
+ drop_table :blog_users
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,112 @@
1
+ # Logfile created on Tue Jul 31 18:44:09 +0200 2007 by /
2
+ SQL (0.000331) SELECT name FROM sqlite_master WHERE type = 'table'
3
+ SQL (0.000000) SQLite3::SQLException: no such table: sessions: DROP TABLE sessions
4
+ SQL (0.110131) CREATE TABLE sessions ("id" INTEGER PRIMARY KEY NOT NULL, "hashid" varchar(32) DEFAULT NULL, "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL) 
5
+ SQL (0.000480) SELECT name FROM sqlite_master WHERE type = 'table'
6
+ SQL (0.000309) SELECT name FROM sqlite_master WHERE type = 'table'
7
+ SQL (0.244545) CREATE TABLE blog_schema_infos ("id" INTEGER PRIMARY KEY NOT NULL, "version" float DEFAULT NULL) 
8
+ Blog::Models::SchemaInfo Load (0.000307) SELECT * FROM blog_schema_infos LIMIT 1
9
+ SQL (0.087348) CREATE TABLE blog_comments ("id" INTEGER PRIMARY KEY NOT NULL, "post_id" integer NOT NULL, "username" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
10
+ SQL (0.068467) CREATE TABLE blog_posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer NOT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
11
+ SQL (0.078659) CREATE TABLE blog_users ("id" INTEGER PRIMARY KEY NOT NULL, "username" varchar(255) DEFAULT NULL, "password" varchar(255) DEFAULT NULL) 
12
+ SQL (0.000478) INSERT INTO blog_users ("username", "password") VALUES('admin', 'bivouac')
13
+ SQL (0.000577) INSERT INTO blog_schema_infos ("version") VALUES(1.0)
14
+ Camping::Models::Session Load (0.000328) SELECT * FROM sessions WHERE (sessions."hashid" = 'embQk59C3ESMmQvAyXAwvYP3eBTDoegY') LIMIT 1
15
+ SQL (0.000611) INSERT INTO sessions ("hashid", "created_at", "ivars") VALUES('qnIE0e112l1pvd5dRiZrGfJgFJvW2y19', '2007-07-31 18:44:18', '--- !map:HashWithIndifferentAccess {}
16
+
17
+ ')
18
+ Blog::Models::Post Load (0.000313) SELECT * FROM blog_posts 
19
+ Camping::Models::Session Load (0.000618) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
20
+ Camping::Models::Session Load (0.000609) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
21
+ Blog::Models::User Load (0.000411) SELECT * FROM blog_users WHERE (username = 'admin' AND password = 'bivouac') LIMIT 1
22
+ Camping::Models::Session Update (0.001165) UPDATE sessions SET "created_at" = '2007-07-31 18:44:18', "hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19', "ivars" = '--- !map:HashWithIndifferentAccess
23
+ Blog: !map:HashWithIndifferentAccess
24
+ user_id: 1
25
+ ' WHERE "id" = 1
26
+ Camping::Models::Session Load (0.000592) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
27
+ Blog::Models::User Load (0.000456) SELECT * FROM blog_users WHERE (blog_users."id" = 1) 
28
+ SQL (0.000712) SELECT name FROM sqlite_master WHERE type = 'table'
29
+ SQL (0.000409) SELECT name FROM sqlite_master WHERE type = 'table'
30
+ SQL (0.000413) SELECT name FROM sqlite_master WHERE type = 'table'
31
+ Blog::Models::SchemaInfo Load (0.000246) SELECT * FROM blog_schema_infos LIMIT 1
32
+ Camping::Models::Session Load (0.000480) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
33
+ Camping::Models::Session Update (0.001387) UPDATE sessions SET "created_at" = '2007-07-31 18:44:18', "hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19', "ivars" = '--- !map:HashWithIndifferentAccess
34
+ Blog: !map:HashWithIndifferentAccess
35
+ user_id:
36
+ ' WHERE "id" = 1
37
+ Camping::Models::Session Load (0.000579) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
38
+ Camping::Models::Session Load (0.000558) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
39
+ Blog::Models::Post Load (0.000286) SELECT * FROM blog_posts 
40
+ Camping::Models::Session Load (0.000568) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
41
+ Camping::Models::Session Load (0.000529) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
42
+ Blog::Models::User Load (0.000490) SELECT * FROM blog_users WHERE (username = 'admin' AND password = 'bivouac') LIMIT 1
43
+ Camping::Models::Session Update (0.001054) UPDATE sessions SET "created_at" = '2007-07-31 18:44:18', "hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19', "ivars" = '--- !map:HashWithIndifferentAccess
44
+ Blog: !map:HashWithIndifferentAccess
45
+ user_id: 1
46
+ ' WHERE "id" = 1
47
+ Camping::Models::Session Load (0.000549) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
48
+ Blog::Models::User Load (0.000566) SELECT * FROM blog_users WHERE (blog_users."id" = 1) 
49
+ Camping::Models::Session Load (0.000552) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
50
+ SQL (0.000572) INSERT INTO blog_posts ("body", "title", "user_id") VALUES('Ca fonctionne aussi avec ERB !!!', 'Blog ERB', 1)
51
+ Camping::Models::Session Load (0.000595) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
52
+ Blog::Models::Post Load (0.000450) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
53
+ Blog::Models::Comment Load (0.000218) SELECT * FROM blog_comments WHERE (post_id = '1') 
54
+ Camping::Models::Session Load (0.000537) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
55
+ Camping::Models::Session Load (0.000573) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
56
+ Blog::Models::Post Load (0.000519) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
57
+ Blog::Models::Comment Load (0.000207) SELECT * FROM blog_comments WHERE (post_id = '1') 
58
+ Camping::Models::Session Load (0.000449) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
59
+ SQL (0.000700) SELECT name FROM sqlite_master WHERE type = 'table'
60
+ SQL (0.000420) SELECT name FROM sqlite_master WHERE type = 'table'
61
+ SQL (0.000408) SELECT name FROM sqlite_master WHERE type = 'table'
62
+ Blog::Models::SchemaInfo Load (0.000292) SELECT * FROM blog_schema_infos LIMIT 1
63
+ Camping::Models::Session Load (0.000495) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
64
+ Blog::Models::Post Load (0.000400) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
65
+ Blog::Models::Comment Load (0.000217) SELECT * FROM blog_comments WHERE (post_id = '1') 
66
+ Camping::Models::Session Load (0.000420) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
67
+ Camping::Models::Session Load (0.000608) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
68
+ Blog::Models::Post Load (0.000464) SELECT * FROM blog_posts 
69
+ Camping::Models::Session Load (0.000702) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
70
+ Camping::Models::Session Load (0.000590) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
71
+ Blog::Models::Post Load (0.000448) SELECT * FROM blog_posts 
72
+ Camping::Models::Session Load (0.000525) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
73
+ Camping::Models::Session Load (0.000552) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
74
+ Blog::Models::Post Load (0.000458) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
75
+ Blog::Models::Comment Load (0.000211) SELECT * FROM blog_comments WHERE (post_id = '1') 
76
+ Camping::Models::Session Load (0.000472) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
77
+ Camping::Models::Session Load (0.000538) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
78
+ Blog::Models::User Load (0.000485) SELECT * FROM blog_users WHERE (blog_users."id" = 1) 
79
+ Blog::Models::Post Load (0.000415) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
80
+ Camping::Models::Session Load (0.000452) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
81
+ Blog::Models::Post Load (0.000285) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
82
+ Blog::Models::Post Update (0.000950) UPDATE blog_posts SET "title" = 'Blog ERB', "body" = 'Ca fonctionne aussi avec ERB !!!', "user_id" = 1 WHERE "id" = 1
83
+ Camping::Models::Session Load (0.000620) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
84
+ Blog::Models::Post Load (0.000437) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
85
+ Blog::Models::Comment Load (0.000189) SELECT * FROM blog_comments WHERE (post_id = '1') 
86
+ Camping::Models::Session Load (0.000473) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
87
+ Camping::Models::Session Load (0.000583) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
88
+ Blog::Models::Post Load (0.000392) SELECT * FROM blog_posts 
89
+ Camping::Models::Session Load (0.000540) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
90
+ Blog::Models::Post Load (0.000447) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
91
+ Blog::Models::Comment Load (0.000188) SELECT * FROM blog_comments WHERE (post_id = '1') 
92
+ Camping::Models::Session Load (0.000498) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
93
+ SQL (0.000516) INSERT INTO blog_comments ("body", "post_id", "username") VALUES('pipo', 1, 'greg')
94
+ Camping::Models::Session Load (0.000517) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
95
+ Blog::Models::Post Load (0.000355) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
96
+ Blog::Models::Comment Load (0.000337) SELECT * FROM blog_comments WHERE (post_id = '1') 
97
+ Camping::Models::Session Load (0.000510) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
98
+ SQL (0.000521) INSERT INTO blog_comments ("body", "post_id", "username") VALUES('C''est beau et il faut chaud. Je me sent bien !!!', 1, 'Hello')
99
+ Camping::Models::Session Load (0.000513) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
100
+ Blog::Models::Post Load (0.000384) SELECT * FROM blog_posts WHERE (blog_posts."id" = 1) 
101
+ Blog::Models::Comment Load (0.000513) SELECT * FROM blog_comments WHERE (post_id = '1') 
102
+ Camping::Models::Session Load (0.000558) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
103
+ Blog::Models::Post Load (0.000403) SELECT * FROM blog_posts 
104
+ Camping::Models::Session Load (0.000499) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
105
+ Blog::Models::User Load (0.000364) SELECT * FROM blog_users WHERE (blog_users."id" = 1) 
106
+ Camping::Models::Session Load (0.000519) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
107
+ SQL (0.000832) INSERT INTO blog_posts ("body", "title", "user_id") VALUES('Ceci et le second post !', 'Post #2', 1)
108
+ Camping::Models::Session Load (0.000521) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
109
+ Blog::Models::Post Load (0.000352) SELECT * FROM blog_posts WHERE (blog_posts."id" = 2) 
110
+ Blog::Models::Comment Load (0.000184) SELECT * FROM blog_comments WHERE (post_id = '2') 
111
+ Camping::Models::Session Load (0.000505) SELECT * FROM sessions WHERE (sessions."hashid" = 'qnIE0e112l1pvd5dRiZrGfJgFJvW2y19') LIMIT 1
112
+ Blog::Models::Post Load (0.000476) SELECT * FROM blog_posts