Class: Schnitzelpress::Cli
- Inherits:
-
Thor
- Object
- Thor
- Schnitzelpress::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/schnitzelpress/cli.rb
Instance Method Summary collapse
Instance Method Details
#console ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/schnitzelpress/cli.rb', line 33 def console require 'schnitzelpress' require 'pry' Schnitzelpress.init! ARGV.clear pry Schnitzelpress end |
#create(name) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/schnitzelpress/cli.rb', line 13 def create(name) @name = name self.destination_root = name directory 'new_blog', '.' in_root do if [:git] run "git init" run "git add ." run "git commit -m 'Created new Schnitzelpress blog'" end end end |
#mongo_pull ⇒ Object
42 43 44 45 |
# File 'lib/schnitzelpress/cli.rb', line 42 def mongo_pull abort "Please set MONGO_URL." unless ENV['MONGO_URL'] system "heroku mongo:pull" end |
#mongo_push ⇒ Object
48 49 50 51 |
# File 'lib/schnitzelpress/cli.rb', line 48 def mongo_push abort "Please set MONGO_URL." unless ENV['MONGO_URL'] system "heroku mongo:push" end |
#update ⇒ Object
28 29 30 |
# File 'lib/schnitzelpress/cli.rb', line 28 def update run "bundle update schnitzelpress" end |