knife-changelog 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/changelog.rb +1 -1
- data/lib/knife/changelog/changelog.rb +7 -8
- data/lib/knife/changelog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26c9f2f01235739907e993394c6732e6e77e4593
|
4
|
+
data.tar.gz: ad18e2e2fc22fe507473d13c2a3234e5b691f686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b9189296b5ddd78faf8590fd4649babebb76fa0c582588476772f449add1691f2ecd3ad3b1b0d04c8fbcaae08b87efe161abf75e2d9bb6d78404324dcef9016
|
7
|
+
data.tar.gz: a63da099e100e37b8b26bbc3b175234fc4e234688b97fbbcb7ef438d57cb8d06f58955c497903ba4879f82ef80d2cbcbaf87c3b09053be2025eb44d54c9a02d3
|
data/lib/chef/knife/changelog.rb
CHANGED
@@ -13,7 +13,7 @@ class Chef
|
|
13
13
|
def initialize(options)
|
14
14
|
super
|
15
15
|
berksfile = Berkshelf::Berksfile.from_options({})
|
16
|
-
@changelog = KnifeChangelog::Changelog.new(berksfile, config)
|
16
|
+
@changelog = KnifeChangelog::Changelog.new(berksfile.lockfile.locks, config)
|
17
17
|
end
|
18
18
|
|
19
19
|
option :linkify,
|
@@ -5,9 +5,9 @@ require 'json'
|
|
5
5
|
|
6
6
|
class KnifeChangelog
|
7
7
|
class Changelog
|
8
|
-
def initialize(
|
8
|
+
def initialize(locked_versions, config = {})
|
9
9
|
@tmp_prefix = 'knife-changelog'
|
10
|
-
@
|
10
|
+
@locked_versions = locked_versions
|
11
11
|
@config = config
|
12
12
|
@tmp_dirs = []
|
13
13
|
end
|
@@ -15,7 +15,7 @@ class KnifeChangelog
|
|
15
15
|
def run(cookbooks)
|
16
16
|
begin
|
17
17
|
if cookbooks.empty?
|
18
|
-
cks =
|
18
|
+
cks = locked_versions.keys
|
19
19
|
else
|
20
20
|
cks = cookbooks
|
21
21
|
end
|
@@ -39,16 +39,15 @@ class KnifeChangelog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def ck_dep(name)
|
42
|
-
@
|
42
|
+
@locked_versions[name]
|
43
43
|
end
|
44
44
|
|
45
45
|
def ck_location(name)
|
46
46
|
ck_dep(name).location
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
50
|
-
|
51
|
-
@berksfile.lockfile.graph.instance_variable_get(:@graph)[name].version
|
49
|
+
def guess_version_for(name)
|
50
|
+
@locked_versions[name].locked_version.to_s
|
52
51
|
end
|
53
52
|
|
54
53
|
def execute(name, submodule=false)
|
@@ -91,7 +90,7 @@ class KnifeChangelog
|
|
91
90
|
url = "https://github.com/#{$1.chomp('/')}.git"
|
92
91
|
options = {
|
93
92
|
:git => url,
|
94
|
-
:revision =>
|
93
|
+
:revision => guess_version_for(name),
|
95
94
|
}
|
96
95
|
location = Berkshelf::GitLocation.new dep, options
|
97
96
|
handle_git(location)
|