Class: Proteus::Kit
- Inherits:
-
Thor
- Object
- Thor
- Proteus::Kit
- Includes:
- Thor::Actions
- Defined in:
- lib/proteus/kit.rb
Instance Method Summary collapse
- #deploy ⇒ Object
- #new(kit_name, repo_name = nil) ⇒ Object
- #server ⇒ Object
- #setup ⇒ Object
- #url(kit) ⇒ Object
- #version ⇒ Object
Instance Method Details
#deploy ⇒ Object
38 39 40 41 |
# File 'lib/proteus/kit.rb', line 38 def deploy puts "Deploying the site to Github" system ". bin/deploy" end |
#new(kit_name, repo_name = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/proteus/kit.rb', line 14 def new(kit_name, repo_name = nil) repo_name ||= kit_name if system "git ls-remote #{url(kit_name)} #{repo_name} > /dev/null 2>&1" puts "Starting a new proteus-#{kit_name} project in #{repo_name}" system "git clone #{url(kit_name)}#{' ' + repo_name}" else puts "A thoughtbot repo doesn't exist with that name" end end |
#server ⇒ Object
32 33 34 35 |
# File 'lib/proteus/kit.rb', line 32 def server puts "Starting the server" system ". bin/server" end |
#setup ⇒ Object
26 27 28 29 |
# File 'lib/proteus/kit.rb', line 26 def setup puts "Setting up your project" system ". bin/setup" end |
#url(kit) ⇒ Object
9 10 11 |
# File 'lib/proteus/kit.rb', line 9 def url(kit) "[email protected]:thoughtbot/proteus-#{kit}.git" end |