Class: Retter::Generator::Creator
- Inherits:
-
Base
- Object
- Thor::Group
- Base
- Retter::Generator::Creator
show all
- Defined in:
- lib/retter/generator/creator.rb
Constant Summary
Constants inherited
from Base
Base::FILES, Base::TEMPLATES
Instance Method Summary
collapse
Methods inherited from Base
#bundle_install, #create_files, source_root
Instance Method Details
#git_init ⇒ Object
4
5
6
|
# File 'lib/retter/generator/creator.rb', line 4
def git_init
Grit::Repo.init "#{Dir.pwd}/#{name}"
end
|
#notice_how_to_use ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/retter/generator/creator.rb', line 8
def notice_how_to_use
editor = ENV['EDITOR']
say "-- Thanks for flying Retter :-> --\n", :green
say <<-EOM, :green
Setting $EDITOR:
retter *requires* $EDITOR variable.
example:
echo "export EDITOR=vim" >> ~/.zshenv # or ~/.bash_profile
. ~/.zshenv
EOM
say " Current your $EDITOR is #{editor ? editor : 'undefined'}.\n", :red
say <<-EOM, :green
Setting $RETTER_HOME:
You can use retter command anywhere, If you set $RETTER_HOME variable.
example:
echo "export RETTER_HOME=#{Dir.pwd}/#{name}" >> ~/.zshenv
...
See also:
retter usage
retter help
EOM
end
|