okuribito_rails 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -6
  3. data/app/assets/images/okuribito_rails/logo.png +0 -0
  4. data/app/assets/stylesheets/okuribito_rails/application.css +11 -0
  5. data/app/assets/stylesheets/okuribito_rails/header.css +39 -0
  6. data/app/assets/stylesheets/okuribito_rails/method_call_info.css +0 -1
  7. data/app/controllers/okuribito_rails/application_controller.rb +19 -0
  8. data/app/models/okuribito_rails/method_call_log.rb +1 -1
  9. data/app/views/layouts/okuribito_rails/_header.html.erb +9 -0
  10. data/app/views/layouts/okuribito_rails/application.html.erb +4 -1
  11. data/app/views/okuribito_rails/method_call_situations/index.html.erb +2 -6
  12. data/lib/generators/okuribito_rails/templates/initializer.erb +6 -0
  13. data/lib/okuribito_rails/config.rb +15 -2
  14. data/lib/okuribito_rails/observe_method.rb +18 -11
  15. data/lib/okuribito_rails/railtie.rb +2 -14
  16. data/lib/okuribito_rails/regist_method.rb +15 -13
  17. data/lib/okuribito_rails/start_observer.rb +39 -0
  18. data/lib/okuribito_rails/version.rb +1 -1
  19. data/spec/dummy/db/development.sqlite3 +0 -0
  20. data/spec/dummy/db/test.sqlite3 +0 -0
  21. data/spec/dummy/log/development.log +131 -0
  22. data/spec/dummy/log/test.log +26561 -0
  23. data/spec/factories.rb +6 -6
  24. data/spec/lib/okuribito_rails/observe_method_spec.rb +33 -0
  25. data/spec/lib/okuribito_rails/regist_method_spec.rb +40 -0
  26. data/spec/lib/okuribito_rails/start_observer_spec.rb +36 -0
  27. data/spec/models/method_call_log_spec.rb +5 -5
  28. data/spec/models/method_call_situation_spec.rb +5 -5
  29. data/spec/spec_helper.rb +16 -0
  30. data/spec/support/test_config.yml +3 -0
  31. data/spec/support/test_target.rb +5 -0
  32. metadata +33 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7a139dac2a491953b55242fff83baba4692ae6e
4
- data.tar.gz: 19520deb5322bd318ea38afb5bd7d6c75b3f48ce
3
+ metadata.gz: dd4b90597549d8c3caf329d3c4364cea6f38ec76
4
+ data.tar.gz: 437ae8940f476287492a92fe941336d0c8851c50
5
5
  SHA512:
6
- metadata.gz: bfd4139173341dd81cbc0a8bd301e62ec0f5ef4a75b8c9cee9605af316a845527e9fa50a188570acd94d0f7dd2e8204b9b3ea96f5811119854abde8ecbee6788
7
- data.tar.gz: b34c654976fac036c2cff3d8b022734a51bae591e7dba080042e1c688cb2a8b968884f290150bca5df97f0cacb3d733fae805dc2f9204be8da6c1f659cfabfa4
6
+ metadata.gz: 2331e21330de88c70939e5fa017e729ce068dab6f6824f77c8bb3a5b2078430b3faa56b0956e9b296a353088885254d290fce6675902449373abea1257c0e2ea
7
+ data.tar.gz: ab868ae7c137dbed5aa741a2872ee9b2c1575b28214211e6f7475115d2ea5b60c39aef9fc009b2cc0644f8133fe71b69b811f19748b3fd46f960caf409393edd
data/README.md CHANGED
@@ -4,15 +4,13 @@
4
4
 
5
5
  # OkuribitoRails
6
6
 
7
- OkuribitoRails is an engine for Rails that aims to be the managing method call status.
7
+ OkuribitoRails is an engine for Rails that aims to manage method call status.
8
8
 
9
- You should create a configuration file. (Describe the method name you want to monitor)
9
+ OkuribitoRails monitors method calls with YAML.
10
10
 
11
- When OkuribitoRails detected a method call during application execution, it registers the method call information in the DB.
11
+ You can identify methods that have not been called from anywhere!
12
12
 
13
- In other words, you can identify methods that have not been called from anywhere in production!
14
-
15
- ![OkuribitoRails](https://raw.githubusercontent.com/muramurasan/okuribito_rails/master/doc/sample.png)
13
+ ![Sample](https://raw.githubusercontent.com/muramurasan/okuribito_rails/master/doc/sample.png)
16
14
 
17
15
  # Features
18
16
 
@@ -11,3 +11,14 @@
11
11
  *= require_self
12
12
  *= require_tree .
13
13
  */
14
+
15
+ body {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ .main {
21
+ width: 98%;
22
+ margin-left: auto;
23
+ margin-right: auto;
24
+ }
@@ -0,0 +1,39 @@
1
+ .header {
2
+ width: 100%;
3
+ background-color: #000;
4
+ height: 60px;
5
+ padding: 5px;
6
+ margin-bottom: 20px;
7
+ }
8
+
9
+ .global-nav {
10
+ text-align: right;
11
+ }
12
+ .global-nav .nav-logo {
13
+ float: left;
14
+ display: inline-block;
15
+ margin-top: -18px;
16
+ }
17
+ .global-nav .nav-item {
18
+ float: right;
19
+ display: inline-block;
20
+ margin: 0 10px;
21
+ }
22
+ .global-nav .nav-item a {
23
+ display: inline-block;
24
+ width: 160px;
25
+ height: 30px;
26
+ line-height: 30px;
27
+ text-align: center;
28
+ border-radius: 8px;
29
+ color: #fff;
30
+ font-size: 1.3rem;
31
+ letter-spacing: 1px;
32
+ transition: 0.15s;
33
+ text-decoration: none;
34
+ }
35
+ .global-nav .nav-item.active a,
36
+ .global-nav .nav-item a:hover {
37
+ background-color: #d03c56;
38
+ color: #fff;
39
+ }
@@ -1,7 +1,6 @@
1
1
  .method_call_info{
2
2
  width: 100%;
3
3
  border-collapse: collapse;
4
- margin-bottom: 10px;
5
4
  }
6
5
  .method_call_info th{
7
6
  padding: 6px;
@@ -1,5 +1,24 @@
1
1
  module OkuribitoRails
2
2
  class ApplicationController < ActionController::Base
3
3
  protect_from_forgery
4
+
5
+ if Gem::Version.new(Rails.version) < Gem::Version.new(4)
6
+ before_filter :available_action!
7
+ else
8
+ before_action :available_action!
9
+ end
10
+
11
+ def available_action!
12
+ if prohibited_env?
13
+ render nothing: true, status: 403
14
+ return
15
+ end
16
+ end
17
+
18
+ private
19
+
20
+ def prohibited_env?
21
+ OkuribitoRails.config.prohibit_webui.include?(ENV["RAILS_ENV"])
22
+ end
4
23
  end
5
24
  end
@@ -1,6 +1,6 @@
1
1
  module OkuribitoRails
2
2
  class MethodCallLog < ActiveRecord::Base
3
- belongs_to :method_call_situation
3
+ belongs_to :method_call_situation, counter_cache: :called_num
4
4
 
5
5
  validates :class_name, presence: true, length: { minimum: 1, maximum: 255 }
6
6
  validates :method_symbol, presence: true, inclusion: { in: %w(. #) }
@@ -0,0 +1,9 @@
1
+ <header class="header">
2
+ <nav class="global-nav">
3
+ <%= image_tag "okuribito_rails/logo.png", class: "nav-logo" %>
4
+ <ul>
5
+ <li class="nav-item"><%= link_to "Monitoring", method_call_situations_path %></li>
6
+ <li class="nav-item"><%= link_to "Logs", method_call_logs_path %></li>
7
+ </ul>
8
+ </nav>
9
+ </header>
@@ -8,7 +8,10 @@
8
8
  </head>
9
9
  <body>
10
10
 
11
- <%= yield %>
11
+ <%= render 'layouts/okuribito_rails/header' %>
12
+ <div class="main">
13
+ <%= yield %>
14
+ </div>
12
15
 
13
16
  </body>
14
17
  </html>
@@ -2,9 +2,8 @@
2
2
  <tbody>
3
3
  <tr>
4
4
  <th>Method name</th>
5
- <th>Number of calls</th>
6
- <th>Monitoring start date</th>
7
- <th>Last call date</th>
5
+ <th>Number of times called</th>
6
+ <th>Observation start date</th>
8
7
  </tr>
9
8
  <% @method_call_situations.each do |method_call_situation| %>
10
9
  <tr>
@@ -17,9 +16,6 @@
17
16
  <td>
18
17
  <%= method_call_situation.created_at %>
19
18
  </td>
20
- <td>
21
- <%= method_call_situation.called_num > 0 ? method_call_situation.updated_at : "Not called" %>
22
- </td>
23
19
  </tr>
24
20
  <% end %>
25
21
  </tbody>
@@ -4,4 +4,10 @@ OkuribitoRails.configure do |config|
4
4
 
5
5
  # Detecting method calls only once during application running.
6
6
  config.once_detect = true
7
+
8
+ # You will not be able to access the Web UI in the specified environment.
9
+ config.prohibit_webui = ["test"]
10
+
11
+ # It will not monitor method calls in the specified environment.
12
+ config.prohibit_observe = ["test"]
7
13
  end
@@ -2,7 +2,20 @@ module OkuribitoRails
2
2
  class Config
3
3
  include ActiveSupport::Configurable
4
4
 
5
- config_accessor :once_detect
6
- config_accessor :setting_path
5
+ config_accessor :once_detect do
6
+ true
7
+ end
8
+
9
+ config_accessor :setting_path do
10
+ "config/okuribito.yml"
11
+ end
12
+
13
+ config_accessor :prohibit_webui do
14
+ ["test"]
15
+ end
16
+
17
+ config_accessor :prohibit_observe do
18
+ ["test"]
19
+ end
7
20
  end
8
21
  end
@@ -4,20 +4,27 @@ module OkuribitoRails
4
4
  class ObserveMethod
5
5
  def patch_okuribito
6
6
  Okuribito::OkuribitoPatch.new(
7
- once_detect: OkuribitoRails.config.once_detect
7
+ once_detect: config_once_detect
8
8
  ) do |method_name, _obj_name, caller_info, class_name, method_symbol|
9
- situation = MethodCallSituation.find_by(class_name: class_name,
10
- method_symbol: method_symbol,
11
- method_name: method_name)
12
- if situation.present?
13
- situation.increment!(:called_num)
14
- MethodCallLog.create(method_call_situation: situation,
15
- class_name: class_name,
16
- method_symbol: method_symbol,
17
- method_name: method_name,
18
- back_trace: caller_info[0])
9
+ ActiveRecord::Base.transaction do
10
+ situation = MethodCallSituation.find_by(class_name: class_name,
11
+ method_symbol: method_symbol,
12
+ method_name: method_name)
13
+ if situation.present?
14
+ MethodCallLog.create(method_call_situation: situation,
15
+ class_name: class_name,
16
+ method_symbol: method_symbol,
17
+ method_name: method_name,
18
+ back_trace: caller_info[0])
19
+ end
19
20
  end
20
21
  end
21
22
  end
23
+
24
+ private
25
+
26
+ def config_once_detect
27
+ OkuribitoRails.config.once_detect
28
+ end
22
29
  end
23
30
  end
@@ -1,21 +1,9 @@
1
- require "okuribito_rails/regist_method"
2
- require "okuribito_rails/observe_method"
1
+ require "okuribito_rails/start_observer"
3
2
 
4
3
  module OkuribitoRails
5
4
  class Railtie < ::Rails::Railtie
6
5
  config.after_initialize do
7
- if ActiveRecord::Base.connection.table_exists? "okuribito_rails_method_call_situations"
8
- yaml_path = OkuribitoRails.config.setting_path
9
-
10
- unless yaml_path.nil?
11
- # Update database by observed methods.
12
- RegistMethod.new.update_observe_methods(yaml_path)
13
-
14
- # Define behavior that when method called.
15
- okuribito = ObserveMethod.new.patch_okuribito
16
- okuribito.apply(yaml_path) if File.exist?(yaml_path)
17
- end
18
- end
6
+ StartObserver.new.start
19
7
  end
20
8
  end
21
9
  end
@@ -6,21 +6,13 @@ module OkuribitoRails
6
6
  input = yaml_to_array(path)
7
7
  base = db_to_array
8
8
  new_methods = input - base
9
- new_methods.each do |new_method|
10
- array = new_method.split(/\s*(#|\.)\s*/)
11
- MethodCallSituation.create(class_name: array[0],
12
- method_symbol: array[1],
13
- method_name: array[2])
14
- end
15
- delete_methods = base - input
16
- delete_methods.each do |delete_method|
17
- array = delete_method.split(/\s*(#|\.)\s*/)
18
- MethodCallSituation.find_by(class_name: array[0],
19
- method_symbol: array[1],
20
- method_name: array[2]).destroy
21
- end
9
+ new_methods.each { |new_method| regist_method(new_method) }
10
+ old_methods = base - input
11
+ old_methods.each { |old_method| destroy_method(old_method) }
22
12
  end
23
13
 
14
+ private
15
+
24
16
  def yaml_to_array(path)
25
17
  yaml = YAML.load_file(path)
26
18
  methods_array = []
@@ -40,5 +32,15 @@ module OkuribitoRails
40
32
  end
41
33
  methods_array
42
34
  end
35
+
36
+ def regist_method(method)
37
+ a = method.split(/\s*(#|\.)\s*/)
38
+ MethodCallSituation.create(class_name: a[0], method_symbol: a[1], method_name: a[2])
39
+ end
40
+
41
+ def destroy_method(method)
42
+ a = method.split(/\s*(#|\.)\s*/)
43
+ MethodCallSituation.find_by(class_name: a[0], method_symbol: a[1], method_name: a[2]).destroy
44
+ end
43
45
  end
44
46
  end
@@ -0,0 +1,39 @@
1
+ require "okuribito_rails/regist_method"
2
+ require "okuribito_rails/observe_method"
3
+
4
+ module OkuribitoRails
5
+ class StartObserver
6
+ def start
7
+ return if prohibit_env? || before_migrate?
8
+ return unless File.exist?(yaml_path = setting_path)
9
+
10
+ regist_method(yaml_path)
11
+ start_observer(yaml_path)
12
+ end
13
+
14
+ private
15
+
16
+ def prohibit_env?
17
+ OkuribitoRails.config.prohibit_observe.include?(ENV["RAILS_ENV"])
18
+ end
19
+
20
+ def before_migrate?
21
+ !ActiveRecord::Base.connection.table_exists? "okuribito_rails_method_call_situations"
22
+ end
23
+
24
+ def setting_path
25
+ OkuribitoRails.config.setting_path
26
+ end
27
+
28
+ def regist_method(yaml_path)
29
+ # Update database by observed methods.
30
+ RegistMethod.new.update_observe_methods(yaml_path)
31
+ end
32
+
33
+ def start_observer(yaml_path)
34
+ # Define behavior that when method called.
35
+ okuribito = ObserveMethod.new.patch_okuribito
36
+ okuribito.apply(yaml_path)
37
+ end
38
+ end
39
+ end
@@ -1,3 +1,3 @@
1
1
  module OkuribitoRails
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.1.0".freeze
3
3
  end
Binary file
Binary file
@@ -3,3 +3,134 @@ DEPRECATION WARNING: #table_exists? currently checks both tables and views. This
3
3
   (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
4
  ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
5
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6
+ DEPRECATION WARNING: #table_exists? currently checks both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only check tables. Use #data_source_exists? instead. (called from block in <class:Railtie> at /Users/ym/works/okuribito_rails_dev/lib/okuribito_rails/railtie.rb:7)
7
+ DEPRECATION WARNING: #table_exists? currently checks both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only check tables. Use #data_source_exists? instead. (called from before_migrate? at /Users/ym/works/okuribito_rails_dev/lib/okuribito_rails/start_observer.rb:21)
8
+ ActiveRecord::SchemaMigration Load (2.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
9
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
+  (4.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
11
+  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
12
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+ Migrating to CreateOkuribitoRailsMethodCallSituations (20161027145839)
14
+  (0.1ms) begin transaction
15
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
16
+
17
+ class CreateOkuribitoRailsMethodCallSituations < ActiveRecord::Migration[4.2] (called from load at /Users/ym/.rbenv/versions/2.3.1/bin/rake:23)
18
+  (0.5ms) CREATE TABLE "okuribito_rails_method_call_situations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "class_name" varchar NOT NULL, "method_symbol" varchar NOT NULL, "method_name" varchar NOT NULL, "created_at" datetime, "updated_at" datetime)
19
+  (0.1ms) select sqlite_version(*)
20
+  (0.1ms) CREATE INDEX "index_okuribito_rails_method_call_situations_on_class_name" ON "okuribito_rails_method_call_situations" ("class_name")
21
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161027145839"]]
22
+  (0.9ms) commit transaction
23
+ Migrating to CreateOkuribitoRailsMethodCallLogs (20161027150000)
24
+  (0.1ms) begin transaction
25
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
26
+
27
+ class CreateOkuribitoRailsMethodCallLogs < ActiveRecord::Migration[4.2] (called from load at /Users/ym/.rbenv/versions/2.3.1/bin/rake:23)
28
+  (0.4ms) CREATE TABLE "okuribito_rails_method_call_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "class_name" varchar NOT NULL, "method_symbol" varchar NOT NULL, "method_name" varchar NOT NULL, "back_trace" text, "created_at" datetime, "updated_at" datetime)
29
+  (0.1ms) CREATE INDEX "index_okuribito_rails_method_call_logs_on_class_name" ON "okuribito_rails_method_call_logs" ("class_name")
30
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161027150000"]]
31
+  (2.4ms) commit transaction
32
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
33
+  (0.1ms) begin transaction
34
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2016-12-18 15:34:06 UTC], ["updated_at", 2016-12-18 15:34:06 UTC]]
35
+  (1.0ms) commit transaction
36
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
37
+  (0.1ms)  SELECT sql
38
+ FROM sqlite_master
39
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
40
+ UNION ALL
41
+ SELECT sql
42
+ FROM sqlite_temp_master
43
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
44
+ 
45
+  (0.5ms)  SELECT sql
46
+ FROM sqlite_master
47
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
48
+ UNION ALL
49
+ SELECT sql
50
+ FROM sqlite_temp_master
51
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
52
+ 
53
+ DEPRECATION WARNING: #table_exists? currently checks both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only check tables. Use #data_source_exists? instead. (called from before_migrate? at /Users/ym/works/okuribito_rails_dev/lib/okuribito_rails/start_observer.rb:21)
54
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
55
+  (1.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
56
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
57
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
58
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
59
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
60
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
61
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
62
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
63
+ Migrating to CreateOkuribitoRailsMethodCallSituations (20161027145839)
64
+  (0.1ms) begin transaction
65
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
66
+
67
+ class CreateOkuribitoRailsMethodCallSituations < ActiveRecord::Migration[4.2] (called from load at /Users/ym/.rbenv/versions/2.3.1/bin/rake:23)
68
+  (0.5ms) CREATE TABLE "okuribito_rails_method_call_situations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "class_name" varchar NOT NULL, "method_symbol" varchar NOT NULL, "method_name" varchar NOT NULL, "called_num" integer DEFAULT 0 NOT NULL, "created_at" datetime, "updated_at" datetime)
69
+  (0.1ms) select sqlite_version(*)
70
+  (0.1ms) CREATE INDEX "index_okuribito_rails_method_call_situations_on_class_name" ON "okuribito_rails_method_call_situations" ("class_name")
71
+  (0.1ms)  SELECT sql
72
+ FROM sqlite_master
73
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
74
+ UNION ALL
75
+ SELECT sql
76
+ FROM sqlite_temp_master
77
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
78
+ 
79
+  (0.2ms) CREATE INDEX "index_okuribito_rails_method_call_situations_on_method_name" ON "okuribito_rails_method_call_situations" ("method_name")
80
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161027145839"]]
81
+  (0.9ms) commit transaction
82
+ Migrating to CreateOkuribitoRailsMethodCallLogs (20161027150000)
83
+  (0.1ms) begin transaction
84
+ DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for:
85
+
86
+ class CreateOkuribitoRailsMethodCallLogs < ActiveRecord::Migration[4.2] (called from load at /Users/ym/.rbenv/versions/2.3.1/bin/rake:23)
87
+  (0.3ms) CREATE TABLE "okuribito_rails_method_call_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "method_call_situation_id" integer NOT NULL, "class_name" varchar NOT NULL, "method_symbol" varchar NOT NULL, "method_name" varchar NOT NULL, "back_trace" text, "created_at" datetime, "updated_at" datetime)
88
+  (0.1ms) CREATE INDEX "index_okuribito_rails_method_call_logs_on_class_name" ON "okuribito_rails_method_call_logs" ("class_name")
89
+  (0.1ms)  SELECT sql
90
+ FROM sqlite_master
91
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
92
+ UNION ALL
93
+ SELECT sql
94
+ FROM sqlite_temp_master
95
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
96
+ 
97
+  (0.1ms) CREATE INDEX "index_okuribito_rails_method_call_logs_on_method_name" ON "okuribito_rails_method_call_logs" ("method_name")
98
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161027150000"]]
99
+  (0.8ms) commit transaction
100
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
101
+  (0.2ms) begin transaction
102
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2016-12-18 15:58:24 UTC], ["updated_at", 2016-12-18 15:58:24 UTC]]
103
+  (0.8ms) commit transaction
104
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
105
+  (0.1ms)  SELECT sql
106
+ FROM sqlite_master
107
+ WHERE name='index_okuribito_rails_method_call_logs_on_method_name' AND type='index'
108
+ UNION ALL
109
+ SELECT sql
110
+ FROM sqlite_temp_master
111
+ WHERE name='index_okuribito_rails_method_call_logs_on_method_name' AND type='index'
112
+ 
113
+  (0.1ms)  SELECT sql
114
+ FROM sqlite_master
115
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
116
+ UNION ALL
117
+ SELECT sql
118
+ FROM sqlite_temp_master
119
+ WHERE name='index_okuribito_rails_method_call_logs_on_class_name' AND type='index'
120
+ 
121
+  (0.1ms)  SELECT sql
122
+ FROM sqlite_master
123
+ WHERE name='index_okuribito_rails_method_call_situations_on_method_name' AND type='index'
124
+ UNION ALL
125
+ SELECT sql
126
+ FROM sqlite_temp_master
127
+ WHERE name='index_okuribito_rails_method_call_situations_on_method_name' AND type='index'
128
+ 
129
+  (0.1ms)  SELECT sql
130
+ FROM sqlite_master
131
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
132
+ UNION ALL
133
+ SELECT sql
134
+ FROM sqlite_temp_master
135
+ WHERE name='index_okuribito_rails_method_call_situations_on_class_name' AND type='index'
136
+