calmlens 0.29.0 → 0.29.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
  SHA256:
3
- metadata.gz: 61f0a6bf210af7e5d56e44b39c071c7dfa68b8a4cb09d19d18580c5ac635f5d9
4
- data.tar.gz: e98d4a86b0629f3b70756e4c86e0c277b006ffa0b9cbece141e46ba74985aee2
3
+ metadata.gz: 81466445cf5f157173547597320cc503f769fa9f27470f06198d825cc338355b
4
+ data.tar.gz: 2a0d0f467f4e687ff42ec11f63e05b28b5f5f75f556a295c0c58ab3195ac46aa
5
5
  SHA512:
6
- metadata.gz: 82aff40edfac4bb534bee900656516bae15546f9557490cd254274526590bac6bb3f1199dcf77da9cc5c6e4b1023c72913acddf8600eb2517d11bcca23998055
7
- data.tar.gz: c7bb56bfcc861de4a1de35e7a4d2ef85e9f0a4519e43a2e4fd166e2305498478789cf22364fc47bc130d79022137b8babc6e6f7ae70a1226e94612342406edef
6
+ metadata.gz: d58bd48417cb615e6584f18b489760431421cfd43d8e58680adbac4eb50d06d8395af40d10611dfe964f7c854403ccd5f7d5e4935101bc716187bb10f124609e
7
+ data.tar.gz: fe55d7b49ec8762f788a1c3437fc4a0db6e66d59f06f0cb72b047734ea08c990477023d48f013b952cd6f4e21e80753f9fcb0e7aa81c72889baa6d947a7310f7
data/lib/calmlens/text.rb CHANGED
@@ -20,12 +20,14 @@ module CalmLens
20
20
  # @return [Asset] show it to everyone only when `classification.moderation.decision` is
21
21
  # `allowed` or `limited` (reduce the reach of `limited` content).
22
22
  def classify(**options)
23
- call(options, __method__) { nil }
24
- text = options[:text]
25
- raise Internal.invalid('Text to classify must be a non-empty string') unless text.is_a?(String) && !text.strip.empty?
23
+ # Within this call, assets.classify's requests report the text.classify operation.
24
+ call(options, __method__) do
25
+ text = options[:text]
26
+ raise Internal.invalid('Text to classify must be a non-empty string') unless text.is_a?(String) && !text.strip.empty?
26
27
 
27
- @assets.classify(**options.except(:text), name: options.fetch(:name, 'text'),
28
- content: { plain_text: text, type: 'text/plain' })
28
+ @assets.classify(**options.except(:text), name: options.fetch(:name, 'text'),
29
+ content: { plain_text: text, type: 'text/plain' })
30
+ end
29
31
  end
30
32
  end
31
33
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module CalmLens
4
4
  # The gem version. The gemspec and the User-Agent header read it from here.
5
- VERSION = '0.29.0'
5
+ VERSION = '0.29.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calmlens
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.0
4
+ version: 0.29.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - CalmLens