embulk-filter-azure_computer_vision_api 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98b01398459c1f1d4705c2c68f5bc2fcbf4281a4
4
- data.tar.gz: 0c8b42fae867dc55d773ddc39e75ddb645c82e6c
3
+ metadata.gz: 78aa84a27de397d78d29e55a3015faf7a796e51a
4
+ data.tar.gz: 5d7f1367283a050239b85b8cc92f08222b568478
5
5
  SHA512:
6
- metadata.gz: 405d8753ea46331db091c613ad09fbe7d610ecd4f01a4a50690ca0d24291f03a2495203092a35883738fdc93b5277e6046bd9561d6515e2f675e2bb18b5a61a1
7
- data.tar.gz: cb15cec9eff8532b013276eb177364f8488ba75296c7568824e23890d81a985d13f62249ece49b7e069827584ad0a97a563e8422af6515622aef48517199b75d
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.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
- return 'application/json', { url: image_path || '' }.to_json
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-filter-azure_computer_vision_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - toyama0919