librarian-puppet 0.9.2.pre → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
data/lib/librarian/puppet/cli.rb
CHANGED
@@ -42,9 +42,13 @@ module Librarian
|
|
42
42
|
option "clean", :type => :boolean, :default => false
|
43
43
|
option "strip-dot-git", :type => :boolean
|
44
44
|
option "path", :type => :string
|
45
|
+
option "destructive", :type => :boolean, :default => false
|
45
46
|
def install
|
46
47
|
ensure!
|
47
48
|
clean! if options["clean"]
|
49
|
+
unless options["destructive"].nil?
|
50
|
+
environment.config_db.local['destructive'] = options['destructive'].to_s
|
51
|
+
end
|
48
52
|
if options.include?("strip-dot-git")
|
49
53
|
strip_dot_git_val = options["strip-dot-git"] ? "1" : nil
|
50
54
|
environment.config_db.local["install.strip-dot-git"] = strip_dot_git_val
|
@@ -40,7 +40,7 @@ module Librarian
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def create_install_path
|
43
|
-
install_path.rmtree if install_path.exist?
|
43
|
+
install_path.rmtree if install_path.exist? && destructive?
|
44
44
|
install_path.mkpath
|
45
45
|
end
|
46
46
|
|
@@ -54,6 +54,10 @@ module Librarian
|
|
54
54
|
ManifestSet.sort(lock.manifests)
|
55
55
|
end
|
56
56
|
|
57
|
+
def destructive?
|
58
|
+
environment.config_db.local['destructive'] == 'true'
|
59
|
+
end
|
60
|
+
|
57
61
|
def specfile_name
|
58
62
|
environment.specfile_name
|
59
63
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarian-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
8
|
- 2
|
9
|
-
|
10
|
-
version: 0.9.2.pre
|
9
|
+
version: 0.9.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Tim Sharpe
|
@@ -199,13 +198,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
198
|
version: "0"
|
200
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
200
|
requirements:
|
202
|
-
- - "
|
201
|
+
- - ">="
|
203
202
|
- !ruby/object:Gem::Version
|
204
203
|
segments:
|
205
|
-
-
|
206
|
-
|
207
|
-
- 1
|
208
|
-
version: 1.3.1
|
204
|
+
- 0
|
205
|
+
version: "0"
|
209
206
|
requirements: []
|
210
207
|
|
211
208
|
rubyforge_project:
|