Skip to content

Commit 5491a70

Browse files
adjusting utilities properly
1 parent 01bba24 commit 5491a70

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

lib/ferry/utilities.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ def execute(command)
2828
`#{command}`
2929
end
3030

31-
def make_starter_file
32-
if !File.exist?("lib/tasks/ferry.rake")
33-
install_dir = `bundle show ferry`.chomp
34-
starter_file_contents = File.open("#{install_dir}/doc/ferry_rake_contents.rb", "rb")
35-
contents = starter_file_contents.read
36-
File.open("lib/tasks/ferry.rake", 'w') {|f| f.write(contents)}
37-
puts "/lib/tasks/ferry.rake created!"
31+
def make_starter_files
32+
if !File.exist?("Ferryfile") && !File.exist?("config/captain.rb")
33+
ferryfile_contents = File.open("Ferryfile", "rb")
34+
captain_contents = File.open("config/captain.rb", "rb")
35+
File.open("Ferryfile", 'w') {|f| f.write(ferryfile_contents.read)}
36+
File.open("config/captain.rb", 'w') {|f| f.write(captain_contents.read)}
3837
else
39-
puts "/lib/tasks/ferry.rake already exists - but you knew that already ... didn't you?"
38+
puts "The files already exist. But you knew that already ... didn't you?"
4039
end
4140
end
4241

0 commit comments

Comments
 (0)