[Groonga-commit] ranguba/groonga-client-model at beb98ac [master] test: really use Rails4...

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 7 15:11:37 JST 2017


Kouhei Sutou	2017-02-07 15:11:37 +0900 (Tue, 07 Feb 2017)

  New Revision: beb98ac017e648cbe53ca6a167c8d6d233e461d4
  https://github.com/ranguba/groonga-client-model/commit/beb98ac017e648cbe53ca6a167c8d6d233e461d4

  Message:
    test: really use Rails4...

  Added files:
    test/apps/rails4/app/models/application_groonga_record.rb
    test/apps/rails4/test/models/post_test.rb
  Removed files:
    test/apps/rails4/app/assets/config/manifest.js
    test/apps/rails4/app/assets/javascripts/cable.js
    test/apps/rails4/app/assets/javascripts/channels/.keep
    test/apps/rails4/app/channels/application_cable/channel.rb
    test/apps/rails4/app/channels/application_cable/connection.rb
    test/apps/rails4/app/jobs/application_job.rb
    test/apps/rails4/app/mailers/application_mailer.rb
    test/apps/rails4/app/views/layouts/mailer.html.erb
    test/apps/rails4/app/views/layouts/mailer.text.erb
    test/apps/rails4/bin/update
    test/apps/rails4/config/cable.yml
    test/apps/rails4/config/initializers/application_controller_renderer.rb
    test/apps/rails4/config/initializers/new_framework_defaults.rb
    test/apps/rails4/config/puma.rb
    test/apps/rails4/config/spring.rb
    test/apps/rails4/public/apple-touch-icon-precomposed.png
    test/apps/rails4/public/apple-touch-icon.png
  Modified files:
    test/apps/rails4/.gitignore
    test/apps/rails4/Gemfile
    test/apps/rails4/Gemfile.lock
    test/apps/rails4/Rakefile
    test/apps/rails4/app/assets/javascripts/application.js
    test/apps/rails4/app/assets/stylesheets/application.css
    test/apps/rails4/app/assets/stylesheets/scaffolds.scss
    test/apps/rails4/app/controllers/application_controller.rb
    test/apps/rails4/app/models/post.rb
    test/apps/rails4/app/views/layouts/application.html.erb
    test/apps/rails4/app/views/posts/_form.html.erb
    test/apps/rails4/app/views/posts/edit.html.erb
    test/apps/rails4/app/views/posts/index.html.erb
    test/apps/rails4/app/views/posts/new.html.erb
    test/apps/rails4/bin/rails
    test/apps/rails4/bin/setup
    test/apps/rails4/bin/spring
    test/apps/rails4/config.ru
    test/apps/rails4/config/application.rb
    test/apps/rails4/config/boot.rb
    test/apps/rails4/config/environment.rb
    test/apps/rails4/config/environments/development.rb
    test/apps/rails4/config/environments/production.rb
    test/apps/rails4/config/environments/test.rb
    test/apps/rails4/config/groonga.yml
    test/apps/rails4/config/initializers/cookies_serializer.rb
    test/apps/rails4/config/initializers/wrap_parameters.rb
    test/apps/rails4/config/routes.rb
    test/apps/rails4/config/secrets.yml
    test/apps/rails4/db/seeds.rb
    test/apps/rails4/test/controllers/posts_controller_test.rb
  Renamed files:
    test/apps/rails4/README.rdoc
      (from test/apps/rails4/README.md)
    test/apps/rails4/app/mailers/.keep
      (from test/apps/rails4/tmp/.keep)
    test/apps/rails4/app/models/.keep
      (from test/apps/rails4/test/fixtures/files/.keep)

  Modified: test/apps/rails4/.gitignore (+1 -5)
===================================================================
--- test/apps/rails4/.gitignore    2017-02-07 14:45:27 +0900 (48fb168)
+++ test/apps/rails4/.gitignore    2017-02-07 15:11:37 +0900 (5b61ab0)
@@ -9,9 +9,5 @@
 
 # Ignore all logfiles and tempfiles.
 /log/*
-/tmp/*
 !/log/.keep
-!/tmp/.keep
-
-# Ignore Byebug command history file.
-.byebug_history
+/tmp

  Modified: test/apps/rails4/Gemfile (+15 -22)
===================================================================
--- test/apps/rails4/Gemfile    2017-02-07 14:45:27 +0900 (502a520)
+++ test/apps/rails4/Gemfile    2017-02-07 15:11:37 +0900 (2152136)
@@ -1,55 +1,48 @@
 source 'https://rubygems.org'
 
-git_source(:github) do |repo_name|
-  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
-  "https://github.com/#{repo_name}.git"
-end
-
 
 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 5.0.1'
-# Use Puma as the app server
-gem 'puma', '~> 3.0'
+gem 'rails', '4.2.7.1'
 # Use SCSS for stylesheets
 gem 'sass-rails', '~> 5.0'
 # Use Uglifier as compressor for JavaScript assets
 gem 'uglifier', '>= 1.3.0'
 # Use CoffeeScript for .coffee assets and views
-gem 'coffee-rails', '~> 4.2'
+gem 'coffee-rails', '~> 4.1.0'
 # See https://github.com/rails/execjs#readme for more supported runtimes
 # gem 'therubyracer', platforms: :ruby
 
 # Use jquery as the JavaScript library
 gem 'jquery-rails'
-# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
-gem 'turbolinks', '~> 5'
+# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
+gem 'turbolinks'
 # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
-gem 'jbuilder', '~> 2.5'
-# Use Redis adapter to run Action Cable in production
-# gem 'redis', '~> 3.0'
+gem 'jbuilder', '~> 2.0'
+# bundle exec rake doc:rails generates the API under doc/api.
+gem 'sdoc', '~> 0.4.0', group: :doc
+
 # Use ActiveModel has_secure_password
 # gem 'bcrypt', '~> 3.1.7'
 
+# Use Unicorn as the app server
+# gem 'unicorn'
+
 # Use Capistrano for deployment
 # gem 'capistrano-rails', group: :development
 
 group :development, :test do
   # Call 'byebug' anywhere in the code to stop execution and get a debugger console
-  gem 'byebug', platform: :mri
+  gem 'byebug'
   gem 'factory_girl_rails'
 end
 
 group :development do
-  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
-  gem 'web-console', '>= 3.3.0'
-  gem 'listen', '~> 3.0.5'
+  # Access an IRB console on exception pages or by using <%= console %> in views
+  gem 'web-console', '~> 2.0'
+
   # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
   gem 'spring'
-  gem 'spring-watcher-listen', '~> 2.0.0'
 end
 
-# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
-gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
-
 gem 'groonga-client-model', path: '../../../'
 gem 'groonga-client', path: '../../../../groonga-client'

  Modified: test/apps/rails4/Gemfile.lock (+77 -91)
===================================================================
--- test/apps/rails4/Gemfile.lock    2017-02-07 14:45:27 +0900 (8017edb)
+++ test/apps/rails4/Gemfile.lock    2017-02-07 15:11:37 +0900 (29623ca)
@@ -1,7 +1,7 @@
 PATH
   remote: ../../../../groonga-client
   specs:
-    groonga-client (0.4.1)
+    groonga-client (0.4.2)
       gqtp (>= 1.0.4)
       groonga-command (>= 1.2.8)
       groonga-command-parser (>= 1.0.7)
@@ -10,7 +10,7 @@ PATH
 PATH
   remote: ../../../
   specs:
-    groonga-client-model (0.9.9)
+    groonga-client-model (1.0.0)
       activemodel
       groonga-client (>= 0.4.1)
       groonga-command-parser
@@ -18,49 +18,49 @@ PATH
 GEM
   remote: https://rubygems.org/
   specs:
-    actioncable (5.0.1)
-      actionpack (= 5.0.1)
-      nio4r (~> 1.2)
-      websocket-driver (~> 0.6.1)
-    actionmailer (5.0.1)
-      actionpack (= 5.0.1)
-      actionview (= 5.0.1)
-      activejob (= 5.0.1)
+    actionmailer (4.2.7.1)
+      actionpack (= 4.2.7.1)
+      actionview (= 4.2.7.1)
+      activejob (= 4.2.7.1)
       mail (~> 2.5, >= 2.5.4)
-      rails-dom-testing (~> 2.0)
-    actionpack (5.0.1)
-      actionview (= 5.0.1)
-      activesupport (= 5.0.1)
-      rack (~> 2.0)
-      rack-test (~> 0.6.3)
-      rails-dom-testing (~> 2.0)
+      rails-dom-testing (~> 1.0, >= 1.0.5)
+    actionpack (4.2.7.1)
+      actionview (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
+      rack (~> 1.6)
+      rack-test (~> 0.6.2)
+      rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionview (5.0.1)
-      activesupport (= 5.0.1)
+    actionview (4.2.7.1)
+      activesupport (= 4.2.7.1)
       builder (~> 3.1)
       erubis (~> 2.7.0)
-      rails-dom-testing (~> 2.0)
+      rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    activejob (5.0.1)
-      activesupport (= 5.0.1)
-      globalid (>= 0.3.6)
-    activemodel (5.0.1)
-      activesupport (= 5.0.1)
-    activerecord (5.0.1)
-      activemodel (= 5.0.1)
-      activesupport (= 5.0.1)
-      arel (~> 7.0)
-    activesupport (5.0.1)
-      concurrent-ruby (~> 1.0, >= 1.0.2)
+    activejob (4.2.7.1)
+      activesupport (= 4.2.7.1)
+      globalid (>= 0.3.0)
+    activemodel (4.2.7.1)
+      activesupport (= 4.2.7.1)
+      builder (~> 3.1)
+    activerecord (4.2.7.1)
+      activemodel (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
+      arel (~> 6.0)
+    activesupport (4.2.7.1)
       i18n (~> 0.7)
+      json (~> 1.7, >= 1.7.7)
       minitest (~> 5.1)
+      thread_safe (~> 0.3, >= 0.3.4)
       tzinfo (~> 1.1)
-    arel (7.1.4)
-    builder (3.2.2)
+    arel (6.0.4)
+    binding_of_caller (0.7.2)
+      debug_inspector (>= 0.0.1)
+    builder (3.2.3)
     byebug (9.0.6)
-    coffee-rails (4.2.1)
+    coffee-rails (4.1.1)
       coffee-script (>= 2.2.0)
-      railties (>= 4.0.0, < 5.2.x)
+      railties (>= 4.0.0, < 5.1.x)
     coffee-script (2.4.1)
       coffee-script-source
       execjs
@@ -74,7 +74,6 @@ GEM
     factory_girl_rails (4.8.0)
       factory_girl (~> 4.8.0)
       railties (>= 3.0.0)
-    ffi (1.9.14)
     globalid (0.3.7)
       activesupport (>= 4.1.0)
     gqtp (1.0.6)
@@ -83,65 +82,58 @@ GEM
     groonga-command-parser (1.0.9)
       groonga-command (>= 1.3.2)
       json-stream
-    hashie (3.4.6)
-    i18n (0.7.0)
+    hashie (3.5.1)
+    i18n (0.8.0)
     jbuilder (2.6.1)
       activesupport (>= 3.0.0, < 5.1)
       multi_json (~> 1.2)
-    jquery-rails (4.2.1)
+    jquery-rails (4.2.2)
       rails-dom-testing (>= 1, < 3)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
-    json (2.0.3)
+    json (1.8.6)
     json-stream (0.2.1)
-    listen (3.0.8)
-      rb-fsevent (~> 0.9, >= 0.9.4)
-      rb-inotify (~> 0.9, >= 0.9.7)
     loofah (2.0.3)
       nokogiri (>= 1.5.9)
     mail (2.6.4)
       mime-types (>= 1.16, < 4)
-    method_source (0.8.2)
     mime-types (3.1)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2016.0521)
     mini_portile2 (2.1.0)
     minitest (5.10.1)
     multi_json (1.12.1)
-    nio4r (1.2.1)
-    nokogiri (1.6.8.1)
+    nokogiri (1.7.0.1)
       mini_portile2 (~> 2.1.0)
-    puma (3.6.2)
-    rack (2.0.1)
+    rack (1.6.5)
     rack-test (0.6.3)
       rack (>= 1.0)
-    rails (5.0.1)
-      actioncable (= 5.0.1)
-      actionmailer (= 5.0.1)
-      actionpack (= 5.0.1)
-      actionview (= 5.0.1)
-      activejob (= 5.0.1)
-      activemodel (= 5.0.1)
-      activerecord (= 5.0.1)
-      activesupport (= 5.0.1)
+    rails (4.2.7.1)
+      actionmailer (= 4.2.7.1)
+      actionpack (= 4.2.7.1)
+      actionview (= 4.2.7.1)
+      activejob (= 4.2.7.1)
+      activemodel (= 4.2.7.1)
+      activerecord (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       bundler (>= 1.3.0, < 2.0)
-      railties (= 5.0.1)
-      sprockets-rails (>= 2.0.0)
-    rails-dom-testing (2.0.1)
-      activesupport (>= 4.2.0, < 6.0)
-      nokogiri (~> 1.6.0)
+      railties (= 4.2.7.1)
+      sprockets-rails
+    rails-deprecated_sanitizer (1.0.3)
+      activesupport (>= 4.2.0.alpha)
+    rails-dom-testing (1.0.8)
+      activesupport (>= 4.2.0.beta, < 5.0)
+      nokogiri (~> 1.6)
+      rails-deprecated_sanitizer (>= 1.0.1)
     rails-html-sanitizer (1.0.3)
       loofah (~> 2.0)
-    railties (5.0.1)
-      actionpack (= 5.0.1)
-      activesupport (= 5.0.1)
-      method_source
+    railties (4.2.7.1)
+      actionpack (= 4.2.7.1)
+      activesupport (= 4.2.7.1)
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
     rake (12.0.0)
-    rb-fsevent (0.9.8)
-    rb-inotify (0.9.7)
-      ffi (>= 0.5.0)
+    rdoc (4.3.0)
     sass (3.4.23)
     sass-rails (5.0.6)
       railties (>= 4.0.0, < 6)
@@ -149,11 +141,11 @@ GEM
       sprockets (>= 2.8, < 4.0)
       sprockets-rails (>= 2.0, < 4.0)
       tilt (>= 1.1, < 3)
-    spring (2.0.0)
+    sdoc (0.4.2)
+      json (~> 1.7, >= 1.7.7)
+      rdoc (~> 4.0)
+    spring (2.0.1)
       activesupport (>= 4.2)
-    spring-watcher-listen (2.0.1)
-      listen (>= 2.7, < 4.0)
-      spring (>= 1.2, < 3.0)
     sprockets (3.7.1)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
@@ -163,7 +155,7 @@ GEM
       sprockets (>= 3.0.0)
     thor (0.19.4)
     thread_safe (0.3.5)
-    tilt (2.0.5)
+    tilt (2.0.6)
     turbolinks (5.0.1)
       turbolinks-source (~> 5)
     turbolinks-source (5.0.0)
@@ -171,36 +163,30 @@ GEM
       thread_safe (~> 0.1)
     uglifier (3.0.4)
       execjs (>= 0.3.0, < 3)
-    web-console (3.4.0)
-      actionview (>= 5.0)
-      activemodel (>= 5.0)
-      debug_inspector
-      railties (>= 5.0)
-    websocket-driver (0.6.4)
-      websocket-extensions (>= 0.1.0)
-    websocket-extensions (0.1.2)
+    web-console (2.3.0)
+      activemodel (>= 4.0)
+      binding_of_caller (>= 0.7.2)
+      railties (>= 4.0)
+      sprockets-rails (>= 2.0, < 4.0)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
   byebug
-  coffee-rails (~> 4.2)
+  coffee-rails (~> 4.1.0)
   factory_girl_rails
   groonga-client!
   groonga-client-model!
-  jbuilder (~> 2.5)
+  jbuilder (~> 2.0)
   jquery-rails
-  listen (~> 3.0.5)
-  puma (~> 3.0)
-  rails (~> 5.0.1)
+  rails (= 4.2.7.1)
   sass-rails (~> 5.0)
+  sdoc (~> 0.4.0)
   spring
-  spring-watcher-listen (~> 2.0.0)
-  turbolinks (~> 5)
-  tzinfo-data
+  turbolinks
   uglifier (>= 1.3.0)
-  web-console (>= 3.3.0)
+  web-console (~> 2.0)
 
 BUNDLED WITH
    1.13.6

  Renamed: test/apps/rails4/README.rdoc (+5 -1) 76%
===================================================================
--- test/apps/rails4/README.md    2017-02-07 14:45:27 +0900 (7db80e4)
+++ test/apps/rails4/README.rdoc    2017-02-07 15:11:37 +0900 (dd4e97e)
@@ -1,4 +1,4 @@
-# README
+== README
 
 This README would normally document whatever steps are necessary to get the
 application up and running.
@@ -22,3 +22,7 @@ Things you may want to cover:
 * Deployment instructions
 
 * ...
+
+
+Please feel free to use a different markup language if you do not plan to run
+<tt>rake doc:app</tt>.

  Modified: test/apps/rails4/Rakefile (+1 -1)
===================================================================
--- test/apps/rails4/Rakefile    2017-02-07 14:45:27 +0900 (e85f913)
+++ test/apps/rails4/Rakefile    2017-02-07 15:11:37 +0900 (ba6b733)
@@ -1,6 +1,6 @@
 # Add your own tasks in files placed in lib/tasks ending in .rake,
 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
-require_relative 'config/application'
+require File.expand_path('../config/application', __FILE__)
 
 Rails.application.load_tasks

  Deleted: test/apps/rails4/app/assets/config/manifest.js (+0 -3) 100644
===================================================================
--- test/apps/rails4/app/assets/config/manifest.js    2017-02-07 14:45:27 +0900 (b16e53d)
+++ /dev/null
@@ -1,3 +0,0 @@
-//= link_tree ../images
-//= link_directory ../javascripts .js
-//= link_directory ../stylesheets .css

  Modified: test/apps/rails4/app/assets/javascripts/application.js (+1 -1)
===================================================================
--- test/apps/rails4/app/assets/javascripts/application.js    2017-02-07 14:45:27 +0900 (b12018d)
+++ test/apps/rails4/app/assets/javascripts/application.js    2017-02-07 15:11:37 +0900 (e07c5a8)
@@ -5,7 +5,7 @@
 // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
 //
 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// compiled file. JavaScript code in this file should be added after the last require_* statement.
+// compiled file.
 //
 // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
 // about supported directives.

  Deleted: test/apps/rails4/app/assets/javascripts/cable.js (+0 -13) 100644
===================================================================
--- test/apps/rails4/app/assets/javascripts/cable.js    2017-02-07 14:45:27 +0900 (71ee1e6)
+++ /dev/null
@@ -1,13 +0,0 @@
-// Action Cable provides the framework to deal with WebSockets in Rails.
-// You can generate new channels where WebSocket features live using the rails generate channel command.
-//
-//= require action_cable
-//= require_self
-//= require_tree ./channels
-
-(function() {
-  this.App || (this.App = {});
-
-  App.cable = ActionCable.createConsumer();
-
-}).call(this);

  Deleted: test/apps/rails4/app/assets/javascripts/channels/.keep (+0 -0) 100644
===================================================================
--- test/apps/rails4/app/assets/javascripts/channels/.keep    2017-02-07 14:45:27 +0900 (e69de29)
+++ /dev/null

  Modified: test/apps/rails4/app/assets/stylesheets/application.css (+3 -3)
===================================================================
--- test/apps/rails4/app/assets/stylesheets/application.css    2017-02-07 14:45:27 +0900 (0ebd7fe)
+++ test/apps/rails4/app/assets/stylesheets/application.css    2017-02-07 15:11:37 +0900 (f9cd5b3)
@@ -6,9 +6,9 @@
  * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
  *
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
- * files in this directory. Styles in this file should be added after the last require_* statement.
- * It is generally better to create a new file per style scope.
+ * compiled file so the styles you add here take precedence over styles defined in any styles
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
+ * file per style scope.
  *
  *= require_tree .
  *= require_self

  Modified: test/apps/rails4/app/assets/stylesheets/scaffolds.scss (+1 -17)
===================================================================
--- test/apps/rails4/app/assets/stylesheets/scaffolds.scss    2017-02-07 14:45:27 +0900 (4ce4266)
+++ test/apps/rails4/app/assets/stylesheets/scaffolds.scss    2017-02-07 15:11:37 +0900 (ed7a765)
@@ -4,14 +4,12 @@ body {
   font-family: verdana, arial, helvetica, sans-serif;
   font-size: 13px;
   line-height: 18px;
-  margin: 33px;
 }
 
 p, ol, ul, td {
   font-family: verdana, arial, helvetica, sans-serif;
   font-size: 13px;
   line-height: 18px;
-  margin: 33px;
 }
 
 pre {
@@ -33,16 +31,6 @@ a {
   }
 }
 
-th {
-  padding-bottom: 5px;
-}
-
-td {
-  padding-bottom: 7px;
-  padding-left: 5px;
-  padding-right: 5px;
-}
-
 div {
   &.field, &.actions {
     margin-bottom: 10px;
@@ -73,7 +61,7 @@ div {
     padding: 5px 5px 5px 15px;
     font-size: 12px;
     margin: -7px;
-    margin-bottom: 0;
+    margin-bottom: 0px;
     background-color: #c00;
     color: #fff;
   }
@@ -83,7 +71,3 @@ div {
     list-style: square;
   }
 }
-
-label {
-  display: block;
-}

  Deleted: test/apps/rails4/app/channels/application_cable/channel.rb (+0 -4) 100644
===================================================================
--- test/apps/rails4/app/channels/application_cable/channel.rb    2017-02-07 14:45:27 +0900 (d672697)
+++ /dev/null
@@ -1,4 +0,0 @@
-module ApplicationCable
-  class Channel < ActionCable::Channel::Base
-  end
-end

  Deleted: test/apps/rails4/app/channels/application_cable/connection.rb (+0 -4) 100644
===================================================================
--- test/apps/rails4/app/channels/application_cable/connection.rb    2017-02-07 14:45:27 +0900 (0ff5442)
+++ /dev/null
@@ -1,4 +0,0 @@
-module ApplicationCable
-  class Connection < ActionCable::Connection::Base
-  end
-end

  Modified: test/apps/rails4/app/controllers/application_controller.rb (+2 -0)
===================================================================
--- test/apps/rails4/app/controllers/application_controller.rb    2017-02-07 14:45:27 +0900 (1c07694)
+++ test/apps/rails4/app/controllers/application_controller.rb    2017-02-07 15:11:37 +0900 (d83690e)
@@ -1,3 +1,5 @@
 class ApplicationController < ActionController::Base
+  # Prevent CSRF attacks by raising an exception.
+  # For APIs, you may want to use :null_session instead.
   protect_from_forgery with: :exception
 end

  Deleted: test/apps/rails4/app/jobs/application_job.rb (+0 -2) 100644
===================================================================
--- test/apps/rails4/app/jobs/application_job.rb    2017-02-07 14:45:27 +0900 (a009ace)
+++ /dev/null
@@ -1,2 +0,0 @@
-class ApplicationJob < ActiveJob::Base
-end

  Renamed: test/apps/rails4/app/mailers/.keep (+0 -0) 100%
===================================================================

  Deleted: test/apps/rails4/app/mailers/application_mailer.rb (+0 -4) 100644
===================================================================
--- test/apps/rails4/app/mailers/application_mailer.rb    2017-02-07 14:45:27 +0900 (286b223)
+++ /dev/null
@@ -1,4 +0,0 @@
-class ApplicationMailer < ActionMailer::Base
-  default from: 'from �� example.com'
-  layout 'mailer'
-end

  Renamed: test/apps/rails4/app/models/.keep (+0 -0) 100%
===================================================================

  Added: test/apps/rails4/app/models/application_groonga_record.rb (+2 -0) 100644
===================================================================
--- /dev/null
+++ test/apps/rails4/app/models/application_groonga_record.rb    2017-02-07 15:11:37 +0900 (f860df4)
@@ -0,0 +1,2 @@
+class ApplicationGroongaRecord < GroongaClientModel::Record
+end

  Modified: test/apps/rails4/app/models/post.rb (+1 -1)
===================================================================
--- test/apps/rails4/app/models/post.rb    2017-02-07 14:45:27 +0900 (90666d2)
+++ test/apps/rails4/app/models/post.rb    2017-02-07 15:11:37 +0900 (3c918b4)
@@ -1,2 +1,2 @@
-class Post < GroongaClientModel::Record
+class Post < ApplicationGroongaRecord
 end

  Modified: test/apps/rails4/app/views/layouts/application.html.erb (+9 -9)
===================================================================
--- test/apps/rails4/app/views/layouts/application.html.erb    2017-02-07 14:45:27 +0900 (1dd80e4)
+++ test/apps/rails4/app/views/layouts/application.html.erb    2017-02-07 15:11:37 +0900 (d0ba841)
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html>
-  <head>
-    <title>Blog</title>
-    <%= csrf_meta_tags %>
+<head>
+  <title>Blog</title>
+  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
+  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
 
-    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
-    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
-  </head>
+<%= yield %>
 
-  <body>
-    <%= yield %>
-  </body>
+</body>
 </html>

  Deleted: test/apps/rails4/app/views/layouts/mailer.html.erb (+0 -13) 100644
===================================================================
--- test/apps/rails4/app/views/layouts/mailer.html.erb    2017-02-07 14:45:27 +0900 (cbd34d2)
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <style>
-      /* Email styles need to be inline */
-    </style>
-  </head>
-
-  <body>
-    <%= yield %>
-  </body>
-</html>

  Deleted: test/apps/rails4/app/views/layouts/mailer.text.erb (+0 -1) 100644
===================================================================
--- test/apps/rails4/app/views/layouts/mailer.text.erb    2017-02-07 14:45:27 +0900 (37f0bdd)
+++ /dev/null
@@ -1 +0,0 @@
-<%= yield %>

  Modified: test/apps/rails4/app/views/posts/_form.html.erb (+6 -8)
===================================================================
--- test/apps/rails4/app/views/posts/_form.html.erb    2017-02-07 14:45:27 +0900 (8733928)
+++ test/apps/rails4/app/views/posts/_form.html.erb    2017-02-07 15:11:37 +0900 (71b34f3)
@@ -1,10 +1,10 @@
-<%= form_for(post) do |f| %>
-  <% if post.errors.any? %>
+<%= form_for(@post) do |f| %>
+  <% if****@post*****? %>
     <div id="error_explanation">
-      <h2><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h2>
+      <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
 
       <ul>
-      <% post.errors.full_messages.each do |message| %>
+      <% @post.errors.full_messages.each do |message| %>
         <li><%= message %></li>
       <% end %>
       </ul>
@@ -12,15 +12,13 @@
   <% end %>
 
   <div class="field">
-    <%= f.label :title %>
+    <%= f.label :title %><br>
     <%= f.text_field :title %>
   </div>
-
   <div class="field">
-    <%= f.label :body %>
+    <%= f.label :body %><br>
     <%= f.text_area :body %>
   </div>
-
   <div class="actions">
     <%= f.submit %>
   </div>

  Modified: test/apps/rails4/app/views/posts/edit.html.erb (+1 -1)
===================================================================
--- test/apps/rails4/app/views/posts/edit.html.erb    2017-02-07 14:45:27 +0900 (ded33f7)
+++ test/apps/rails4/app/views/posts/edit.html.erb    2017-02-07 15:11:37 +0900 (f1e9acb)
@@ -1,6 +1,6 @@
 <h1>Editing Post</h1>
 
-<%= render 'form', post: @post %>
+<%= render 'form' %>
 
 <%= link_to 'Show', @post %> |
 <%= link_to 'Back', posts_path %>

  Modified: test/apps/rails4/app/views/posts/index.html.erb (+1 -1)
===================================================================
--- test/apps/rails4/app/views/posts/index.html.erb    2017-02-07 14:45:27 +0900 (dd12307)
+++ test/apps/rails4/app/views/posts/index.html.erb    2017-02-07 15:11:37 +0900 (9985e4f)
@@ -1,6 +1,6 @@
 <p id="notice"><%= notice %></p>
 
-<h1>Posts</h1>
+<h1>Listing Posts</h1>
 
 <table>
   <thead>

  Modified: test/apps/rails4/app/views/posts/new.html.erb (+1 -1)
===================================================================
--- test/apps/rails4/app/views/posts/new.html.erb    2017-02-07 14:45:27 +0900 (fb1e2a1)
+++ test/apps/rails4/app/views/posts/new.html.erb    2017-02-07 15:11:37 +0900 (3e5f187)
@@ -1,5 +1,5 @@
 <h1>New Post</h1>
 
-<%= render 'form', post: @post %>
+<%= render 'form' %>
 
 <%= link_to 'Back', posts_path %>

  Modified: test/apps/rails4/bin/rails (+1 -1)
===================================================================
--- test/apps/rails4/bin/rails    2017-02-07 14:45:27 +0900 (5badb2f)
+++ test/apps/rails4/bin/rails    2017-02-07 15:11:37 +0900 (0138d79)
@@ -4,6 +4,6 @@ begin
 rescue LoadError => e
   raise unless e.message.include?('spring')
 end
-APP_PATH = File.expand_path('../config/application', __dir__)
+APP_PATH = File.expand_path('../../config/application', __FILE__)
 require_relative '../config/boot'
 require 'rails/commands'

  Modified: test/apps/rails4/bin/setup (+12 -17)
===================================================================
--- test/apps/rails4/bin/setup    2017-02-07 14:45:27 +0900 (e620b4d)
+++ test/apps/rails4/bin/setup    2017-02-07 15:11:37 +0900 (acdb2c1)
@@ -1,34 +1,29 @@
 #!/usr/bin/env ruby
 require 'pathname'
-require 'fileutils'
-include FileUtils
 
 # path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = Pathname.new File.expand_path('../../',  __FILE__)
 
-def system!(*args)
-  system(*args) || abort("\n== Command #{args} failed ==")
-end
-
-chdir APP_ROOT do
+Dir.chdir APP_ROOT do
   # This script is a starting point to setup your application.
-  # Add necessary setup steps to this file.
+  # Add necessary setup steps to this file:
 
-  puts '== Installing dependencies =='
-  system! 'gem install bundler --conservative'
-  system('bundle check') || system!('bundle install')
+  puts "== Installing dependencies =="
+  system "gem install bundler --conservative"
+  system "bundle check || bundle install"
 
   # puts "\n== Copying sample files =="
-  # unless File.exist?('config/database.yml')
-  #   cp 'config/database.yml.sample', 'config/database.yml'
+  # unless File.exist?("config/database.yml")
+  #   system "cp config/database.yml.sample config/database.yml"
   # end
 
   puts "\n== Preparing database =="
-  system! 'bin/rails db:setup'
+  system "bin/rake db:setup"
 
   puts "\n== Removing old logs and tempfiles =="
-  system! 'bin/rails log:clear tmp:clear'
+  system "rm -f log/*"
+  system "rm -rf tmp/cache"
 
   puts "\n== Restarting application server =="
-  system! 'bin/rails restart'
+  system "touch tmp/restart.txt"
 end

  Modified: test/apps/rails4/bin/spring (+2 -1)
===================================================================
--- test/apps/rails4/bin/spring    2017-02-07 14:45:27 +0900 (9bc076b)
+++ test/apps/rails4/bin/spring    2017-02-07 15:11:37 +0900 (fb2ec2e)
@@ -8,7 +8,8 @@ unless defined?(Spring)
   require 'bundler'
 
   lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
-  if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
+  spring = lockfile.specs.detect { |spec| spec.name == "spring" }
+  if spring
     Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
     gem 'spring', spring.version
     require 'spring/binstub'

  Deleted: test/apps/rails4/bin/update (+0 -29) 100755
===================================================================
--- test/apps/rails4/bin/update    2017-02-07 14:45:27 +0900 (a8e4462)
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env ruby
-require 'pathname'
-require 'fileutils'
-include FileUtils
-
-# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
-
-def system!(*args)
-  system(*args) || abort("\n== Command #{args} failed ==")
-end
-
-chdir APP_ROOT do
-  # This script is a way to update your development environment automatically.
-  # Add necessary update steps to this file.
-
-  puts '== Installing dependencies =='
-  system! 'gem install bundler --conservative'
-  system('bundle check') || system!('bundle install')
-
-  puts "\n== Updating database =="
-  system! 'bin/rails db:migrate'
-
-  puts "\n== Removing old logs and tempfiles =="
-  system! 'bin/rails log:clear tmp:clear'
-
-  puts "\n== Restarting application server =="
-  system! 'bin/rails restart'
-end

  Modified: test/apps/rails4/config.ru (+1 -2)
===================================================================
--- test/apps/rails4/config.ru    2017-02-07 14:45:27 +0900 (f7ba0b5)
+++ test/apps/rails4/config.ru    2017-02-07 15:11:37 +0900 (bd83b25)
@@ -1,5 +1,4 @@
 # This file is used by Rack-based servers to start the application.
 
-require_relative 'config/environment'
-
+require ::File.expand_path('../config/environment', __FILE__)
 run Rails.application

  Modified: test/apps/rails4/config/application.rb (+9 -2)
===================================================================
--- test/apps/rails4/config/application.rb    2017-02-07 14:45:27 +0900 (e480430)
+++ test/apps/rails4/config/application.rb    2017-02-07 15:11:37 +0900 (da51278)
@@ -1,4 +1,4 @@
-require_relative 'boot'
+require File.expand_path('../boot', __FILE__)
 
 require "rails"
 # Pick the frameworks you want:
@@ -8,7 +8,6 @@ require "active_job/railtie"
 require "action_controller/railtie"
 require "action_mailer/railtie"
 require "action_view/railtie"
-require "action_cable/engine"
 require "sprockets/railtie"
 require "rails/test_unit/railtie"
 
@@ -21,5 +20,13 @@ module Blog
     # Settings in config/environments/* take precedence over those specified here.
     # Application configuration should go into files in config/initializers
     # -- all .rb files in that directory are automatically loaded.
+
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+    # config.time_zone = 'Central Time (US & Canada)'
+
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+    # config.i18n.default_locale = :de
   end
 end

  Modified: test/apps/rails4/config/boot.rb (+1 -1)
===================================================================
--- test/apps/rails4/config/boot.rb    2017-02-07 14:45:27 +0900 (30f5120)
+++ test/apps/rails4/config/boot.rb    2017-02-07 15:11:37 +0900 (6b750f0)
@@ -1,3 +1,3 @@
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
 
 require 'bundler/setup' # Set up gems listed in the Gemfile.

  Deleted: test/apps/rails4/config/cable.yml (+0 -9) 100644
===================================================================
--- test/apps/rails4/config/cable.yml    2017-02-07 14:45:27 +0900 (0bbde6f)
+++ /dev/null
@@ -1,9 +0,0 @@
-development:
-  adapter: async
-
-test:
-  adapter: async
-
-production:
-  adapter: redis
-  url: redis://localhost:6379/1

  Modified: test/apps/rails4/config/environment.rb (+1 -1)
===================================================================
--- test/apps/rails4/config/environment.rb    2017-02-07 14:45:27 +0900 (426333b)
+++ test/apps/rails4/config/environment.rb    2017-02-07 15:11:37 +0900 (ee8d90d)
@@ -1,5 +1,5 @@
 # Load the Rails application.
-require_relative 'application'
+require File.expand_path('../application', __FILE__)
 
 # Initialize the Rails application.
 Rails.application.initialize!

  Modified: test/apps/rails4/config/environments/development.rb (+11 -24)
===================================================================
--- test/apps/rails4/config/environments/development.rb    2017-02-07 14:45:27 +0900 (58d20de)
+++ test/apps/rails4/config/environments/development.rb    2017-02-07 15:11:37 +0900 (0feba2e)
@@ -9,28 +9,13 @@ Rails.application.configure do
   # Do not eager load code on boot.
   config.eager_load = false
 
-  # Show full error reports.
-  config.consider_all_requests_local = true
-
-  # Enable/disable caching. By default caching is disabled.
-  if Rails.root.join('tmp/caching-dev.txt').exist?
-    config.action_controller.perform_caching = true
-
-    config.cache_store = :memory_store
-    config.public_file_server.headers = {
-      'Cache-Control' => 'public, max-age=172800'
-    }
-  else
-    config.action_controller.perform_caching = false
-
-    config.cache_store = :null_store
-  end
+  # Show full error reports and disable caching.
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
 
   # Don't care if the mailer can't send.
   config.action_mailer.raise_delivery_errors = false
 
-  config.action_mailer.perform_caching = false
-
   # Print deprecation notices to the Rails logger.
   config.active_support.deprecation = :log
 
@@ -39,13 +24,15 @@ Rails.application.configure do
   # number of complex assets.
   config.assets.debug = true
 
-  # Suppress logger output for asset requests.
-  config.assets.quiet = true
+  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
+  # yet still be able to expire them through the digest params.
+  config.assets.digest = true
+
+  # Adds additional error checking when serving assets at runtime.
+  # Checks for improperly declared sprockets dependencies.
+  # Raises helpful error messages.
+  config.assets.raise_runtime_errors = true
 
   # Raises error for missing translations
   # config.action_view.raise_on_missing_translations = true
-
-  # Use an evented file watcher to asynchronously detect changes in source code,
-  # routes, locales, etc. This feature depends on the listen gem.
-  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
 end

  Modified: test/apps/rails4/config/environments/production.rb (+17 -24)
===================================================================
--- test/apps/rails4/config/environments/production.rb    2017-02-07 14:45:27 +0900 (84704b2)
+++ test/apps/rails4/config/environments/production.rb    2017-02-07 15:11:37 +0900 (a008b61)
@@ -14,9 +14,15 @@ Rails.application.configure do
   config.consider_all_requests_local       = false
   config.action_controller.perform_caching = true
 
+  # Enable Rack::Cache to put a simple HTTP cache in front of your application
+  # Add `rack-cache` to your Gemfile before enabling this.
+  # For large-scale production use, consider using a caching reverse proxy like
+  # NGINX, varnish or squid.
+  # config.action_dispatch.rack_cache = true
+
   # Disable serving static files from the `/public` folder by default since
   # Apache or NGINX already handles this.
-  config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
+  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
 
   # Compress JavaScripts and CSS.
   config.assets.js_compressor = :uglifier
@@ -25,20 +31,16 @@ Rails.application.configure do
   # Do not fallback to assets pipeline if a precompiled asset is missed.
   config.assets.compile = false
 
-  # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
+  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
+  # yet still be able to expire them through the digest params.
+  config.assets.digest = true
 
-  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
-  # config.action_controller.asset_host = 'http://assets.example.com'
+  # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
 
   # Specifies the header that your server uses for sending files.
   # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
 
-  # Mount Action Cable outside main process or domain
-  # config.action_cable.mount_path = nil
-  # config.action_cable.url = 'wss://example.com/cable'
-  # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
-
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
   # config.force_ssl = true
 
@@ -47,15 +49,16 @@ Rails.application.configure do
   config.log_level = :debug
 
   # Prepend all log lines with the following tags.
-  config.log_tags = [ :request_id ]
+  # config.log_tags = [ :subdomain, :uuid ]
+
+  # Use a different logger for distributed setups.
+  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
 
   # Use a different cache store in production.
   # config.cache_store = :mem_cache_store
 
-  # Use a real queuing backend for Active Job (and separate queues per environment)
-  # config.active_job.queue_adapter     = :resque
-  # config.active_job.queue_name_prefix = "blog_#{Rails.env}"
-  config.action_mailer.perform_caching = false
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+  # config.action_controller.asset_host = 'http://assets.example.com'
 
   # Ignore bad email addresses and do not raise email delivery errors.
   # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -70,14 +73,4 @@ Rails.application.configure do
 
   # Use default logging formatter so that PID and timestamp are not suppressed.
   config.log_formatter = ::Logger::Formatter.new
-
-  # Use a different logger for distributed setups.
-  # require 'syslog/logger'
-  # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
-
-  if ENV["RAILS_LOG_TO_STDOUT"].present?
-    logger           = ActiveSupport::Logger.new(STDOUT)
-    logger.formatter = config.log_formatter
-    config.logger = ActiveSupport::TaggedLogging.new(logger)
-  end
 end

  Modified: test/apps/rails4/config/environments/test.rb (+6 -6)
===================================================================
--- test/apps/rails4/config/environments/test.rb    2017-02-07 14:45:27 +0900 (30587ef)
+++ test/apps/rails4/config/environments/test.rb    2017-02-07 15:11:37 +0900 (1c19f08)
@@ -12,11 +12,9 @@ Rails.application.configure do
   # preloads Rails for running tests, you may have to set it to true.
   config.eager_load = false
 
-  # Configure public file server for tests with Cache-Control for performance.
-  config.public_file_server.enabled = true
-  config.public_file_server.headers = {
-    'Cache-Control' => 'public, max-age=3600'
-  }
+  # Configure static file server for tests with Cache-Control for performance.
+  config.serve_static_files   = true
+  config.static_cache_control = 'public, max-age=3600'
 
   # Show full error reports and disable caching.
   config.consider_all_requests_local       = true
@@ -27,13 +25,15 @@ Rails.application.configure do
 
   # Disable request forgery protection in test environment.
   config.action_controller.allow_forgery_protection = false
-  config.action_mailer.perform_caching = false
 
   # Tell Action Mailer not to deliver emails to the real world.
   # The :test delivery method accumulates sent emails in the
   # ActionMailer::Base.deliveries array.
   config.action_mailer.delivery_method = :test
 
+  # Randomize the order test cases are executed.
+  config.active_support.test_order = :random
+
   # Print deprecation notices to the stderr.
   config.active_support.deprecation = :stderr
 

  Modified: test/apps/rails4/config/groonga.yml (+18 -3)
===================================================================
--- test/apps/rails4/config/groonga.yml    2017-02-07 14:45:27 +0900 (6bd3460)
+++ test/apps/rails4/config/groonga.yml    2017-02-07 15:11:37 +0900 (e04e0f4)
@@ -1,8 +1,23 @@
+default: &default
+  url: http://127.0.0.1:10041/
+  # url: https://127.0.0.1:10041/
+  # protocol: http
+  # host: 127.0.0.1
+  # port: 10041
+  # user: alice
+  # password: secret
+  read_timeout: -1
+  # read_timeout: 3
+  backend: synchronous
+
 development:
-  url: http://127.0.0.1:10041
+  <<: *default
 
 test:
-  url: http://127.0.0.1:20041
+  <<: *default
+  url: http://127.0.0.1:20041/
 
 production:
-  url: http://127.0.0.1:10041
+  <<: *default
+  # url: http://production.example.com:10041/
+  read_timeout: 10

  Deleted: test/apps/rails4/config/initializers/application_controller_renderer.rb (+0 -6) 100644
===================================================================
--- test/apps/rails4/config/initializers/application_controller_renderer.rb    2017-02-07 14:45:27 +0900 (51639b6)
+++ /dev/null
@@ -1,6 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# ApplicationController.renderer.defaults.merge!(
-#   http_host: 'example.org',
-#   https: false
-# )

  Modified: test/apps/rails4/config/initializers/cookies_serializer.rb (+0 -2)
===================================================================
--- test/apps/rails4/config/initializers/cookies_serializer.rb    2017-02-07 14:45:27 +0900 (5a6a32d)
+++ test/apps/rails4/config/initializers/cookies_serializer.rb    2017-02-07 15:11:37 +0900 (7f70458)
@@ -1,5 +1,3 @@
 # Be sure to restart your server when you modify this file.
 
-# Specify a serializer for the signed and encrypted cookie jars.
-# Valid options are :json, :marshal, and :hybrid.
 Rails.application.config.action_dispatch.cookies_serializer = :json

  Deleted: test/apps/rails4/config/initializers/new_framework_defaults.rb (+0 -21) 100644
===================================================================
--- test/apps/rails4/config/initializers/new_framework_defaults.rb    2017-02-07 14:45:27 +0900 (e34c66c)
+++ /dev/null
@@ -1,21 +0,0 @@
-# Be sure to restart your server when you modify this file.
-#
-# This file contains migration options to ease your Rails 5.0 upgrade.
-#
-# Read the Guide for Upgrading Ruby on Rails for more info on each option.
-
-# Enable per-form CSRF tokens. Previous versions had false.
-Rails.application.config.action_controller.per_form_csrf_tokens = true
-
-# Enable origin-checking CSRF mitigation. Previous versions had false.
-Rails.application.config.action_controller.forgery_protection_origin_check = true
-
-# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
-# Previous versions had false.
-ActiveSupport.to_time_preserves_timezone = true
-
-# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = false
-
-# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
-Rails.application.config.ssl_options = { hsts: { subdomains: true } }

  Modified: test/apps/rails4/config/initializers/wrap_parameters.rb (+1 -1)
===================================================================
--- test/apps/rails4/config/initializers/wrap_parameters.rb    2017-02-07 14:45:27 +0900 (633c1c8)
+++ test/apps/rails4/config/initializers/wrap_parameters.rb    2017-02-07 15:11:37 +0900 (b81ea74)
@@ -5,5 +5,5 @@
 
 # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
 ActiveSupport.on_load(:action_controller) do
-  wrap_parameters format: [:json]
+  wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
 end

  Deleted: test/apps/rails4/config/puma.rb (+0 -47) 100644
===================================================================
--- test/apps/rails4/config/puma.rb    2017-02-07 14:45:27 +0900 (c7f311f)
+++ /dev/null
@@ -1,47 +0,0 @@
-# Puma can serve each request in a thread from an internal thread pool.
-# The `threads` method setting takes two numbers a minimum and maximum.
-# Any libraries that use thread pools should be configured to match
-# the maximum value specified for Puma. Default is set to 5 threads for minimum
-# and maximum, this matches the default thread size of Active Record.
-#
-threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
-threads threads_count, threads_count
-
-# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
-#
-port        ENV.fetch("PORT") { 3000 }
-
-# Specifies the `environment` that Puma will run in.
-#
-environment ENV.fetch("RAILS_ENV") { "development" }
-
-# Specifies the number of `workers` to boot in clustered mode.
-# Workers are forked webserver processes. If using threads and workers together
-# the concurrency of the application would be max `threads` * `workers`.
-# Workers do not work on JRuby or Windows (both of which do not support
-# processes).
-#
-# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
-
-# Use the `preload_app!` method when specifying a `workers` number.
-# This directive tells Puma to first boot the application and load code
-# before forking the application. This takes advantage of Copy On Write
-# process behavior so workers use less memory. If you use this option
-# you need to make sure to reconnect any threads in the `on_worker_boot`
-# block.
-#
-# preload_app!
-
-# The code in the `on_worker_boot` will be called if you are using
-# clustered mode by specifying a number of `workers`. After each worker
-# process is booted this block will be run, if you are using `preload_app!`
-# option you will want to use this block to reconnect to any threads
-# or connections that may have been created at application boot, Ruby
-# cannot share connections between processes.
-#
-# on_worker_boot do
-#   ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
-# end
-
-# Allow puma to be restarted by `rails restart` command.
-plugin :tmp_restart

  Modified: test/apps/rails4/config/routes.rb (+54 -1)
===================================================================
--- test/apps/rails4/config/routes.rb    2017-02-07 14:45:27 +0900 (abba78d)
+++ test/apps/rails4/config/routes.rb    2017-02-07 15:11:37 +0900 (7f88317)
@@ -1,4 +1,57 @@
 Rails.application.routes.draw do
   resources :posts
-  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
+  # The priority is based upon order of creation: first created -> highest priority.
+  # See how all your routes lay out with "rake routes".
+
+  # You can have the root of your site routed with "root"
+  # root 'welcome#index'
+
+  # Example of regular route:
+  #   get 'products/:id' => 'catalog#view'
+
+  # Example of named route that can be invoked with purchase_url(id: product.id)
+  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
+
+  # Example resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Example resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Example resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Example resource route with more complex sub-resources:
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', on: :collection
+  #     end
+  #   end
+
+  # Example resource route with concerns:
+  #   concern :toggleable do
+  #     post 'toggle'
+  #   end
+  #   resources :posts, concerns: :toggleable
+  #   resources :photos, concerns: :toggleable
+
+  # Example resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
 end

  Modified: test/apps/rails4/config/secrets.yml (+3 -3)
===================================================================
--- test/apps/rails4/config/secrets.yml    2017-02-07 14:45:27 +0900 (9431af2)
+++ test/apps/rails4/config/secrets.yml    2017-02-07 15:11:37 +0900 (8650c43)
@@ -5,16 +5,16 @@
 
 # Make sure the secret is at least 30 characters and all random,
 # no regular words or you'll be exposed to dictionary attacks.
-# You can use `rails secret` to generate a secure secret key.
+# You can use `rake secret` to generate a secure secret key.
 
 # Make sure the secrets in this file are kept private
 # if you're sharing your code publicly.
 
 development:
-  secret_key_base: bc32332a8b499eea2e1ffed5ff535148985b414437acc2a1ea4259a2d365136919a0898ba75f370cf5ef47fcf8aa544aa68f121bd9998c1f0b33f98f266485d4
+  secret_key_base: cd601617986a637bfd151a594f2f735f85afb230f3a2877d9823d86546e2a6c1cacea6f32173be267c28c7274a941bc64c34037cff13fbc4ac39ee2b801a6a3f
 
 test:
-  secret_key_base: c7b122c8ac22d2a79487ee76493ee1ae11bd8c4fcfe2d43f61af7c6bf90011e039afa8c7650c876ea8c17a45000e666ea8a0fd0eff3a63951563eef9b41c183e
+  secret_key_base: 90647008867e3c3ea89d3b541ce6c20db05412a38d83430caf661c856c63a21ddce9a8ce8c3df1ff531d936529d66e6411234a370d99b8a02f90b31c267654f4
 
 # Do not keep production secrets in the repository,
 # instead read values from the environment.

  Deleted: test/apps/rails4/config/spring.rb (+0 -6) 100644
===================================================================
--- test/apps/rails4/config/spring.rb    2017-02-07 14:45:27 +0900 (c9119b4)
+++ /dev/null
@@ -1,6 +0,0 @@
-%w(
-  .ruby-version
-  .rbenv-vars
-  tmp/restart.txt
-  tmp/caching-dev.txt
-).each { |path| Spring.watch(path) }

  Modified: test/apps/rails4/db/seeds.rb (+3 -3)
===================================================================
--- test/apps/rails4/db/seeds.rb    2017-02-07 14:45:27 +0900 (1beea2a)
+++ test/apps/rails4/db/seeds.rb    2017-02-07 15:11:37 +0900 (4edb1e8)
@@ -1,7 +1,7 @@
 # This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
 #
 # Examples:
 #
-#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
-#   Character.create(name: 'Luke', movie: movies.first)
+#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+#   Mayor.create(name: 'Emanuel', city: cities.first)

  Deleted: test/apps/rails4/public/apple-touch-icon-precomposed.png (+0 -0) 100644
===================================================================
--- test/apps/rails4/public/apple-touch-icon-precomposed.png    2017-02-07 14:45:27 +0900 (e69de29)
+++ /dev/null

  Deleted: test/apps/rails4/public/apple-touch-icon.png (+0 -0) 100644
===================================================================
--- test/apps/rails4/public/apple-touch-icon.png    2017-02-07 14:45:27 +0900 (e69de29)
+++ /dev/null

  Modified: test/apps/rails4/test/controllers/posts_controller_test.rb (+12 -11)
===================================================================
--- test/apps/rails4/test/controllers/posts_controller_test.rb    2017-02-07 14:45:27 +0900 (dc8397e)
+++ test/apps/rails4/test/controllers/posts_controller_test.rb    2017-02-07 15:11:37 +0900 (5ccbed8)
@@ -1,6 +1,6 @@
 require 'test_helper'
 
-class PostsControllerTest < ActionDispatch::IntegrationTest
+class PostsControllerTest < ActionController::TestCase
   include GroongaClientModel::TestHelper
 
   setup do
@@ -8,43 +8,44 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
   end
 
   test "should get index" do
-    get posts_url
+    get :index
     assert_response :success
+    assert_not_nil assigns(:posts)
   end
 
   test "should get new" do
-    get new_post_url
+    get :new
     assert_response :success
   end
 
   test "should create post" do
     assert_difference('Post.count') do
-      post posts_url, params: { post: { body: @post.body, title: @post.title } }
+      post :create, post: { body: @post.body, title: @post.title }
     end
 
-    assert_redirected_to post_url(Post.last)
+    assert_redirected_to post_path(assigns(:post))
   end
 
   test "should show post" do
-    get post_url(@post)
+    get :show, id: @post
     assert_response :success
   end
 
   test "should get edit" do
-    get edit_post_url(@post)
+    get :edit, id: @post
     assert_response :success
   end
 
   test "should update post" do
-    patch post_url(@post), params: { post: { body: @post.body, title: @post.title } }
-    assert_redirected_to post_url(@post)
+    patch :update, id: @post, post: { body: @post.body, title: @post.title }
+    assert_redirected_to post_path(assigns(:post))
   end
 
   test "should destroy post" do
     assert_difference('Post.count', -1) do
-      delete post_url(@post)
+      delete :destroy, id: @post
     end
 
-    assert_redirected_to posts_url
+    assert_redirected_to posts_path
   end
 end

  Added: test/apps/rails4/test/models/post_test.rb (+16 -0) 100644
===================================================================
--- /dev/null
+++ test/apps/rails4/test/models/post_test.rb    2017-02-07 15:11:37 +0900 (28b5ad3)
@@ -0,0 +1,16 @@
+require 'test_helper'
+
+class PostTest < ActiveSupport::TestCase
+  include GroongaClientModel::TestHelper
+
+  test ".create(Hash)" do
+    post = Post.create(:title => "Hello")
+    assert_equal("Hello", Post.find(post.id).title)
+  end
+
+  test ".create([Hash])" do
+    posts = Post.create([{:title => "Hello1"}, {:title => "Hello2"}])
+    assert_equal(["Hello1", "Hello2"],
+                 posts.collect {|post| Post.find(post.id).title})
+  end
+end
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index