Class: Tyrone::Cli

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/tyrone/cli.rb

Instance Method Summary collapse

Instance Method Details

#initObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/tyrone/cli.rb', line 9

def init
  @project = Pathname.pwd.basename

  copy_file 'Rakefile', 'Rakefile'
  copy_file 'Gemfile', 'Gemfile'
  copy_file 'config.ru'
  copy_file 'init.rb'
  copy_file 'app.rb', 'app.rb'

  empty_directory 'mockups'
  copy_file 'screen.sass', 'mockups/screen.sass'
  copy_file 'app.coffee', 'mockups/app.coffee'

  empty_directory 'public'
  template 'layout.haml.erb', 'mockups/layout.haml'
  get 'http://html5resetcss.googlecode.com/files/html5reset-1.4.1.css', 'public/reset.css'

  empty_directory 'features'

  system 'bundle install'
end

#mock(name) ⇒ Object



32
33
34
35
# File 'lib/tyrone/cli.rb', line 32

def mock(name)
  empty_directory 'mockups'
  create_file "mockups/#{name.gsub(' ','-')}.haml"
end