plagiarism-checker 3.1.2 → 3.1.3

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
  SHA256:
3
- metadata.gz: e947c529be01e971d5887175ba1dcf763a48de09c9ab732759d555c2311b07d5
4
- data.tar.gz: ec0ef3fe06953dc9e2e213fd9c26434833c006b6facd49fa94edeec63d88962f
3
+ metadata.gz: 524a7020e06e02585a7cb3ce7b045283b71c99420e9af6503c98448c26cfc87a
4
+ data.tar.gz: 9afacdb5523ba19853121372f6033106ba9c64ba92d270192797266a7d254f61
5
5
  SHA512:
6
- metadata.gz: de8559653ead6ea1ea1160f29dd5ba10426a7d4fb16729c170bd32157e78ec8168f1711b93e94a910c52a41b5bf9eba1f95d905a3b762efcb9806f0db7bce3bb
7
- data.tar.gz: 20fefac0dd0751da77c1e9568f4ee6458f1caabc3a8b974b3e8918c9940e698107347669a20a518e2f1ee31944f3b6499e5043b3897caf1c2889e679c9817b1c
6
+ metadata.gz: 58de7422fa492f654a1e3af71869f530c189eb891d3f31cd302bb30d40d3d443f130a4248058031ab5e33b3d79841468023e6f83fb8d38ba2c5324a91c2278be
7
+ data.tar.gz: d665f8acc700ee5ca81dd036e6756a0af8fe4a90db5a013a94c865af8b2b97c68b2241ba9b5b26007e8df66e8b7690e73b5a7678ef974b6c9cedb47572af16ed
@@ -0,0 +1,43 @@
1
+ #
2
+ # The MIT License(MIT)
3
+ #
4
+ # Copyright(c) 2023 Copyleaks LTD (https://copyleaks.com)
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # =
24
+ module Copyleaks
25
+ class SubmissionAiGeneratedText
26
+ # @param [Boolean] detect Detects whether the text was written by an AI.
27
+ def initialize(
28
+ detect = false
29
+ )
30
+ @detect = detect
31
+ end
32
+
33
+ def as_json(*_args)
34
+ {
35
+ detect: @detect
36
+ }.select { |_k, v| !v.nil? }
37
+ end
38
+
39
+ def to_json(*options)
40
+ as_json(*options).to_json(*options)
41
+ end
42
+ end
43
+ end
@@ -25,6 +25,7 @@
25
25
  require_relative 'submission_properties.rb'
26
26
 
27
27
  require_relative 'actions.rb'
28
+ require_relative 'ai_generated_text.rb'
28
29
  require_relative 'author.rb'
29
30
  require_relative 'copyleaks_db.rb'
30
31
  require_relative 'domains_mode.rb'
@@ -45,7 +45,8 @@ module Copyleaks
45
45
  def initialize(
46
46
  webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil,
47
47
  sensitivityLevel = nil, cheatDetection = nil, action = nil, author = nil, filters = nil,
48
- scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil
48
+ scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil,
49
+ scanMethodAlgorithm = nil, aiGeneratedText = nil
49
50
  )
50
51
  unless webhooks.instance_of?(SubmissionWebhooks)
51
52
  raise 'Copyleaks::SubmissionProperties - webhooks - webhooks must be of type SubmissionWebhooks'
@@ -93,7 +94,10 @@ module Copyleaks
93
94
  raise 'Copyleaks::SubmissionProperties - sensitiveDataProtection - sensitiveDataProtection must be of type SubmissionSensitiveData'
94
95
  end
95
96
  if !scanMethodAlgorithm.nil? && ![0, 1].include?(scanMethodAlgorithm)
96
- raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - action must be of type SubmissionScanMethodAlgorithm consts'
97
+ raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - scanMethodAlgorithm must be of type SubmissionScanMethodAlgorithm'
98
+ end
99
+ if !aiGeneratedText.nil? && !aiGeneratedText.instance_of?(SubmissionAiGeneratedText)
100
+ raise 'Copyleaks::SubmissionProperties - aiGeneratedText - aiGeneratedText must be of type SubmissionAiGeneratedText'
97
101
  end
98
102
 
99
103
  @webhooks = webhooks
@@ -103,6 +107,7 @@ module Copyleaks
103
107
  @expiration = expiration
104
108
  @sensitivityLevel = sensitivityLevel
105
109
  @cheatDetection = cheatDetection
110
+ @aiGeneratedText = aiGeneratedText
106
111
  @action = action
107
112
  @author = author
108
113
  @filters = filters
@@ -123,6 +128,7 @@ module Copyleaks
123
128
  expiration: @expiration,
124
129
  sensitivityLevel: @sensitivityLevel,
125
130
  cheatDetection: @cheatDetection,
131
+ aiGeneratedText: @aiGeneratedText,
126
132
  action: @action,
127
133
  author: @author,
128
134
  filters: @filters,
@@ -1,3 +1,3 @@
1
1
  module Copyleaks
2
- VERSION = '3.1.2'
2
+ VERSION = '3.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plagiarism-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Copyleaks ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-29 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Copyleaks detects plagiarism and checks content distribution online.
14
14
  Use Copyleaks to find out if textual content is original and if it has been used
@@ -51,6 +51,7 @@ files:
51
51
  - lib/copyleaks/models/submissions/file_submission_model.rb
52
52
  - lib/copyleaks/models/submissions/index.rb
53
53
  - lib/copyleaks/models/submissions/properties/actions.rb
54
+ - lib/copyleaks/models/submissions/properties/ai_generated_text.rb
54
55
  - lib/copyleaks/models/submissions/properties/author.rb
55
56
  - lib/copyleaks/models/submissions/properties/copyleaks_db.rb
56
57
  - lib/copyleaks/models/submissions/properties/domains_mode.rb