Sha256: c1182bcacc0e9f2135d5c92a338ee2708c8b7fa0a487940737391214853694ab

Contents?: true

Size: 1.26 KB

Versions: 16

Compression:

Stored size: 1.26 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

      include Particularity
      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

16 entries across 16 versions & 2 rubygems

Version Path
librarian-puppet-0.9.10 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.9 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.8 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7.5 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7.4 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7.3 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7.2 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7.1 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-maestrodev-0.9.7 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.7 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.6 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.5 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.4 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.3 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.2 vendor/librarian/lib/librarian/chef/cli.rb
librarian-puppet-0.9.2.pre vendor/librarian/lib/librarian/chef/cli.rb