diff --git a/.rubocop.yml b/.rubocop.yml index d0fe8e0d4..3af4b3eb7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -109,6 +109,9 @@ Layout/TrailingWhitespace: Style/RedundantPercentQ: Enabled: true +Lint/DeprecatedClassMethods: + Enabled: true + # Align `end` with the matching keyword or starting expression except for # assignments, where it should be aligned with the LHS. Layout/EndAlignment: diff --git a/lib/install/template.rb b/lib/install/template.rb index 6a38f0656..b07377f84 100644 --- a/lib/install/template.rb +++ b/lib/install/template.rb @@ -13,7 +13,7 @@ say "Copying .browserslistrc to app root directory" copy_file "#{__dir__}/config/.browserslistrc", ".browserslistrc" -if Dir.exists?(Webpacker.config.source_path) +if Dir.exist?(Webpacker.config.source_path) say "The JavaScript app source directory already exists" else say "Creating JavaScript app source directory" @@ -22,7 +22,7 @@ apply "#{__dir__}/binstubs.rb" -if File.exists?(".gitignore") +if File.exist?(".gitignore") append_to_file ".gitignore" do "\n" + "/public/packs\n" +