plagiarism-checker 3.1.0 → 3.1.1

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: e35843d2ef1d9d926ebcb7a799689e567dc91662cbbbe7a996345f342f9f4694
4
- data.tar.gz: b65e0d03a2c7c930a3fd26d11f50e834d6856b42062013e0a2882cc04162fb0f
3
+ metadata.gz: daf1bb5b06a87dabf0c3d99f66e95b59f622ae62da8ad1b23c3f86bee1294b28
4
+ data.tar.gz: edb0ffa236e2dd08e313d1fd0287c06820184932a9856b5bf11beccf8496188e
5
5
  SHA512:
6
- metadata.gz: e977e23ca5fc86194031ce6dcaf4bcf5007a6421f234615875c552fd71556fb2889f11543802a050f2566fdcfe6ce29a6229150adc4ac1d135b2fdf499a320c1
7
- data.tar.gz: b0886f96f27a487cccf67886e7bbcb4761134eb700c2811f245b461073b026fdd065a5e45a8ba8265a8a73ccf6d33af8ce23da20f2e2a2376b547db1aae01648
6
+ metadata.gz: dad101affa1aede0700fedd94b14206bbde93627d9de8e3070101a9390c198e035729909f3e458c63080f262b8836bcce3bcf98b1202e9bc8cc8a977f69e2e72
7
+ data.tar.gz: 0e6e41a65a7c5a7caf680d23c4f098bcd02b9f0ebc7478258b3bc11377d31bb9424c9d078827cd8cfb1c099e0a259b058ad7dcc79067abf435659275f22da2ae
@@ -21,12 +21,11 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
  # =
24
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
25
24
 
26
- require 'auth_exipred_exception'
27
- require 'command_exception'
28
- require 'rate_limit_exception'
29
- require 'under_maintenance_exception'
25
+ require_relative 'auth_exipred_exception.rb'
26
+ require_relative 'command_exception.rb'
27
+ require_relative 'rate_limit_exception.rb'
28
+ require_relative 'under_maintenance_exception.rb'
30
29
 
31
30
  module Copyleaks
32
31
  end
@@ -21,12 +21,11 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
  # =
24
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
25
24
 
26
- require 'export_model'
27
- require 'export_crawled_version'
28
- require 'export_pdf_report'
29
- require 'export_results'
25
+ require_relative 'export_model.rb'
26
+ require_relative 'export_crawled_version.rb'
27
+ require_relative 'export_pdf_report.rb'
28
+ require_relative 'export_results.rb'
30
29
 
31
30
  module Copyleaks
32
31
  end
@@ -21,15 +21,15 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
  # =
24
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
25
- require 'exceptions/index'
26
- require 'exports/index'
27
- require 'submissions/index'
28
- require 'auth_token'
29
24
 
30
- require 'id_object'
31
- require 'delete_request_model'
32
- require 'start_request_model'
25
+ require_relative 'exceptions/index.rb'
26
+ require_relative 'exports/index.rb'
27
+ require_relative 'submissions/index.rb'
28
+ require_relative 'auth_token.rb'
29
+
30
+ require_relative 'id_object.rb'
31
+ require_relative 'delete_request_model.rb'
32
+ require_relative 'start_request_model.rb'
33
33
 
34
34
  module Copyleaks
35
35
  end
@@ -21,13 +21,12 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
  # =
24
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
25
- require 'properties/index'
24
+ require_relative 'properties/index.rb'
26
25
 
27
- require 'submission_model'
28
- require 'file_submission_model'
29
- require 'file_ocr_submission_model'
30
- require 'url_submission_model'
26
+ require_relative 'submission_model.rb'
27
+ require_relative 'file_submission_model.rb'
28
+ require_relative 'file_ocr_submission_model.rb'
29
+ require_relative 'url_submission_model.rb'
31
30
 
32
31
  module Copyleaks
33
32
  end
@@ -21,25 +21,25 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
  # =
24
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
25
24
 
26
- require 'submission_properties'
25
+ require_relative 'submission_properties.rb'
27
26
 
28
- require 'actions'
29
- require 'author'
30
- require 'copyleaks_db'
31
- require 'domains_mode'
32
- require 'exclude'
33
- require 'filter'
34
- require 'indexing'
35
- require 'pdf_properties'
36
- require 'repository'
37
- require 'scanning'
38
- require 'scanning_exclude'
39
- require 'scanning_repository'
40
- require 'sensitive_data_protection'
41
- require 'submission_properties'
42
- require 'webhooks'
27
+ require_relative 'actions.rb'
28
+ require_relative 'author.rb'
29
+ require_relative 'copyleaks_db.rb'
30
+ require_relative 'domains_mode.rb'
31
+ require_relative 'exclude.rb'
32
+ require_relative 'filter.rb'
33
+ require_relative 'scan_method_algorithm.rb'
34
+ require_relative 'indexing.rb'
35
+ require_relative 'pdf_properties.rb'
36
+ require_relative 'repository.rb'
37
+ require_relative 'scanning.rb'
38
+ require_relative 'scanning_exclude.rb'
39
+ require_relative 'scanning_repository.rb'
40
+ require_relative 'sensitive_data_protection.rb'
41
+ require_relative 'submission_properties.rb'
42
+ require_relative 'webhooks.rb'
43
43
 
44
44
  module Copyleaks
45
45
  end
@@ -0,0 +1,31 @@
1
+ #
2
+ # The MIT License(MIT)
3
+ #
4
+ # Copyright(c) 2016 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 SubmissionScanMethodAlgorithm
26
+ # prioritize higher similarity
27
+ MAXIMUM_COVERAGE = 0
28
+ # prioritize finding more sources.
29
+ MAXIMUM_RESULTS = 1
30
+ end
31
+ end
@@ -23,9 +23,9 @@
23
23
  # =
24
24
  module Copyleaks
25
25
  class SubmissionScanningRepository < SubmissionRepository
26
- # @param [String] Id of a repository to add the scanned document to.
27
- # @param [Boolean] includeMySubmissions Compare the scanned document against MY submittions in the repository.
28
- # @param [Boolean] includeOthersSubmissions Compare the scanned document against OTHER users submittions in the repository.
26
+ # @param [String] ID of a repository to add the scanned document to.
27
+ # @param [Boolean] includeMySubmissions Compare the scanned document against MY submissions in the repository.
28
+ # @param [Boolean] includeOthersSubmissions Compare the scanned document against OTHER users submissions in the repository.
29
29
  def initialize(id, includeMySubmissions, includeOthersSubmissions)
30
30
  super(id)
31
31
  @includeMySubmissions = includeMySubmissions
@@ -24,7 +24,7 @@
24
24
  module Copyleaks
25
25
  class SubmissionProperties
26
26
  attr_reader :webhooks, :includeHtml, :developerPayload, :sandbox, :expiration, :sensitivityLevel, :cheatDetection,
27
- :action, :author, :filters, :scanning, :indexing, :exclude, :pdf, :sensitiveDataProtection
27
+ :action, :author, :filters, :scanning, :indexing, :exclude, :pdf, :sensitiveDataProtection, :scanMethodAlgorithm
28
28
 
29
29
  # @param [SubmissionWebhooks] webhooks - Check inner properties for more details.
30
30
  # @param [Boolean] includeHtml - By default, Copyleaks will present the report in text format. If set to true, Copyleaks will also include html format.
@@ -41,10 +41,11 @@ module Copyleaks
41
41
  # @param [SubmissionExclude] exclude - Check inner properties for more details.
42
42
  # @param [SubmissionPDF] pdf - Check inner properties for more details.
43
43
  # @param [SubmissionSensitiveData] sensitiveDataProtection - Check inner properties for more details.
44
+ # @param [SubmissionScanMethodAlgorithm] scanMethodAlgorithm - Check inner properties for more details.
44
45
  def initialize(
45
46
  webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil,
46
47
  sensitivityLevel = nil, cheatDetection = nil, action = nil, author = nil, filters = nil,
47
- scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil
48
+ scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil
48
49
  )
49
50
  unless webhooks.instance_of?(SubmissionWebhooks)
50
51
  raise 'Copyleaks::SubmissionProperties - webhooks - webhooks must be of type SubmissionWebhooks'
@@ -91,6 +92,9 @@ module Copyleaks
91
92
  if !sensitiveDataProtection.nil? && !sensitiveDataProtection.instance_of?(SubmissionSensitiveData)
92
93
  raise 'Copyleaks::SubmissionProperties - sensitiveDataProtection - sensitiveDataProtection must be of type SubmissionSensitiveData'
93
94
  end
95
+ if !scanMethodAlgorithm.nil? && ![0, 1].include?(scanMethodAlgorithm)
96
+ raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - action must be of type SubmissionScanMethodAlgorithm consts'
97
+ end
94
98
 
95
99
  @webhooks = webhooks
96
100
  @includeHtml = includeHtml
@@ -107,6 +111,7 @@ module Copyleaks
107
111
  @exclude = exclude
108
112
  @pdf = pdf
109
113
  @sensitiveDataProtection = sensitiveDataProtection
114
+ @scanMethodAlgorithm = scanMethodAlgorithm
110
115
  end
111
116
 
112
117
  def as_json(*_args)
@@ -125,7 +130,8 @@ module Copyleaks
125
130
  indexing: @indexing,
126
131
  exclude: @exclude,
127
132
  pdf: @pdf,
128
- sensitiveDataProtection: @sensitiveDataProtection
133
+ sensitiveDataProtection: @sensitiveDataProtection,
134
+ scanMethodAlgorithm: @scanMethodAlgorithm
129
135
  }.select { |_k, v| !v.nil? }
130
136
  end
131
137
 
@@ -1,3 +1,3 @@
1
1
  module Copyleaks
2
- VERSION = '3.1.0'
2
+ VERSION = '3.1.1'
3
3
  end
data/lib/copyleaks.rb CHANGED
@@ -22,14 +22,11 @@
22
22
  # SOFTWARE.
23
23
  # =
24
24
 
25
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
26
-
27
- require 'copyleaks/version'
28
-
29
- require 'copyleaks/models/index'
30
- require 'copyleaks/utils/status-code.utils'
31
- require 'copyleaks/app.config'
32
- require 'copyleaks/api'
25
+ require_relative './copyleaks/api.rb'
26
+ require_relative './copyleaks/version.rb'
27
+ require_relative './copyleaks/app.config.rb'
28
+ require_relative './copyleaks/models/index.rb'
29
+ require_relative './copyleaks/utils/status-code.utils.rb'
33
30
 
34
31
  module Copyleaks
35
32
  end
data/lib/index.rb CHANGED
@@ -22,9 +22,7 @@
22
22
  # SOFTWARE.
23
23
  # =
24
24
 
25
- $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
26
-
27
- require 'copyleaks'
25
+ require_relative 'copyleaks.rb'
28
26
 
29
27
  module Copyleaks
30
28
  end
Binary file
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.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Copyleaks ltd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-11-20 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
@@ -58,6 +58,7 @@ files:
58
58
  - lib/copyleaks/models/submissions/properties/indexing.rb
59
59
  - lib/copyleaks/models/submissions/properties/pdf_properties.rb
60
60
  - lib/copyleaks/models/submissions/properties/repository.rb
61
+ - lib/copyleaks/models/submissions/properties/scan_method_algorithm.rb
61
62
  - lib/copyleaks/models/submissions/properties/scanning.rb
62
63
  - lib/copyleaks/models/submissions/properties/scanning_exclude.rb
63
64
  - lib/copyleaks/models/submissions/properties/scanning_repository.rb
@@ -69,6 +70,7 @@ files:
69
70
  - lib/copyleaks/utils/status-code.utils.rb
70
71
  - lib/copyleaks/version.rb
71
72
  - lib/index.rb
73
+ - plagiarism-checker-3.1.0.gem
72
74
  - plagiarism-checker.gemspec
73
75
  homepage: https://api.copyleaks.com
74
76
  licenses: