clarifai_ruby 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: 7f1ee99c65bb794b60079e097b4c0759ef9a8669
4
- data.tar.gz: c0e33cd478c123d1a045074faf0c56707cbcee05
3
+ metadata.gz: fa877f0f47bafae9ced48aeaf29243197f5fd3a8
4
+ data.tar.gz: 7b051baef2eeceef620fcd68fa6be7334b6da149
5
5
  SHA512:
6
- metadata.gz: 27ec4b7d23889f256220d4fd501e57ace7cd4dca459d6b4eb96ab408599913ac1be9a847eb050db1448790a72bf4869df4fb26494d75c137ee9acdb7ddb8ef96
7
- data.tar.gz: f70ff54ba57ae62e27d1fc63d4f43b785aad134ed92e4b9230e8f6739274775a4011450a3ea759c93b63723ad783bb0b58d8d36ed5d30690b2ff1977c49a7b1a
6
+ metadata.gz: 8475dcb53a92cc66d4c2cbe782db26fc97b9b969db1c307dfd62e4ad15cd2262b36ae47d0256ad0d04812c3fd1147406c82560e56c113d44da056219a12d4c16
7
+ data.tar.gz: 5d0e602780267ac6e616fdaee29b72dfc0a1a2893da7dc052eb2d6400fdccc895d9e217241e98d356a0be6fced19d8490affd94c109658c5126b1453a4463eef
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+
@@ -2,3 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
4
  before_install: gem install bundler -v 1.11.2
5
+ addons:
6
+ code_climate:
7
+ repo_token: f4e87766ed5b226cdbc1db9cefa3fdbc6f9b909323101fffb80b99c6fe4a3232
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem "codeclimate-test-reporter", group: :test, require: nil
4
+
3
5
  # Specify your gem's dependencies in clarifai_ruby.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -1,10 +1,34 @@
1
1
  # ClarifaiRuby
2
2
 
3
- Made with love, from Prince Wilson and Charlyn Gonda (because they are awesome)
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/clarifai_ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- TODO: Delete this and the text above, and describe your gem
3
+ [![Build Status](https://travis-ci.org/chardane/ClarifaiRuby.svg?branch=master)](https://travis-ci.org/chardane/ClarifaiRuby)
4
+ [![Code Climate](https://codeclimate.com/github/chardane/ClarifaiRuby/badges/gpa.svg)](https://codeclimate.com/github/chardane/ClarifaiRuby)
5
+
6
+ Made with :heart:, from Prince Wilson ([:octocat:](https://github.com/maxcell) [:bird:](https://twitter.com/maxcellw)) and Charlyn Gonda ([:octocat:](https://github.com/chardane) [:bird:](https://twitter.com/chardane)). Because they are awesome.
7
+
8
+ This gem is an unofficial Ruby client for Clarifai's image recognition API.
9
+
10
+ >The Clarifai API offers image and video recognition as a service. Whether you have one image or billions, you are only steps away from using artificial intelligence to 'see' what's inside your visual content.
11
+ >
12
+ >[*Clarifai*](https://developer.clarifai.com/guide/)
13
+
14
+ ## Table of Contents
15
+ - [Prerequisites](#prerequisites)
16
+ - [Installation](#installation)
17
+ - [Configuration](#configuration)
18
+ - [Usage](#usage)
19
+ - [InfoRequest](#inforequest)
20
+ - [TagRequest](#tagrequest)
21
+ - [Model](#model)
22
+ - [Select Classes](#select-classes)
23
+ - [Language](#language)
24
+ - [ColorRequest](#colorrequest)
25
+ - [FeedbackRequest](#feedbackrequest)
26
+ - [Known Issues](#known-issues)
27
+ - [Contributing](#contributing)
28
+ - [License](#license)
29
+
30
+ ## Prerequisites
31
+ Before using this gem, make sure to [create an account for Clarifai](https://developer.clarifai.com/signup/?code=champs) and create an application to obtain a client id and client secret.
8
32
 
9
33
  ## Installation
10
34
 
@@ -16,25 +40,128 @@ gem 'clarifai_ruby'
16
40
 
17
41
  And then execute:
18
42
 
19
- $ bundle
43
+ ```
44
+ $ bundle
45
+ ```
20
46
 
21
47
  Or install it yourself as:
22
48
 
23
- $ gem install clarifai_ruby
49
+ ```
50
+ $ gem install clarifai_ruby
51
+ ```
52
+
53
+ ## Configuration
54
+ To configure the gem, stick this block:
55
+ ```ruby
56
+ ClarifaiRuby.configure do |config|
57
+ config.base_url = "https://api.clarifai.com"
58
+ config.version_path = "/v1"
59
+ config.client_id = "<CLIENT_ID>"
60
+ config.client_secret = "<CLIENT_SECRET>"
61
+ end
62
+ ```
63
+ inside of your initializer file.
24
64
 
25
65
  ## Usage
26
66
 
27
- TODO: Write usage instructions here
67
+ This gem can make 4 types of requests (Info, Tag, Color, Feedback) using 4 corresponding request objects:
68
+ - `InfoRequest`
69
+ - `TagRequest`
70
+ - `ColorRequest`
71
+ - `FeedbackRequest`
72
+
73
+ And each request will result in a corresponding response object that will have access to each response's data:
74
+ - `InfoResponse`
75
+ - `TagResponse`
76
+ - `ColorResponse`
77
+ - `FeedbackResponse`
78
+
79
+ ### InfoRequest
80
+ To make an `InfoRequest`:
81
+ ```ruby
82
+ info = ClarifaiRuby::InfoRequest.new.get
83
+ #=> ClarifaiRuby::InfoResponse
84
+
85
+ info.status_code
86
+ #=> "OK"
87
+ ```
88
+ ### TagRequest
89
+ To make a `TagRequest`:
90
+ ```ruby
91
+ tag_response = ClarifaiRuby::TagRequest.new.get("https://samples.clarifai.com/metro-north.jpg")
92
+ #=> #<ClarifaiRuby::TagResponse>
93
+
94
+ tag_response.tag_images
95
+ #=> [#<ClarifaiRuby::TagImage>]
96
+
97
+ # Each tag image will contain an array of Tag objects
98
+ tag_response.tag_images.first.tags
99
+ #=> [#<ClarifaiRuby::Tag>, #<ClarifaiRuby::Tag>, ...]
100
+ ```
101
+ A `TagResponse` will contain an array of `TagImage`s and each `TagImage` will contain an array of `Tag`s
102
+
103
+ ### Tag
104
+ A `Tag` represents each tag returned by Clarifai.
105
+
106
+ Each `Tag` contains these readers:
107
+ - `word` - the class of the tag
108
+ - `prob` - (short for probability) indicate how well the model believes the corresponding tag is associated with the input data.
109
+ - `concept_id` - the corresponding concept_id
28
110
 
29
- ## Development
111
+ #### Model
112
+
113
+ You can pass in the `model` [(more info)](http://developer.clarifai.com/guide/tag#models)
114
+
115
+ >If you'd like to get tags for an image or video using a different model, you can do so by passing in a `model` parameter. If you omit this parameter, the API will use the default model for your application. You can change this on the applications page.
116
+
117
+ ```ruby
118
+ ClarifaiRuby::TagRequest.new.get("https://samples.clarifai.com/metro-north.jpg", model: "nsfw-v0.1")
119
+ #=> #<ClarifaiRuby::TagResponse>
120
+ ```
121
+ As of February here are the valid models:
122
+
123
+ 1. `general-v1.3`
124
+ 2. `nsfw-v0.1`
125
+ 3. `weddings-v1.0`
126
+
127
+ Please refer to the [documentation](http://developer.clarifai.com/guide/tag#models) for any possible changes to this list.
128
+
129
+ #### Select Classes
130
+
131
+ You can pass in `select_classes` [(more info)](http://developer.clarifai.com/guide/tag#select-classes)
132
+
133
+ >If you'd like to get the probability of a certain tag or tags, you can specify them in the request using the `select_classes` parameter. Different tags should be comma separated.
134
+
135
+ ```ruby
136
+ tag_response = ClarifaiRuby::TagRequest.new.get("https://samples.clarifai.com/metro-north.jpg", select_classes: "light,sky")
137
+ #=> #<ClarifaiRuby::TagResponse>
138
+ ```
139
+
140
+ #### Language
141
+
142
+ You can pass in `language` [(more info)](https://developer.clarifai.com/guide/tag#guide-tag-languages)
143
+
144
+ > By default this API call returns tags in English. You can change this default setting on the applications page or can pass in a language parameter. If you use a language other than English, you must make sure the model you are using is `general-v1.3`.
145
+
146
+ ```ruby
147
+ tag_response = tag_response = ClarifaiRuby::TagRequest.new.get("https://samples.clarifai.com/metro-north.jpg", model: "general-v1.3", language: "es")
148
+ #=> #<ClarifaiRuby::TagResponse>
149
+ ```
30
150
 
31
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
151
+ ### ColorRequest
152
+ **Pending**
153
+ ### FeedbackRequest
154
+ **Pending**
32
155
 
33
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
156
+ ## Known Issues
157
+ - [ ] **Token Overconsumption**
158
+ - Currently, every instance of any request objects generates a separate access token. We would need to change it, such that it would use one token across all request objects.
159
+ - [ ] **No support for multiple files**
160
+ - The `tag` endpoint can support multiple files within its request, however, due to `HTTMultiParty` gem limitations.Â
34
161
 
35
162
  ## Contributing
36
163
 
37
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/clarifai_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
164
+ Bug reports and pull requests are welcome on GitHub at https://github.com/chardane/ClarifaiRuby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
38
165
 
39
166
 
40
167
  ## License
@@ -6,9 +6,14 @@ require "clarifai_ruby"
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
8
8
 
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
9
+ ClarifaiRuby.configure do |config|
10
+ config.base_url = 'https://api.clarifai.com'
11
+ config.version_path = "/v1"
12
+ config.client_id = "-GMMA7LUQQ_xKYRWQDgIosC2U6JNusO7R7neDIJy"
13
+ config.client_secret = "VPH8lyZjE9BhnztcvXeGWRA_OUEfckFBt4sgWqXj"
14
+ end
12
15
 
13
- require "irb"
14
- IRB.start
16
+ @client = ClarifaiRuby::Client.new
17
+
18
+ require "pry"
19
+ Pry.start
@@ -22,7 +22,9 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.11"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
- spec.add_development_dependency "pry-byebug", "~> 3.3.0"
25
+ spec.add_development_dependency "pry-byebug", "~> 3.3"
26
+ spec.add_development_dependency "webmock", "~> 1.24"
27
+ spec.add_development_dependency "vcr", "~> 3.0"
26
28
 
27
- spec.add_runtime_dependency "httparty", "~> 0.13.7"
29
+ spec.add_runtime_dependency "httmultiparty"
28
30
  end
@@ -1,9 +1,29 @@
1
+ require 'httmultiparty'
2
+
1
3
  require "clarifai_ruby/version"
2
- require 'httparty'
4
+ require 'clarifai_ruby/configuration'
5
+ require 'clarifai_ruby/client'
6
+ require 'clarifai_ruby/info_request'
7
+ require 'clarifai_ruby/info_response'
8
+ require 'clarifai_ruby/color_request'
9
+ require 'clarifai_ruby/color_response'
10
+ require 'clarifai_ruby/token'
11
+ require 'clarifai_ruby/tag_request'
12
+ require 'clarifai_ruby/tag_response'
13
+ require 'clarifai_ruby/models/tag'
14
+ require 'clarifai_ruby/models/tag_image'
15
+
3
16
 
4
17
  module ClarifaiRuby
5
- # Your code goes here...
6
- def self.hello_world
7
- "yo, boo"
18
+ def self.configuration
19
+ @configuration ||= Configuration.new
20
+ end
21
+
22
+ def self.configuration=(configuration)
23
+ @configuration = configuration
24
+ end
25
+
26
+ def self.configure
27
+ yield configuration
8
28
  end
9
29
  end
@@ -0,0 +1,35 @@
1
+ module ClarifaiRuby
2
+ class RequestError < StandardError; end
3
+
4
+ class Client
5
+ include HTTMultiParty
6
+ debug_output $stderr
7
+ disable_rails_query_string_format
8
+
9
+ attr_reader :token
10
+
11
+ def initialize
12
+ @token = Token.new.token
13
+ self.class.base_uri ClarifaiRuby.configuration.api_url
14
+ self.class.headers auth_header
15
+ end
16
+
17
+ def get(url, opts={})
18
+ response = self.class.get(url, query: opts)
19
+ #TODO handle raising any errors here
20
+ end
21
+
22
+ def post(url, opts={})
23
+ response = self.class.post(url, query: opts)
24
+ #TODO handle raising any errors here
25
+ end
26
+
27
+ private
28
+
29
+ def auth_header
30
+ {
31
+ "Authorization" => "Bearer #{token}"
32
+ }
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,20 @@
1
+ module ClarifaiRuby
2
+ class ColorRequest
3
+ COLOR_PATH = '/color'
4
+ attr_reader :raw_response, :options
5
+
6
+ def initialize
7
+ @client = Client.new
8
+ end
9
+
10
+ def get(url)
11
+
12
+ query = {
13
+ url: url
14
+ }
15
+
16
+ @raw_response = @client.get(COLOR_PATH, query).parsed_response
17
+ ColorResponse.new(raw_response)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ module ClarifaiRuby
2
+ class ColorResponse
3
+
4
+ attr_reader :status_code, :status_msg, :docid_str, :url, :colors
5
+
6
+ def initialize(json_response)
7
+ @status_code = json_response["status_code"]
8
+ @status_msg = json_response["status_msg"]
9
+ @results = json_response["results"][0]
10
+ @docid_str = @results["docid_str"]
11
+ @url = @results["url"]
12
+ @colors = @results["colors"]
13
+ end
14
+
15
+ # Color Objects!
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ module ClarifaiRuby
2
+ class Configuration
3
+ attr_accessor :base_url, :client_id, :client_secret, :version_path
4
+
5
+ def initialize
6
+ @base_url = 'https://api.clarifai.com'
7
+ @version_path = '/v1'
8
+ end
9
+
10
+ def api_url
11
+ base_url + version_path
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ module ClarifaiRuby
2
+ class InfoRequest
3
+ INFO_PATH = '/info'
4
+ attr_reader :raw_response, :options
5
+
6
+ def initialize
7
+ @client = Client.new
8
+ end
9
+
10
+ def get(opts = {})
11
+ @raw_response = @client.get(INFO_PATH, opts).parsed_response
12
+ InfoResponse.new(raw_response)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ module ClarifaiRuby
2
+ class InfoResponse
3
+
4
+ def initialize(json_response, recursion=0)
5
+ #parse the json response and make each key available
6
+ json_response.each do |name, value|
7
+ if value.is_a? Hash
8
+ initialize(value, recursion+1)
9
+ else
10
+ self.class.send(:attr_reader, name)
11
+ instance_variable_set("@#{name}", value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ module ClarifaiRuby
2
+ class Tag
3
+ attr_reader :word, :prob, :concept_id
4
+
5
+ def initialize(word, prob, concept_id=nil)
6
+ @word = word
7
+ @prob = prob
8
+ @concept_id = concept_id
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ module ClarifaiRuby
2
+ class TagImage
3
+ attr_reader :docid,
4
+ :docid_str,
5
+ :url,
6
+ :status_code,
7
+ :status_msg,
8
+ :local_id,
9
+ :tags,
10
+ :tags_by_words
11
+
12
+
13
+ def initialize(response_doc)
14
+ @docid = response_doc["docid"]
15
+ @docid_str = response_doc["docid_str"]
16
+ @url = response_doc["url"]
17
+ @status_code = response_doc["status_code"]
18
+ @status_msg = response_doc["status_msg"]
19
+ @local_id = response_doc["local_id"]
20
+ @tags = generate_tags response_doc["result"]["tag"]
21
+ @tags_by_words = response_doc["result"]["tag"]["classes"]
22
+ end
23
+
24
+ private
25
+
26
+ def generate_tags(tag_doc)
27
+ tags = tag_doc["classes"].zip(tag_doc["probs"], tag_doc["concept_ids"] || [])
28
+ tags.map{ |tag| Tag.new(*tag) }
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,39 @@
1
+ module ClarifaiRuby
2
+ class TagRequest
3
+ TAG_PATH = '/tag'
4
+ attr_reader :raw_response, :options
5
+
6
+ def initialize
7
+ @client = Client.new
8
+ end
9
+
10
+ def get(image_url, opts={})
11
+ body = {
12
+ url: image_url,
13
+ model: opts[:model]
14
+ }
15
+
16
+ build_request!(body, opts)
17
+
18
+ @raw_response = @client.get(TAG_PATH, body).parsed_response
19
+ raise RequestError.new @raw_response["status_msg"] if @raw_response["status_code"] != "OK"
20
+
21
+ TagResponse.new(raw_response)
22
+ end
23
+
24
+ private
25
+
26
+ def build_request!(body, opts)
27
+ if opts.has_key? :language
28
+ if body[:model] != "general-v1.3"
29
+ raise RequestError.new "must set model to 'general-v1.3' when using language option"
30
+ end
31
+ body.merge!(language: opts[:language])
32
+ end
33
+
34
+ if opts.has_key? :select_classes
35
+ body.merge!(select_classes: opts[:select_classes])
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,24 @@
1
+ module ClarifaiRuby
2
+ class TagResponse
3
+ attr_reader :tag_images,
4
+ :status_code,
5
+ :status_msg,
6
+ :meta,
7
+ :model
8
+
9
+
10
+ def initialize(json_response)
11
+ @tag_images = generate_tag_images json_response["results"]
12
+ @status_code = json_response["status_code"]
13
+ @status_msg = json_response["status_msg"]
14
+ @meta = json_response["meta"]
15
+ @model = json_response["meta"]["tag"]["model"]
16
+ end
17
+
18
+ private
19
+
20
+ def generate_tag_images(results)
21
+ results.map { |r| TagImage.new(r) }
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,29 @@
1
+ module ClarifaiRuby
2
+ class Token
3
+ include HTTParty
4
+ TOKEN_PATH = "/token"
5
+
6
+ def initialize
7
+ self.class.base_uri ClarifaiRuby.configuration.api_url
8
+ end
9
+
10
+ def token
11
+ @token ||= generate_token
12
+ end
13
+
14
+ private
15
+
16
+ def generate_token
17
+ body = {
18
+ "grant_type" => "client_credentials",
19
+ "client_id" => "#{ClarifaiRuby.configuration.client_id}",
20
+ "client_secret" => "#{ClarifaiRuby.configuration.client_secret}"
21
+ }
22
+
23
+ response = self.class.post(TOKEN_PATH, :body => body).parsed_response
24
+ #TODO handle error case here
25
+ response['access_token']
26
+ end
27
+
28
+ end
29
+ end
@@ -1,3 +1,3 @@
1
1
  module ClarifaiRuby
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clarifai_ruby
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
  - Charlyn Gonda
@@ -9,78 +9,106 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-29 00:00:00.000000000 Z
12
+ date: 2016-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.11'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.11'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '10.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: pry-byebug
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 3.3.0
62
+ version: '3.3'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 3.3.0
69
+ version: '3.3'
70
70
  - !ruby/object:Gem::Dependency
71
- name: httparty
71
+ name: webmock
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 0.13.7
76
+ version: '1.24'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.24'
84
+ - !ruby/object:Gem::Dependency
85
+ name: vcr
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '3.0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '3.0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: httmultiparty
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
77
105
  type: :runtime
78
106
  prerelease: false
79
107
  version_requirements: !ruby/object:Gem::Requirement
80
108
  requirements:
81
- - - ~>
109
+ - - ">="
82
110
  - !ruby/object:Gem::Version
83
- version: 0.13.7
111
+ version: '0'
84
112
  description: 'Work In Progress - Clarifai is a visual recognition API. Clarifai''s
85
113
  algorithms enable fine grained classification, localization of objects in images
86
114
  and similarity search based on the combination of semantic and visual properties. '
@@ -91,9 +119,9 @@ executables: []
91
119
  extensions: []
92
120
  extra_rdoc_files: []
93
121
  files:
94
- - .gitignore
95
- - .rspec
96
- - .travis.yml
122
+ - ".gitignore"
123
+ - ".rspec"
124
+ - ".travis.yml"
97
125
  - CODE_OF_CONDUCT.md
98
126
  - Gemfile
99
127
  - LICENSE.txt
@@ -103,6 +131,17 @@ files:
103
131
  - bin/setup
104
132
  - clarifai_ruby.gemspec
105
133
  - lib/clarifai_ruby.rb
134
+ - lib/clarifai_ruby/client.rb
135
+ - lib/clarifai_ruby/color_request.rb
136
+ - lib/clarifai_ruby/color_response.rb
137
+ - lib/clarifai_ruby/configuration.rb
138
+ - lib/clarifai_ruby/info_request.rb
139
+ - lib/clarifai_ruby/info_response.rb
140
+ - lib/clarifai_ruby/models/tag.rb
141
+ - lib/clarifai_ruby/models/tag_image.rb
142
+ - lib/clarifai_ruby/tag_request.rb
143
+ - lib/clarifai_ruby/tag_response.rb
144
+ - lib/clarifai_ruby/token.rb
106
145
  - lib/clarifai_ruby/version.rb
107
146
  homepage: https://github.com/chardane/ClarifaiRuby
108
147
  licenses:
@@ -114,18 +153,19 @@ require_paths:
114
153
  - lib
115
154
  required_ruby_version: !ruby/object:Gem::Requirement
116
155
  requirements:
117
- - - '>='
156
+ - - ">="
118
157
  - !ruby/object:Gem::Version
119
158
  version: '0'
120
159
  required_rubygems_version: !ruby/object:Gem::Requirement
121
160
  requirements:
122
- - - '>='
161
+ - - ">="
123
162
  - !ruby/object:Gem::Version
124
163
  version: '0'
125
164
  requirements: []
126
165
  rubyforge_project:
127
- rubygems_version: 2.5.1
166
+ rubygems_version: 2.4.5
128
167
  signing_key:
129
168
  specification_version: 4
130
169
  summary: A Ruby client for the Clarifai API
131
170
  test_files: []
171
+ has_rdoc: