atlas_rb 0.0.52 → 0.0.54
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 +1 -1
- data/lib/atlas_rb/collection.rb +6 -3
- data/lib/atlas_rb/work.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3783dac3e90e0710de6cb63dbefd12858c5cc6bbbab5d8bbc74100af52b56ce3
|
4
|
+
data.tar.gz: 5df48e147258911c1dcba2e637f94619c293cc398b602c76bfaaa31f1adc7129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb90d3591825c493b7ce4bd9ebaf2149e98f8708d5f1052961c4e842f34fefd41c61b7509998b4d326133ba4ab04d0ad3f372d553bfbb409c8cfafd5cf8f3055
|
7
|
+
data.tar.gz: 250613ec50dd638dfaacda8fb237aaa688d23a2a8dff561927bd79aaa27fed7e8d9ca2cdc29dee8d950f96c45041cf58add1835489d95889d5309bcd72aa9c3a
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.54
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/collection.rb
CHANGED
@@ -8,9 +8,12 @@ module AtlasRb
|
|
8
8
|
JSON.parse(connection({}).get(ROUTE + id)&.body)["collection"]
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.create(id)
|
12
|
-
|
13
|
-
|
11
|
+
def self.create(id, xml_path = nil)
|
12
|
+
result = JSON.parse(connection({ parent_id: id }).post(ROUTE)&.body)["collection"]
|
13
|
+
return unless xml_path.present?
|
14
|
+
|
15
|
+
update(result["id"], xml_path)
|
16
|
+
find(result["id"])
|
14
17
|
end
|
15
18
|
|
16
19
|
def self.destroy(id)
|
data/lib/atlas_rb/work.rb
CHANGED
@@ -8,9 +8,12 @@ module AtlasRb
|
|
8
8
|
JSON.parse(connection({}).get(ROUTE + id)&.body)["work"]
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.create(id)
|
12
|
-
|
13
|
-
|
11
|
+
def self.create(id, xml_path = nil)
|
12
|
+
result = JSON.parse(connection({ collection_id: id }).post(ROUTE)&.body)["work"]
|
13
|
+
return unless xml_path.present?
|
14
|
+
|
15
|
+
update(result["id"], xml_path)
|
16
|
+
find(result["id"])
|
14
17
|
end
|
15
18
|
|
16
19
|
def self.destroy(id)
|