web_function 0.3.0 → 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/lib/web_function/endpoint.rb +4 -1
- data/lib/web_function/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: 651453280b0a98140477f0546132fe12d8d3019b7d4d2d70e7ab35151e64ba7a
|
|
4
|
+
data.tar.gz: 655a1615c48658c5e21738a8c88ea8c2a65916fd1edf54087d6fd39ec3e7402f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9d4d809aae59eb372f2c803ae14c0bb9396b7fb9e333af8a17773dc7b211981c3169f3da2f0762998825618e198afc6b172b4edad2c097a15fbe70dd09e71b5
|
|
7
|
+
data.tar.gz: a51eceeb6e007aec231e4ab201bd4164d6c0e618ee1c268f6f4b4c200593dd887694d534de52350af7d5fcb091bfa19f16be5922b6ec46a141357b756bdca314
|
|
@@ -10,6 +10,7 @@ module WebFunction
|
|
|
10
10
|
headers = {
|
|
11
11
|
"Content-Type": "application/json",
|
|
12
12
|
"Accept": "application/json",
|
|
13
|
+
"User-Agent": "webfunction/#{WebFunction::VERSION}",
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
if bearer_auth
|
|
@@ -43,10 +44,12 @@ module WebFunction
|
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
if response.status != 200
|
|
46
|
-
raise WebFunction::Error.new("
|
|
47
|
+
raise WebFunction::Error.new("Unexpected status code [#{response.status}]")
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
result
|
|
51
|
+
rescue JSON::ParserError => e
|
|
52
|
+
raise WebFunction::Error.new("Response cannot be parsed", details: {})
|
|
50
53
|
end
|
|
51
54
|
|
|
52
55
|
def name
|
data/lib/web_function/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web_function
|
|
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
|
- Robin Clart
|
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
87
|
version: '0'
|
|
88
88
|
requirements: []
|
|
89
|
-
rubygems_version: 3.
|
|
89
|
+
rubygems_version: 3.7.1
|
|
90
90
|
specification_version: 4
|
|
91
91
|
summary: A Web Function Client for Ruby
|
|
92
92
|
test_files: []
|