forked from cybrespace/mastodon
		
	Downgrade rubocop 0.48.1 => 0.46.0 (#2628)
* downgrade rubocop 0.48.1 => 0.46.0 * exclude vendor/**/* from rubocop target files * add frozen_string_literal comment line * fix percent literal delimited by ( and ) * fix alignment * remove comment disabling unknown cop
This commit is contained in:
		
							parent
							
								
									01e011bc90
								
							
						
					
					
						commit
						8325866c61
					
				
					 10 changed files with 17 additions and 14 deletions
				
			
		| 
						 | 
					@ -88,3 +88,4 @@ AllCops:
 | 
				
			||||||
  - 'Rakefile'
 | 
					  - 'Rakefile'
 | 
				
			||||||
  - 'node_modules/**/*'
 | 
					  - 'node_modules/**/*'
 | 
				
			||||||
  - 'Vagrantfile'
 | 
					  - 'Vagrantfile'
 | 
				
			||||||
 | 
					  - 'vendor/**/*'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								Capfile
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								Capfile
									
										
									
									
									
								
							| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					# frozen_string_literal: true
 | 
				
			||||||
require 'capistrano/setup'
 | 
					require 'capistrano/setup'
 | 
				
			||||||
require 'capistrano/deploy'
 | 
					require 'capistrano/deploy'
 | 
				
			||||||
require 'capistrano/scm/git'
 | 
					require 'capistrano/scm/git'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								Gemfile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Gemfile
									
										
									
									
									
								
							| 
						 | 
					@ -83,7 +83,7 @@ group :test do
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
group :development do
 | 
					group :development do
 | 
				
			||||||
  gem 'rubocop', require: false
 | 
					  gem 'rubocop', '0.46.0', require: false
 | 
				
			||||||
  gem 'better_errors'
 | 
					  gem 'better_errors'
 | 
				
			||||||
  gem 'binding_of_caller'
 | 
					  gem 'binding_of_caller'
 | 
				
			||||||
  gem 'letter_opener'
 | 
					  gem 'letter_opener'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -394,8 +394,8 @@ GEM
 | 
				
			||||||
      rspec-core (~> 3.0, >= 3.0.0)
 | 
					      rspec-core (~> 3.0, >= 3.0.0)
 | 
				
			||||||
      sidekiq (>= 2.4.0)
 | 
					      sidekiq (>= 2.4.0)
 | 
				
			||||||
    rspec-support (3.5.0)
 | 
					    rspec-support (3.5.0)
 | 
				
			||||||
    rubocop (0.48.1)
 | 
					    rubocop (0.46.0)
 | 
				
			||||||
      parser (>= 2.3.3.1, < 3.0)
 | 
					      parser (>= 2.3.1.1, < 3.0)
 | 
				
			||||||
      powerpack (~> 0.1)
 | 
					      powerpack (~> 0.1)
 | 
				
			||||||
      rainbow (>= 1.99.1, < 3.0)
 | 
					      rainbow (>= 1.99.1, < 3.0)
 | 
				
			||||||
      ruby-progressbar (~> 1.7)
 | 
					      ruby-progressbar (~> 1.7)
 | 
				
			||||||
| 
						 | 
					@ -547,7 +547,7 @@ DEPENDENCIES
 | 
				
			||||||
  rqrcode
 | 
					  rqrcode
 | 
				
			||||||
  rspec-rails
 | 
					  rspec-rails
 | 
				
			||||||
  rspec-sidekiq
 | 
					  rspec-sidekiq
 | 
				
			||||||
  rubocop
 | 
					  rubocop (= 0.46.0)
 | 
				
			||||||
  ruby-oembed
 | 
					  ruby-oembed
 | 
				
			||||||
  sanitize
 | 
					  sanitize
 | 
				
			||||||
  sass-rails (~> 5.0)
 | 
					  sass-rails (~> 5.0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ class AuthorizeFollowsController < ApplicationController
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def acct_param_is_url?
 | 
					  def acct_param_is_url?
 | 
				
			||||||
    parsed_uri.path && %w[http https].include?(parsed_uri.scheme)
 | 
					    parsed_uri.path && %w(http https).include?(parsed_uri.scheme)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def parsed_uri
 | 
					  def parsed_uri
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
  # frozen_string_literal: true
 | 
					# frozen_string_literal: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module WellKnown
 | 
					module WellKnown
 | 
				
			||||||
  class HostMetaController < ApplicationController
 | 
					  class HostMetaController < ApplicationController
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
# frozen_string_literal: true
 | 
					# frozen_string_literal: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module Admin::FilterHelper
 | 
					module Admin::FilterHelper
 | 
				
			||||||
  ACCOUNT_FILTERS = %i[local remote by_domain silenced suspended recent].freeze
 | 
					  ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended recent).freeze
 | 
				
			||||||
  REPORT_FILTERS = %i[resolved account_id target_account_id].freeze
 | 
					  REPORT_FILTERS = %i(resolved account_id target_account_id).freeze
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  FILTERS = ACCOUNT_FILTERS + REPORT_FILTERS
 | 
					  FILTERS = ACCOUNT_FILTERS + REPORT_FILTERS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,10 +63,12 @@ class AccountSearchService < BaseService
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def search_results
 | 
					  def search_results
 | 
				
			||||||
    @_search_results ||= if account
 | 
					    @_search_results ||= begin
 | 
				
			||||||
      advanced_search_results
 | 
					      if account
 | 
				
			||||||
    else
 | 
					        advanced_search_results
 | 
				
			||||||
      simple_search_results
 | 
					      else
 | 
				
			||||||
 | 
					        simple_search_results
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -205,7 +205,7 @@ class ProcessFeedService < BaseService
 | 
				
			||||||
        media = MediaAttachment.where(status: parent, remote_url: link['href']).first_or_initialize(account: parent.account, status: parent, remote_url: link['href'])
 | 
					        media = MediaAttachment.where(status: parent, remote_url: link['href']).first_or_initialize(account: parent.account, status: parent, remote_url: link['href'])
 | 
				
			||||||
        parsed_url = Addressable::URI.parse(link['href']).normalize
 | 
					        parsed_url = Addressable::URI.parse(link['href']).normalize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        next if !%w[http https].include?(parsed_url.scheme) || parsed_url.host.empty?
 | 
					        next if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        media.save
 | 
					        media.save
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,7 +61,6 @@ namespace :mastodon do
 | 
				
			||||||
    desc 'Set unknown attachment type for remote-only attachments'
 | 
					    desc 'Set unknown attachment type for remote-only attachments'
 | 
				
			||||||
    task set_unknown: :environment do
 | 
					    task set_unknown: :environment do
 | 
				
			||||||
      Rails.logger.debug 'Setting unknown attachment type for remote-only attachments...'
 | 
					      Rails.logger.debug 'Setting unknown attachment type for remote-only attachments...'
 | 
				
			||||||
      # rubocop:disable Rails/SkipsModelValidations
 | 
					 | 
				
			||||||
      MediaAttachment.where(file_file_name: nil).where.not(type: :unknown).in_batches.update_all(type: :unknown)
 | 
					      MediaAttachment.where(file_file_name: nil).where.not(type: :unknown).in_batches.update_all(type: :unknown)
 | 
				
			||||||
      Rails.logger.debug 'Done!'
 | 
					      Rails.logger.debug 'Done!'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue