Sha256: 25cfb864a94f94ef1b30d6b9e64487eb303f2b6f53367afc7e3553dd7f0eb9b4

Contents?: true

Size: 1.23 KB

Versions: 9

Compression:

Stored size: 1.23 KB

Contents

require 'librarian/helpers'

require 'librarian/cli'
require 'librarian/chef'

module Librarian
  module Chef
    class Cli < Librarian::Cli

      module Particularity
        def root_module
          Chef
        end
      end

      extend Particularity

      source_root Pathname.new(__FILE__).dirname.join("templates")

      def init
        copy_file environment.specfile_name
      end

      desc "install", "Resolves and installs all of the dependencies you specify."
      option "quiet", :type => :boolean, :default => false
      option "verbose", :type => :boolean, :default => false
      option "line-numbers", :type => :boolean, :default => false
      option "clean", :type => :boolean, :default => false
      option "strip-dot-git", :type => :boolean
      option "path", :type => :string
      def install
        ensure!
        clean! if options["clean"]
        if options.include?("strip-dot-git")
          strip_dot_git_val = options["strip-dot-git"] ? "1" : nil
          environment.config_db.local["install.strip-dot-git"] = strip_dot_git_val
        end
        if options.include?("path")
          environment.config_db.local["path"] = options["path"]
        end
        resolve!
        install!
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
librarian-chef-0.0.4 lib/librarian/chef/cli.rb
librarian-chef-0.0.3 lib/librarian/chef/cli.rb
librarian-chef-0.0.2 lib/librarian/chef/cli.rb
librarian-chef-0.0.1 lib/librarian/chef/cli.rb
librarian-chef-0.0.1.beta.2 lib/librarian/chef/cli.rb
librarian-chef-0.0.1.beta.1 lib/librarian/chef/cli.rb
librarian-puppet-lmco-0.9.8.2 vendor/librarian/lib/librarian/chef/cli.rb
librarian-0.0.26 lib/librarian/chef/cli.rb
librarian-0.0.25 lib/librarian/chef/cli.rb