Skip to content
This repository has been archived by the owner. It is now read-only.

Add support for `--path` option to install #459

Merged
merged 1 commit into from Jun 22, 2017

Conversation

@mehlah
Copy link
Contributor

@mehlah mehlah commented Jul 9, 2016

This allows installing Neat into a specific directory.
It's more consistent with Bourbon CLI

Fix #351

@install_path ||= if options[:path]
Pathname.new(File.join(options[:path], 'neat'))
else
Pathname.new('neat')

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

FileUtils.cp_r(all_stylesheets, "neat/")
def install_path
@install_path ||= if options[:path]
Pathname.new(File.join(options[:path], 'neat'))

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Use 2 (not -14) spaces for indentation.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -28,6 +30,7 @@ def update
end

desc "remove", "Remove Neat"
method_options :path => :string

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

end
end

desc "update", "Update Neat"
method_options :path => :string

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

@@ -7,16 +7,18 @@ class Generator < Thor
map ["-v", "--version"] => :version

desc "install", "Install Neat into your project"
method_options :path => :string, :force => :boolean

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

def install_path
@install_path ||= if options[:path]
Pathname.new(File.join(options[:path], 'neat'))
else

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

Align else with if.

Pathname.new(File.join(options[:path], 'neat'))
else
Pathname.new('neat')
end

This comment has been minimized.

@houndci-bot

houndci-bot Jul 9, 2016

end at 59, 8 is not aligned with if at 55, 24.

@mehlah mehlah force-pushed the mehlah:install-to-custom-path branch from cc0c1fd to 97f5cf4 Jul 9, 2016
@dgalarza
Copy link
Contributor

@dgalarza dgalarza commented Jun 21, 2017

@mehlah this LGTM. Could you address the Hound hash syntax violations and rebase off of master? Then this will be good to merge.

This allows installing Neat into a specific directory.
It's more consistent with Bourbon CLI

Fix #351
@mehlah mehlah force-pushed the mehlah:install-to-custom-path branch from 97f5cf4 to c673fd8 Jun 22, 2017
Pathname.new(File.join(options[:path], "neat"))
else
Pathname.new("neat")
end

This comment has been minimized.

@houndci-bot

houndci-bot Jun 22, 2017

end at 59, 8 is not aligned with if at 55, 24.

def install_path
@install_path ||= if options[:path]
Pathname.new(File.join(options[:path], "neat"))
else

This comment has been minimized.

@houndci-bot

houndci-bot Jun 22, 2017

Align else with if.

@mehlah
Copy link
Contributor Author

@mehlah mehlah commented Jun 22, 2017

👋 @dgalarza! All done :) Thanks again

@dgalarza dgalarza merged commit 91ec2c0 into thoughtbot:master Jun 22, 2017
1 check passed
1 check passed
hound 3 violations found.
@dgalarza
Copy link
Contributor

@dgalarza dgalarza commented Jun 22, 2017

Thanks @mehlah!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants