Sha256: 98a32aa560d4bfee2d5bc1f68eda605ba26e7ae8589df6b27f34088ea3824a22

Contents?: true

Size: 808 Bytes

Versions: 2

Compression:

Stored size: 808 Bytes

Contents

# encoding: utf-8
module PasswordChanger
  module Cli
    # This class provides an 'presentation init' command for the middleman CLI.
    class Init < Thor
      include Thor::Actions

      desc 'application ', 'Initialize system for use of middleman-presentation'
      option :configuration_file, default: PasswordChanger.config.preferred_configuration_file, desc: 'Path to configuration file'
      option :force, type: :boolean, desc: 'Force creation of config file'
      def application
        source_paths << File.expand_path('../../../../templates', __FILE__)

        @version = PasswordChanger::VERSION
        @config = PasswordChanger.config

        opts = options.dup.deep_symbolize_keys
        template 'config.yaml.tt', opts.delete(:configuration_file), **opts
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
password_changer-0.0.4 lib/password_changer/cli/init.rb
password_changer-0.0.3 lib/password_changer/cli/init.rb