diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-07-31 17:42:27 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-07-31 17:48:14 +0900 |
commit | 4c8c8c87b07844b26564ca6aa2052660e601bc3d (patch) | |
tree | c6e1863a91618c017de9c5fd92a8240b177256e7 /railties/lib | |
parent | 511d1abc8ad523aa3592e30b4ecf4dac92a2a352 (diff) | |
download | rails-4c8c8c87b07844b26564ca6aa2052660e601bc3d.tar.gz rails-4c8c8c87b07844b26564ca6aa2052660e601bc3d.tar.bz2 rails-4c8c8c87b07844b26564ca6aa2052660e601bc3d.zip |
Address to rubocop offences
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 2886986865..c0f19fcfe5 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -8,7 +8,7 @@ namespace :app do task template: :environment do template = ENV["LOCATION"] raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank? - template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} + template = File.expand_path(template) unless %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}.match?(template) require "rails/generators" require "rails/generators/rails/app/app_generator" generator = Rails::Generators::AppGenerator.new [Rails.root], {}, { destination_root: Rails.root } |