lib/jive/cli.rb in jive-0.3.1 vs lib/jive/cli.rb in jive-0.3.2

- old
+ new

@@ -39,40 +39,23 @@ desc "git SUBCOMMAND ...ARGS", "git commands" subcommand "git", (Class.new(Thor) do desc "semantic", "Print help for semantic commit messages" def semantic - say <<~MESSAGE - Format: <type>(<scope>): <subject> + say Git.new.semantic_help + end - <scope> is optional - - feat: add hat wobble - ^--^ ^------------^ - | | - | +-> Summary in present tense. - | - +-------> Type: chore, docs, feat, fix, refactor, style, or test. - - chore: updating grunt tasks etc; no production code change - docs: changes to the documentation - feat: new feature for the user, not a new feature for build script - fix: bug fix for the user, not a fix to a build script - refactor: refactoring production code, eg. renaming a variable - style: formatting, missing semi colons, etc; no production code change - test: adding missing tests, refactoring tests; no production code change - MESSAGE + method_option :host, type: :string, default: "github.com" + desc "clone <org>/<project>", "git clone to ~/src/github.com/<org>/<project>" + def clone(slug) + host = options[:host] + Jive.shell.run_safely { Git.new(Jive.shell).clone(slug, host: host) } end end) desc "cd <org>/<project>", "cd to ~/src/github.com/<org>/<project>" def cd(slug) Jive.shell.run_safely { Git.new(Jive.shell).cd(slug) } - end - - desc "clone <org>/<project>", "git clone to ~/src/github.com/<org>/<project>" - def clone(slug) - Jive.shell.run_safely { Git.new(Jive.shell).clone(slug) } end desc "exec <command>", "run command from jive.yml" def exec(command) path = Pathname.pwd.join("jive.yml")