google_perspective 0.1.3 → 0.1.5

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
- SHA1:
3
- metadata.gz: fc95fc60e4369cd9ab8d5d810c9ee61be8612e73
4
- data.tar.gz: b2bf539a2ded94d5de1e61c4fcb2b2ae4c686b7a
2
+ SHA256:
3
+ metadata.gz: 8dddb4ca049dc2b1eff7fa6ac1be0acc2669c79dc20fb17de7f6870dfedbfdd5
4
+ data.tar.gz: 59db221ed92608a47be7ef96e2bbdfdee9510b6d0c2a6c4df58fc2776fdddcbc
5
5
  SHA512:
6
- metadata.gz: ae43aee0059c62ea2d28d978fc4a7d2437f801162ef1a83697cd5afbd6675f53b1c3d7d1a4e6ed27a51fb5257a43cdb219f3208aeb0d1fc1c1dbcde0fff04874
7
- data.tar.gz: 30447d1ecae9233765ecba4e90f8771f7980aa8428c088903a98fb1cec20f012df4345f3ca914fa827db38c623fec9614505de00e60efc9882d00fee23b1b56a
6
+ metadata.gz: 47e50444916e2f3caf4fb8fca3fef3873b329d80aef23756c5fea5ded7be7ae497a9706ba8dc4a47a5049a69a90db2056fece518bae1e065435f91d601529e22
7
+ data.tar.gz: 03763fa6d63031b15039289a2138e6a2c53f18ab16223e37b3576bee1c962c57b50c4ad84d4ea4ae1703c2585f7742edc28a412b5d7f69efea9d2dda2b28fd6e
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
13
  .idea/
14
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_perspective (0.1.0)
4
+ google_perspective (0.1.5)
5
5
  http
6
6
 
7
7
  GEM
@@ -50,4 +50,4 @@ DEPENDENCIES
50
50
  rspec (~> 3.0)
51
51
 
52
52
  BUNDLED WITH
53
- 2.0.1
53
+ 2.4.4
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module GooglePerspective
4
2
  class CommentAnalyzer
5
3
  attr_accessor :text, :client, :score
@@ -11,11 +9,15 @@ module GooglePerspective
11
9
  end
12
10
 
13
11
  def valid?
14
- result_scores.min <= score
12
+ result_score <= score
13
+ end
14
+
15
+ def result_score
16
+ result_scores.min
15
17
  end
16
18
 
17
19
  def result_scores
18
- response['attributeScores'].map do |_model, model_score|
20
+ @result_scores ||= response['attributeScores'].map do |_model, model_score|
19
21
  model_score.dig('summaryScore', 'value')
20
22
  end
21
23
  end
@@ -1,3 +1,3 @@
1
1
  module GooglePerspective
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_perspective
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Espinosa
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2023-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -98,7 +98,7 @@ metadata:
98
98
  homepage_uri: https://github.com/rderoldan1/google_perspective
99
99
  source_code_uri: https://github.com/rderoldan1/google_perspective
100
100
  changelog_uri: https://github.com/rderoldan1/google_perspective
101
- post_install_message:
101
+ post_install_message:
102
102
  rdoc_options: []
103
103
  require_paths:
104
104
  - lib
@@ -113,9 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubyforge_project:
117
- rubygems_version: 2.5.2.3
118
- signing_key:
116
+ rubygems_version: 3.1.6
117
+ signing_key:
119
118
  specification_version: 4
120
119
  summary: Use google perspective AI.
121
120
  test_files: []