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

Show outdated Hide outdated lib/neat/generator.rb
@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.

@houndci-bot

houndci-bot Jul 9, 2016

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

Show outdated Hide outdated lib/neat/generator.rb
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.

@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.

Show outdated Hide outdated lib/neat/generator.rb
@@ -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.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

Show outdated Hide outdated lib/neat/generator.rb
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.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

Show outdated Hide outdated lib/neat/generator.rb
@@ -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.

@houndci-bot

houndci-bot Jul 9, 2016

Use the new Ruby 1.9 hash syntax.

Show outdated Hide outdated lib/neat/generator.rb
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.

@houndci-bot

houndci-bot Jul 9, 2016

Align else with if.

Show outdated Hide outdated lib/neat/generator.rb
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.

@houndci-bot

houndci-bot Jul 9, 2016

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

@dgalarza

This comment has been minimized.

Show comment
Hide comment
@dgalarza

dgalarza Jun 21, 2017

Contributor

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

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
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.

@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.

@houndci-bot

houndci-bot Jun 22, 2017

Align else with if.

@mehlah

This comment has been minimized.

Show comment
Hide comment
@mehlah

mehlah Jun 22, 2017

Contributor

👋 @dgalarza! All done :) Thanks again

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.

Show comment
Hide comment
@dgalarza

dgalarza Jun 22, 2017

Contributor

Thanks @mehlah!

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