Skip to content
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

Change cli #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Change cli #8

wants to merge 4 commits into from

Conversation

TechMagister
Copy link

Move from OptionParser to Cli for better integration

class Watch < Sentry::SentryCommand
      command_name "watch"

      def run
        options.watch << "./config/**/*.cr"
        super
      end
end

@samueleaton
Copy link
Owner

When someone runs the install.rb script to install the cli tool it is copying the src files. You are adding a file to the src directory so you will probably need to update install.rb.


module Sentry

class SentryCommand < Cli::Command
Copy link
Owner

Choose a reason for hiding this comment

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

I believe it is a Crystal standard to capitalize acronyms (e.g. CLI, HTTP, JSON)

Copy link
Author

Choose a reason for hiding this comment

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

True, but I don't know if @mosop will change the name now :/

@samueleaton
Copy link
Owner

Also, the current CLI installation process does not use shards or dependencies, so we will need to figure that out. Correct me if I'm wrong, but I don't believe shards has support for installing CLI tools as a dependency.

@TechMagister
Copy link
Author

I updated the install.rb file to take in account the modifications. ( I completely forgot it 😝 )

@samueleaton
Copy link
Owner

Seeing as this will introduce a dependency, is there a way to install Sentry while installing dependencies at the same time? Does shards support that feature? I like what you did to install.rb btw.

@samueleaton
Copy link
Owner

samueleaton commented Jan 14, 2017

Also they way you are loading the app name in the CLI dynamically is a no brainer. 👍 That will be much better. Glad I could get some other eyes on this project to help button it up.

I would however make the DEFAULT_NAME start as nil and print an error if it is not set manually or found in shard.yml.

@jwaldrip
Copy link

You may want to look at Admiral as well: https://github.com/jwaldrip/admiral.cr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants