bin/massa in massa-0.5.0 vs bin/massa in massa-0.6.0
- old
+ new
@@ -2,18 +2,18 @@
# frozen_string_literal: true
require 'optparse'
require 'massa'
-$LOAD_PATH.push File.expand_path('../../lib', __FILE__)
+$LOAD_PATH.push File.expand_path('../lib', __dir__)
options = {}
OptionParser.new do |opts|
opts.banner = 'Usage: massa [options]'
opts.on('-g', '--generate-config', 'Generate config file') do
- template = File.expand_path('../../lib/massa/templates/massa.yml', __FILE__)
+ template = File.expand_path('../lib/massa/templates/massa.yml', __dir__)
config_file = 'config/massa.yml'
FileUtils.mkdir_p(File.dirname(config_file))
FileUtils.cp(template, "#{Dir.pwd}/#{config_file}")
Massa::CLI.colorize :default, 'File generated: ', :green, "#{config_file}\n"