Class: Bookery::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bookery::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/bookery/cli.rb
Instance Method Summary collapse
Instance Method Details
#new(path) ⇒ Object
20 21 22 23 24 |
# File 'lib/bookery/cli.rb', line 20 def new(path) template = 'basic' template = [:template] if [:template] directory(template, path) end |
#publish ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/bookery/cli.rb', line 28 def publish project_dir = Dir.pwd project_dir = [:project_dir] if [:project_dir] config = YAML.load_file(File.join(project_dir, 'config.yml')) project = Project.new(project_dir, config.symbolize_keys) publishers = Factories::PublisherFactory.create_publishers(project.generator_config) project.publish(publishers) end |