cnvrg 0.3.1 → 0.3.2
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 +4 -4
- data/lib/cnvrg/datafiles.rb +4 -4
- data/lib/cnvrg/dataset.rb +1 -1
- data/lib/cnvrg/files.rb +1 -1
- data/lib/cnvrg/project.rb +1 -1
- data/lib/cnvrg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d46b5eaf4d56cb615fcd63a3df9a57eb1c256655
|
|
4
|
+
data.tar.gz: 4471e16b3294f712df87e4427a23b4c509052beb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 470747e59cf58d292ebda9e50fa2e858713f5008d975d6adf9836547791d2ae59df3ba101da5d746a310651b93757b84cc1637cb32b11f559a1fee4c714d70d2
|
|
7
|
+
data.tar.gz: 9b052fa3deef0c29cfc611f733f49a3a48890a0e27d1cc775199a60b0ca9e696836d54e451c234a1936b10424572df6345166d265ef8f7ddcc2d6966d489e94c
|
data/lib/cnvrg/datafiles.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Cnvrg
|
|
|
21
21
|
file_size = File.size(absolute_path).to_f
|
|
22
22
|
mime_type = MimeMagic.by_path(absolute_path)
|
|
23
23
|
content_type = !(mime_type.nil? or mime_type.text?) ? mime_type.type : "text/plain"
|
|
24
|
-
sha1 =
|
|
24
|
+
sha1 = OpenSSL::Digest::SHA1.file(absolute_path).hexdigest
|
|
25
25
|
upload_resp = Cnvrg::API.request(@base_resource + "upload_file", 'POST_FILE', {absolute_path: absolute_path, relative_path: relative_path,
|
|
26
26
|
commit_sha1: commit_sha1, file_name: file_name,
|
|
27
27
|
file_size: file_size, file_content_type: content_type, sha1: sha1})
|
|
@@ -55,12 +55,12 @@ module Cnvrg
|
|
|
55
55
|
total_yanked = f.read(chunked_bytes)
|
|
56
56
|
end
|
|
57
57
|
if !total_yanked.empty?
|
|
58
|
-
sha1 =
|
|
58
|
+
sha1 = OpenSSL::Digest::SHA1.hexdigest(total_yanked)
|
|
59
59
|
else
|
|
60
|
-
sha1 =
|
|
60
|
+
sha1 = OpenSSL::Digest::SHA1.file(absolute_path).hexdigest
|
|
61
61
|
end
|
|
62
62
|
rescue
|
|
63
|
-
sha1 =
|
|
63
|
+
sha1 = OpenSSL::Digest::SHA1.file(absolute_path).hexdigest
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
upload_resp = Cnvrg::API.request(@base_resource + "upload_tar_file", 'POST_FILE', {absolute_path: absolute_path, relative_path: relative_path,
|
data/lib/cnvrg/dataset.rb
CHANGED
|
@@ -205,7 +205,7 @@ module Cnvrg
|
|
|
205
205
|
if list_ignore.include? label
|
|
206
206
|
next
|
|
207
207
|
end
|
|
208
|
-
sha1 =
|
|
208
|
+
sha1 = OpenSSL::Digest::SHA1.file(e).hexdigest
|
|
209
209
|
if old_idx.nil? or old_idx.to_h["tree"].nil?
|
|
210
210
|
tree_idx[label] = {sha1: sha1, commit_time: nil}
|
|
211
211
|
elsif old_idx["tree"][label].nil? or old_idx["tree"][label]["sha1"] != sha1
|
data/lib/cnvrg/files.rb
CHANGED
|
@@ -22,7 +22,7 @@ module Cnvrg
|
|
|
22
22
|
file_size = File.size(absolute_path).to_f
|
|
23
23
|
mime_type = MimeMagic.by_path(absolute_path)
|
|
24
24
|
content_type = !(mime_type.nil? or mime_type.text?) ? mime_type.type : "text/plain"
|
|
25
|
-
sha1 =
|
|
25
|
+
sha1 = OpenSSL::Digest::SHA1.file(absolute_path).hexdigest
|
|
26
26
|
upload_resp = Cnvrg::API.request(@base_resource + "upload_file", 'POST_FILE', {absolute_path: absolute_path, relative_path: relative_path,
|
|
27
27
|
commit_sha1: commit_sha1, file_name: file_name,
|
|
28
28
|
file_size: file_size, file_content_type: content_type, sha1: sha1,
|
data/lib/cnvrg/project.rb
CHANGED
|
@@ -332,7 +332,7 @@ module Cnvrg
|
|
|
332
332
|
|
|
333
333
|
tree_idx[label+"/"] = nil
|
|
334
334
|
else
|
|
335
|
-
sha1 =
|
|
335
|
+
sha1 = OpenSSL::Digest::SHA1.file(e).hexdigest
|
|
336
336
|
if old_idx.nil? or old_idx.to_h[:tree].nil?
|
|
337
337
|
tree_idx[label] = {sha1: sha1, commit_time: nil}
|
|
338
338
|
elsif old_idx[:tree][label].nil? or old_idx[:tree][label][:sha1] != sha1
|
data/lib/cnvrg/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cnvrg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yochay Ettun
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-02-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|