sightengine 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: 828d67cc2cf495058fcda68d876bcdaf24bc2880
4
- data.tar.gz: 4f8434aa1b2402154e88a9672c237ad874f9ac46
3
+ metadata.gz: 6c53057f6fb51ac5aaa544bd29a7fdc31f936915
4
+ data.tar.gz: b8317c5c75c48202bbe0ed109a87861cd2754200
5
5
  SHA512:
6
- metadata.gz: 4ef556ebf8ec0c00cf65f1ad3b384bf34cc2cb48bdfd8c9c4843c30648afbb624e4a40ff49e914f49acde46ad064dd104ac404ca6358db112a1a863ddd266cbe
7
- data.tar.gz: d8bee6aad4af2e5d97077f45421ee212281aba58b0e114bb7c71c390cd180572d9b537684d4da878f688c1b3978531208b240f40fd9731cc5b7416b1466ab8ad
6
+ metadata.gz: 29dd79b8fc3c6e7306d2d699fdc428d007b7f1962549a07812738f7250d353670793764bda2c221affb0e990042f49604e4fa2acdcaf38648896884af38adf10
7
+ data.tar.gz: 64b29eb8f13243b5bc757adc16cdc8c22d388f781fd3bcdc096456ca60200066bcdfe34dd4504aeb3eff59e364f0b9f12c3e7ebd306afa12bfa6a3f4366de27e
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Sightengine
2
2
 
3
+ ![](https://travis-ci.org/leoht/sightengine.svg?branch=master)
4
+
3
5
  Unofficial wrapper for the [Sightengine](https://sightengine.com/) API
4
6
  which provides image moderation including nudity detection, scammer detection,
5
7
  face attributes, and more.
@@ -51,8 +53,8 @@ response.safe? # true
51
53
  ```ruby
52
54
  response = client.face_attributes("https://sightengine.com/assets/img/examples/example7.jpg")
53
55
 
54
- response.faces.length # 1
55
- face = response.faces.first
56
+ response.get_faces.length # 1
57
+ face = response.get_faces.first
56
58
 
57
59
  face.female? # true
58
60
  face.male? # true
@@ -77,6 +79,16 @@ response.celebrity? # true
77
79
  response.celebrities # [{"name"=>"Daniel Craig", "prob"=>0.99}, {"name"=>"Graham Fellows", "prob"=>0.08}, ...]
78
80
  ```
79
81
 
82
+ ### Weapons, alcohol and drugs (WAD)
83
+
84
+ ```ruby
85
+ response = client.wad("https://sightengine.com/assets/img/examples/example2.jpg")
86
+
87
+ response.weapon?
88
+ response.drugs?
89
+ response.alcohol?
90
+ ```
91
+
80
92
  ### Multi-models check
81
93
 
82
94
  ```ruby
@@ -8,7 +8,7 @@ module Sightengine
8
8
  end
9
9
  end
10
10
 
11
- def faces
11
+ def get_faces
12
12
  (self.instance_variable_get("@faces") || []).map do |face|
13
13
  Sightengine::Api::FaceAttributes::Face.new(face)
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Sightengine
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sightengine
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
  - Léonard Hetsch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-06 00:00:00.000000000 Z
11
+ date: 2017-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.2.5
152
+ rubygems_version: 2.6.12
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Ruby wrapper for the Sightengine image moderation API