dockly 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/dockly.rb +1 -0
- data/lib/dockly/util/git.rb +12 -8
- data/lib/dockly/version.rb +1 -1
- data/spec/dockly/util/git_spec.rb +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODhhMjA1MzAwZGY2ZmVkYzJiYjUxZjk3ZmM1MDM0OTI2MWY5NGJlMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjU3NzRlOTE4ZmY3ZDAyOGI0YjI0ZDM4OWY3YTJlZjI2ZGY3ZWFmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTBjY2M0ODFlNzU5NDlmNTU0M2UwZjgzZmRiODcyMGVjNzJhNGZhZWM2NjA3
|
10
|
+
MDkwNTNiNGVmZTJhMWIwOGJlNTQwZjJiYzkxM2Y5ZTQxYzM2NjBiNmFhMDc5
|
11
|
+
MTIyNjU5NDZlZmVhMmU0NzQ3NGJiYTg5Y2ExZTI4M2Q2ZTc4ZGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTgxN2ZjYWYzMjg4YTI1MmE4OGRlODZmZTQ2MTFlZTdhNmVjNWM0MzYyYzE2
|
14
|
+
MDcxMzU3N2U5ZGFhZDUxNjI5NDQ2OTI3YTQxNmE0YmIzZGU1NTNhZmQyYTU2
|
15
|
+
N2I3YTdjZjQyOGRiNTJhZDI2ZGM1MDQ1ZWQxZWNmMmYzOGUyY2Q=
|
data/lib/dockly.rb
CHANGED
data/lib/dockly/util/git.rb
CHANGED
@@ -25,14 +25,18 @@ module Dockly::Util::Git
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def archive(oid, prefix, output)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
prefix = prefix.dup
|
29
|
+
unless prefix[-1] == '/'; prefix << '/'; end
|
30
|
+
|
31
|
+
cmd = ['git','archive',"--prefix=#{prefix}",'--output=/dev/stdout',oid]
|
32
|
+
Open3.popen3(*cmd) do |stdin, stdout, stderr, wait_thr|
|
33
|
+
stdin.close
|
34
|
+
|
35
|
+
output.write(stdout.read)
|
36
|
+
process_status = wait_thr.value
|
37
|
+
exit_status = process_status.exitstatus
|
38
|
+
|
39
|
+
raise "#{cmd.join(' ')} exitted non-zero: #{exit_status}" unless exit_status.zero?
|
36
40
|
end
|
37
41
|
end
|
38
42
|
end
|
data/lib/dockly/version.rb
CHANGED
@@ -28,10 +28,22 @@ describe Dockly::Util::Git do
|
|
28
28
|
it 'archives the current directory into the given IO' do
|
29
29
|
subject.archive(subject.sha, prefix, io)
|
30
30
|
reader.each do |entry|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
if entry.full_name == 'pax_global_header'
|
32
|
+
expect(entry.header.typeflag).to eq('g')
|
33
|
+
else
|
34
|
+
expect(entry.full_name).to start_with(prefix)
|
35
|
+
orig = entry.full_name.gsub(/\A#{prefix}/, '.')
|
36
|
+
expect(File.exist?(orig)).to be_true
|
37
|
+
expect(entry.read).to eq(File.read(orig)) if orig.end_with?('.rb')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'with a really long prefix' do
|
43
|
+
let(:prefix) { '/' + ('a' * 255) }
|
44
|
+
it 'exhibits the tar extended headers' do
|
45
|
+
subject.archive(subject.sha, prefix, io)
|
46
|
+
expect(io.string.include?("path=#{prefix}")).to be true
|
35
47
|
end
|
36
48
|
end
|
37
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swipely, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|