lib/minable/generator.rb in minable-0.1.1 vs lib/minable/generator.rb in minable-0.1.2
- old
+ new
@@ -11,11 +11,11 @@
def install
if minable_files_already_exist? && !options[:force]
puts 'Minable files already installed, doing nothing.'
else
install_files
- puts 'Minable files installed to #{install_path}/'
+ puts "Minable files installed to #{install_path}/"
end
end
desc 'update', 'Update Minable'
method_options path: :string
@@ -29,24 +29,24 @@
end
end
desc 'version', 'Show Minable version'
def version
- say 'Minable #{Minable::VERSION}'
+ say "Minable #{Minable::VERSION}"
end
private
def minable_files_already_exist?
install_path.exist?
end
def install_path
@install_path ||= if options[:path]
- Pathname.new(File.join(options[:path], '.'))
+ Pathname.new(File.join(options[:path], 'minable'))
else
- Pathname.new('.')
+ Pathname.new('minable')
end
end
def install_files
make_install_directory
@@ -64,14 +64,14 @@
def copy_in_scss_files
FileUtils.cp_r(all_stylesheets, install_path)
end
def all_stylesheets
- Dir['#{stylesheets_directory}/*']
+ Dir["#{stylesheets_directory}/*"]
end
def stylesheets_directory
- File.join(top_level_directory, 'app', 'assets', 'stylesheets')
+ File.join(top_level_directory, 'app', 'assets', 'stylesheets', 'minable')
end
def top_level_directory
File.dirname(File.dirname(File.dirname(__FILE__)))
end