atlas_rb 0.0.59 → 0.0.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/Gemfile.lock +2 -2
- data/lib/atlas_rb/blob.rb +18 -18
- data/lib/atlas_rb/file_set.rb +16 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fc8248dce62919e557dcea44a7cbc492f4ec35cd27cb55913c2de1ec480c6d9
|
4
|
+
data.tar.gz: 85246ff7f2a6584a0811d44301ec9456501dae766678a516ba983f8852eae9f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d21922ec797058ceb83b4c780940af0473ab3367c216882295c904781debcf6667d1fc58c910232cdec8abacb0d773a5a1dcd4e1749a4d1961a96c08f1b66dd
|
7
|
+
data.tar.gz: fcbb8e9690552079436ad47a2a1a35903d083436a30e352bf4ec95c7bd71250d9a5294bf4b8b342ba5bca15f285aff9ba87f6d83e93ecce4b861e62619f3b382
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.61
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
atlas_rb (0.0.
|
4
|
+
atlas_rb (0.0.61)
|
5
5
|
faraday (~> 2.7)
|
6
6
|
faraday-follow_redirects (~> 0.3.0)
|
7
7
|
faraday-multipart (~> 1)
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
38
|
rspec-support (~> 3.12.0)
|
39
39
|
rspec-support (3.12.1)
|
40
|
-
uri (0.13.
|
40
|
+
uri (0.13.1)
|
41
41
|
|
42
42
|
PLATFORMS
|
43
43
|
x86_64-linux
|
data/lib/atlas_rb/blob.rb
CHANGED
@@ -3,28 +3,28 @@
|
|
3
3
|
module AtlasRb
|
4
4
|
class Blob < Resource
|
5
5
|
ROUTE = "/files/"
|
6
|
-
end
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def self.find(id)
|
8
|
+
connection({}).get(ROUTE + id)&.body
|
9
|
+
end
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
def self.create(id, blob_path)
|
12
|
+
payload = { binary: Faraday::Multipart::FilePart.new(File.open(blob_path),
|
13
|
+
"application/octet-stream",
|
14
|
+
File.basename(blob_path)) }
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
multipart({ work_id: id }).post(ROUTE, payload)&.body
|
17
|
+
end
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
def self.destroy(id)
|
20
|
+
connection({}).delete(ROUTE + id)
|
21
|
+
end
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
def self.update(id, blob_path)
|
24
|
+
payload = { binary: Faraday::Multipart::FilePart.new(File.open(blob_path),
|
25
|
+
"application/octet-stream",
|
26
|
+
File.basename(blob_path)) }
|
27
|
+
multipart({}).patch(ROUTE + id, payload)&.body
|
28
|
+
end
|
29
29
|
end
|
30
30
|
end
|
data/lib/atlas_rb/file_set.rb
CHANGED
@@ -3,25 +3,25 @@
|
|
3
3
|
module AtlasRb
|
4
4
|
class FileSet < Resource
|
5
5
|
ROUTE = "/file_sets/"
|
6
|
-
end
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def self.find(id)
|
8
|
+
connection({}).get(ROUTE + id)&.body
|
9
|
+
end
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
def self.create(id, classification)
|
12
|
+
connection({ work_id: id, classification: classification }).post(ROUTE)&.body
|
13
|
+
end
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
def self.destroy(id)
|
16
|
+
connection({}).delete(ROUTE + id)
|
17
|
+
end
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
def self.update(id, blob_path)
|
20
|
+
# Need to figure out blob vs XML
|
21
|
+
payload = { binary: Faraday::Multipart::FilePart.new(File.open(blob_path),
|
22
|
+
"application/octet-stream",
|
23
|
+
File.basename(blob_path)) }
|
24
|
+
multipart({}).patch(ROUTE + id, payload)&.body
|
25
|
+
end
|
26
26
|
end
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlas_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cliff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|