New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 5 and Spree 3.2 migration #95
Conversation
@@ -0,0 +1,7 @@ | |||
# This migration comes from spree (originally 20161014152814) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,7 @@ | |||
# This migration comes from spree (originally 20161014152814) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,9 @@ | |||
# This migration comes from spree (originally 20161014145148) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,9 @@ | |||
# This migration comes from spree (originally 20161014145148) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,8 @@ | |||
# This migration comes from spree (originally 20160608090604) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,8 @@ | |||
# This migration comes from spree (originally 20160608090604) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,15 @@ | |||
# This migration comes from spree (originally 20160511072335) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,15 @@ | |||
# This migration comes from spree (originally 20160511072335) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,10 @@ | |||
# This migration comes from spree (originally 20160511072249) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,10 @@ | |||
# This migration comes from spree (originally 20160511072249) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,41 @@ | |||
# This migration comes from spree (originally 20160511071954) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,41 @@ | |||
# This migration comes from spree (originally 20160511071954) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
end | ||
end | ||
|
||
def down |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put empty method definitions on a single line.
end | ||
end | ||
|
||
def down |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put empty method definitions on a single line.
@@ -0,0 +1,11 @@ | |||
# This migration comes from spree (originally 20160509064646) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,11 @@ | |||
# This migration comes from spree (originally 20160509064646) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,68 @@ | |||
# This migration comes from spree (originally 20150314013438) | |||
class AddMissingIndexesOnSpreeTables < ActiveRecord::Migration[4.2] | |||
def change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for change is too high. [44.72/15]
Perceived complexity for change is too high. [21/7]
@@ -0,0 +1,68 @@ | |||
# This migration comes from spree (originally 20150314013438) | |||
class AddMissingIndexesOnSpreeTables < ActiveRecord::Migration[4.2] | |||
def change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for change is too high. [44.72/15]
Perceived complexity for change is too high. [21/7]
@@ -0,0 +1,68 @@ | |||
# This migration comes from spree (originally 20150314013438) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,68 @@ | |||
# This migration comes from spree (originally 20150314013438) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
%w( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
%w( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -1,15 +1,47 @@ | |||
workers Integer(ENV['WEB_CONCURRENCY'] || 2) | |||
threads_count = Integer(ENV['MAX_THREADS'] || 5) | |||
# Puma can serve each request in a thread from an internal thread pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -1,15 +1,47 @@ | |||
workers Integer(ENV['WEB_CONCURRENCY'] || 2) | |||
threads_count = Integer(ENV['MAX_THREADS'] || 5) | |||
# Puma can serve each request in a thread from an internal thread pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,23 @@ | |||
# Be sure to restart your server when you modify this file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,23 @@ | |||
# Be sure to restart your server when you modify this file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# Be sure to restart your server when you modify this file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# Be sure to restart your server when you modify this file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -1,3 +1,3 @@ | |||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | |||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -64,6 +64,7 @@ class Application < Rails::Application | |||
code: js_polyfill, | |||
files: ['application.server.js'], # files to load for prerendering | |||
replay_console: true, # if true, console.* will be replayed client-side | |||
code: 'var window = this; ', # window object was removed from react-rails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated key in hash literal.
@@ -1,3 +1,3 @@ | |||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | |||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -64,6 +64,7 @@ class Application < Rails::Application | |||
code: js_polyfill, | |||
files: ['application.server.js'], # files to load for prerendering | |||
replay_console: true, # if true, console.* will be replayed client-side | |||
code: 'var window = this; ', # window object was removed from react-rails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated key in hash literal.
def change | ||
|
||
# do what sql does best: copy all slugs into history table in a single query | ||
# rather than load potentially millions of products into memory | ||
Spree::Product.connection.execute <<-SQL | ||
INSERT INTO #{FriendlyId::Slug.table_name} (slug, sluggable_id, sluggable_type, created_at) | ||
SELECT slug, id, '#{Spree::Product.to_s}', #{ActiveRecord::Base.send(:sanitize_sql_array, ['?', Time.current])} | ||
SELECT slug, id, '#{Spree::Product.to_s}', #{ApplicationRecord.send(:sanitize_sql_array, ['?', Time.current])} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant use of Object#to_s in interpolation.
Trailing whitespace detected.
@@ -0,0 +1,9 @@ | |||
# This migration comes from spree (originally 20140508151342) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# This migration comes from spree (originally 20140219060952) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# This migration comes from spree (originally 20130917024658) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# This migration comes from spree (originally 20130815000406) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# This migration comes from spree (originally 20130815024413) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,10 @@ | |||
# This migration comes from spree (originally 20130813140619) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,6 @@ | |||
# This migration comes from spree (originally 20130813004002) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,7 @@ | |||
# This migration comes from spree (originally 20161014152814) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,9 @@ | |||
# This migration comes from spree (originally 20161014145148) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,8 @@ | |||
# This migration comes from spree (originally 20160608090604) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,15 @@ | |||
# This migration comes from spree (originally 20160511072335) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,10 @@ | |||
# This migration comes from spree (originally 20160511072249) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -0,0 +1,41 @@ | |||
# This migration comes from spree (originally 20160511071954) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
end | ||
end | ||
|
||
def down |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put empty method definitions on a single line.
@@ -0,0 +1,11 @@ | |||
# This migration comes from spree (originally 20160509064646) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
Fixes #90