knife-changelog 0.3.0 → 0.3.1.pre.alpha.pre.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 26c9f2f01235739907e993394c6732e6e77e4593
4
- data.tar.gz: ad18e2e2fc22fe507473d13c2a3234e5b691f686
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjY0N2E0ZGQ5M2NmNzk1MzI0OTMyM2Q5MGEzYjU3MjE3NDQ0Mzc3NQ==
5
+ data.tar.gz: !binary |-
6
+ MjZjYzljMzdmOGI4YWUyOTljNTM0ZTk5MjZjMjQ3ZTdlNzc4MDE3Yw==
5
7
  SHA512:
6
- metadata.gz: 0b9189296b5ddd78faf8590fd4649babebb76fa0c582588476772f449add1691f2ecd3ad3b1b0d04c8fbcaae08b87efe161abf75e2d9bb6d78404324dcef9016
7
- data.tar.gz: a63da099e100e37b8b26bbc3b175234fc4e234688b97fbbcb7ef438d57cb8d06f58955c497903ba4879f82ef80d2cbcbaf87c3b09053be2025eb44d54c9a02d3
8
+ metadata.gz: !binary |-
9
+ ZWZmMWM0N2E4ZmVmNjBjYWY0OTA4ZTEyMTQ5MjQwZWRkNzdjNzY0NzBmNTg4
10
+ NjcyZjc3MTBmZGQxYmExMjc3ZTQyYzcxNWMxZTVjZDMyMWI2MTM1MWRmNTc0
11
+ M2QzZjI4N2NhM2I0NDcyZmI5ZDgwNGQ2ODEzYjRiOWNjMTI1OTE=
12
+ data.tar.gz: !binary |-
13
+ ZGYyNzVlYmYwODlmNzJiMDNmMTU1MDVmNWNjMTdmODFhOGM2OGE1NWJiYmRj
14
+ MjBiYzNhZWFlNWZjZDYzZjQzMjAzOWM1NjUzYmZiYTdhOWU2YjlkMGFiNDkx
15
+ MjIxYjEwMTQwZWQyMTQxNGVkMmQyYzU5MjhjOWZmM2ZkY2E3Mjc=
@@ -40,7 +40,8 @@ class Chef
40
40
 
41
41
  def run
42
42
  Log.info config
43
- @changelog.run(@name_args)
43
+ changelog = @changelog.run(@name_args)
44
+ puts changelog
44
45
  end
45
46
  end
46
47
 
@@ -13,23 +13,25 @@ class KnifeChangelog
13
13
  end
14
14
 
15
15
  def run(cookbooks)
16
+ changelog = []
16
17
  begin
17
18
  if cookbooks.empty?
18
- cks = locked_versions.keys
19
+ cks = @locked_versions.keys
19
20
  else
20
21
  cks = cookbooks
21
22
  end
22
- cks.each do |cookbook|
23
+ changelog += cks.map do |cookbook|
23
24
  Chef::Log.debug "Checking changelog for #{cookbook} (cookbook)"
24
25
  execute cookbook
25
26
  end
26
- (@config[:submodules] || '').split(',').each do |submodule|
27
+ changelog += (@config[:submodules] || '').split(',').map do |submodule|
27
28
  Chef::Log.debug "Checking changelog for #{submodule} (submodule)"
28
29
  execute(submodule, true)
29
30
  end
30
31
  ensure
31
32
  clean
32
33
  end
34
+ changelog.compact.join("\n")
33
35
  end
34
36
 
35
37
  def clean
@@ -67,14 +69,18 @@ class KnifeChangelog
67
69
  raise "Cannot handle #{loc.class} yet"
68
70
  end
69
71
  end
70
- print_changelog(name, changelog)
72
+ format_changelog(name, changelog)
71
73
  end
72
74
 
73
- def print_changelog(name, changelog)
74
- unless changelog.empty?
75
- puts "### Changelog for #{name}"
76
- puts changelog
77
- puts "\n\n"
75
+ def format_changelog(name, changelog)
76
+ if changelog.empty?
77
+ nil
78
+ else
79
+ [
80
+ "### Changelog for #{name}",
81
+ changelog,
82
+ "\n"
83
+ ].join("\n")
78
84
  end
79
85
  end
80
86
 
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module Changelog
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1.pre.alpha.pre.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregoire Seux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: berkshelf
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rest-client
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mixlib-shellout
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: chef
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '11.16'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '11.16'
111
111
  description: ''
@@ -115,8 +115,8 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - ".gitignore"
119
- - ".travis.yml"
118
+ - .gitignore
119
+ - .travis.yml
120
120
  - Gemfile
121
121
  - LICENSE.txt
122
122
  - README.md
@@ -137,14 +137,14 @@ require_paths:
137
137
  - lib
138
138
  required_ruby_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - ">="
140
+ - - ! '>='
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ">="
145
+ - - ! '>'
146
146
  - !ruby/object:Gem::Version
147
- version: '0'
147
+ version: 1.3.1
148
148
  requirements: []
149
149
  rubyforge_project:
150
150
  rubygems_version: 2.4.5