knife-changelog 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0f29dd794fc5873a0e850546180f1bc2b69f17f
4
- data.tar.gz: 19bcc39810f49b5893114dcc2a6b77e81535fbb9
3
+ metadata.gz: edbbf5411d82753b8ce5b135c1a38492c6b22266
4
+ data.tar.gz: 26c3fd802919a151dcace2082ed0970bcc5519ca
5
5
  SHA512:
6
- metadata.gz: 0a89bd48cf48671ee2a37f53b08e53e64971a853200b3be2b1cb8eb85730135ec882796d2c6e96cb8a6b8301a483871691a978f3a1aca5a41dda0513f2175b4c
7
- data.tar.gz: 990c2933deb6e028097f919cb7f808ce3f8bb870c4a44d933c8fb8d2a6af7b7b81d8df59741c98a23c8408ebdbcb8d2c599a9edaa23a42a343d57fc157590538
6
+ metadata.gz: 18e3235065d4e4e096ceb2463111de89cb0a552c3c7bde36a739afd00b6c7215a7f517166bc19b899c6a73d29eeee47366223c5620c8f7b9dc9a86f8aa3dac84
7
+ data.tar.gz: c87d9b670ab7f7cefbb4a24654df02f7848896d5028d023c29607fd1f48681cbc350287f3e3d1193dcc9a2ec244ec4dffb3f0f291977f928e2632866ce7ca907
@@ -63,7 +63,7 @@ class KnifeChangelog
63
63
  when NilClass
64
64
  handle_source name, ck_dep(name)
65
65
  when Berkshelf::GitLocation
66
- handle_git loc
66
+ handle_git name, loc
67
67
  when Berkshelf::PathLocation
68
68
  Chef::Log.debug "path location are always at the last version"
69
69
  ""
@@ -101,7 +101,7 @@ class KnifeChangelog
101
101
  :revision => guess_version_for(name),
102
102
  }
103
103
  location = Berkshelf::GitLocation.new dep, options
104
- handle_git(location)
104
+ handle_git(name, location)
105
105
  else
106
106
  fail "External url #{url} points to unusable location!"
107
107
  end
@@ -114,11 +114,11 @@ class KnifeChangelog
114
114
  not revlist.error?
115
115
  end
116
116
 
117
- def detect_cur_revision(dir, rev)
117
+ def detect_cur_revision(name, dir, rev)
118
118
  unless revision_exists?(dir, rev)
119
119
  prefixed_rev = 'v' + rev
120
120
  return prefixed_rev if revision_exists?(dir, prefixed_rev)
121
- fail "#{rev} is not a valid revision"
121
+ fail "#{rev} is not a valid revision (#{name})"
122
122
  end
123
123
  rev
124
124
  end
@@ -133,15 +133,15 @@ class KnifeChangelog
133
133
  subm_revision.error!
134
134
  revision = subm_revision.stdout.strip.split(' ').first
135
135
  loc = Berkshelf::Location.init(nil, {git: url,revision: revision})
136
- handle_git(loc)
136
+ handle_git(name, loc)
137
137
  end
138
138
 
139
- def handle_git(location)
139
+ def handle_git(name, location)
140
140
  tmp_dir = shallow_clone(@tmp_prefix,location.uri)
141
141
 
142
142
  rev_parse = location.instance_variable_get(:@rev_parse)
143
143
  cur_rev = location.revision.rstrip
144
- cur_rev = detect_cur_revision(tmp_dir, cur_rev)
144
+ cur_rev = detect_cur_revision(name, tmp_dir, cur_rev)
145
145
  ls_tree = Mixlib::ShellOut.new("git ls-tree -r #{rev_parse}", :cwd => tmp_dir)
146
146
  ls_tree.run_command
147
147
  changelog = ls_tree.stdout.lines.find { |line| line =~ /\s(changelog.*$)/i }
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module Changelog
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregoire Seux