Skip to content

Commit

Permalink
Merge pull request #310 from arthurgeek/fix-ruby-3-2
Browse files Browse the repository at this point in the history
fix: rename `File.exists?` to `File.exist?`
  • Loading branch information
bogdan authored Aug 3, 2023
2 parents ff9c32d + 3385b92 commit 57a775c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/js_routes/generators/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def application_js_path
"app/javascript/packs/application.js",
"app/javascript/controllers/application.js",
].find do |path|
File.exists?(Rails.root.join(path))
File.exist?(Rails.root.join(path))
end
end
end
2 changes: 1 addition & 1 deletion spec/js_routes/module_types/umd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
end

it "should not generate file before initialization" do
expect(File.exists?(name)).to be_falsey
expect(File.exist?(name)).to be_falsey
end
end
end
2 changes: 1 addition & 1 deletion spec/js_routes/zzz_last_post_rails_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def evaluate(ctx, file)
end

it "should generate routes file" do
expect(File.exists?(NAME)).to be_truthy
expect(File.exist?(NAME)).to be_truthy
end

it "should not rewrite routes file if nothing changed" do
Expand Down

0 comments on commit 57a775c

Please sign in to comment.