knife-changelog 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7bea4f6a0e0d4c2a2904c625fd38a6a19899510
4
- data.tar.gz: 1a9133fcbbe9dfcb63df3211a866b2e14460920d
3
+ metadata.gz: 98c4159a0fc3b58953636b8ccf0c8c8382177e4d
4
+ data.tar.gz: 6771513114075ccae583f8ad398fd59e74a29c3d
5
5
  SHA512:
6
- metadata.gz: 221fd8ae1f49fc3c9125ce7752108a42334f9ec4ba9b7b1078f8157408cb435d0b08ad8d2ceb83712cb3298be60ce20df6b5b27d84bc28187eb2293f5c17088c
7
- data.tar.gz: 61b5dc799fd99c8c141fb7634b036d606fd9c99455ae10d91589d723530765124bebf1aad67b1ce1c7e7db2cf1179d13924b3fb1de04415c0c3b4b1277fc31e2
6
+ metadata.gz: 65d40a2adf64c8a95efc6c6a2f64c2a2b350d488b208e189a7846357194ce59c632cadb6da7fd570b39569cb97614fcf817be9a35635ab482e6d3227a5499372
7
+ data.tar.gz: b60b63be3884ee0297b6aa9acc8bd7b2be55898fdba6c719624a0fa79cabd767f73c0cb6970597f0f0f755a0e891e6a03e966a3d7af2e9d3437bccaac614c7d9
data/.travis.yml CHANGED
@@ -7,3 +7,4 @@ deploy:
7
7
  on:
8
8
  tags: true
9
9
  repo: kamaradclimber/knife-changelog
10
+ sudo: false # use docker based infra
data/Rakefile CHANGED
@@ -3,5 +3,7 @@ require "bundler/gem_tasks"
3
3
  begin
4
4
  require 'rspec/core/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
6
8
  rescue LoadError
7
9
  end
@@ -30,11 +30,12 @@ class Chef
30
30
  def run
31
31
  begin
32
32
  if @name_args.empty?
33
- cks = @berksfile.cookbooks.collect {|c| c.name }
33
+ cks = @berksfile.cookbooks.collect {|c| c.cookbook_name }
34
34
  else
35
35
  cks = @name_args
36
36
  end
37
37
  cks.each do |cookbook|
38
+ Log.debug "Checking changelog for #{cookbook}"
38
39
  execute cookbook
39
40
  end
40
41
  ensure
@@ -68,6 +69,9 @@ class Chef
68
69
  handle_source name, ck_dep(name)
69
70
  when Berkshelf::GitLocation
70
71
  handle_git loc
72
+ when Berkshelf::PathLocation
73
+ Log.debug "path location are always at the last version"
74
+ ""
71
75
  else
72
76
  raise "Cannot handle #{loc.class} yet"
73
77
  end
@@ -76,22 +80,23 @@ class Chef
76
80
 
77
81
  def print_changelog(name, changelog)
78
82
  unless changelog.empty?
79
- puts "--- Changelog for #{name} ---"
83
+ puts "### Changelog for #{name}"
80
84
  puts changelog
81
- puts "-----------------"
85
+ puts "\n\n"
82
86
  end
83
87
  end
84
88
 
85
89
  def handle_source(name, dep)
86
90
  ck = noauth_rest.get_rest("https://supermarket.getchef.com/api/v1/cookbooks/#{name}")
87
91
  url = ck['source_url'] || ck ['external_url']
88
- case url
89
- when nil
90
- fail "No external url for #{name}, can't find any changelog source"
92
+ case url.strip
93
+ when nil,""
94
+ Log.warn "No external url for #{name}, can't find any changelog source"
95
+ ""
91
96
  when /github.com\/(.*)(.git)?/
92
97
  options = {
93
98
  :github => $1,
94
- :revision => 'v' + version_for(name),
99
+ :revision => 'v' + version_for(name),
95
100
  }
96
101
  location = Berkshelf::GithubLocation.new dep, options
97
102
  handle_git(location)
@@ -109,7 +114,7 @@ class Chef
109
114
  ls_tree.run_command
110
115
  changelog = ls_tree.stdout.lines.find { |line| line =~ /\s(changelog.*$)/i }
111
116
  if changelog and not config[:ignore_changelog_file]
112
- puts "Found changelog file : " + $1
117
+ Log.info "Found changelog file : " + $1
113
118
  generate_from_changelog_file($1, cur_rev, rev_parse, tmp_dir)
114
119
  else
115
120
  generate_from_git_history(tmp_dir, location, cur_rev, rev_parse)
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module Changelog
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregoire Seux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2014-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,6 @@ files:
104
104
  - ".gitignore"
105
105
  - ".travis.yml"
106
106
  - Gemfile
107
- - Gemfile.lock
108
107
  - LICENSE.txt
109
108
  - README.md
110
109
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,181 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- knife-changelog (0.0.1)
5
- berkshelf
6
- chef (~> 11.16)
7
- mixlib-shellout
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- addressable (2.3.6)
13
- berkshelf (3.2.1)
14
- addressable (~> 2.3.4)
15
- berkshelf-api-client (~> 1.2)
16
- buff-config (~> 1.0)
17
- buff-extensions (~> 1.0)
18
- buff-shell_out (~> 0.1)
19
- celluloid (~> 0.16.0)
20
- celluloid-io (~> 0.16.1)
21
- cleanroom (~> 1.0)
22
- faraday (~> 0.9.0)
23
- minitar (~> 0.5.4)
24
- octokit (~> 3.0)
25
- retryable (~> 1.3.3)
26
- ridley (~> 4.0)
27
- solve (~> 1.1)
28
- thor (~> 0.19)
29
- berkshelf-api-client (1.2.0)
30
- faraday (~> 0.9.0)
31
- buff-config (1.0.1)
32
- buff-extensions (~> 1.0)
33
- varia_model (~> 0.4)
34
- buff-extensions (1.0.0)
35
- buff-ignore (1.1.1)
36
- buff-ruby_engine (0.1.0)
37
- buff-shell_out (0.2.0)
38
- buff-ruby_engine (~> 0.1.0)
39
- celluloid (0.16.0)
40
- timers (~> 4.0.0)
41
- celluloid-io (0.16.1)
42
- celluloid (>= 0.16.0)
43
- nio4r (>= 1.0.0)
44
- chef (11.16.4)
45
- chef-zero (~> 2.1, >= 2.1.4)
46
- diff-lcs (~> 1.2, >= 1.2.4)
47
- erubis (~> 2.7)
48
- ffi-yajl (~> 1.0)
49
- highline (~> 1.6, >= 1.6.9)
50
- mime-types (~> 1.16)
51
- mixlib-authentication (~> 1.3)
52
- mixlib-cli (~> 1.4)
53
- mixlib-config (~> 2.0)
54
- mixlib-log (~> 1.3)
55
- mixlib-shellout (~> 1.4)
56
- net-ssh (~> 2.6)
57
- net-ssh-multi (~> 1.1)
58
- ohai (~> 7.4)
59
- plist (~> 3.1.0)
60
- pry (~> 0.9)
61
- rest-client (>= 1.0.4, <= 1.6.7)
62
- chef-zero (2.2.1)
63
- ffi-yajl (~> 1.1)
64
- hashie (~> 2.0)
65
- mixlib-log (~> 1.3)
66
- rack
67
- cleanroom (1.0.0)
68
- coderay (1.1.0)
69
- dep-selector-libgecode (1.0.2)
70
- dep_selector (1.0.3)
71
- dep-selector-libgecode (~> 1.0)
72
- ffi (~> 1.9)
73
- diff-lcs (1.2.5)
74
- erubis (2.7.0)
75
- faraday (0.9.0)
76
- multipart-post (>= 1.2, < 3)
77
- ffi (1.9.6)
78
- ffi-yajl (1.3.1)
79
- ffi (~> 1.5)
80
- libyajl2 (~> 1.2)
81
- hashie (2.1.2)
82
- highline (1.6.21)
83
- hitimes (1.2.2)
84
- ipaddress (0.8.0)
85
- json (1.8.1)
86
- libyajl2 (1.2.0)
87
- method_source (0.8.2)
88
- mime-types (1.25.1)
89
- minitar (0.5.4)
90
- mixlib-authentication (1.3.0)
91
- mixlib-log
92
- mixlib-cli (1.5.0)
93
- mixlib-config (2.1.0)
94
- mixlib-log (1.6.0)
95
- mixlib-shellout (1.6.1)
96
- multipart-post (2.0.0)
97
- net-http-persistent (2.9.4)
98
- net-ssh (2.9.1)
99
- net-ssh-gateway (1.2.0)
100
- net-ssh (>= 2.6.5)
101
- net-ssh-multi (1.2.0)
102
- net-ssh (>= 2.6.5)
103
- net-ssh-gateway (>= 1.2.0)
104
- nio4r (1.0.1)
105
- octokit (3.7.0)
106
- sawyer (~> 0.6.0, >= 0.5.3)
107
- ohai (7.4.0)
108
- ffi (~> 1.9)
109
- ffi-yajl (~> 1.0)
110
- ipaddress
111
- mime-types (~> 1.16)
112
- mixlib-cli
113
- mixlib-config (~> 2.0)
114
- mixlib-log
115
- mixlib-shellout (~> 1.2)
116
- systemu (~> 2.6.4)
117
- wmi-lite (~> 1.0)
118
- plist (3.1.0)
119
- pry (0.10.1)
120
- coderay (~> 1.1.0)
121
- method_source (~> 0.8.1)
122
- slop (~> 3.4)
123
- rack (1.5.2)
124
- rake (10.4.2)
125
- rest-client (1.6.7)
126
- mime-types (>= 1.16)
127
- retryable (1.3.6)
128
- ridley (4.1.1)
129
- addressable
130
- buff-config (~> 1.0)
131
- buff-extensions (~> 1.0)
132
- buff-ignore (~> 1.1)
133
- buff-shell_out (~> 0.1)
134
- celluloid (~> 0.16.0)
135
- celluloid-io (~> 0.16.1)
136
- erubis
137
- faraday (~> 0.9.0)
138
- hashie (>= 2.0.2, < 3.0.0)
139
- json (>= 1.7.7)
140
- mixlib-authentication (>= 1.3.0)
141
- net-http-persistent (>= 2.8)
142
- retryable
143
- semverse (~> 1.1)
144
- varia_model (~> 0.4)
145
- rspec (3.1.0)
146
- rspec-core (~> 3.1.0)
147
- rspec-expectations (~> 3.1.0)
148
- rspec-mocks (~> 3.1.0)
149
- rspec-core (3.1.7)
150
- rspec-support (~> 3.1.0)
151
- rspec-expectations (3.1.2)
152
- diff-lcs (>= 1.2.0, < 2.0)
153
- rspec-support (~> 3.1.0)
154
- rspec-mocks (3.1.3)
155
- rspec-support (~> 3.1.0)
156
- rspec-support (3.1.2)
157
- sawyer (0.6.0)
158
- addressable (~> 2.3.5)
159
- faraday (~> 0.8, < 0.10)
160
- semverse (1.2.1)
161
- slop (3.6.0)
162
- solve (1.2.1)
163
- dep_selector (~> 1.0)
164
- semverse (~> 1.1)
165
- systemu (2.6.4)
166
- thor (0.19.1)
167
- timers (4.0.1)
168
- hitimes
169
- varia_model (0.4.0)
170
- buff-extensions (~> 1.0)
171
- hashie (>= 2.0.2, < 3.0.0)
172
- wmi-lite (1.0.0)
173
-
174
- PLATFORMS
175
- ruby
176
-
177
- DEPENDENCIES
178
- bundler (~> 1.6)
179
- knife-changelog!
180
- rake
181
- rspec