Skip to content

Commit

Permalink
GHI-6911 - Replaced deprecated/removed File.exists? method (#4)
Browse files Browse the repository at this point in the history
* Fixed the test spec/ey_config_local_spec.rb

* Substituted `File.exists?` with `File.exist?`

* Added AI comments

* Bump up the gem version
  • Loading branch information
eudalov authored Mar 30, 2024
1 parent b8ce8a3 commit e9f7298
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ey_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def full_path
end

def init
unless File.exists?(full_path)
unless File.exist?(full_path) # AI-GEN - cursor
err_msg = ""
if detected_a_dev_environment?
ey_config_local_usage
Expand Down Expand Up @@ -101,7 +101,7 @@ def find_config(config_paths)
config_paths.each do |config_path|
possible_path = File.expand_path(config_path)
possible_paths << possible_path
if File.exists?(possible_path)
if File.exist?(possible_path) # AI-GEN - cursor
return possible_path
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ey_config/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module EY
class Config
VERSION = "0.0.7"
VERSION = "0.0.8" # AI-GEN - cursor
end
end
2 changes: 1 addition & 1 deletion spec/ey_config_local_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

it 'should create ey_services_config_local.yml' do
File.exist?(EY::Config::Local.config_path).should be_true
expect(File.exist?(EY::Config::Local.config_path)).to be_truthy # AI-GEN - cursor
end

it 'should add the keys passed from the command line' do
Expand Down

0 comments on commit e9f7298

Please sign in to comment.