Skip to content

Commit

Permalink
initial CLI with Thor
Browse files Browse the repository at this point in the history
  • Loading branch information
daveio committed Apr 4, 2019
1 parent ab539d3 commit 396a223
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2

[*.py]
indent_size = 4

[*.go]
indent_style = tab
5 changes: 2 additions & 3 deletions exe/zt
@@ -1,5 +1,4 @@
#!/usr/bin/env ruby
puts "hello from zt dummy executable"

#require 'zt/cli'
#Zt::CLI.start
require 'zt/cli'
Zt::CLI.start
12 changes: 12 additions & 0 deletions lib/zt/cli.rb
@@ -0,0 +1,12 @@
require 'thor'
require 'zt'
module Zt
class CLI < Thor

desc "version", "Show the zt version number"
def version
puts "This is zt version #{Zt::VERSION}"
end

end
end
2 changes: 2 additions & 0 deletions zt.gemspec
Expand Up @@ -35,6 +35,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "thor", "~> 0.0"

spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.0"
Expand Down

0 comments on commit 396a223

Please sign in to comment.