filebound_client 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/.gitignore +3 -1
- data/.rubocop.yml +5 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/ext/object.rb +1 -1
- data/lib/filebound_client.rb +9 -3
- data/lib/filebound_client/endpoints/documents.rb +1 -1
- data/lib/filebound_client/version.rb +1 -1
- 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: 78c968b126940138166073c4d4737a5a9e2299075f8e612a0b201a10dd7c5e06
|
4
|
+
data.tar.gz: bd92c85ec24b82f53cccca5d24ebf623498e9ff154d1b9c390275ad09c089453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2bb9e29ddf5bc4585c908501c5f9ab1217f0e5cfa6fa50d28d782c6eae6a4a5aaa9399d43ee3235e3ebd06168cf9325e2d68545633e443935ed16fabe758079
|
7
|
+
data.tar.gz: 3afd1349d71c255e9a8397fbfc56d48a010289b7e775c23acad77a1a1c381b44cfea04fb005f75f00c04b49935cf0f9d5464ebe20b28a5f407708d8931cd0751
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/ext/object.rb
CHANGED
data/lib/filebound_client.rb
CHANGED
@@ -93,9 +93,15 @@ module FileboundClient
|
|
93
93
|
|
94
94
|
def perform(action, url, params)
|
95
95
|
response = connection.send(action, url, params)
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
if response.error?
|
97
|
+
message = <<~ERROR
|
98
|
+
#{action.upcase} request failed: #{response.code}
|
99
|
+
Headers: #{response.headers}
|
100
|
+
Body: #{response.body}
|
101
|
+
ERROR
|
102
|
+
raise FileboundClientException.new(message, response.code)
|
103
|
+
end
|
104
|
+
|
99
105
|
response.body
|
100
106
|
end
|
101
107
|
end
|
@@ -87,7 +87,7 @@ module FileboundClient
|
|
87
87
|
# @param [Hash] document the document hash to add
|
88
88
|
# @return [Hash] the newly added document hash
|
89
89
|
def document_add(document)
|
90
|
-
raise FileboundClientException.new('File Id is required', 0) unless document && document[:fileId]
|
90
|
+
raise FileboundClientException.new('File Id is required', 0) unless document && document[:fileId].positive?
|
91
91
|
put("/documents/#{document[:fileId]}", nil, document)
|
92
92
|
end
|
93
93
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filebound_client
|
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
|
- Bryan Richardson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|