Class: Mkgem::Cli
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Mkgem::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/mkgem/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_dir ⇒ Object
- #init_git_repo ⇒ Object
- #install_deps ⇒ Object
- #set_permissions ⇒ Object
- #setup ⇒ Object
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/mkgem/cli.rb', line 8 def self.source_root File.('../../../templates', __FILE__) end |
Instance Method Details
#create_dir ⇒ Object
16 17 18 |
# File 'lib/mkgem/cli.rb', line 16 def create_dir directory 'gem', name end |
#init_git_repo ⇒ Object
26 27 28 29 30 |
# File 'lib/mkgem/cli.rb', line 26 def init_git_repo inside(name) do run('git init .') end end |
#install_deps ⇒ Object
32 33 34 35 36 |
# File 'lib/mkgem/cli.rb', line 32 def install_deps inside(name) do run('bundle') end end |
#set_permissions ⇒ Object
20 21 22 23 24 |
# File 'lib/mkgem/cli.rb', line 20 def inside(name) do chmod 'bin/console', 'a+x' end end |
#setup ⇒ Object
12 13 14 |
# File 'lib/mkgem/cli.rb', line 12 def setup @name = name.underscore end |