almodovar 1.7.7 → 1.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/almodovar/resource_collection.rb +6 -1
- data/lib/almodovar/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5e3ab978aae76e66bdf9720e0b0138ae3be35c51ee8406d6771bfa06e726df9
|
4
|
+
data.tar.gz: b51554cee84fc6bf7ed9875ea1b0be779d154af92da9a2468c00313f06d799f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac0df4ec63782ae8409e3d094bf747035a5721ab2d8074d754fd6e053f0f8478159e56bf1cd66e6e22ca95a92f4969cd136e520f7cf6335a0e32929188c5af8e
|
7
|
+
data.tar.gz: 21f7223520a6eb116ea50400b9f788c20a52ff2c173aac9088b1a9dbbb34a99998498e2f2a1795dac380876b77f76ac59a1c9ec103d7335909bfe03298613370
|
@@ -17,7 +17,12 @@ module Almodovar
|
|
17
17
|
def create(attrs = {})
|
18
18
|
raise ArgumentError.new("You must specify one only root element which is the type of resource (e.g. `:project => { :name => 'Wadus' }` instead of just `:name => 'Wadus'`)") if attrs.size > 1
|
19
19
|
root, body = attrs.first
|
20
|
-
|
20
|
+
if body.is_a?(Array)
|
21
|
+
body = body.to_xml(root: root)
|
22
|
+
else
|
23
|
+
body = body.to_xml(root: root, convert_links: true, skip_links_one_level: true)
|
24
|
+
end
|
25
|
+
response = http.post(@url, body, query_params, { "Content-Type" => "application/xml" })
|
21
26
|
check_errors(response, @url, query_params)
|
22
27
|
Resource.new(nil, @auth, Nokogiri::XML.parse(response.body).root)
|
23
28
|
end
|
data/lib/almodovar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: almodovar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BeBanjo S.L.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email: ballsbreaking@bebanjo.com
|
113
113
|
executables: []
|
114
114
|
extensions: []
|
@@ -130,7 +130,7 @@ homepage: http://wiki.github.com/bebanjo/almodovar/
|
|
130
130
|
licenses:
|
131
131
|
- MIT
|
132
132
|
metadata: {}
|
133
|
-
post_install_message:
|
133
|
+
post_install_message:
|
134
134
|
rdoc_options:
|
135
135
|
- "--main"
|
136
136
|
- README.rdoc
|
@@ -147,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
151
|
-
signing_key:
|
150
|
+
rubygems_version: 3.0.3
|
151
|
+
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: BeBanjo API client
|
154
154
|
test_files: []
|