cookbook-release 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/cookbook-release.gemspec +1 -1
- data/lib/cookbook-release/release.rb +4 -1
- data/spec/git_spec.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTI0NWQ2NzMwMDU5NDAyNDlhZDNhMzRkMzJlMmJhZjliMzU1NjM5NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTQ0NzhhOTBmZjczNmMxZGE0MWU0MmE0OGM3MGFmYjU4ZjJkZDM3NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjhiZmI5YzM2ODFjOTAwMjZiYzhlMWM5OTI1ZWZjN2ZkYmU4YzYyZWZlMzAy
|
10
|
+
MDk3YTMwZTlmYjZhZDczZmQ5ZDQwNDI5NTIwNjNlZGY1NDI5NzdhMzAwMWQ4
|
11
|
+
MDMxYjlmYmEyZmIxNGViMGVhZDg4OWQ3MDY3ZWYyODkzMjYzNjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjgwZjJkZjM0OWQ4Mzk5MWIxY2MyMDBjYzIzMzI5OGRkYzYzZDRiMjlmYjYw
|
14
|
+
OTMxY2JmZTRjMDYyZmMyOWNjODY2NmI1MzAyZDYyOWZkZTQxYjM3MDkxY2U2
|
15
|
+
NzJiOTBlMzNkNGI3MjBmYzVhMmFiYjY3YjNhODI1YzU4Y2NiOWM=
|
data/cookbook-release.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'English'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'cookbook-release'
|
9
|
-
spec.version = '1.1.
|
9
|
+
spec.version = '1.1.8'
|
10
10
|
spec.authors = ['Grégoire Seux']
|
11
11
|
spec.email = 'g.seux@criteo.com'
|
12
12
|
spec.summary = 'Provide primitives (and rake tasks) to release a cookbook'
|
@@ -6,7 +6,10 @@ module CookbookRelease
|
|
6
6
|
dir = File.dirname(file)
|
7
7
|
version_file = File.join(dir, '.cookbook_version')
|
8
8
|
|
9
|
-
|
9
|
+
if !GitUtilities.git?(dir)
|
10
|
+
return File.read(version_file) if File.exist?(version_file)
|
11
|
+
raise "Can't determine version in a non-git environment without #{version_file}"
|
12
|
+
end
|
10
13
|
|
11
14
|
r = Release.new(GitUtilities.new(cwd: dir))
|
12
15
|
begin
|
data/spec/git_spec.rb
CHANGED
@@ -29,6 +29,23 @@ describe CookbookRelease::GitUtilities do
|
|
29
29
|
|
30
30
|
let(:git) { CookbookRelease::GitUtilities.new }
|
31
31
|
|
32
|
+
describe 'git directory' do
|
33
|
+
it 'detects non-git' do
|
34
|
+
tmp = Dir.mktmpdir('cookbook-release')
|
35
|
+
expect(CookbookRelease::GitUtilities.git?(tmp)).to be(false)
|
36
|
+
FileUtils.rm_rf(tmp)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'detects git' do
|
40
|
+
tmp = Dir.mktmpdir('cookbook-release')
|
41
|
+
cmd = Mixlib::ShellOut.new("git init #{tmp}")
|
42
|
+
cmd.run_command
|
43
|
+
cmd.error!
|
44
|
+
expect(CookbookRelease::GitUtilities.git?(tmp)).to be(true)
|
45
|
+
FileUtils.rm_rf(tmp)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
32
49
|
describe '.clean_index(?|!)' do
|
33
50
|
it 'detects clean index' do
|
34
51
|
expect(git.clean_index?).to be(true)
|