atlas_rb 0.0.51 → 0.0.53
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/community.rb +4 -2
- data/lib/atlas_rb/work.rb +5 -2
- 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: a7d9df70b466e4b62db94dd27024137fccb16c3f18b06821a93124ce0b6c15a9
|
4
|
+
data.tar.gz: e8fbecc7b36ae97725201ed0b3db1fdbf3f81d1b0085ea3d0ce3526bbcd5e9b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f655fc91584e99757f706e417fa8480ae53dc4d913227f885ef9e981d0a0056c3456bbce50bc71fe6e536f6a9dea712fabedecf54f1c7869d0fe66df407bd20
|
7
|
+
data.tar.gz: c7b0b663ca55eefe8c7fb5c35e53cd2f0dfac9facfb938094532dc0d05c494c9138ee159409c023fa155b55edf83e0cd88221e78ef6260ee67ecb2bcbf5e26f8
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.53
|
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/community.rb
CHANGED
@@ -10,8 +10,10 @@ module AtlasRb
|
|
10
10
|
|
11
11
|
def self.create(id = nil, xml_path = nil)
|
12
12
|
result = JSON.parse(connection({ parent_id: id }).post(ROUTE)&.body)["community"]
|
13
|
-
|
14
|
-
|
13
|
+
return unless xml_path.present?
|
14
|
+
|
15
|
+
update(result["id"], xml_path)
|
16
|
+
find(result["id"])
|
15
17
|
end
|
16
18
|
|
17
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
|
-
# params[:collection_id]
|
11
|
+
def self.create(id, xml_path = nil)
|
13
12
|
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)
|