Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Use Thor and add --version command #329

Closed
wants to merge 1 commit into from

Conversation

mehlah
Copy link
Contributor

@mehlah mehlah commented Mar 30, 2015

This moves to Thor, like Bitters and Bourbon, and add a --version command (was missing before, as described by #315)
Closes #315

desc "install", "Install Neat into your project"
def install
if neat_files_already_exist?
puts "Neat files already installed, doing nothing."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not write to stdout. Use Rails' logger if you want to log.

@kaishin
Copy link

kaishin commented Apr 3, 2015

This looks good to me.

@mehlah
Copy link
Contributor Author

mehlah commented Jun 6, 2015

Anything holding back this can I help with?

@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

require "neat"
require File.dirname(__FILE__) + "/../lib/neat.rb"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is seemingly unrelated. You can avoid this, and it's common to do something along these lines: bundle exec ruby -I lib bin/neat

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teoljungberg Just built the gem locally and testing all of this with and without the above change, and it breaks without. This also aligns with the executable in Bourbon and Bitters, so I’m going to run with it.

@tysongach tysongach modified the milestone: 2.0 Feb 6, 2016
@tysongach tysongach removed this from the 2.0 milestone Mar 5, 2016
@tysongach
Copy link
Contributor

Merged as 4bef318. Thanks, @mehlah!

@tysongach tysongach closed this Mar 5, 2016
@mehlah mehlah deleted the thor-and-version-command branch July 9, 2016 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CLI] Displaying the installed version via a flag
5 participants