From 997a618ed6d9e8f3c14703dc40d075b50f7fcef5 Mon Sep 17 00:00:00 2001 From: Brian John Date: Sat, 29 Feb 2020 09:41:01 -0600 Subject: [PATCH] Upgrade Ruby/Rails and other dependencies I started out just trying to get specs passing on Ruby 2.7.0, but ended up also upgrading several gems (including Rails) as well. --- .rubocop.yml | 1 + .ruby-version | 2 +- .travis.yml | 7 +- Gemfile.lock | 340 +++++++++--------- activeadmin_addons.gemspec | 3 +- spec/dummy/app/assets/config/manifest.js | 4 + spec/dummy/config/application.rb | 1 - .../migrate/20140530172044_create_invoices.rb | 2 +- ...0140530172144_devise_create_admin_users.rb | 2 +- ...0530172146_create_active_admin_comments.rb | 2 +- .../20140530173150_add_paid_to_invoices.rb | 2 +- ...190908_add_state_and_status_to_invoices.rb | 2 +- ...150925194618_add_attachment_to_invoices.rb | 2 +- .../20151009200940_create_categories.rb | 2 +- ...51009201023_add_category_id_to_invoices.rb | 2 +- .../20151218170155_create_countries.rb | 2 +- .../migrate/20151218170211_create_regions.rb | 2 +- .../migrate/20151218170240_create_cities.rb | 2 +- .../20151218170831_add_city_to_invoices.rb | 2 +- ...0151231204230_add_information_to_cities.rb | 2 +- ...151231205008_add_information_to_regions.rb | 2 +- ...1231205017_add_information_to_countries.rb | 2 +- ...20160123231225_add_position_to_invoices.rb | 2 +- ...211518_add_color_and_amount_to_invoices.rb | 2 +- .../db/migrate/20160426155136_create_items.rb | 2 +- ...0160426161032_create_invoices_and_items.rb | 2 +- ...0170804152156_add_client_id_to_invoices.rb | 2 +- ...170827225107_add_aasm_state_to_invoices.rb | 2 +- .../db/migrate/20170904155016_create_cars.rb | 2 +- .../20170904155843_create_manufacturers.rb | 2 +- .../20171110201538_add_active_to_invoices.rb | 2 +- ...22225709_add_shipping_status_to_invoice.rb | 2 +- .../20180228085959_create_departments.rb | 2 +- ...0180228122115_create_departments_cities.rb | 2 +- spec/dummy/db/schema.rb | 126 +++---- 35 files changed, 268 insertions(+), 270 deletions(-) create mode 100644 spec/dummy/app/assets/config/manifest.js diff --git a/.rubocop.yml b/.rubocop.yml index 48449597..0b9658d5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,7 @@ AllCops: - "spec/dummy/db/*" - "db/**/*" - "bin/**/*" + - "spec/dummy/db/schema.rb" DisplayCopNames: false TargetRubyVersion: 2.5 Rails: diff --git a/.ruby-version b/.ruby-version index bb576dbd..24ba9a38 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3 +2.7.0 diff --git a/.travis.yml b/.travis.yml index 5da6becc..7c211c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,16 @@ language: ruby sudo: false rvm: - - 2.3.3 - - 2.5.0 + - 2.5.7 + - 2.6.5 + - 2.7.0 script: - cd spec/dummy && RAILS_ENV=test bundle exec rake db:create db:migrate - cd ../.. && bundle exec rspec spec addons: chrome: stable before_install: - - gem install bundler:1.16.5 + - gem install bundler:1.17.2 - google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost & env: - CHROME_PATH=/usr/bin/google-chrome-stable diff --git a/Gemfile.lock b/Gemfile.lock index 4e37a886..b62538b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,19 +1,18 @@ GIT remote: git://github.com/activeadmin/activeadmin.git - revision: f71b375325eb3060d40d1fafd6d8d31254921b76 + revision: a92ee4d2394f3f5b8ee15de7f26e4ce754834842 specs: - activeadmin (2.0.0.alpha) - arbre (>= 1.1.1) + activeadmin (2.6.1) + arbre (~> 1.2, >= 1.2.1) formtastic (~> 3.1) - formtastic_i18n + formtastic_i18n (~> 0.4) inherited_resources (~> 1.7) - jquery-rails (>= 4.2.0) - kaminari (>= 1.0.1) - railties (>= 4.2, < 5.2) - ransack (~> 1.3) - sass (~> 3.4) + jquery-rails (~> 4.2) + kaminari (~> 1.0, >= 1.0.1) + railties (>= 5.2, < 6.1) + ransack (~> 2.1, >= 2.1.1) + sassc-rails (~> 2.1) sprockets (>= 3.0, < 4.1) - sprockets-es6 (>= 0.9.2) PATH remote: . @@ -29,72 +28,74 @@ PATH GEM remote: https://rubygems.org/ specs: - aasm (4.12.3) + aasm (5.0.6) concurrent-ruby (~> 1.0) - actionmailer (4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) + actioncable (5.2.4.1) + actionpack (= 5.2.4.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.4.1) + actionpack (= 5.2.4.1) + actionview (= 5.2.4.1) + activejob (= 5.2.4.1) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11.1) - actionview (= 4.2.11.1) - activesupport (= 4.2.11.1) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) + actionpack (5.2.4.1) + actionview (= 5.2.4.1) + activesupport (= 5.2.4.1) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.11.1) - activesupport (= 4.2.11.1) + actionview (5.2.4.1) + activesupport (= 5.2.4.1) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) active_material (1.4.2) - activejob (4.2.11.1) - activesupport (= 4.2.11.1) - globalid (>= 0.3.0) - activemodel (4.2.11.1) - activesupport (= 4.2.11.1) - builder (~> 3.1) - activerecord (4.2.11.1) - activemodel (= 4.2.11.1) - activesupport (= 4.2.11.1) - arel (~> 6.0) - activesupport (4.2.11.1) - i18n (~> 0.7) + activejob (5.2.4.1) + activesupport (= 5.2.4.1) + globalid (>= 0.3.6) + activemodel (5.2.4.1) + activesupport (= 5.2.4.1) + activerecord (5.2.4.1) + activemodel (= 5.2.4.1) + activesupport (= 5.2.4.1) + arel (>= 9.0) + activestorage (5.2.4.1) + actionpack (= 5.2.4.1) + activerecord (= 5.2.4.1) + marcel (~> 0.3.1) + activesupport (5.2.4.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - arbre (1.1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + arbre (1.2.1) activesupport (>= 3.0.0) - arel (6.0.4) - babel-source (5.8.35) - babel-transpiler (0.7.0) - babel-source (>= 4.0, < 6) - execjs (~> 2.0) + arel (9.0.0) bcrypt (3.1.13) builder (3.2.4) - capybara (2.17.0) + capybara (3.31.0) addressable mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.5) + xpath (~> 3.2) capybara-selenium (0.0.6) capybara selenium-webdriver childprocess (3.0.0) climate_control (0.2.0) - cocaine (0.5.8) - climate_control (>= 0.0.3, < 1.0) coderay (1.1.2) concurrent-ruby (1.1.6) crass (1.0.6) - database_cleaner (1.6.2) + database_cleaner (1.8.2) devise (4.7.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -102,15 +103,14 @@ GEM responders warden (~> 1.2.3) diff-lcs (1.3) - enumerize (2.1.2) + enumerize (2.3.1) activesupport (>= 3.2) - erubis (2.7.0) - execjs (2.7.0) - factory_bot (4.8.2) - activesupport (>= 3.0.0) - factory_bot_rails (4.8.2) - factory_bot (~> 4.8.2) - railties (>= 3.0.0) + erubi (1.9.0) + factory_bot (5.1.1) + activesupport (>= 4.2.0) + factory_bot_rails (5.1.1) + factory_bot (~> 5.1.0) + railties (>= 4.2.0) ffi (1.12.2) formatador (0.2.5) formtastic (3.1.5) @@ -118,7 +118,7 @@ GEM formtastic_i18n (0.6.0) globalid (0.4.2) activesupport (>= 4.2.0) - guard (2.14.2) + guard (2.16.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -132,140 +132,138 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - has_scope (0.7.1) - actionpack (>= 4.1, < 5.2) - activesupport (>= 4.1, < 5.2) - i18n (0.9.5) + has_scope (0.7.2) + actionpack (>= 4.1) + activesupport (>= 4.1) + i18n (1.8.2) concurrent-ruby (~> 1.0) - inherited_resources (1.8.0) - actionpack (>= 4.2, <= 5.2) + inherited_resources (1.11.0) + actionpack (>= 5.0, < 6.1) has_scope (~> 0.6) - railties (>= 4.2, <= 5.2) - responders - jquery-rails (4.3.1) + railties (>= 5.0, < 6.1) + responders (>= 2, < 4) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - kaminari (1.1.1) + kaminari (1.2.0) activesupport (>= 4.1.0) - kaminari-actionview (= 1.1.1) - kaminari-activerecord (= 1.1.1) - kaminari-core (= 1.1.1) - kaminari-actionview (1.1.1) + kaminari-actionview (= 1.2.0) + kaminari-activerecord (= 1.2.0) + kaminari-core (= 1.2.0) + kaminari-actionview (1.2.0) actionview - kaminari-core (= 1.1.1) - kaminari-activerecord (1.1.1) + kaminari-core (= 1.2.0) + kaminari-activerecord (1.2.0) activerecord - kaminari-core (= 1.1.1) - kaminari-core (1.1.1) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + kaminari-core (= 1.2.0) + kaminari-core (1.2.0) + listen (3.2.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.12) + lumberjack (1.2.4) mail (2.7.1) mini_mime (>= 0.1.1) - method_source (0.9.0) - mime-types (3.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (0.9.2) + mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mimemagic (0.3.2) + mime-types-data (3.2019.1009) + mimemagic (0.3.4) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) nenv (0.3.0) + nio4r (2.5.2) nokogiri (1.10.8) mini_portile2 (~> 2.4.0) - notiffany (0.1.1) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) orm_adapter (0.5.0) - paperclip (5.2.1) + paperclip (6.1.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) - cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) - polyamorous (1.3.3) - activerecord (>= 3.0) - pry (0.11.3) + terrapin (~> 0.6.0) + polyamorous (2.3.2) + activerecord (>= 5.2.1) + pry (0.12.2) coderay (~> 1.1.0) method_source (~> 0.9.0) - pry-rails (0.3.6) + pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (3.0.1) - rack (1.6.13) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.11.1) - actionmailer (= 4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) - activemodel (= 4.2.11.1) - activerecord (= 4.2.11.1) - activesupport (= 4.2.11.1) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11.1) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) + public_suffix (4.0.3) + puma (4.3.3) + nio4r (~> 2.0) + rack (2.2.2) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.4.1) + actioncable (= 5.2.4.1) + actionmailer (= 5.2.4.1) + actionpack (= 5.2.4.1) + actionview (= 5.2.4.1) + activejob (= 5.2.4.1) + activemodel (= 5.2.4.1) + activerecord (= 5.2.4.1) + activestorage (= 5.2.4.1) + activesupport (= 5.2.4.1) + bundler (>= 1.3.0) + railties (= 5.2.4.1) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (4.2.11.1) - actionpack (= 4.2.11.1) - activesupport (= 4.2.11.1) + railties (5.2.4.1) + actionpack (= 5.2.4.1) + activesupport (= 5.2.4.1) + method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) + thor (>= 0.19.0, < 2.0) rake (13.0.1) - ransack (1.8.6) - actionpack (>= 3.0) - activerecord (>= 3.0) - activesupport (>= 3.0) + ransack (2.3.2) + activerecord (>= 5.2.1) + activesupport (>= 5.2.1) i18n - polyamorous (~> 1.3.2) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + polyamorous (= 2.3.2) + rb-fsevent (0.10.3) + rb-inotify (0.10.1) + ffi (~> 1.0) + regexp_parser (1.6.0) require_all (1.5.0) - responders (2.4.1) - actionpack (>= 4.2.0, < 6.0) - railties (>= 4.2.0, < 6.0) - rspec (3.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.1) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + responders (3.0.0) + actionpack (>= 5.0) + railties (>= 5.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.1) + rspec-support (~> 3.9.1) + rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-rails (3.7.2) + rspec-support (~> 3.9.0) + rspec-rails (3.9.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) - ruby_dep (1.5.0) - rubyzip (1.3.0) - sass (3.5.5) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.2) + rubyzip (2.2.0) sassc (2.2.1) ffi (~> 1.9) sassc-rails (2.1.2) @@ -278,35 +276,36 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) shellany (0.0.1) - shoulda-matchers (3.1.2) - activesupport (>= 4.0.0) - sprockets (3.7.2) + shoulda-matchers (4.2.0) + activesupport (>= 4.2.0) + sprockets (4.0.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-es6 (0.9.2) - babel-source (>= 5.8.11) - babel-transpiler - sprockets (>= 3.0.0) sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.13) + sqlite3 (1.4.2) + terrapin (0.6.0) + climate_control (>= 0.0.3, < 1.0) thor (0.20.3) thread_safe (0.3.6) tilt (2.0.10) tzinfo (1.2.6) thread_safe (~> 0.1) - warden (1.2.7) - rack (>= 1.0) + warden (1.2.8) + rack (>= 2.0.6) webdrivers (4.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (>= 3.0, < 4.0) + websocket-driver (0.7.1) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.4) xdan-datetimepicker-rails (2.5.4) jquery-rails rails (>= 3.2.16) - xpath (3.0.0) + xpath (3.2.0) nokogiri (~> 1.8) PLATFORMS @@ -325,11 +324,12 @@ DEPENDENCIES guard-rspec paperclip pry-rails - rails (~> 4.2) + puma + rails (~> 5.2, >= 5.2.4.1) rspec-rails shoulda-matchers sqlite3 webdrivers BUNDLED WITH - 1.16.5 + 1.17.2 diff --git a/activeadmin_addons.gemspec b/activeadmin_addons.gemspec index 08f568d0..55bd2125 100644 --- a/activeadmin_addons.gemspec +++ b/activeadmin_addons.gemspec @@ -34,7 +34,8 @@ Gem::Specification.new do |s| s.add_development_dependency "guard-rspec" s.add_development_dependency "paperclip" s.add_development_dependency "pry-rails" - s.add_development_dependency "rails", "~> 4.2" + s.add_development_dependency "puma" + s.add_development_dependency "rails", "~> 5.2", ">= 5.2.4.1" s.add_development_dependency "rspec-rails" s.add_development_dependency "shoulda-matchers" s.add_development_dependency "sqlite3" diff --git a/spec/dummy/app/assets/config/manifest.js b/spec/dummy/app/assets/config/manifest.js new file mode 100644 index 00000000..a3c72cb3 --- /dev/null +++ b/spec/dummy/app/assets/config/manifest.js @@ -0,0 +1,4 @@ +//= link_tree ../images +//= link_directory ../javascripts +//= link_directory ../stylesheets +//= link fileicons/file_extension_pdf.png diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index e4a9408f..c4bca01c 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -26,6 +26,5 @@ class Application < Rails::Application # config.i18n.default_locale = :de config.secret_key_base = 'TODO Put something here' config.action_controller.permit_all_parameters = true - config.active_record.raise_in_transactional_callbacks = true end end diff --git a/spec/dummy/db/migrate/20140530172044_create_invoices.rb b/spec/dummy/db/migrate/20140530172044_create_invoices.rb index af28b2d6..75933459 100644 --- a/spec/dummy/db/migrate/20140530172044_create_invoices.rb +++ b/spec/dummy/db/migrate/20140530172044_create_invoices.rb @@ -1,4 +1,4 @@ -class CreateInvoices < ActiveRecord::Migration +class CreateInvoices < ActiveRecord::Migration[4.2] def change create_table :invoices do |t| t.datetime :legal_date diff --git a/spec/dummy/db/migrate/20140530172144_devise_create_admin_users.rb b/spec/dummy/db/migrate/20140530172144_devise_create_admin_users.rb index 9674a875..259818d0 100644 --- a/spec/dummy/db/migrate/20140530172144_devise_create_admin_users.rb +++ b/spec/dummy/db/migrate/20140530172144_devise_create_admin_users.rb @@ -1,4 +1,4 @@ -class DeviseCreateAdminUsers < ActiveRecord::Migration +class DeviseCreateAdminUsers < ActiveRecord::Migration[4.2] def migrate(direction) super # Create a default user diff --git a/spec/dummy/db/migrate/20140530172146_create_active_admin_comments.rb b/spec/dummy/db/migrate/20140530172146_create_active_admin_comments.rb index 9efd1478..3396dfad 100644 --- a/spec/dummy/db/migrate/20140530172146_create_active_admin_comments.rb +++ b/spec/dummy/db/migrate/20140530172146_create_active_admin_comments.rb @@ -1,4 +1,4 @@ -class CreateActiveAdminComments < ActiveRecord::Migration +class CreateActiveAdminComments < ActiveRecord::Migration[4.2] def self.up create_table :active_admin_comments do |t| t.string :namespace diff --git a/spec/dummy/db/migrate/20140530173150_add_paid_to_invoices.rb b/spec/dummy/db/migrate/20140530173150_add_paid_to_invoices.rb index 51a3f095..1cf61c26 100644 --- a/spec/dummy/db/migrate/20140530173150_add_paid_to_invoices.rb +++ b/spec/dummy/db/migrate/20140530173150_add_paid_to_invoices.rb @@ -1,4 +1,4 @@ -class AddPaidToInvoices < ActiveRecord::Migration +class AddPaidToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :paid, :boolean end diff --git a/spec/dummy/db/migrate/20150925190908_add_state_and_status_to_invoices.rb b/spec/dummy/db/migrate/20150925190908_add_state_and_status_to_invoices.rb index 1efc9c7e..3d1d1734 100644 --- a/spec/dummy/db/migrate/20150925190908_add_state_and_status_to_invoices.rb +++ b/spec/dummy/db/migrate/20150925190908_add_state_and_status_to_invoices.rb @@ -1,4 +1,4 @@ -class AddStateAndStatusToInvoices < ActiveRecord::Migration +class AddStateAndStatusToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :state, :string add_column :invoices, :status, :integer diff --git a/spec/dummy/db/migrate/20150925194618_add_attachment_to_invoices.rb b/spec/dummy/db/migrate/20150925194618_add_attachment_to_invoices.rb index dc5678a2..7aa3c6b4 100644 --- a/spec/dummy/db/migrate/20150925194618_add_attachment_to_invoices.rb +++ b/spec/dummy/db/migrate/20150925194618_add_attachment_to_invoices.rb @@ -1,5 +1,5 @@ require "paperclip" -class AddAttachmentToInvoices < ActiveRecord::Migration +class AddAttachmentToInvoices < ActiveRecord::Migration[4.2] include Paperclip::Schema::Statements def change diff --git a/spec/dummy/db/migrate/20151009200940_create_categories.rb b/spec/dummy/db/migrate/20151009200940_create_categories.rb index 218bb1f6..5459563a 100644 --- a/spec/dummy/db/migrate/20151009200940_create_categories.rb +++ b/spec/dummy/db/migrate/20151009200940_create_categories.rb @@ -1,4 +1,4 @@ -class CreateCategories < ActiveRecord::Migration +class CreateCategories < ActiveRecord::Migration[4.2] def change create_table :categories do |t| t.string :name diff --git a/spec/dummy/db/migrate/20151009201023_add_category_id_to_invoices.rb b/spec/dummy/db/migrate/20151009201023_add_category_id_to_invoices.rb index 5d804698..170dd098 100644 --- a/spec/dummy/db/migrate/20151009201023_add_category_id_to_invoices.rb +++ b/spec/dummy/db/migrate/20151009201023_add_category_id_to_invoices.rb @@ -1,4 +1,4 @@ -class AddCategoryIdToInvoices < ActiveRecord::Migration +class AddCategoryIdToInvoices < ActiveRecord::Migration[4.2] def change add_reference :invoices, :category, index: true end diff --git a/spec/dummy/db/migrate/20151218170155_create_countries.rb b/spec/dummy/db/migrate/20151218170155_create_countries.rb index 3f621f08..e6dd0c40 100644 --- a/spec/dummy/db/migrate/20151218170155_create_countries.rb +++ b/spec/dummy/db/migrate/20151218170155_create_countries.rb @@ -1,4 +1,4 @@ -class CreateCountries < ActiveRecord::Migration +class CreateCountries < ActiveRecord::Migration[4.2] def change create_table :countries do |t| t.string :name diff --git a/spec/dummy/db/migrate/20151218170211_create_regions.rb b/spec/dummy/db/migrate/20151218170211_create_regions.rb index 782ed052..6e87fd94 100644 --- a/spec/dummy/db/migrate/20151218170211_create_regions.rb +++ b/spec/dummy/db/migrate/20151218170211_create_regions.rb @@ -1,4 +1,4 @@ -class CreateRegions < ActiveRecord::Migration +class CreateRegions < ActiveRecord::Migration[4.2] def change create_table :regions do |t| t.string :name diff --git a/spec/dummy/db/migrate/20151218170240_create_cities.rb b/spec/dummy/db/migrate/20151218170240_create_cities.rb index 45c86513..7b737273 100644 --- a/spec/dummy/db/migrate/20151218170240_create_cities.rb +++ b/spec/dummy/db/migrate/20151218170240_create_cities.rb @@ -1,4 +1,4 @@ -class CreateCities < ActiveRecord::Migration +class CreateCities < ActiveRecord::Migration[4.2] def change create_table :cities do |t| t.string :name diff --git a/spec/dummy/db/migrate/20151218170831_add_city_to_invoices.rb b/spec/dummy/db/migrate/20151218170831_add_city_to_invoices.rb index d0687da5..2b9fdc00 100644 --- a/spec/dummy/db/migrate/20151218170831_add_city_to_invoices.rb +++ b/spec/dummy/db/migrate/20151218170831_add_city_to_invoices.rb @@ -1,4 +1,4 @@ -class AddCityToInvoices < ActiveRecord::Migration +class AddCityToInvoices < ActiveRecord::Migration[4.2] def change add_reference :invoices, :city, index: true end diff --git a/spec/dummy/db/migrate/20151231204230_add_information_to_cities.rb b/spec/dummy/db/migrate/20151231204230_add_information_to_cities.rb index a58dfbc6..2f026e62 100644 --- a/spec/dummy/db/migrate/20151231204230_add_information_to_cities.rb +++ b/spec/dummy/db/migrate/20151231204230_add_information_to_cities.rb @@ -1,4 +1,4 @@ -class AddInformationToCities < ActiveRecord::Migration +class AddInformationToCities < ActiveRecord::Migration[4.2] def change add_column :cities, :information, :text end diff --git a/spec/dummy/db/migrate/20151231205008_add_information_to_regions.rb b/spec/dummy/db/migrate/20151231205008_add_information_to_regions.rb index 758db75e..13c3b901 100644 --- a/spec/dummy/db/migrate/20151231205008_add_information_to_regions.rb +++ b/spec/dummy/db/migrate/20151231205008_add_information_to_regions.rb @@ -1,4 +1,4 @@ -class AddInformationToRegions < ActiveRecord::Migration +class AddInformationToRegions < ActiveRecord::Migration[4.2] def change add_column :regions, :information, :text end diff --git a/spec/dummy/db/migrate/20151231205017_add_information_to_countries.rb b/spec/dummy/db/migrate/20151231205017_add_information_to_countries.rb index d71455af..f4fa29e6 100644 --- a/spec/dummy/db/migrate/20151231205017_add_information_to_countries.rb +++ b/spec/dummy/db/migrate/20151231205017_add_information_to_countries.rb @@ -1,4 +1,4 @@ -class AddInformationToCountries < ActiveRecord::Migration +class AddInformationToCountries < ActiveRecord::Migration[4.2] def change add_column :countries, :information, :text end diff --git a/spec/dummy/db/migrate/20160123231225_add_position_to_invoices.rb b/spec/dummy/db/migrate/20160123231225_add_position_to_invoices.rb index 01d9e25c..52cf51ea 100644 --- a/spec/dummy/db/migrate/20160123231225_add_position_to_invoices.rb +++ b/spec/dummy/db/migrate/20160123231225_add_position_to_invoices.rb @@ -1,4 +1,4 @@ -class AddPositionToInvoices < ActiveRecord::Migration +class AddPositionToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :position, :integer end diff --git a/spec/dummy/db/migrate/20160227211518_add_color_and_amount_to_invoices.rb b/spec/dummy/db/migrate/20160227211518_add_color_and_amount_to_invoices.rb index b5cd32ff..2b5ae266 100644 --- a/spec/dummy/db/migrate/20160227211518_add_color_and_amount_to_invoices.rb +++ b/spec/dummy/db/migrate/20160227211518_add_color_and_amount_to_invoices.rb @@ -1,4 +1,4 @@ -class AddColorAndAmountToInvoices < ActiveRecord::Migration +class AddColorAndAmountToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :color, :string add_column :invoices, :amount, :float diff --git a/spec/dummy/db/migrate/20160426155136_create_items.rb b/spec/dummy/db/migrate/20160426155136_create_items.rb index 30092b67..c96ffe1f 100644 --- a/spec/dummy/db/migrate/20160426155136_create_items.rb +++ b/spec/dummy/db/migrate/20160426155136_create_items.rb @@ -1,4 +1,4 @@ -class CreateItems < ActiveRecord::Migration +class CreateItems < ActiveRecord::Migration[4.2] def change create_table :items do |t| t.string :name diff --git a/spec/dummy/db/migrate/20160426161032_create_invoices_and_items.rb b/spec/dummy/db/migrate/20160426161032_create_invoices_and_items.rb index dd9b4525..2fdc3c7d 100644 --- a/spec/dummy/db/migrate/20160426161032_create_invoices_and_items.rb +++ b/spec/dummy/db/migrate/20160426161032_create_invoices_and_items.rb @@ -1,4 +1,4 @@ -class CreateInvoicesAndItems < ActiveRecord::Migration +class CreateInvoicesAndItems < ActiveRecord::Migration[4.2] def change create_table :invoices_items, id: false do |t| t.belongs_to :invoice, index: true diff --git a/spec/dummy/db/migrate/20170804152156_add_client_id_to_invoices.rb b/spec/dummy/db/migrate/20170804152156_add_client_id_to_invoices.rb index 9c4696fe..93fdedc7 100644 --- a/spec/dummy/db/migrate/20170804152156_add_client_id_to_invoices.rb +++ b/spec/dummy/db/migrate/20170804152156_add_client_id_to_invoices.rb @@ -1,4 +1,4 @@ -class AddClientIdToInvoices < ActiveRecord::Migration +class AddClientIdToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :client_id, :integer end diff --git a/spec/dummy/db/migrate/20170827225107_add_aasm_state_to_invoices.rb b/spec/dummy/db/migrate/20170827225107_add_aasm_state_to_invoices.rb index 7b4dd3ed..8b6d84d4 100644 --- a/spec/dummy/db/migrate/20170827225107_add_aasm_state_to_invoices.rb +++ b/spec/dummy/db/migrate/20170827225107_add_aasm_state_to_invoices.rb @@ -1,4 +1,4 @@ -class AddAasmStateToInvoices < ActiveRecord::Migration +class AddAasmStateToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :aasm_state, :string end diff --git a/spec/dummy/db/migrate/20170904155016_create_cars.rb b/spec/dummy/db/migrate/20170904155016_create_cars.rb index 78f54b06..c9bbced2 100644 --- a/spec/dummy/db/migrate/20170904155016_create_cars.rb +++ b/spec/dummy/db/migrate/20170904155016_create_cars.rb @@ -1,4 +1,4 @@ -class CreateCars < ActiveRecord::Migration +class CreateCars < ActiveRecord::Migration[4.2] def change create_table :cars do |t| t.string :name diff --git a/spec/dummy/db/migrate/20170904155843_create_manufacturers.rb b/spec/dummy/db/migrate/20170904155843_create_manufacturers.rb index d6a229a1..ac2d9654 100644 --- a/spec/dummy/db/migrate/20170904155843_create_manufacturers.rb +++ b/spec/dummy/db/migrate/20170904155843_create_manufacturers.rb @@ -1,4 +1,4 @@ -class CreateManufacturers < ActiveRecord::Migration +class CreateManufacturers < ActiveRecord::Migration[4.2] def change create_table :manufacturers do |t| t.string :name diff --git a/spec/dummy/db/migrate/20171110201538_add_active_to_invoices.rb b/spec/dummy/db/migrate/20171110201538_add_active_to_invoices.rb index d9381307..aca2d61f 100644 --- a/spec/dummy/db/migrate/20171110201538_add_active_to_invoices.rb +++ b/spec/dummy/db/migrate/20171110201538_add_active_to_invoices.rb @@ -1,4 +1,4 @@ -class AddActiveToInvoices < ActiveRecord::Migration +class AddActiveToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :active, :boolean, default: true end diff --git a/spec/dummy/db/migrate/20180222225709_add_shipping_status_to_invoice.rb b/spec/dummy/db/migrate/20180222225709_add_shipping_status_to_invoice.rb index 09e7725c..d9014c69 100644 --- a/spec/dummy/db/migrate/20180222225709_add_shipping_status_to_invoice.rb +++ b/spec/dummy/db/migrate/20180222225709_add_shipping_status_to_invoice.rb @@ -1,4 +1,4 @@ -class AddShippingStatusToInvoice < ActiveRecord::Migration +class AddShippingStatusToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :shipping_status, :string end diff --git a/spec/dummy/db/migrate/20180228085959_create_departments.rb b/spec/dummy/db/migrate/20180228085959_create_departments.rb index 3c01a695..9e417e6d 100644 --- a/spec/dummy/db/migrate/20180228085959_create_departments.rb +++ b/spec/dummy/db/migrate/20180228085959_create_departments.rb @@ -1,4 +1,4 @@ -class CreateDepartments < ActiveRecord::Migration +class CreateDepartments < ActiveRecord::Migration[4.2] def change create_table :departments do |t| t.string :name diff --git a/spec/dummy/db/migrate/20180228122115_create_departments_cities.rb b/spec/dummy/db/migrate/20180228122115_create_departments_cities.rb index 586522ae..3d283b7c 100644 --- a/spec/dummy/db/migrate/20180228122115_create_departments_cities.rb +++ b/spec/dummy/db/migrate/20180228122115_create_departments_cities.rb @@ -1,4 +1,4 @@ -class CreateDepartmentsCities < ActiveRecord::Migration +class CreateDepartmentsCities < ActiveRecord::Migration[4.2] def change create_table :departments_cities do |t| t.references :department, index: true, foreign_key: true diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index f1b34586..7b4d1f37 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -11,73 +10,70 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180228122115) do +ActiveRecord::Schema.define(version: 2018_02_28_122115) do create_table "active_admin_comments", force: :cascade do |t| - t.string "namespace" - t.text "body" - t.string "resource_id", null: false - t.string "resource_type", null: false - t.integer "author_id" - t.string "author_type" + t.string "namespace" + t.text "body" + t.string "resource_id", null: false + t.string "resource_type", null: false + t.string "author_type" + t.integer "author_id" t.datetime "created_at" t.datetime "updated_at" + t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id" + t.index ["namespace"], name: "index_active_admin_comments_on_namespace" + t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id" end - add_index "active_admin_comments", ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id" - add_index "active_admin_comments", ["namespace"], name: "index_active_admin_comments_on_namespace" - add_index "active_admin_comments", ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id" - create_table "admin_users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false - t.string "reset_password_token" + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" + t.index ["email"], name: "index_admin_users_on_email", unique: true + t.index ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true end - add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true - add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true - create_table "cars", force: :cascade do |t| - t.string "name" + t.string "name" t.integer "year" t.integer "manufacturer_id" end create_table "categories", force: :cascade do |t| - t.string "name" - t.text "description" + t.string "name" + t.text "description" t.datetime "created_at" t.datetime "updated_at" end create_table "cities", force: :cascade do |t| - t.string "name" - t.integer "region_id" + t.string "name" + t.integer "region_id" t.datetime "created_at" t.datetime "updated_at" - t.text "information" + t.text "information" + t.index ["region_id"], name: "index_cities_on_region_id" end - add_index "cities", ["region_id"], name: "index_cities_on_region_id" - create_table "countries", force: :cascade do |t| - t.string "name" + t.string "name" t.datetime "created_at" t.datetime "updated_at" - t.text "information" + t.text "information" end create_table "departments", force: :cascade do |t| - t.string "name" + t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end @@ -85,52 +81,49 @@ create_table "departments_cities", force: :cascade do |t| t.integer "department_id" t.integer "city_id" + t.index ["city_id"], name: "index_departments_cities_on_city_id" + t.index ["department_id"], name: "index_departments_cities_on_department_id" end - add_index "departments_cities", ["city_id"], name: "index_departments_cities_on_city_id" - add_index "departments_cities", ["department_id"], name: "index_departments_cities_on_department_id" - create_table "invoices", force: :cascade do |t| t.datetime "legal_date" - t.string "number" + t.string "number" t.datetime "created_at" t.datetime "updated_at" - t.boolean "paid" - t.string "state" - t.integer "status" - t.string "attachment_file_name" - t.string "attachment_content_type" - t.integer "attachment_file_size" + t.boolean "paid" + t.string "state" + t.integer "status" + t.string "attachment_file_name" + t.string "attachment_content_type" + t.bigint "attachment_file_size" t.datetime "attachment_updated_at" - t.string "photo_file_name" - t.string "photo_content_type" - t.integer "photo_file_size" + t.string "photo_file_name" + t.string "photo_content_type" + t.bigint "photo_file_size" t.datetime "photo_updated_at" - t.integer "category_id" - t.integer "city_id" - t.integer "position" - t.string "color" - t.float "amount" - t.integer "client_id" - t.string "aasm_state" - t.boolean "active", default: true - t.string "shipping_status" + t.integer "category_id" + t.integer "city_id" + t.integer "position" + t.string "color" + t.float "amount" + t.integer "client_id" + t.string "aasm_state" + t.boolean "active", default: true + t.string "shipping_status" + t.index ["category_id"], name: "index_invoices_on_category_id" + t.index ["city_id"], name: "index_invoices_on_city_id" end - add_index "invoices", ["category_id"], name: "index_invoices_on_category_id" - add_index "invoices", ["city_id"], name: "index_invoices_on_city_id" - create_table "invoices_items", id: false, force: :cascade do |t| t.integer "invoice_id" t.integer "item_id" + t.index ["invoice_id"], name: "index_invoices_items_on_invoice_id" + t.index ["item_id"], name: "index_invoices_items_on_item_id" end - add_index "invoices_items", ["invoice_id"], name: "index_invoices_items_on_invoice_id" - add_index "invoices_items", ["item_id"], name: "index_invoices_items_on_item_id" - create_table "items", force: :cascade do |t| - t.string "name" - t.text "description" + t.string "name" + t.text "description" t.datetime "created_at" t.datetime "updated_at" end @@ -140,13 +133,12 @@ end create_table "regions", force: :cascade do |t| - t.string "name" - t.integer "country_id" + t.string "name" + t.integer "country_id" t.datetime "created_at" t.datetime "updated_at" - t.text "information" + t.text "information" + t.index ["country_id"], name: "index_regions_on_country_id" end - add_index "regions", ["country_id"], name: "index_regions_on_country_id" - end