librails 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/librails/db_utils.rb +5 -0
  3. data/lib/librails.rb +2 -0
  4. data/lib/librails/engine.rb +4 -0
  5. data/lib/librails/misc_utils.rb +13 -0
  6. data/lib/librails/version.rb +1 -1
  7. data/test/dummy/app/assets/javascripts/books.js +2 -0
  8. data/test/dummy/app/assets/stylesheets/books.css +4 -0
  9. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  10. data/test/dummy/app/controllers/books_controller.rb +58 -0
  11. data/test/dummy/app/helpers/books_helper.rb +2 -0
  12. data/test/dummy/app/models/book.rb +2 -0
  13. data/test/dummy/app/views/books/_form.html.erb +29 -0
  14. data/test/dummy/app/views/books/edit.html.erb +6 -0
  15. data/test/dummy/app/views/books/index.html.erb +31 -0
  16. data/test/dummy/app/views/books/new.html.erb +5 -0
  17. data/test/dummy/app/views/books/show.html.erb +19 -0
  18. data/test/dummy/config/routes.rb +1 -0
  19. data/test/dummy/db/development.sqlite3 +0 -0
  20. data/test/dummy/db/migrate/20161025052813_create_books.rb +11 -0
  21. data/test/dummy/db/schema.rb +9 -1
  22. data/test/dummy/db/test.sqlite3 +0 -0
  23. data/test/dummy/log/development.log +86 -0
  24. data/test/dummy/log/test.log +596 -0
  25. data/test/dummy/tmp/cache/assets/sprockets/v3.0/-a/-a5ntVe_0-JosKC_U-LV0kALRyUIgn03H0eVSdQ8pAo.cache +1 -0
  26. data/test/dummy/tmp/cache/assets/sprockets/v3.0/2x/2xVmM6jHrzDyP1lp_LjSNgXh8HYZQ7UMeLoN7wQO2uM.cache +1 -0
  27. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4J/4JwVVgJQeLQmk-x6jORqWPEH5TYtWgMF-4GJupuMreM.cache +0 -0
  28. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4P/4Po6Zxf1klgk64Tw6mYOWnTGXYt4fqfrgbM_aUJwGpw.cache +0 -0
  29. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4Q/4Qo2DjyziGCKkz1oJV2GVlh8wX1CcV8pAS46Q7Qm7hI.cache +0 -0
  30. data/test/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
  31. data/test/dummy/tmp/cache/assets/sprockets/v3.0/98/98JB3RlDHR57hBl-xqETG_I6j8A_Nq0odiAq7v00Myk.cache +1 -0
  32. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9h/9hWcOzybQOFoTeNjwVlrLZ5CFSgHv2mFQz1iT7DZsAM.cache +0 -0
  33. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9l/9lRpyWJfT2I3m8gijV7lkjQFoXhOKRq-qrktmY8jwqQ.cache +1 -0
  34. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9y/9y8VxpdidE2YHBhtV16bnLrhPEyaw00uRH9rGQrGiYo.cache +2 -0
  35. data/test/dummy/tmp/cache/assets/sprockets/v3.0/AN/ANELt8DAvX3T4rWiL73ZyAs9akz2xqaJ8oSTkjC8F4E.cache +0 -0
  36. data/test/dummy/tmp/cache/assets/sprockets/v3.0/B0/B0yDuvt2bL4_VgHHUwn0DSCgUg_Ubj4YjHffaiGCAL0.cache +0 -0
  37. data/test/dummy/tmp/cache/assets/sprockets/v3.0/CU/CUUNfrG7P9ppFhzKGMMhyineSvfddDpmm193O8hqWn8.cache +1 -0
  38. data/test/dummy/tmp/cache/assets/sprockets/v3.0/DS/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +2 -0
  39. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Dm/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +0 -0
  40. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Gr/Gr9XYAo8GbcW54Sm4tf2EnAzEUrmUcF3x29iJGtBs-A.cache +0 -0
  41. data/test/dummy/tmp/cache/assets/sprockets/v3.0/H4/H4oToPWSBBLRPAut47gvhtagG-ZlAjMvULFS1IlsDSQ.cache +1 -0
  42. data/test/dummy/tmp/cache/assets/sprockets/v3.0/HB/HB4_lJeXGMv1qlxwZfwDD0DQt9v9D3uJfs5M8Kgu3iw.cache +0 -0
  43. data/test/dummy/tmp/cache/assets/sprockets/v3.0/HE/HEA-bEdudX8qzqty72VsU6YCvuJV2OkyzRXpsXLoxFA.cache +0 -0
  44. data/test/dummy/tmp/cache/assets/sprockets/v3.0/HV/HVshoeO2Vki70_9KjCtwERcw7ODKGOGVYYDQIANp2UM.cache +0 -0
  45. data/test/dummy/tmp/cache/assets/sprockets/v3.0/I3/I3W61RA7E9U8gY3VOReLJalzQzVrSopciuNv6qcYmng.cache +0 -0
  46. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ic/IcuhBgC-nw3u2yhN8hnjRD6Qmzw3DbcuIBUqovrS6Hc.cache +0 -0
  47. data/test/dummy/tmp/cache/assets/sprockets/v3.0/JS/JSjnVos6CVam_6IKJcXZEgVG5kHcAauxq-yHnTn4mxE.cache +1 -0
  48. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ki/KifnWePy2kuI6EoY35NBONt3SPPPXzXWFUzy7YS0AXg.cache +1 -0
  49. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ld/LdOU9kh2e1UyWAH9vMD_vrJTydu8vLyj9RZRdtWZJJE.cache +1 -0
  50. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ms/MsWDjQABzh2_2l9wZzvXwvwaDXCKRqC_CHFqwpF3vfA.cache +1 -0
  51. data/test/dummy/tmp/cache/assets/sprockets/v3.0/NP/NPTKYje_vsxbdQIwHZm4GQ9ctgNfDx_dGpmUY09mUQw.cache +0 -0
  52. data/test/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
  53. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Oo/OopMIscaD_StAXIYnIlx8woMEjgZf2uDXh17312pc5w.cache +1 -0
  54. data/test/dummy/tmp/cache/assets/sprockets/v3.0/PZ/PZM2O0pn21R_wlGR30OX0pQ4-zThf7ZxUhXihEKAcxM.cache +1 -0
  55. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Q0/Q0pvcN-Uyq45X4gQ1IIsx2hW2l933XYAVm66Lt-CcMg.cache +0 -0
  56. data/test/dummy/tmp/cache/assets/sprockets/v3.0/QY/QY4eYMS1Fh5SL6cZCo_OpPSZGx9e7vjDlEpwXT0AaRI.cache +1 -0
  57. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Un/Un1edWzWIIMQo9Q1V4Y3p58MSmZMO3ccQIABeCzt-es.cache +1 -0
  58. data/test/dummy/tmp/cache/assets/sprockets/v3.0/WJ/WJndgy_O4Z4_vIJzVJV49Oj7pXcrXAM2WToimOqHi94.cache +0 -0
  59. data/test/dummy/tmp/cache/assets/sprockets/v3.0/YB/YBmLL8rNkJ9wDjR63wHcnw4HPQ2zc4_sUHBnCwCHmV8.cache +1 -0
  60. data/test/dummy/tmp/cache/assets/sprockets/v3.0/YO/YOQwG9qoTCWsQaEUYqC2eU6VMwJ8eY5az9PWEg0YBVY.cache +1 -0
  61. data/test/dummy/tmp/cache/assets/sprockets/v3.0/YZ/YZ5lr9CWjxm17X4Z6whrpsqGepK7FMkaMYke2pZeJkY.cache +0 -0
  62. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Z0/Z0v-Clv1RmCtHcZgsHm2Efklg2cOj1_vvXGxSZJYGmU.cache +0 -0
  63. data/test/dummy/tmp/cache/assets/sprockets/v3.0/a9/a9CMcRWEr_aXxa0Z54LL_mihjvWtKKhXEkjYUf1jbYg.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/sprockets/v3.0/az/azSFX09wOk1dDEk1xyUuhOvndGRfhAQw7X3bhVUvbqk.cache +0 -0
  65. data/test/dummy/tmp/cache/assets/sprockets/v3.0/c4/c4wesegfvp3YOFFSsjDTtaqlTJT4wu9TEQwmOabiGBE.cache +1 -0
  66. data/test/dummy/tmp/cache/assets/sprockets/v3.0/di/diq4wNwLuxlJAo-1sx9AH3-mub_Z63HbEaidoP-u9LQ.cache +0 -0
  67. data/test/dummy/tmp/cache/assets/sprockets/v3.0/dj/djpYduQfWsseWdaOi5NPjqzRTg-mdM1AuAl5fgbfRLI.cache +1 -0
  68. data/test/dummy/tmp/cache/assets/sprockets/v3.0/dv/dvTANT0eJS1VHnH7LFBvahPvuDEVWCsoCxbVYEyZhzs.cache +0 -0
  69. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ek/ek29x0Bv7htoVKBJsvqHHHd4qD1hqohET5SJ3GHUe3c.cache +1 -0
  70. data/test/dummy/tmp/cache/assets/sprockets/v3.0/gI/gIcGEFwVb02r2Kvp4JojiRH9FmhmT2W3zpbokUikgTM.cache +1 -0
  71. data/test/dummy/tmp/cache/assets/sprockets/v3.0/gZ/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +2 -0
  72. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hZ/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +0 -0
  73. data/test/dummy/tmp/cache/assets/sprockets/v3.0/jR/jRlfgMuDhdJ9DeARm8C34EzijHiSAEZi9IumOi8d8co.cache +1 -0
  74. data/test/dummy/tmp/cache/assets/sprockets/v3.0/je/jeF02OPMeSNXwtMncDIYKtOsYCK80N9cMVBag1DQcTU.cache +1 -0
  75. data/test/dummy/tmp/cache/assets/sprockets/v3.0/jy/jyTlR0GRNS7XsvnoGBrqht7VoF8JHgPAhzzlPSI38Lg.cache +0 -0
  76. data/test/dummy/tmp/cache/assets/sprockets/v3.0/kf/kff_5LRygUIEBDA1u6MXzK09UFf90uCaOsLtaBgyGUQ.cache +0 -0
  77. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ll/lllxIh8TmYST5iT3pMMqEiiW2kVnV46e8apjHYV4NwQ.cache +0 -0
  78. data/test/dummy/tmp/cache/assets/sprockets/v3.0/lt/ltZ12Hb1MIwQ_x5JJ3RSyPYvs7uKQ6sobTXErisPSIo.cache +1 -0
  79. data/test/dummy/tmp/cache/assets/sprockets/v3.0/m4/m4PDLvfn6lwFaBlngbSJXSB_eLt6iyL5y4mX1QPdp40.cache +0 -0
  80. data/test/dummy/tmp/cache/assets/sprockets/v3.0/nF/nFDSlhA0quhrqhaq_7tpg8xL130zYnfh0fSgdoKjyxs.cache +1 -0
  81. data/test/dummy/tmp/cache/assets/sprockets/v3.0/om/omT5fdYWQly0TYwKCjLTSkd4KnkiW3DBI7u_9iwQujM.cache +1 -0
  82. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pE/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +0 -0
  83. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pV/pVjei3DOBfiSnjFhJoxc5fnuoqkyxSZXVaXL-PtQOnM.cache +1 -0
  84. data/test/dummy/tmp/cache/assets/sprockets/v3.0/qo/qom3M3JruFGz9uj1CmP-jbPFnMOFh2r2KESBsGzKqSQ.cache +1 -0
  85. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rA/rAUGcozHSiZ93hwuQ5Ez0-DFNvpIp1pMSFzJDL6j5t0.cache +1 -0
  86. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rG/rGuMNcIUBp03kbJ6EzyYnC3CRj5goxzKZBmJYdmHAZQ.cache +0 -0
  87. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sU/sU3oqz4lk5ZBEidbxhSyI-aEf0xo5cuP8154BPYzRSQ.cache +0 -0
  88. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sZ/sZS3zy1fxZQjAPA_1FJ3AowfYeZce2J_6g44pGwLUm0.cache +0 -0
  89. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sj/sj16ZRag8S_gxUTofHpRMDlBfQtRrkOCTHE4XkpqTIw.cache +1 -0
  90. data/test/dummy/tmp/cache/assets/sprockets/v3.0/so/sor5uSsm2pcLDkIB_nEyeFtyH3H9JfHraQ06BUgKQDI.cache +1 -0
  91. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tO/tOhfPNHfUCZMMbxsrZ8QFkHIS4Kvl5n2uOQFyrtP8sg.cache +1 -0
  92. data/test/dummy/tmp/cache/assets/sprockets/v3.0/vA/vASpagKbFH0ZvwZExZpP6xUozv_LZDLv2ChvkXLH9bM.cache +1 -0
  93. data/test/dummy/tmp/cache/assets/sprockets/v3.0/vG/vGFQZSHgo_Z1jtdt-4UDi4Cq_rLRNs3NgVSnCC-00tk.cache +0 -0
  94. data/test/dummy/tmp/cache/assets/sprockets/v3.0/wt/wtPqYC4VZKO69pxoohTrsnCI_qisEoAEF_0a0cchBOs.cache +1 -0
  95. data/test/dummy/tmp/cache/assets/sprockets/v3.0/xw/xw-pJ8PwbGRKiqJ9PyoPiRt1qJ2tGDRaVKQr5L83M24.cache +0 -0
  96. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zh/zhG0AnNGbV5bRFlZI647Ycb4OP62cNjN9sCGP2XSmLY.cache +0 -0
  97. data/test/fixtures/books.yml +11 -0
  98. data/test/integration/books_controller_test.rb +51 -0
  99. data/test/librails_test.rb +7 -1
  100. metadata +178 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4353d673b25c199dd035f11a47cf60737117a24d
4
- data.tar.gz: f32826e4d3f02ce3435f0b2e90d9c65a69f717ea
3
+ metadata.gz: 3cabed066ea2a94382c29ce59130ad6dfb4204c2
4
+ data.tar.gz: 8560c3972008e3824447c103ac92cf2387496b85
5
5
  SHA512:
6
- metadata.gz: 6530cec6c5732874d4983f5a67a1fa6c8c7d8e075095d2b42ab8df667b2a10f204c8e4ac0423f87f8b867a0e9666801af2c36a2b04bb945687d68c31140853b9
7
- data.tar.gz: 5610ef030cc3aa9b1b43be2375fca192309d02c0bc6ed3da62c2d29fa4eeca7e28425c872115d30883fe33fc34b65901d67eb129f1bd03a5fc420cae8101dd0f
6
+ metadata.gz: 971260575f0d93f86fa98027602871ebea95a684d59dfc07aa6533dc51e6f8b3892a63c6d75bd7be88bfc97ba2004446ead5445dd0ba42ac429e13f935e2de05
7
+ data.tar.gz: a70c8f84a26ccb50052b2d477df805931ab48cd85be61393d07413b1511a2bbf2bc4580380e480411139ded8ed7109586b5e310c69c3a77095ae03021a770583
@@ -0,0 +1,5 @@
1
+ module Librails
2
+ class DbUtils
3
+
4
+ end
5
+ end
data/lib/librails.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require "librails/engine"
2
+ #require "librails/version"
3
+ require "librails/misc_utils"
2
4
 
3
5
  module Librails
4
6
  end
@@ -1,6 +1,10 @@
1
1
  module Librails
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace Librails
4
+
5
+ # Add a load path for this specific Engine
6
+ config.autoload_paths << File.expand_path("../../lib", __FILE__)
7
+
4
8
  initializer "librails.view_helper" do |app|
5
9
  ActiveSupport.on_load :action_view do
6
10
  require 'librails/view_helper'
@@ -0,0 +1,13 @@
1
+ module Librails
2
+ class MiscUtils
3
+ def self.rescue_mysql2_error(e)
4
+ if e.message =~ /Incorrect string value:/
5
+ # utf8mb4にすればいいのだ…。とりあえずそのばしのぎ。
6
+ puts e.message
7
+ else
8
+ puts e.message
9
+ puts e.backtrace
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Librails
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,56 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ div.field, div.actions {
20
+ margin-bottom: 10px;
21
+ }
22
+
23
+ #notice {
24
+ color: green;
25
+ }
26
+
27
+ .field_with_errors {
28
+ padding: 2px;
29
+ background-color: red;
30
+ display: table;
31
+ }
32
+
33
+ #error_explanation {
34
+ width: 450px;
35
+ border: 2px solid red;
36
+ padding: 7px;
37
+ padding-bottom: 0;
38
+ margin-bottom: 20px;
39
+ background-color: #f0f0f0;
40
+ }
41
+
42
+ #error_explanation h2 {
43
+ text-align: left;
44
+ font-weight: bold;
45
+ padding: 5px 5px 5px 15px;
46
+ font-size: 12px;
47
+ margin: -7px;
48
+ margin-bottom: 0px;
49
+ background-color: #c00;
50
+ color: #fff;
51
+ }
52
+
53
+ #error_explanation ul li {
54
+ font-size: 12px;
55
+ list-style: square;
56
+ }
@@ -0,0 +1,58 @@
1
+ class BooksController < ApplicationController
2
+ before_action :set_book, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /books
5
+ def index
6
+ @books = Book.all
7
+ end
8
+
9
+ # GET /books/1
10
+ def show
11
+ end
12
+
13
+ # GET /books/new
14
+ def new
15
+ @book = Book.new
16
+ end
17
+
18
+ # GET /books/1/edit
19
+ def edit
20
+ end
21
+
22
+ # POST /books
23
+ def create
24
+ @book = Book.new(book_params)
25
+
26
+ if @book.save
27
+ redirect_to @book, notice: 'Book was successfully created.'
28
+ else
29
+ render :new
30
+ end
31
+ end
32
+
33
+ # PATCH/PUT /books/1
34
+ def update
35
+ if @book.update(book_params)
36
+ redirect_to @book, notice: 'Book was successfully updated.'
37
+ else
38
+ render :edit
39
+ end
40
+ end
41
+
42
+ # DELETE /books/1
43
+ def destroy
44
+ @book.destroy
45
+ redirect_to books_url, notice: 'Book was successfully destroyed.'
46
+ end
47
+
48
+ private
49
+ # Use callbacks to share common setup or constraints between actions.
50
+ def set_book
51
+ @book = Book.find(params[:id])
52
+ end
53
+
54
+ # Only allow a trusted parameter "white list" through.
55
+ def book_params
56
+ params.require(:book).permit(:title, :author, :summary)
57
+ end
58
+ end
@@ -0,0 +1,2 @@
1
+ module BooksHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class Book < ActiveRecord::Base
2
+ end
@@ -0,0 +1,29 @@
1
+ <%= form_for(@book) do |f| %>
2
+ <% if @book.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @book.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :title %><br>
16
+ <%= f.text_field :title %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :author %><br>
20
+ <%= f.text_field :author %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :summary %><br>
24
+ <%= f.text_area :summary %>
25
+ </div>
26
+ <div class="actions">
27
+ <%= f.submit %>
28
+ </div>
29
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Book</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @book %> |
6
+ <%= link_to 'Back', books_path %>
@@ -0,0 +1,31 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Listing Books</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Title</th>
9
+ <th>Author</th>
10
+ <th>Summary</th>
11
+ <th colspan="3"></th>
12
+ </tr>
13
+ </thead>
14
+
15
+ <tbody>
16
+ <% @books.each do |book| %>
17
+ <tr>
18
+ <td><%= book.title %></td>
19
+ <td><%= book.author %></td>
20
+ <td><%= book.summary %></td>
21
+ <td><%= link_to 'Show', book %></td>
22
+ <td><%= link_to 'Edit', edit_book_path(book) %></td>
23
+ <td><%= link_to 'Destroy', book, method: :delete, data: { confirm: 'Are you sure?' } %></td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
29
+ <br>
30
+
31
+ <%= link_to 'New Book', new_book_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Book</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', books_path %>
@@ -0,0 +1,19 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Title:</strong>
5
+ <%= @book.title %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Author:</strong>
10
+ <%= @book.author %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Summary:</strong>
15
+ <%= @book.summary %>
16
+ </p>
17
+
18
+ <%= link_to 'Edit', edit_book_path(@book) %> |
19
+ <%= link_to 'Back', books_path %>
@@ -1,4 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
+ resources :books
3
4
  mount Librails::Engine => "/librails"
4
5
  end
Binary file
@@ -0,0 +1,11 @@
1
+ class CreateBooks < ActiveRecord::Migration
2
+ def change
3
+ create_table :books do |t|
4
+ t.string :title
5
+ t.string :author
6
+ t.text :summary
7
+
8
+ t.timestamps null: false
9
+ end
10
+ end
11
+ end
@@ -11,6 +11,14 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 0) do
14
+ ActiveRecord::Schema.define(version: 20161025052813) do
15
+
16
+ create_table "books", force: :cascade do |t|
17
+ t.string "title"
18
+ t.string "author"
19
+ t.text "summary"
20
+ t.datetime "created_at", null: false
21
+ t.datetime "updated_at", null: false
22
+ end
15
23
 
16
24
  end
Binary file
@@ -2,3 +2,89 @@
2
2
   (0.1ms) select sqlite_version(*)
3
3
   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
4
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+
6
+
7
+ Started GET "/" for ::1 at 2016-10-25 14:28:30 +0900
8
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
9
+
10
+ ActiveRecord::PendingMigrationError (
11
+
12
+ Migrations are pending. To resolve this issue, run:
13
+
14
+ bin/rake db:migrate RAILS_ENV=development
15
+
16
+ ):
17
+ activerecord (4.2.7.1) lib/active_record/migration.rb:392:in `check_pending!'
18
+ activerecord (4.2.7.1) lib/active_record/migration.rb:373:in `call'
19
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
20
+ activesupport (4.2.7.1) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
21
+ activesupport (4.2.7.1) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
22
+ activesupport (4.2.7.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
23
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
24
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
25
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
26
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
27
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
28
+ railties (4.2.7.1) lib/rails/rack/logger.rb:38:in `call_app'
29
+ railties (4.2.7.1) lib/rails/rack/logger.rb:20:in `block in call'
30
+ activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
31
+ activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:26:in `tagged'
32
+ activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:68:in `tagged'
33
+ railties (4.2.7.1) lib/rails/rack/logger.rb:20:in `call'
34
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
35
+ rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
36
+ rack (1.6.4) lib/rack/runtime.rb:18:in `call'
37
+ activesupport (4.2.7.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
38
+ rack (1.6.4) lib/rack/lock.rb:17:in `call'
39
+ actionpack (4.2.7.1) lib/action_dispatch/middleware/static.rb:120:in `call'
40
+ rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
41
+ railties (4.2.7.1) lib/rails/engine.rb:518:in `call'
42
+ railties (4.2.7.1) lib/rails/application.rb:165:in `call'
43
+ rack (1.6.4) lib/rack/lock.rb:17:in `call'
44
+ rack (1.6.4) lib/rack/content_length.rb:15:in `call'
45
+ rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
46
+ /Users/sora/.anyenv/envs/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
47
+ /Users/sora/.anyenv/envs/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
48
+ /Users/sora/.anyenv/envs/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
49
+
50
+
51
+ Rendered /Users/sora/work/librails/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (4.7ms)
52
+ Rendered /Users/sora/work/librails/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms)
53
+ Rendered /Users/sora/work/librails/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
54
+ Rendered /Users/sora/work/librails/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (58.6ms)
55
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
+ Migrating to CreateBooks (20161025052813)
57
+  (0.1ms) begin transaction
58
+  (0.5ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "author" varchar, "summary" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
59
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161025052813"]]
60
+  (0.9ms) commit transaction
61
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
62
+
63
+
64
+ Started GET "/" for ::1 at 2016-10-25 14:29:32 +0900
65
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
+ Processing by Rails::WelcomeController#index as HTML
67
+ Rendered /Users/sora/work/librails/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/templates/rails/welcome/index.html.erb (1.7ms)
68
+ Completed 200 OK in 11ms (Views: 10.6ms | ActiveRecord: 0.0ms)
69
+
70
+
71
+ Started GET "/books" for ::1 at 2016-10-25 14:29:37 +0900
72
+ Processing by BooksController#index as HTML
73
+ Book Load (0.4ms) SELECT "books".* FROM "books"
74
+ Rendered books/index.html.erb within layouts/application (13.1ms)
75
+ Completed 200 OK in 274ms (Views: 271.6ms | ActiveRecord: 0.6ms)
76
+
77
+
78
+ Started GET "/assets/books.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-10-25 14:29:38 +0900
79
+
80
+
81
+ Started GET "/assets/scaffold.self-83b741db49389dc7cfdf85bf7537a0219cce48e085c4116afc83d55c9af47c78.css?body=1" for ::1 at 2016-10-25 14:29:38 +0900
82
+
83
+
84
+ Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-10-25 14:29:38 +0900
85
+
86
+
87
+ Started GET "/assets/books.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-10-25 14:29:38 +0900
88
+
89
+
90
+ Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-10-25 14:29:38 +0900
@@ -52,3 +52,599 @@ LibrailsTest: test_hello
52
52
  LibrailsTest: test_hello
53
53
  ------------------------
54
54
   (0.1ms) rollback transaction
55
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
+  (1.4ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "author" varchar, "summary" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
57
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
58
+  (0.1ms) select sqlite_version(*)
59
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
60
+  (0.1ms) SELECT version FROM "schema_migrations"
61
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20161025052813')
62
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
63
+  (0.1ms) begin transaction
64
+ ------------------------
65
+ LibrailsTest: test_hello
66
+ ------------------------
67
+  (0.1ms) rollback transaction
68
+  (0.1ms) begin transaction
69
+ --------------------------------------
70
+ LibrailsTest: test_rescue_mysql2_error
71
+ --------------------------------------
72
+  (0.0ms) rollback transaction
73
+  (0.0ms) begin transaction
74
+ ------------------------------------------
75
+ BooksControllerTest: test_should_get_index
76
+ ------------------------------------------
77
+  (0.1ms) rollback transaction
78
+  (0.0ms) begin transaction
79
+ --------------------------------------------
80
+ BooksControllerTest: test_should_create_book
81
+ --------------------------------------------
82
+  (0.0ms) rollback transaction
83
+  (0.0ms) begin transaction
84
+ --------------------------------------------
85
+ BooksControllerTest: test_should_update_book
86
+ --------------------------------------------
87
+  (0.0ms) rollback transaction
88
+  (0.0ms) begin transaction
89
+ ---------------------------------------------
90
+ BooksControllerTest: test_should_destroy_book
91
+ ---------------------------------------------
92
+  (0.1ms) rollback transaction
93
+  (0.0ms) begin transaction
94
+ -----------------------------------------
95
+ BooksControllerTest: test_should_get_edit
96
+ -----------------------------------------
97
+  (0.0ms) rollback transaction
98
+  (0.0ms) begin transaction
99
+ ----------------------------------------
100
+ BooksControllerTest: test_should_get_new
101
+ ----------------------------------------
102
+  (0.0ms) rollback transaction
103
+  (0.0ms) begin transaction
104
+ ------------------------------------------
105
+ BooksControllerTest: test_should_show_book
106
+ ------------------------------------------
107
+  (0.0ms) rollback transaction
108
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
109
+  (0.1ms) begin transaction
110
+ ------------------------------------------
111
+ BooksControllerTest: test_should_show_book
112
+ ------------------------------------------
113
+  (0.1ms) rollback transaction
114
+  (0.0ms) begin transaction
115
+ ------------------------------------------
116
+ BooksControllerTest: test_should_get_index
117
+ ------------------------------------------
118
+  (0.0ms) rollback transaction
119
+  (0.0ms) begin transaction
120
+ --------------------------------------------
121
+ BooksControllerTest: test_should_update_book
122
+ --------------------------------------------
123
+  (0.0ms) rollback transaction
124
+  (0.0ms) begin transaction
125
+ --------------------------------------------
126
+ BooksControllerTest: test_should_create_book
127
+ --------------------------------------------
128
+  (0.0ms) rollback transaction
129
+  (0.0ms) begin transaction
130
+ ----------------------------------------
131
+ BooksControllerTest: test_should_get_new
132
+ ----------------------------------------
133
+  (0.0ms) rollback transaction
134
+  (0.0ms) begin transaction
135
+ -----------------------------------------
136
+ BooksControllerTest: test_should_get_edit
137
+ -----------------------------------------
138
+  (0.0ms) rollback transaction
139
+  (0.0ms) begin transaction
140
+ ---------------------------------------------
141
+ BooksControllerTest: test_should_destroy_book
142
+ ---------------------------------------------
143
+  (0.0ms) rollback transaction
144
+  (0.1ms) begin transaction
145
+ ------------------------
146
+ LibrailsTest: test_hello
147
+ ------------------------
148
+  (0.1ms) rollback transaction
149
+  (0.1ms) begin transaction
150
+ --------------------------------------
151
+ LibrailsTest: test_rescue_mysql2_error
152
+ --------------------------------------
153
+  (0.0ms) rollback transaction
154
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
155
+  (0.1ms) begin transaction
156
+ ------------------------
157
+ LibrailsTest: test_hello
158
+ ------------------------
159
+  (0.0ms) rollback transaction
160
+  (0.0ms) begin transaction
161
+ --------------------------------------
162
+ LibrailsTest: test_rescue_mysql2_error
163
+ --------------------------------------
164
+  (0.0ms) rollback transaction
165
+  (0.0ms) begin transaction
166
+ ----------------------------------------
167
+ BooksControllerTest: test_should_get_new
168
+ ----------------------------------------
169
+  (0.1ms) rollback transaction
170
+  (0.0ms) begin transaction
171
+ -----------------------------------------
172
+ BooksControllerTest: test_should_get_edit
173
+ -----------------------------------------
174
+  (0.1ms) rollback transaction
175
+  (0.0ms) begin transaction
176
+ ------------------------------------------
177
+ BooksControllerTest: test_should_get_index
178
+ ------------------------------------------
179
+  (0.0ms) rollback transaction
180
+  (0.1ms) begin transaction
181
+ ------------------------------------------
182
+ BooksControllerTest: test_should_show_book
183
+ ------------------------------------------
184
+  (0.0ms) rollback transaction
185
+  (0.0ms) begin transaction
186
+ --------------------------------------------
187
+ BooksControllerTest: test_should_update_book
188
+ --------------------------------------------
189
+  (0.0ms) rollback transaction
190
+  (0.0ms) begin transaction
191
+ ---------------------------------------------
192
+ BooksControllerTest: test_should_destroy_book
193
+ ---------------------------------------------
194
+  (0.0ms) rollback transaction
195
+  (0.0ms) begin transaction
196
+ --------------------------------------------
197
+ BooksControllerTest: test_should_create_book
198
+ --------------------------------------------
199
+  (0.0ms) rollback transaction
200
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
201
+  (0.1ms) begin transaction
202
+ ------------------------
203
+ LibrailsTest: test_hello
204
+ ------------------------
205
+  (0.0ms) rollback transaction
206
+  (0.0ms) begin transaction
207
+ --------------------------------------
208
+ LibrailsTest: test_rescue_mysql2_error
209
+ --------------------------------------
210
+  (0.0ms) rollback transaction
211
+  (0.0ms) begin transaction
212
+ ----------------------------------------
213
+ BooksControllerTest: test_should_get_new
214
+ ----------------------------------------
215
+  (0.1ms) rollback transaction
216
+  (0.1ms) begin transaction
217
+ ---------------------------------------------
218
+ BooksControllerTest: test_should_destroy_book
219
+ ---------------------------------------------
220
+  (0.0ms) rollback transaction
221
+  (0.1ms) begin transaction
222
+ --------------------------------------------
223
+ BooksControllerTest: test_should_create_book
224
+ --------------------------------------------
225
+  (0.0ms) rollback transaction
226
+  (0.0ms) begin transaction
227
+ ------------------------------------------
228
+ BooksControllerTest: test_should_show_book
229
+ ------------------------------------------
230
+  (0.0ms) rollback transaction
231
+  (0.0ms) begin transaction
232
+ ------------------------------------------
233
+ BooksControllerTest: test_should_get_index
234
+ ------------------------------------------
235
+  (0.0ms) rollback transaction
236
+  (0.0ms) begin transaction
237
+ -----------------------------------------
238
+ BooksControllerTest: test_should_get_edit
239
+ -----------------------------------------
240
+  (0.0ms) rollback transaction
241
+  (0.0ms) begin transaction
242
+ --------------------------------------------
243
+ BooksControllerTest: test_should_update_book
244
+ --------------------------------------------
245
+  (0.0ms) rollback transaction
246
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
247
+  (0.1ms) begin transaction
248
+ --------------------------------------
249
+ LibrailsTest: test_rescue_mysql2_error
250
+ --------------------------------------
251
+  (0.0ms) rollback transaction
252
+  (0.1ms) begin transaction
253
+ ------------------------
254
+ LibrailsTest: test_hello
255
+ ------------------------
256
+  (0.1ms) rollback transaction
257
+  (0.1ms) begin transaction
258
+ ------------------------------------------
259
+ BooksControllerTest: test_should_get_index
260
+ ------------------------------------------
261
+  (0.1ms) rollback transaction
262
+  (0.1ms) begin transaction
263
+ ---------------------------------------------
264
+ BooksControllerTest: test_should_destroy_book
265
+ ---------------------------------------------
266
+  (0.0ms) rollback transaction
267
+  (0.0ms) begin transaction
268
+ ----------------------------------------
269
+ BooksControllerTest: test_should_get_new
270
+ ----------------------------------------
271
+  (0.0ms) rollback transaction
272
+  (0.0ms) begin transaction
273
+ --------------------------------------------
274
+ BooksControllerTest: test_should_update_book
275
+ --------------------------------------------
276
+  (0.0ms) rollback transaction
277
+  (0.0ms) begin transaction
278
+ --------------------------------------------
279
+ BooksControllerTest: test_should_create_book
280
+ --------------------------------------------
281
+  (0.0ms) rollback transaction
282
+  (0.1ms) begin transaction
283
+ ------------------------------------------
284
+ BooksControllerTest: test_should_show_book
285
+ ------------------------------------------
286
+  (0.0ms) rollback transaction
287
+  (0.0ms) begin transaction
288
+ -----------------------------------------
289
+ BooksControllerTest: test_should_get_edit
290
+ -----------------------------------------
291
+  (0.2ms) rollback transaction
292
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
293
+  (0.1ms) begin transaction
294
+ --------------------------------------
295
+ LibrailsTest: test_rescue_mysql2_error
296
+ --------------------------------------
297
+  (0.0ms) rollback transaction
298
+  (0.0ms) begin transaction
299
+ ------------------------
300
+ LibrailsTest: test_hello
301
+ ------------------------
302
+  (0.0ms) rollback transaction
303
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
304
+  (0.1ms) begin transaction
305
+ ------------------------
306
+ LibrailsTest: test_hello
307
+ ------------------------
308
+  (0.1ms) rollback transaction
309
+  (0.1ms) begin transaction
310
+ --------------------------------------
311
+ LibrailsTest: test_rescue_mysql2_error
312
+ --------------------------------------
313
+  (0.1ms) rollback transaction
314
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
315
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
316
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
317
+  (0.1ms) begin transaction
318
+ ------------------------
319
+ LibrailsTest: test_hello
320
+ ------------------------
321
+  (0.0ms) rollback transaction
322
+  (0.0ms) begin transaction
323
+ --------------------------------------
324
+ LibrailsTest: test_rescue_mysql2_error
325
+ --------------------------------------
326
+  (0.0ms) rollback transaction
327
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
328
+  (0.1ms) begin transaction
329
+ --------------------------------------
330
+ LibrailsTest: test_rescue_mysql2_error
331
+ --------------------------------------
332
+  (0.1ms) rollback transaction
333
+  (0.0ms) begin transaction
334
+ ------------------------
335
+ LibrailsTest: test_hello
336
+ ------------------------
337
+  (0.0ms) rollback transaction
338
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
339
+  (0.1ms) begin transaction
340
+ --------------------------------------
341
+ LibrailsTest: test_rescue_mysql2_error
342
+ --------------------------------------
343
+  (0.0ms) rollback transaction
344
+  (0.0ms) begin transaction
345
+ ------------------------
346
+ LibrailsTest: test_hello
347
+ ------------------------
348
+  (0.0ms) rollback transaction
349
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
350
+  (0.1ms) begin transaction
351
+ ------------------------
352
+ LibrailsTest: test_hello
353
+ ------------------------
354
+  (0.0ms) rollback transaction
355
+  (0.0ms) begin transaction
356
+ --------------------------------------
357
+ LibrailsTest: test_rescue_mysql2_error
358
+ --------------------------------------
359
+  (0.0ms) rollback transaction
360
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
361
+  (0.1ms) begin transaction
362
+ --------------------------------------
363
+ LibrailsTest: test_rescue_mysql2_error
364
+ --------------------------------------
365
+  (0.1ms) rollback transaction
366
+  (0.0ms) begin transaction
367
+ ------------------------
368
+ LibrailsTest: test_hello
369
+ ------------------------
370
+  (0.0ms) rollback transaction
371
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
372
+  (0.1ms) begin transaction
373
+ ------------------------
374
+ LibrailsTest: test_hello
375
+ ------------------------
376
+  (0.1ms) rollback transaction
377
+  (0.1ms) begin transaction
378
+ --------------------------------------
379
+ LibrailsTest: test_rescue_mysql2_error
380
+ --------------------------------------
381
+  (0.0ms) rollback transaction
382
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
383
+  (0.1ms) begin transaction
384
+ ------------------------
385
+ LibrailsTest: test_hello
386
+ ------------------------
387
+  (0.0ms) rollback transaction
388
+  (0.0ms) begin transaction
389
+ --------------------------------------
390
+ LibrailsTest: test_rescue_mysql2_error
391
+ --------------------------------------
392
+  (0.0ms) rollback transaction
393
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
394
+  (0.1ms) begin transaction
395
+ ------------------------
396
+ LibrailsTest: test_hello
397
+ ------------------------
398
+  (0.0ms) rollback transaction
399
+  (0.0ms) begin transaction
400
+ --------------------------------------
401
+ LibrailsTest: test_rescue_mysql2_error
402
+ --------------------------------------
403
+  (0.0ms) rollback transaction
404
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
405
+  (0.1ms) begin transaction
406
+ ------------------------
407
+ LibrailsTest: test_hello
408
+ ------------------------
409
+  (0.0ms) rollback transaction
410
+  (0.0ms) begin transaction
411
+ --------------------------------------
412
+ LibrailsTest: test_rescue_mysql2_error
413
+ --------------------------------------
414
+  (0.0ms) rollback transaction
415
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
416
+  (0.1ms) begin transaction
417
+ --------------------------------------
418
+ LibrailsTest: test_rescue_mysql2_error
419
+ --------------------------------------
420
+  (0.1ms) rollback transaction
421
+  (0.0ms) begin transaction
422
+ ------------------------
423
+ LibrailsTest: test_hello
424
+ ------------------------
425
+  (0.0ms) rollback transaction
426
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
427
+  (0.1ms) begin transaction
428
+ ------------------------
429
+ LibrailsTest: test_hello
430
+ ------------------------
431
+  (0.0ms) rollback transaction
432
+  (0.0ms) begin transaction
433
+ --------------------------------------
434
+ LibrailsTest: test_rescue_mysql2_error
435
+ --------------------------------------
436
+  (0.0ms) rollback transaction
437
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
438
+  (0.1ms) begin transaction
439
+ --------------------------------------
440
+ LibrailsTest: test_rescue_mysql2_error
441
+ --------------------------------------
442
+  (0.1ms) rollback transaction
443
+  (0.0ms) begin transaction
444
+ ------------------------
445
+ LibrailsTest: test_hello
446
+ ------------------------
447
+  (0.0ms) rollback transaction
448
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
449
+  (0.1ms) begin transaction
450
+ ------------------------
451
+ LibrailsTest: test_hello
452
+ ------------------------
453
+  (0.1ms) rollback transaction
454
+  (0.1ms) begin transaction
455
+ --------------------------------------
456
+ LibrailsTest: test_rescue_mysql2_error
457
+ --------------------------------------
458
+  (0.1ms) rollback transaction
459
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
460
+  (0.1ms) begin transaction
461
+ ------------------------
462
+ LibrailsTest: test_hello
463
+ ------------------------
464
+  (0.0ms) rollback transaction
465
+  (0.0ms) begin transaction
466
+ --------------------------------------
467
+ LibrailsTest: test_rescue_mysql2_error
468
+ --------------------------------------
469
+  (0.0ms) rollback transaction
470
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
471
+  (0.1ms) begin transaction
472
+ ------------------------
473
+ LibrailsTest: test_hello
474
+ ------------------------
475
+  (0.1ms) rollback transaction
476
+  (0.1ms) begin transaction
477
+ --------------------------------------
478
+ LibrailsTest: test_rescue_mysql2_error
479
+ --------------------------------------
480
+  (0.1ms) rollback transaction
481
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
482
+  (0.1ms) begin transaction
483
+ ------------------------
484
+ LibrailsTest: test_hello
485
+ ------------------------
486
+  (0.0ms) rollback transaction
487
+  (0.1ms) begin transaction
488
+ --------------------------------------
489
+ LibrailsTest: test_rescue_mysql2_error
490
+ --------------------------------------
491
+  (0.0ms) rollback transaction
492
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
493
+  (0.1ms) begin transaction
494
+ ------------------------
495
+ LibrailsTest: test_hello
496
+ ------------------------
497
+  (0.0ms) rollback transaction
498
+  (0.0ms) begin transaction
499
+ --------------------------------------
500
+ LibrailsTest: test_rescue_mysql2_error
501
+ --------------------------------------
502
+  (0.0ms) rollback transaction
503
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
504
+  (0.1ms) begin transaction
505
+ ------------------------------------------
506
+ BooksControllerTest: test_should_get_index
507
+ ------------------------------------------
508
+  (0.1ms) rollback transaction
509
+  (0.1ms) begin transaction
510
+ ------------------------
511
+ LibrailsTest: test_hello
512
+ ------------------------
513
+  (0.0ms) rollback transaction
514
+  (0.0ms) begin transaction
515
+ --------------------------------------
516
+ LibrailsTest: test_rescue_mysql2_error
517
+ --------------------------------------
518
+  (0.0ms) rollback transaction
519
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
520
+  (0.1ms) begin transaction
521
+ ------------------------
522
+ LibrailsTest: test_hello
523
+ ------------------------
524
+  (0.1ms) rollback transaction
525
+  (0.1ms) begin transaction
526
+ --------------------------------------
527
+ LibrailsTest: test_rescue_mysql2_error
528
+ --------------------------------------
529
+  (0.1ms) rollback transaction
530
+  (0.1ms) begin transaction
531
+ ------------------------------------------
532
+ BooksControllerTest: test_should_get_index
533
+ ------------------------------------------
534
+  (0.1ms) rollback transaction
535
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
536
+  (0.2ms) begin transaction
537
+ ------------------------------------------
538
+ BooksControllerTest: test_should_get_index
539
+ ------------------------------------------
540
+  (0.1ms) rollback transaction
541
+  (0.1ms) begin transaction
542
+ ------------------------
543
+ LibrailsTest: test_hello
544
+ ------------------------
545
+  (0.0ms) rollback transaction
546
+  (0.1ms) begin transaction
547
+ --------------------------------------
548
+ LibrailsTest: test_rescue_mysql2_error
549
+ --------------------------------------
550
+  (0.1ms) rollback transaction
551
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
552
+  (0.1ms) begin transaction
553
+ ------------------------
554
+ LibrailsTest: test_hello
555
+ ------------------------
556
+  (0.0ms) rollback transaction
557
+  (0.1ms) begin transaction
558
+ --------------------------------------
559
+ LibrailsTest: test_rescue_mysql2_error
560
+ --------------------------------------
561
+  (0.0ms) rollback transaction
562
+  (0.0ms) begin transaction
563
+ ------------------------------------------
564
+ BooksControllerTest: test_should_get_index
565
+ ------------------------------------------
566
+  (0.1ms) rollback transaction
567
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
568
+  (0.1ms) begin transaction
569
+ --------------------------------------
570
+ LibrailsTest: test_rescue_mysql2_error
571
+ --------------------------------------
572
+  (0.0ms) rollback transaction
573
+  (0.1ms) begin transaction
574
+ ------------------------
575
+ LibrailsTest: test_hello
576
+ ------------------------
577
+  (0.1ms) rollback transaction
578
+  (0.0ms) begin transaction
579
+ ------------------------------------------
580
+ BooksControllerTest: test_should_get_index
581
+ ------------------------------------------
582
+  (0.1ms) rollback transaction
583
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
584
+  (0.1ms) begin transaction
585
+ ------------------------
586
+ LibrailsTest: test_hello
587
+ ------------------------
588
+  (0.0ms) rollback transaction
589
+  (0.0ms) begin transaction
590
+ --------------------------------------
591
+ LibrailsTest: test_rescue_mysql2_error
592
+ --------------------------------------
593
+  (0.0ms) rollback transaction
594
+  (0.1ms) begin transaction
595
+ ------------------------------------------
596
+ BooksControllerTest: test_should_get_index
597
+ ------------------------------------------
598
+  (0.1ms) rollback transaction
599
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
600
+  (0.1ms) begin transaction
601
+ Fixture Delete (2.6ms) DELETE FROM "books"
602
+ Fixture Insert (0.8ms) INSERT INTO "books" ("title", "author", "summary", "created_at", "updated_at", "id") VALUES ('MyString', 'MyString', 'MyText', '2016-10-26 04:42:27', '2016-10-26 04:42:27', 980190962)
603
+ Fixture Insert (0.5ms) INSERT INTO "books" ("title", "author", "summary", "created_at", "updated_at", "id") VALUES ('MyString', 'MyString', 'MyText', '2016-10-26 04:42:27', '2016-10-26 04:42:27', 298486374)
604
+  (0.7ms) commit transaction
605
+  (0.0ms) begin transaction
606
+ ------------------------
607
+ LibrailsTest: test_hello
608
+ ------------------------
609
+  (0.0ms) rollback transaction
610
+  (0.0ms) begin transaction
611
+ --------------------------------------
612
+ LibrailsTest: test_rescue_mysql2_error
613
+ --------------------------------------
614
+  (0.0ms) rollback transaction
615
+  (0.1ms) begin transaction
616
+ ------------------------------------------
617
+ BooksControllerTest: test_should_get_index
618
+ ------------------------------------------
619
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 980190962]]
620
+ Processing by BooksController#index as HTML
621
+ Book Load (0.1ms) SELECT "books".* FROM "books"
622
+ Rendered books/index.html.erb within layouts/application (3.5ms)
623
+ Completed 200 OK in 189ms (Views: 188.6ms | ActiveRecord: 0.1ms)
624
+  (0.1ms) rollback transaction
625
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
626
+  (0.1ms) begin transaction
627
+ Fixture Delete (0.3ms) DELETE FROM "books"
628
+ Fixture Insert (0.1ms) INSERT INTO "books" ("title", "author", "summary", "created_at", "updated_at", "id") VALUES ('MyString', 'MyString', 'MyText', '2016-10-26 04:42:46', '2016-10-26 04:42:46', 980190962)
629
+ Fixture Insert (0.1ms) INSERT INTO "books" ("title", "author", "summary", "created_at", "updated_at", "id") VALUES ('MyString', 'MyString', 'MyText', '2016-10-26 04:42:46', '2016-10-26 04:42:46', 298486374)
630
+  (8.1ms) commit transaction
631
+  (0.1ms) begin transaction
632
+ ------------------------
633
+ LibrailsTest: test_hello
634
+ ------------------------
635
+  (0.0ms) rollback transaction
636
+  (0.0ms) begin transaction
637
+ --------------------------------------
638
+ LibrailsTest: test_rescue_mysql2_error
639
+ --------------------------------------
640
+  (0.0ms) rollback transaction
641
+  (0.0ms) begin transaction
642
+ ------------------------------------------
643
+ BooksControllerTest: test_should_get_index
644
+ ------------------------------------------
645
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 980190962]]
646
+ Processing by BooksController#index as HTML
647
+ Book Load (0.1ms) SELECT "books".* FROM "books"
648
+ Rendered books/index.html.erb within layouts/application (2.8ms)
649
+ Completed 200 OK in 146ms (Views: 145.8ms | ActiveRecord: 0.1ms)
650
+  (0.1ms) rollback transaction