Sha256: 3ca7e1184e29e474be5c329d28507c62a0817762c8725f4a7f270df0a330dd8d

Contents?: true

Size: 747 Bytes

Versions: 6

Compression:

Stored size: 747 Bytes

Contents

require 'thor'
require 'thor/group'
require 'blazing/base'

module Blazing
  module CLI
    class Create < Thor::Group

      desc 'create a blazing config file'

      argument :repository

      include Thor::Actions
      include Blazing::Base

      def self.source_root
        File.dirname(__FILE__)
      end

      def create_blazing_dir
        empty_directory Blazing::DIRECTORY
      end

      def create_config_file
        template 'templates/blazing.tt', Blazing::CONFIGURATION_FILE
        log :info, "Blazing config file has been created in #{Blazing::CONFIGURATION_FILE} with a default remote."
        log :info, "Check the config and then setup your remote with blazing setup REMOTE"
        report
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blazing-0.0.16 lib/blazing/cli/create.rb
blazing-0.0.15 lib/blazing/cli/create.rb
blazing-0.0.14 lib/blazing/cli/create.rb
blazing-0.0.13 lib/blazing/cli/create.rb
blazing-0.0.12 lib/blazing/cli/create.rb
blazing-0.0.10 lib/blazing/cli/create.rb