embulk-filter-azure_computer_vision_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78aa84a27de397d78d29e55a3015faf7a796e51a
|
4
|
+
data.tar.gz: 5d7f1367283a050239b85b8cc92f08222b568478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68439f3cdf7f8c53812b7fec8ed6375916f13090d32574b1fde1304b8a1bbf5b6ac8550fa2a71970e514a0d86d459d8ff2dd7d217a293f723e0a944673baf915
|
7
|
+
data.tar.gz: 9c2cbfae113fc45966006f56e4bfbe0920d503fe5c3e5a7e7329f65d3ce98f5c48e73085b9df72803b599b8c3a66a20a28995973acb709ab24aefc13f44ffe43
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "embulk-filter-azure_computer_vision_api"
|
4
|
-
spec.version = "0.1.
|
4
|
+
spec.version = "0.1.2"
|
5
5
|
spec.authors = ["toyama0919"]
|
6
6
|
spec.summary = "Azure Computer Vision Api filter plugin for Embulk"
|
7
7
|
spec.description = "Azure Computer Vision Api"
|
@@ -58,7 +58,8 @@ module Embulk
|
|
58
58
|
private
|
59
59
|
def get_content_type_and_body(image_path)
|
60
60
|
if image_path =~ /https?\:\/\//
|
61
|
-
|
61
|
+
content = Net::HTTP.get_response(URI.parse(image_path)).body rescue ''
|
62
|
+
return 'application/octet-stream', content
|
62
63
|
else
|
63
64
|
content = File.read(image_path) rescue ''
|
64
65
|
return 'application/octet-stream', content
|