New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jun 22, 2017

Conversation

Projects
None yet
3 participants
@mehlah
Contributor

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

This comment has been minimized.

Contributor

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.

Add support for `--path` option to install
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

This comment has been minimized.

Contributor

mehlah commented Jun 22, 2017

👋 @dgalarza! All done :) Thanks again

@dgalarza dgalarza merged commit 91ec2c0 into thoughtbot:master Jun 22, 2017

1 check passed

hound 3 violations found.
@dgalarza

This comment has been minimized.

Contributor

dgalarza commented Jun 22, 2017

Thanks @mehlah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment