microsoft_computer_vision 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +49 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/example/all.rb +152 -0
- data/example/test.jpg +0 -0
- data/lib/microsoft_computer_vision.rb +16 -0
- data/lib/microsoft_computer_vision/api/analyze.rb +26 -0
- data/lib/microsoft_computer_vision/api/describe.rb +24 -0
- data/lib/microsoft_computer_vision/api/domain_model.rb +14 -0
- data/lib/microsoft_computer_vision/api/domain_models.rb +10 -0
- data/lib/microsoft_computer_vision/api/ocr.rb +26 -0
- data/lib/microsoft_computer_vision/api/tag.rb +10 -0
- data/lib/microsoft_computer_vision/api/thumbnail.rb +28 -0
- data/lib/microsoft_computer_vision/client.rb +142 -0
- data/lib/microsoft_computer_vision/version.rb +3 -0
- data/microsoft_computer_vision.gemspec +23 -0
- metadata +91 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 067e72acf9cf7d4c5fb3f98c92bbf2ae79033509
|
4
|
+
data.tar.gz: e5e9f064142d80e9990c665b52317986e2e194a6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7c9f9811427d7d5137b243636dd15286bf0ff8eeeb6b4f847acb9e6dc9718a6e083173b8276f1ca380919188b758034a25281eb105af287a0e957a305f368036
|
7
|
+
data.tar.gz: 11de3dd934a44ea1286b444b5a35d1e29ae5d36954bdfdb665bafa8c817ce1c9d2c06f03d6994a4d56c2675ed1165e3004a81af0b99e264f807e9cca4934b787
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Microsoft Computer Vision API
|
2
|
+
|
3
|
+
This is a very basic wrapper for the [Microsoft Computer Vision API](https://www.microsoft.com/cognitive-services/en-us/computer-vision-api).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'microsoft_computer_vision'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
```
|
22
|
+
$ gem install microsoft_computer_vision
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'microsoft_computer_vision'
|
29
|
+
|
30
|
+
client = MicrosoftComputerVision::Client.new('your_subscription_key')
|
31
|
+
options = {
|
32
|
+
visual_features: 'Faces',
|
33
|
+
details: 'Celebrities'
|
34
|
+
}
|
35
|
+
|
36
|
+
res = client.analyze_image_url('http://example.com/images/test.jpg', options)
|
37
|
+
puts res.body
|
38
|
+
```
|
39
|
+
|
40
|
+
Please see [example](https://github.com/henteko/microsoft_computer_vision/tree/master/example).
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/henteko/microsoft_computer_vision.
|
45
|
+
|
46
|
+
|
47
|
+
## License
|
48
|
+
|
49
|
+
[MIT License](http://www.opensource.org/licenses/MIT)
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'microsoft_computer_vision'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require 'pry'
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/example/all.rb
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
require 'microsoft_computer_vision'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
subscription_key = ENV['SUBSCRIPTION_KEY']
|
5
|
+
@client = MicrosoftComputerVision::Client.new(subscription_key)
|
6
|
+
IMAGE_URL = 'https://www.pakutaso.com/shared/img/thumb/PAK105215431_TP_V.jpg'
|
7
|
+
|
8
|
+
def file_open
|
9
|
+
File.open(File.expand_path('../test.jpg', __FILE__)) do |image_file|
|
10
|
+
yield(image_file)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa
|
15
|
+
def analyze
|
16
|
+
puts 'Analyze'
|
17
|
+
|
18
|
+
options = {
|
19
|
+
visual_features: 'Faces', # [Categories, Tags, Description, Faces, ImageType, Color, Adult]
|
20
|
+
details: 'Celebrities' # [Celebrities]
|
21
|
+
}
|
22
|
+
|
23
|
+
# image url
|
24
|
+
res = @client.analyze_image_url(IMAGE_URL, options)
|
25
|
+
puts res.body
|
26
|
+
|
27
|
+
# image file
|
28
|
+
file_open do |image_file|
|
29
|
+
res = @client.analyze_image_file(image_file.read, options)
|
30
|
+
puts res.body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fe
|
35
|
+
def describe
|
36
|
+
puts 'Describe'
|
37
|
+
|
38
|
+
options = {
|
39
|
+
max_candidates: '1'
|
40
|
+
}
|
41
|
+
|
42
|
+
# image url
|
43
|
+
res = @client.describe_image_url(IMAGE_URL, options)
|
44
|
+
puts res.body
|
45
|
+
|
46
|
+
# image file
|
47
|
+
file_open do |image_file|
|
48
|
+
res = @client.describe_image_file(image_file.read, options)
|
49
|
+
puts res.body
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fb
|
54
|
+
def thumbnail
|
55
|
+
puts 'Thumbnail'
|
56
|
+
|
57
|
+
options = {
|
58
|
+
width: 400,
|
59
|
+
height: 400,
|
60
|
+
smart_cropping: true
|
61
|
+
}
|
62
|
+
|
63
|
+
# image url
|
64
|
+
res = @client.thumbnail_image_url(IMAGE_URL, options)
|
65
|
+
out = File.expand_path('../thumbnail_from_image_url.jpg', __FILE__)
|
66
|
+
File.write out, res.body
|
67
|
+
puts "Created #{out}"
|
68
|
+
|
69
|
+
# image file
|
70
|
+
file_open do |image_file|
|
71
|
+
out = File.expand_path('../thumbnail_from_image_file.jpg', __FILE__)
|
72
|
+
|
73
|
+
res = @client.thumbnail_image_file(image_file.read, options)
|
74
|
+
File.write out, res.body
|
75
|
+
puts "Created #{out}"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fd
|
80
|
+
def domain_models
|
81
|
+
puts 'Domain Models'
|
82
|
+
|
83
|
+
res = @client.domain_models
|
84
|
+
puts res.body
|
85
|
+
end
|
86
|
+
|
87
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fc
|
88
|
+
def ocr
|
89
|
+
puts 'OCR'
|
90
|
+
|
91
|
+
options = {
|
92
|
+
language: 'ja',
|
93
|
+
detect_orientation: true
|
94
|
+
}
|
95
|
+
|
96
|
+
# image url
|
97
|
+
res = @client.ocr_image_url(IMAGE_URL, options)
|
98
|
+
puts res.body
|
99
|
+
|
100
|
+
# image file
|
101
|
+
file_open do |image_file|
|
102
|
+
res = @client.ocr_image_file(image_file.read, options)
|
103
|
+
puts res.body
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e200
|
108
|
+
def domain_model
|
109
|
+
puts 'DomainModel'
|
110
|
+
|
111
|
+
res = @client.domain_models
|
112
|
+
models = JSON.parse(res.body)['models']
|
113
|
+
|
114
|
+
model = models[0]['name']
|
115
|
+
puts "model: #{model}"
|
116
|
+
options = {
|
117
|
+
model: model
|
118
|
+
}
|
119
|
+
|
120
|
+
# image url
|
121
|
+
res = @client.domain_model_image_url(IMAGE_URL, options)
|
122
|
+
puts res.body
|
123
|
+
|
124
|
+
# image file
|
125
|
+
file_open do |image_file|
|
126
|
+
res = @client.domain_model_image_file(image_file.read, options)
|
127
|
+
puts res.body
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# See: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1ff
|
132
|
+
def tag
|
133
|
+
puts 'Tag'
|
134
|
+
|
135
|
+
# image url
|
136
|
+
res = @client.tag_image_url(IMAGE_URL)
|
137
|
+
puts res.body
|
138
|
+
|
139
|
+
# image file
|
140
|
+
file_open do |image_file|
|
141
|
+
res = @client.tag_image_file(image_file.read)
|
142
|
+
puts res.body
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
analyze
|
147
|
+
describe
|
148
|
+
thumbnail
|
149
|
+
domain_models
|
150
|
+
ocr
|
151
|
+
domain_model
|
152
|
+
tag
|
data/example/test.jpg
ADDED
Binary file
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module MicrosoftComputerVision
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'microsoft_computer_vision/version'
|
9
|
+
require 'microsoft_computer_vision/client'
|
10
|
+
require 'microsoft_computer_vision/api/analyze'
|
11
|
+
require 'microsoft_computer_vision/api/describe'
|
12
|
+
require 'microsoft_computer_vision/api/thumbnail'
|
13
|
+
require 'microsoft_computer_vision/api/domain_model'
|
14
|
+
require 'microsoft_computer_vision/api/domain_models'
|
15
|
+
require 'microsoft_computer_vision/api/ocr'
|
16
|
+
require 'microsoft_computer_vision/api/tag'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module MicrosoftComputerVision::Api
|
2
|
+
class Analyze
|
3
|
+
|
4
|
+
ENDPOINT = '/analyze'
|
5
|
+
|
6
|
+
def initialize(visual_features, details)
|
7
|
+
@visual_features = visual_features
|
8
|
+
@details = details
|
9
|
+
end
|
10
|
+
|
11
|
+
def uri
|
12
|
+
uri = URI("#{MicrosoftComputerVision::Client::API_BASE}#{ENDPOINT}")
|
13
|
+
uri.query = URI.encode_www_form(params)
|
14
|
+
|
15
|
+
uri
|
16
|
+
end
|
17
|
+
|
18
|
+
def params
|
19
|
+
data = {}
|
20
|
+
data[:visualFeatures] = @visual_features if @visual_features
|
21
|
+
data[:details] = @details if @details
|
22
|
+
|
23
|
+
data
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module MicrosoftComputerVision::Api
|
2
|
+
class Describe
|
3
|
+
|
4
|
+
ENDPOINT = '/describe'
|
5
|
+
|
6
|
+
def initialize(max_candidates)
|
7
|
+
@max_candidates = max_candidates
|
8
|
+
end
|
9
|
+
|
10
|
+
def uri
|
11
|
+
uri = URI("#{MicrosoftComputerVision::Client::API_BASE}#{ENDPOINT}")
|
12
|
+
uri.query = URI.encode_www_form(params)
|
13
|
+
|
14
|
+
uri
|
15
|
+
end
|
16
|
+
|
17
|
+
def params
|
18
|
+
data = {}
|
19
|
+
data[:maxCandidates] = @max_candidates if @max_candidates
|
20
|
+
|
21
|
+
data
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module MicrosoftComputerVision::Api
|
2
|
+
class OCR
|
3
|
+
|
4
|
+
ENDPOINT = '/ocr'
|
5
|
+
|
6
|
+
def initialize(language, detect_orientation)
|
7
|
+
@language = language
|
8
|
+
@detect_orientation = detect_orientation
|
9
|
+
end
|
10
|
+
|
11
|
+
def uri
|
12
|
+
uri = URI("#{MicrosoftComputerVision::Client::API_BASE}#{ENDPOINT}")
|
13
|
+
uri.query = URI.encode_www_form(params)
|
14
|
+
|
15
|
+
uri
|
16
|
+
end
|
17
|
+
|
18
|
+
def params
|
19
|
+
data = {}
|
20
|
+
data[:language] = @language if @language
|
21
|
+
data[:detectOrientation] = @detect_orientation if @detect_orientation
|
22
|
+
|
23
|
+
data
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module MicrosoftComputerVision::Api
|
2
|
+
class Thumbnail
|
3
|
+
|
4
|
+
ENDPOINT = '/generateThumbnail'
|
5
|
+
|
6
|
+
def initialize(width, height, smart_cropping)
|
7
|
+
@width = width
|
8
|
+
@height = height
|
9
|
+
@smart_cropping = smart_cropping
|
10
|
+
end
|
11
|
+
|
12
|
+
def uri
|
13
|
+
uri = URI("#{MicrosoftComputerVision::Client::API_BASE}#{ENDPOINT}")
|
14
|
+
uri.query = URI.encode_www_form(params)
|
15
|
+
|
16
|
+
uri
|
17
|
+
end
|
18
|
+
|
19
|
+
def params
|
20
|
+
data = {}
|
21
|
+
data[:width] = @width if @width
|
22
|
+
data[:height] = @height if @height
|
23
|
+
data[:smartCropping] = @smart_cropping if @smart_cropping
|
24
|
+
|
25
|
+
data
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
module MicrosoftComputerVision
|
2
|
+
class Client
|
3
|
+
|
4
|
+
API_BASE = 'https://api.projectoxford.ai/vision/v1.0'
|
5
|
+
|
6
|
+
def initialize(subscription_key)
|
7
|
+
@subscription_key = subscription_key
|
8
|
+
end
|
9
|
+
|
10
|
+
###############################################################################################################
|
11
|
+
# Analyze
|
12
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa
|
13
|
+
###############################################################################################################
|
14
|
+
|
15
|
+
def analyze_image_url(image_url, options)
|
16
|
+
analyze = Api::Analyze.new(options[:visual_features], options[:details])
|
17
|
+
post_image_url(analyze.uri, image_url)
|
18
|
+
end
|
19
|
+
|
20
|
+
def analyze_image_file(image_file, options)
|
21
|
+
analyze = Api::Analyze.new(options[:visual_features], options[:details])
|
22
|
+
post_image_file(analyze.uri, image_file)
|
23
|
+
end
|
24
|
+
|
25
|
+
###############################################################################################################
|
26
|
+
# Describe
|
27
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fe
|
28
|
+
###############################################################################################################
|
29
|
+
|
30
|
+
def describe_image_url(image_url, options)
|
31
|
+
describe = Api::Describe.new(options[:max_candidates])
|
32
|
+
post_image_url(describe.uri, image_url)
|
33
|
+
end
|
34
|
+
|
35
|
+
def describe_image_file(image_file, options)
|
36
|
+
describe = Api::Describe.new(options[:max_candidates])
|
37
|
+
post_image_file(describe.uri, image_file)
|
38
|
+
end
|
39
|
+
|
40
|
+
###############################################################################################################
|
41
|
+
# Thumbnail
|
42
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fb
|
43
|
+
###############################################################################################################
|
44
|
+
|
45
|
+
def thumbnail_image_url(image_url, options)
|
46
|
+
thumbnail = Api::Thumbnail.new(options[:width], options[:height], options[:smart_cropping])
|
47
|
+
post_image_url(thumbnail.uri, image_url)
|
48
|
+
end
|
49
|
+
|
50
|
+
def thumbnail_image_file(image_file, options)
|
51
|
+
thumbnail = Api::Thumbnail.new(options[:width], options[:height], options[:smart_cropping])
|
52
|
+
post_image_file(thumbnail.uri, image_file)
|
53
|
+
end
|
54
|
+
|
55
|
+
###############################################################################################################
|
56
|
+
# Domain Models
|
57
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fd
|
58
|
+
###############################################################################################################
|
59
|
+
|
60
|
+
def domain_models
|
61
|
+
domain_models = Api::DomainModels.new()
|
62
|
+
get(domain_models.uri, {}.to_json)
|
63
|
+
end
|
64
|
+
|
65
|
+
###############################################################################################################
|
66
|
+
# Domain Model
|
67
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e200
|
68
|
+
###############################################################################################################
|
69
|
+
|
70
|
+
def domain_model_image_url(image_url, options)
|
71
|
+
domain_model = Api::DomainModel.new(options[:model])
|
72
|
+
post_image_url(domain_model.uri, image_url)
|
73
|
+
end
|
74
|
+
|
75
|
+
def domain_model_image_file(image_file, options)
|
76
|
+
domain_model = Api::DomainModel.new(options[:model])
|
77
|
+
post_image_file(domain_model.uri, image_file)
|
78
|
+
end
|
79
|
+
|
80
|
+
###############################################################################################################
|
81
|
+
# OCR
|
82
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fc
|
83
|
+
###############################################################################################################
|
84
|
+
|
85
|
+
def ocr_image_url(image_url, options)
|
86
|
+
ocr = Api::OCR.new(options[:language], options[:detect_orientation])
|
87
|
+
post_image_url(ocr.uri, image_url)
|
88
|
+
end
|
89
|
+
|
90
|
+
def ocr_image_file(image_file, options)
|
91
|
+
ocr = Api::OCR.new(options[:language], options[:detect_orientation])
|
92
|
+
post_image_file(ocr.uri, image_file)
|
93
|
+
end
|
94
|
+
|
95
|
+
###############################################################################################################
|
96
|
+
# Tag
|
97
|
+
# Docs: https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1ff
|
98
|
+
###############################################################################################################
|
99
|
+
|
100
|
+
def tag_image_url(image_url)
|
101
|
+
tag = Api::Tag.new()
|
102
|
+
post_image_url(tag.uri, image_url)
|
103
|
+
end
|
104
|
+
|
105
|
+
def tag_image_file(image_file)
|
106
|
+
tag = Api::Tag.new()
|
107
|
+
post_image_file(tag.uri, image_file)
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
|
112
|
+
def get(uri, body)
|
113
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
114
|
+
|
115
|
+
start(uri, body, request)
|
116
|
+
end
|
117
|
+
|
118
|
+
def post_image_file(uri, image_file)
|
119
|
+
post(uri, 'application/octet-stream', image_file)
|
120
|
+
end
|
121
|
+
|
122
|
+
def post_image_url(uri, image_url)
|
123
|
+
post(uri, 'application/json', {url: image_url}.to_json)
|
124
|
+
end
|
125
|
+
|
126
|
+
def post(uri, content_type, body)
|
127
|
+
request = Net::HTTP::Post.new(uri.request_uri)
|
128
|
+
request['Content-Type'] = content_type
|
129
|
+
|
130
|
+
start(uri, body, request)
|
131
|
+
end
|
132
|
+
|
133
|
+
def start(uri, body, request)
|
134
|
+
request['Ocp-Apim-Subscription-Key'] = @subscription_key
|
135
|
+
request.body = body
|
136
|
+
|
137
|
+
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
|
138
|
+
http.request(request)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'microsoft_computer_vision/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'microsoft_computer_vision'
|
8
|
+
spec.version = MicrosoftComputerVision::VERSION
|
9
|
+
spec.authors = ['henteko']
|
10
|
+
spec.email = ['henteko07@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'This is a very basic wrapper for the Microsoft Computer Vision API.'
|
13
|
+
spec.description = 'This is a very basic wrapper for the Microsoft Computer Vision API.'
|
14
|
+
spec.homepage = 'https://github.com/henteko/microsoft_computer_vision'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/).reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = 'exe'
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: microsoft_computer_vision
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- henteko
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: This is a very basic wrapper for the Microsoft Computer Vision API.
|
42
|
+
email:
|
43
|
+
- henteko07@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
|
+
- Gemfile
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- bin/console
|
54
|
+
- bin/setup
|
55
|
+
- example/all.rb
|
56
|
+
- example/test.jpg
|
57
|
+
- lib/microsoft_computer_vision.rb
|
58
|
+
- lib/microsoft_computer_vision/api/analyze.rb
|
59
|
+
- lib/microsoft_computer_vision/api/describe.rb
|
60
|
+
- lib/microsoft_computer_vision/api/domain_model.rb
|
61
|
+
- lib/microsoft_computer_vision/api/domain_models.rb
|
62
|
+
- lib/microsoft_computer_vision/api/ocr.rb
|
63
|
+
- lib/microsoft_computer_vision/api/tag.rb
|
64
|
+
- lib/microsoft_computer_vision/api/thumbnail.rb
|
65
|
+
- lib/microsoft_computer_vision/client.rb
|
66
|
+
- lib/microsoft_computer_vision/version.rb
|
67
|
+
- microsoft_computer_vision.gemspec
|
68
|
+
homepage: https://github.com/henteko/microsoft_computer_vision
|
69
|
+
licenses: []
|
70
|
+
metadata: {}
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 2.4.5
|
88
|
+
signing_key:
|
89
|
+
specification_version: 4
|
90
|
+
summary: This is a very basic wrapper for the Microsoft Computer Vision API.
|
91
|
+
test_files: []
|