aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-08-03 03:13:11 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-08-03 03:13:11 +0900
commit815d1abf3962d65c0bb9043c99a507580b4360df (patch)
tree15e3dd06455877e6e702e898e2b8fce8592d3cef /activestorage/test
parentc6974229d018b73f70e38ca8c8862473870d0274 (diff)
downloadrails-815d1abf3962d65c0bb9043c99a507580b4360df.tar.gz
rails-815d1abf3962d65c0bb9043c99a507580b4360df.tar.bz2
rails-815d1abf3962d65c0bb9043c99a507580b4360df.zip
Fix `Style/StringLiterals` violations for Active Storage
``` % be rubocop -a --only Style/StringLiterals activestorage Inspecting 74 files ........................................CCCCCCCCCC.C........CC.......C.C.. (snip) 74 files inspected, 31 offenses detected, 31 offenses corrected ```
Diffstat (limited to 'activestorage/test')
-rw-r--r--activestorage/test/dummy/Rakefile2
-rwxr-xr-xactivestorage/test/dummy/bin/bundle4
-rwxr-xr-xactivestorage/test/dummy/bin/rails6
-rwxr-xr-xactivestorage/test/dummy/bin/rake4
-rwxr-xr-xactivestorage/test/dummy/bin/yarn2
-rw-r--r--activestorage/test/dummy/config.ru2
-rw-r--r--activestorage/test/dummy/config/application.rb2
-rw-r--r--activestorage/test/dummy/config/boot.rb6
-rw-r--r--activestorage/test/dummy/config/environment.rb2
-rw-r--r--activestorage/test/dummy/config/environments/development.rb4
-rw-r--r--activestorage/test/dummy/config/environments/production.rb2
-rw-r--r--activestorage/test/dummy/config/environments/test.rb2
-rw-r--r--activestorage/test/dummy/config/initializers/assets.rb4
-rw-r--r--activestorage/test/service/gcs_service_test.rb4
-rw-r--r--activestorage/test/service/s3_service_test.rb4
15 files changed, 25 insertions, 25 deletions
diff --git a/activestorage/test/dummy/Rakefile b/activestorage/test/dummy/Rakefile
index ed646b6f55..d1baef0699 100644
--- a/activestorage/test/dummy/Rakefile
+++ b/activestorage/test/dummy/Rakefile
@@ -1,3 +1,3 @@
-require_relative 'config/application'
+require_relative "config/application"
Rails.application.load_tasks
diff --git a/activestorage/test/dummy/bin/bundle b/activestorage/test/dummy/bin/bundle
index 66e9889e8b..fe1874509a 100755
--- a/activestorage/test/dummy/bin/bundle
+++ b/activestorage/test/dummy/bin/bundle
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-load Gem.bin_path('bundler', 'bundle')
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
+load Gem.bin_path("bundler", "bundle")
diff --git a/activestorage/test/dummy/bin/rails b/activestorage/test/dummy/bin/rails
index 0739660237..efc0377492 100755
--- a/activestorage/test/dummy/bin/rails
+++ b/activestorage/test/dummy/bin/rails
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-APP_PATH = File.expand_path('../config/application', __dir__)
-require_relative '../config/boot'
-require 'rails/commands'
+APP_PATH = File.expand_path("../config/application", __dir__)
+require_relative "../config/boot"
+require "rails/commands"
diff --git a/activestorage/test/dummy/bin/rake b/activestorage/test/dummy/bin/rake
index 17240489f6..4fbf10b960 100755
--- a/activestorage/test/dummy/bin/rake
+++ b/activestorage/test/dummy/bin/rake
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-require_relative '../config/boot'
-require 'rake'
+require_relative "../config/boot"
+require "rake"
Rake.application.run
diff --git a/activestorage/test/dummy/bin/yarn b/activestorage/test/dummy/bin/yarn
index c2bacef836..b8fe4eeaf3 100755
--- a/activestorage/test/dummy/bin/yarn
+++ b/activestorage/test/dummy/bin/yarn
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-VENDOR_PATH = File.expand_path('..', __dir__)
+VENDOR_PATH = File.expand_path("..", __dir__)
Dir.chdir(VENDOR_PATH) do
begin
exec "yarnpkg #{ARGV.join(" ")}"
diff --git a/activestorage/test/dummy/config.ru b/activestorage/test/dummy/config.ru
index f7ba0b527b..441e6ff0c3 100644
--- a/activestorage/test/dummy/config.ru
+++ b/activestorage/test/dummy/config.ru
@@ -1,5 +1,5 @@
# This file is used by Rack-based servers to start the application.
-require_relative 'config/environment'
+require_relative "config/environment"
run Rails.application
diff --git a/activestorage/test/dummy/config/application.rb b/activestorage/test/dummy/config/application.rb
index 7c8c2575ee..5c59401358 100644
--- a/activestorage/test/dummy/config/application.rb
+++ b/activestorage/test/dummy/config/application.rb
@@ -1,4 +1,4 @@
-require_relative 'boot'
+require_relative "boot"
require "rails"
require "active_model/railtie"
diff --git a/activestorage/test/dummy/config/boot.rb b/activestorage/test/dummy/config/boot.rb
index c9aef85d40..116591a4ed 100644
--- a/activestorage/test/dummy/config/boot.rb
+++ b/activestorage/test/dummy/config/boot.rb
@@ -1,5 +1,5 @@
# Set up gems listed in the Gemfile.
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
-require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
-$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
+require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
+$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
diff --git a/activestorage/test/dummy/config/environment.rb b/activestorage/test/dummy/config/environment.rb
index 426333bb46..cac5315775 100644
--- a/activestorage/test/dummy/config/environment.rb
+++ b/activestorage/test/dummy/config/environment.rb
@@ -1,5 +1,5 @@
# Load the Rails application.
-require_relative 'application'
+require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
diff --git a/activestorage/test/dummy/config/environments/development.rb b/activestorage/test/dummy/config/environments/development.rb
index 503375dede..5f3d463210 100644
--- a/activestorage/test/dummy/config/environments/development.rb
+++ b/activestorage/test/dummy/config/environments/development.rb
@@ -13,12 +13,12 @@ Rails.application.configure do
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
- if Rails.root.join('tmp/caching-dev.txt').exist?
+ if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
- 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
+ "Cache-Control" => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
diff --git a/activestorage/test/dummy/config/environments/production.rb b/activestorage/test/dummy/config/environments/production.rb
index 35a30e084a..343da23f0b 100644
--- a/activestorage/test/dummy/config/environments/production.rb
+++ b/activestorage/test/dummy/config/environments/production.rb
@@ -21,7 +21,7 @@ Rails.application.configure do
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
+ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
diff --git a/activestorage/test/dummy/config/environments/test.rb b/activestorage/test/dummy/config/environments/test.rb
index 4380dfc0cd..4f2c048600 100644
--- a/activestorage/test/dummy/config/environments/test.rb
+++ b/activestorage/test/dummy/config/environments/test.rb
@@ -15,7 +15,7 @@ Rails.application.configure do
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
+ "Cache-Control" => "public, max-age=#{1.hour.seconds.to_i}"
}
# Show full error reports and disable caching.
diff --git a/activestorage/test/dummy/config/initializers/assets.rb b/activestorage/test/dummy/config/initializers/assets.rb
index 4b828e80cb..c1f948d018 100644
--- a/activestorage/test/dummy/config/initializers/assets.rb
+++ b/activestorage/test/dummy/config/initializers/assets.rb
@@ -1,12 +1,12 @@
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
-Rails.application.config.assets.version = '1.0'
+Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules folder to the asset load path.
-Rails.application.config.assets.paths << Rails.root.join('node_modules')
+Rails.application.config.assets.paths << Rails.root.join("node_modules")
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
diff --git a/activestorage/test/service/gcs_service_test.rb b/activestorage/test/service/gcs_service_test.rb
index aca779c167..03048731bc 100644
--- a/activestorage/test/service/gcs_service_test.rb
+++ b/activestorage/test/service/gcs_service_test.rb
@@ -17,8 +17,8 @@ if SERVICE_CONFIGURATIONS[:gcs]
uri = URI.parse url
request = Net::HTTP::Put.new uri.request_uri
request.body = data
- request.add_field 'Content-Type', 'text/plain'
- request.add_field 'Content-MD5', checksum
+ request.add_field "Content-Type", "text/plain"
+ request.add_field "Content-MD5", checksum
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request request
end
diff --git a/activestorage/test/service/s3_service_test.rb b/activestorage/test/service/s3_service_test.rb
index ae17eb32aa..23b94f25ed 100644
--- a/activestorage/test/service/s3_service_test.rb
+++ b/activestorage/test/service/s3_service_test.rb
@@ -17,8 +17,8 @@ if SERVICE_CONFIGURATIONS[:s3] && SERVICE_CONFIGURATIONS[:s3][:access_key_id].pr
uri = URI.parse url
request = Net::HTTP::Put.new uri.request_uri
request.body = data
- request.add_field 'Content-Type', 'text/plain'
- request.add_field 'Content-MD5', checksum
+ request.add_field "Content-Type", "text/plain"
+ request.add_field "Content-MD5", checksum
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request request
end