lib/ferry/utilities.rb in ferry-1.1.0 vs lib/ferry/utilities.rb in ferry-1.1.1
- old
+ new
@@ -16,29 +16,22 @@
else
raise "#{db_type} is not supported by ferry at this time"
end
end
- def continue?(prompt = "Are you sure", default = false)
- a = ''
- s = default ? '[Y/n]' : '[y/N]'
- d = default ? 'y' : 'n'
- until %w[y n].include? a
- a = ask("#{prompt} #{s} ") { |q| q.limit = 1; q.case = :downcase }
- a = d if a.length == 0
- end
- a == 'y'
- end
-
def make_starter_file
if !File.exist?("lib/tasks/ferry.rake")
install_dir = `bundle show ferry`.chomp
starter_file_contents = File.open("#{install_dir}/doc/ferry_rake_contents.rb", "rb")
contents = starter_file_contents.read
File.open("lib/tasks/ferry.rake", 'w') {|f| f.write(contents)}
puts "/lib/tasks/ferry.rake created!"
else
puts "/lib/tasks/ferry.rake already exists - but you knew that already ... didn't you?"
end
+ end
+
+ def print_version
+ puts "Ferry #{Ferry::VERSION}"
end
end
end