kairos-api 0.0.1 → 0.0.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/README.md +8 -5
- data/lib/kairos/version.rb +1 -1
- data/spec/kairos/detect_spec.rb +2 -2
- data/spec/kairos/gallery_remove_subject_spec.rb +2 -2
- data/spec/vcr/detect_with_missing_parameters.yml +5 -5
- data/spec/vcr/detect_with_no_faces_in_image.yml +5 -5
- data/spec/vcr/gallery_remove_subject.yml +5 -5
- data/spec/vcr/gallery_remove_subject_with_unmatched_subject.yml +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6e1c9a16e6f0bc05b1a44cf61da0baf933beef
|
4
|
+
data.tar.gz: d93c0e0bd20a4af0975424c3f4ef8a3f356806bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b73362a6251ff6b9214ef42fa082b9d05a9bee2deb2fabcdf83e7039d890a1f659c86c9f5923c50d8aeb1d4b4a97ead4c604c35828de95816b9102e554ea411
|
7
|
+
data.tar.gz: 4034d42c4fec138a71ac1ba69820a95a9c7b51ac11ac29c57f9704219576c79b2b64253a814f9c811a8e0e2c9bdb2bfaae2aeb1e84f3d9f099453a7c7e3fe281
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Kairos
|
1
|
+
# Kairos-Api
|
2
2
|
|
3
3
|
Ruby gem for the Kairos facial recognition API - https://developer.kairos.io/
|
4
4
|
|
@@ -45,10 +45,13 @@ Takes an image and stores it as a face template into a gallery you define
|
|
45
45
|
- Removes a subject from a specified gallery
|
46
46
|
|
47
47
|
## To Do List
|
48
|
-
1
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
1. Trim unnessary gem dependencies
|
49
|
+
|
50
|
+
2. Expand documentation
|
51
|
+
|
52
|
+
3. Expand test specs to cover more scenarios and edge cases
|
53
|
+
|
54
|
+
4. DRY up code where possible
|
52
55
|
|
53
56
|
## Contributing
|
54
57
|
|
data/lib/kairos/version.rb
CHANGED
data/spec/kairos/detect_spec.rb
CHANGED
@@ -20,7 +20,7 @@ describe Kairos::Client do
|
|
20
20
|
it 'should not detect faces' do
|
21
21
|
VCR.use_cassette('detect_with_missing_parameters') do
|
22
22
|
response = @client.detect(:selector => 'FULL')
|
23
|
-
response.should eq("
|
23
|
+
response.should eq({"errors"=>[{"Errcode"=>5001, "Message"=>"some unknown service error"}]})
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -28,7 +28,7 @@ describe Kairos::Client do
|
|
28
28
|
it 'should not detect faces' do
|
29
29
|
VCR.use_cassette('detect_with_no_faces_in_image') do
|
30
30
|
response = @client.detect(:url => 'http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Seal_of_the_US_Air_Force.svg/356px-Seal_of_the_US_Air_Force.svg.png', :selector => 'FULL')
|
31
|
-
response.should eq("
|
31
|
+
response.should eq({"errors"=>[{"Errcode"=>5002, "Message"=>"No face(s) found"}]})
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -28,7 +28,7 @@ describe Kairos::Client do
|
|
28
28
|
it 'should accept any subject and try to remove it, if it exists' do
|
29
29
|
VCR.use_cassette('gallery_remove_subject_with_unmatched_subject') do
|
30
30
|
response = @client.gallery_remove_subject(:gallery_name => 'gemtest', :subject_id => 'abcdefghi')
|
31
|
-
response.should eq(
|
31
|
+
response.should eq({"status"=>"complete", "message"=>"subject id abcdefghi has been successfully removed"})
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -40,7 +40,7 @@ describe Kairos::Client do
|
|
40
40
|
end
|
41
41
|
describe 'response' do
|
42
42
|
it 'subject is removed from gallery' do
|
43
|
-
@response.should eq(
|
43
|
+
@response.should eq({"status"=>"complete", "message"=>"subject id image123abc has been successfully removed"})
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -27,16 +27,16 @@ http_interactions:
|
|
27
27
|
Server:
|
28
28
|
- ngx_openresty/1.2.8.6
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 05 Aug 2014 03:24:15 GMT
|
31
31
|
Content-Type:
|
32
32
|
- text/html; charset=UTF-8
|
33
|
-
|
34
|
-
-
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
35
|
Connection:
|
36
36
|
- keep-alive
|
37
37
|
body:
|
38
38
|
encoding: UTF-8
|
39
|
-
string: '
|
39
|
+
string: '{"errors":[{"Errcode":5001,"Message":"some unknown service error"}]}'
|
40
40
|
http_version:
|
41
|
-
recorded_at:
|
41
|
+
recorded_at: Tue, 05 Aug 2014 03:24:13 GMT
|
42
42
|
recorded_with: VCR 2.9.2
|
@@ -27,16 +27,16 @@ http_interactions:
|
|
27
27
|
Server:
|
28
28
|
- ngx_openresty/1.2.8.6
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 05 Aug 2014 03:25:31 GMT
|
31
31
|
Content-Type:
|
32
32
|
- text/html; charset=UTF-8
|
33
|
-
|
34
|
-
-
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
35
|
Connection:
|
36
36
|
- keep-alive
|
37
37
|
body:
|
38
38
|
encoding: UTF-8
|
39
|
-
string: '
|
39
|
+
string: '{"errors":[{"Errcode":5002,"Message":"No face(s) found"}]}'
|
40
40
|
http_version:
|
41
|
-
recorded_at:
|
41
|
+
recorded_at: Tue, 05 Aug 2014 03:25:30 GMT
|
42
42
|
recorded_with: VCR 2.9.2
|
@@ -27,17 +27,17 @@ http_interactions:
|
|
27
27
|
Server:
|
28
28
|
- ngx_openresty/1.2.8.6
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 05 Aug 2014 03:32:27 GMT
|
31
31
|
Content-Type:
|
32
32
|
- text/html; charset=UTF-8
|
33
|
-
|
34
|
-
-
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
35
|
Connection:
|
36
36
|
- keep-alive
|
37
37
|
body:
|
38
38
|
encoding: UTF-8
|
39
39
|
string: "{\n\t\"status\": \"complete\",\n\t\"message\": \"subject id image123abc
|
40
|
-
has been successfully removed
|
40
|
+
has been successfully removed\"\n}"
|
41
41
|
http_version:
|
42
|
-
recorded_at:
|
42
|
+
recorded_at: Tue, 05 Aug 2014 03:32:25 GMT
|
43
43
|
recorded_with: VCR 2.9.2
|
@@ -27,17 +27,17 @@ http_interactions:
|
|
27
27
|
Server:
|
28
28
|
- ngx_openresty/1.2.8.6
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 05 Aug 2014 03:31:49 GMT
|
31
31
|
Content-Type:
|
32
32
|
- text/html; charset=UTF-8
|
33
|
-
|
34
|
-
-
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
35
|
Connection:
|
36
36
|
- keep-alive
|
37
37
|
body:
|
38
38
|
encoding: UTF-8
|
39
39
|
string: "{\n\t\"status\": \"complete\",\n\t\"message\": \"subject id abcdefghi
|
40
|
-
has been successfully removed
|
40
|
+
has been successfully removed\"\n}"
|
41
41
|
http_version:
|
42
|
-
recorded_at:
|
42
|
+
recorded_at: Tue, 05 Aug 2014 03:31:48 GMT
|
43
43
|
recorded_with: VCR 2.9.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kairos-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Kany
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|