Class: Natstrap::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/natstrap/cli.rb

Overview

Instance Method Summary collapse

Instance Method Details

#launchObject



31
32
33
# File 'lib/natstrap/cli.rb', line 31

def launch
  puts "Launching!"
end

#new(prj_name) ⇒ Object



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

def new prj_name
  # Init padrino
  Natstrap::Utils.create_padrino prj_name

  # enter into the dir
  FileUtils.cd prj_name, :verbose => Natstrap::DEV

  # Track all of our changes with git
  Natstrap::Utils.git_init
  Natstrap::Utils.git_commit "padrino init."

  # Install templates, update gems
  Natstrap::Utils.extend_padrino prj_name
  Natstrap::Utils.git_commit "padrino configured."

  # Move folders around the way I like them
  Natstrap::Utils.reorganize_public
  Natstrap::Utils.git_commit "public folder reorganized"

  # Download and extract bootstrap framework.
  Natstrap::Utils.add_bootstrap 'public'
  Natstrap::Utils.git_commit "bootstrapped"
end

#versionObject



37
38
39
40
# File 'lib/natstrap/cli.rb', line 37

def version
  require 'natstrap/version'
  puts "Natstrap v#{Natstrap::VERSION}"
end