Просмотр исходного кода

Maintenance: Update dependency rubocop-rails to v2.19.1

renovatebot 1 год назад
Родитель
Сommit
9ea9235e41

+ 1 - 1
Gemfile.lock

@@ -497,7 +497,7 @@ GEM
     rubocop-performance (1.17.1)
       rubocop (>= 1.7.0, < 2.0)
       rubocop-ast (>= 0.4.0)
-    rubocop-rails (2.17.4)
+    rubocop-rails (2.19.1)
       activesupport (>= 4.2.0)
       rack (>= 1.1)
       rubocop (>= 1.33.0, < 2.0)

+ 6 - 6
db/migrate/20120101000001_create_base.rb

@@ -8,7 +8,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
 
     create_table :sessions do |t|
       t.string :session_id,  null: false
-      t.boolean :persistent, null: true
+      t.boolean :persistent, null: true # rubocop:disable Rails/ThreeStateBooleanColumn
       t.text :data
       t.timestamps limit: 3, null: false
     end
@@ -35,7 +35,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
       t.string :city,                 limit: 100, null: true, default: ''
       t.string :country,              limit: 100, null: true, default: ''
       t.string :address,              limit: 500, null: true, default: ''
-      t.boolean :vip,                                         default: false
+      t.boolean :vip,                                         default: false # rubocop:disable Rails/ThreeStateBooleanColumn
       t.boolean :verified,                        null: false, default: false
       t.boolean :active,                          null: false, default: true
       t.string :note,                 limit: 5000, null: true, default: ''
@@ -134,7 +134,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
     create_table :roles do |t|
       t.string :name,                   limit: 100, null: false
       t.text   :preferences,            limit: 500.kilobytes + 1, null: true
-      t.boolean :default_at_signup,                 null: true, default: false
+      t.boolean :default_at_signup,                 null: true, default: false # rubocop:disable Rails/ThreeStateBooleanColumn
       t.boolean :active,                            null: false, default: true
       t.string :note,                   limit: 250, null: true
       t.integer :updated_by_id,                     null: false
@@ -273,7 +273,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
 
     create_table :tokens do |t|
       t.references :user,                         null: false
-      t.boolean :persistent
+      t.boolean :persistent # rubocop:disable Rails/ThreeStateBooleanColumn
       t.string  :name,                limit: 255, null: true
       t.string  :token,               limit: 100, null: false
       t.string  :action,              limit: 40,  null: false
@@ -446,7 +446,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
       t.text :options, null: true
       t.text :state_current,            limit: 200.kilobytes + 1, null: true
       t.string :state_initial,          limit: 2000, null: true
-      t.boolean :frontend,                           null: false
+      t.boolean :frontend,                           null: false # rubocop:disable Rails/ThreeStateBooleanColumn
       t.text :preferences,              limit: 200.kilobytes + 1, null: true
       t.timestamps limit: 3, null: false
     end
@@ -651,7 +651,7 @@ class CreateBase < ActiveRecord::Migration[4.2]
     create_table :import_jobs do |t|
       t.string :name, limit: 250, null: false
 
-      t.boolean :dry_run, default: false
+      t.boolean :dry_run, default: false # rubocop:disable Rails/ThreeStateBooleanColumn
 
       t.text :payload, limit: 80_000
       t.text :result, limit: 80_000

+ 1 - 1
db/migrate/20120101000010_create_ticket.rb

@@ -152,7 +152,7 @@ class CreateTicket < ActiveRecord::Migration[4.2]
     create_table :ticket_article_types do |t|
       t.column :name,                 :string, limit: 250, null: false
       t.column :note,                 :string, limit: 250, null: true
-      t.column :communication,        :boolean,            null: false
+      t.column :communication,        :boolean,            null: false # rubocop:disable Rails/ThreeStateBooleanColumn
       t.column :active,               :boolean,            null: false, default: true
       t.column :updated_by_id,        :integer,            null: false
       t.column :created_by_id,        :integer,            null: false

+ 1 - 1
db/migrate/20170419000001_ldap_support.rb

@@ -10,7 +10,7 @@ class LdapSupport < ActiveRecord::Migration[4.2]
       create_table :import_jobs do |t|
         t.string :name, limit: 250, null: false
 
-        t.boolean :dry_run, default: false
+        t.boolean :dry_run, default: false # rubocop:disable Rails/ThreeStateBooleanColumn
 
         t.text :payload, limit: 80_000
         t.text :result, limit: 80_000

+ 1 - 1
db/migrate/20190713000001_group_dependent_macros.rb

@@ -3,7 +3,7 @@
 class GroupDependentMacros < ActiveRecord::Migration[4.2]
   def up
 
-    create_table :groups_macros, id: false do |t| # rubocop:disable Rails/CreateTableWithTimestamps
+    create_table :groups_macros, id: false do |t|
       t.references :macro, null: false
       t.references :group, null: false
     end

+ 2 - 2
spec/requests/user/admin_password_auth_spec.rb

@@ -110,7 +110,7 @@ RSpec.describe 'User endpoint', authenticated_as: false, type: :request do
 
       it "'failed' if invalid token" do
         post api_v1_users_admin_password_auth_verify_path, params: { token: 4711 }
-        expect(JSON.parse(response.body)).to include('message' => 'failed')
+        expect(response.parsed_body).to include('message' => 'failed')
       end
 
       it "'ok' and user login if valid token" do
@@ -118,7 +118,7 @@ RSpec.describe 'User endpoint', authenticated_as: false, type: :request do
         token = Token.create(action: 'AdminAuth', user_id: user.id, persistent: false)
 
         post api_v1_users_admin_password_auth_verify_path, params: { token: token.token }
-        expect(JSON.parse(response.body)).to include('message' => 'ok', 'user_login' => user.login)
+        expect(response.parsed_body).to include('message' => 'ok', 'user_login' => user.login)
       end
     end
   end