- 'Rakefile'
- 'node_modules/**/*'
- 'Vagrantfile'
+ - 'vendor/**/*'
+# frozen_string_literal: true
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm/git'
end
group :development do
- gem 'rubocop', require: false
+ gem 'rubocop', '0.46.0', require: false
gem 'better_errors'
gem 'binding_of_caller'
gem 'letter_opener'
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.5.0)
- rubocop (0.48.1)
- parser (>= 2.3.3.1, < 3.0)
+ rubocop (0.46.0)
+ parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
rqrcode
rspec-rails
rspec-sidekiq
- rubocop
+ rubocop (= 0.46.0)
ruby-oembed
sanitize
sass-rails (~> 5.0)
end
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
def parsed_uri
- # frozen_string_literal: true
+# frozen_string_literal: true
module WellKnown
class HostMetaController < ApplicationController
# frozen_string_literal: true
module Admin::FilterHelper
- ACCOUNT_FILTERS = %i[local remote by_domain silenced suspended recent].freeze
- REPORT_FILTERS = %i[resolved account_id target_account_id].freeze
+ ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended recent).freeze
+ REPORT_FILTERS = %i(resolved account_id target_account_id).freeze
FILTERS = ACCOUNT_FILTERS + REPORT_FILTERS
end
def search_results
- @_search_results ||= if account
- advanced_search_results
- else
- simple_search_results
+ @_search_results ||= begin
+ if account
+ advanced_search_results
+ else
+ simple_search_results
+ end
end
end
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
- 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
desc 'Set unknown attachment type for remote-only attachments'
task set_unknown: :environment do
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)
Rails.logger.debug 'Done!'
end