plagiarism-checker 3.1.2 → 3.2.0

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: e947c529be01e971d5887175ba1dcf763a48de09c9ab732759d555c2311b07d5
4
- data.tar.gz: ec0ef3fe06953dc9e2e213fd9c26434833c006b6facd49fa94edeec63d88962f
3
+ metadata.gz: 656faf7755f82079293190fdf4fa9cbcbbc2c463e97e4c932d2f81f2629e2b1e
4
+ data.tar.gz: e615b998dd2308698c970109dd9e1f9535f563280edf413f7bf3d6d03f5324fa
5
5
  SHA512:
6
- metadata.gz: de8559653ead6ea1ea1160f29dd5ba10426a7d4fb16729c170bd32157e78ec8168f1711b93e94a910c52a41b5bf9eba1f95d905a3b762efcb9806f0db7bce3bb
7
- data.tar.gz: 20fefac0dd0751da77c1e9568f4ee6458f1caabc3a8b974b3e8918c9940e698107347669a20a518e2f1ee31944f3b6499e5043b3897caf1c2889e679c9817b1c
6
+ metadata.gz: 24e07928948af2e76cad6265d6179c28009f50a24d064d9ee9b3e86d61652d4beb5c6b2be87e084c1cdcd8f47f9eb8f4e8e25d6c89ce58711013fbb9d6881556
7
+ data.tar.gz: c02fd1978bf35209158633a3437f38a770a7a67e342629508eb8d7d19204b831c38adcbd6460604a9e2895ab119997a4a62621df7e93e336181a7f83d1475646
@@ -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
@@ -0,0 +1,44 @@
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 SubmissionCrossLanguages
26
+ # @param [Language[]] languages - Languages to scan your content against.
27
+ def initialize(languages = nil)
28
+ if !languages.nil? && !(languages.is_a?(Array) && languages.all? { |element| element.is_a?(SubmissionLanguage) })
29
+ raise 'Copyleaks::SubmissionCrossLanguages - languages - languages must be of type SubmissionLanguage[]'
30
+ end
31
+ @languages = languages
32
+ end
33
+
34
+ def as_json(*_args)
35
+ {
36
+ languages: @languages,
37
+ }.select { |_k, v| !v.nil? }
38
+ end
39
+
40
+ def to_json(*options)
41
+ as_json(*options).to_json(*options)
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
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 SubmissionCustomMetadata
26
+ # @param [String] key.
27
+ # @param [String] value.
28
+ def initialize(key, value)
29
+ @key = key
30
+ @value = value
31
+ end
32
+
33
+ def as_json(*_args)
34
+ {
35
+ key: @key,
36
+ value: @value
37
+ }.select { |_k, v| !v.nil? }
38
+ end
39
+
40
+ def to_json(*options)
41
+ as_json(*options).to_json(*options)
42
+ end
43
+ end
44
+ end
@@ -28,18 +28,41 @@ module Copyleaks
28
28
  # @param [Boolean] tableOfContents Exclude table of contents from the scan.
29
29
  # @param [Boolean] titles Exclude titles from the scan.
30
30
  # @param [Boolean] htmlTemplate When the scanned document is an HTML document, exclude irrelevant text that appears across the site like the website footer or header.
31
+ # @param [Boolean] citations - Exclude citations from the scan.
32
+ # @param [String[]] documentTemplateIds - Exclude text based on text found within other documents.
33
+ # @param [SubmissionExcludeCode] code - Exclude sections of source code
34
+
31
35
  def initialize(
32
36
  quotes = false,
33
37
  references = false,
34
38
  tableOfContents = false,
35
39
  titles = false,
36
- htmlTemplate = false
40
+ htmlTemplate = false,
41
+ citations = nil,
42
+ documentTemplateIds = nil,
43
+ code = nil
37
44
  )
45
+ if !citations.nil? && ![true, false].include?(citations)
46
+ raise 'Copyleaks::SubmissionExclude - citations - citations must be of type Boolean'
47
+ end
48
+
49
+ if !documentTemplateIds.nil? && !(documentTemplateIds.is_a?(Array) && documentTemplateIds.all? { |element| element.is_a?(String) })
50
+ raise 'Copyleaks::SubmissionExclude - documentTemplateIds - documentTemplateIds must be of type String[]'
51
+ end
52
+
53
+ if !code.nil? && !code.instance_of?(SubmissionExcludeCode)
54
+ raise 'Copyleaks::SubmissionExclude - code - code must be of type SubmissionExcludeCode'
55
+ end
56
+
38
57
  @quotes = quotes
39
58
  @references = references
40
59
  @tableOfContents = tableOfContents
41
60
  @titles = titles
42
61
  @htmlTemplate = htmlTemplate
62
+ @citations = citations
63
+ @documentTemplateIds = documentTemplateIds
64
+ @code = code
65
+
43
66
  end
44
67
 
45
68
  def as_json(*_args)
@@ -48,7 +71,10 @@ module Copyleaks
48
71
  references: @references,
49
72
  tableOfContents: @tableOfContents,
50
73
  titles: @titles,
51
- htmlTemplate: @htmlTemplate
74
+ htmlTemplate: @htmlTemplate,
75
+ citations: @citations,
76
+ documentTemplateIds: @documentTemplateIds,
77
+ code: @code
52
78
  }.select { |_k, v| !v.nil? }
53
79
  end
54
80
 
@@ -0,0 +1,44 @@
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 SubmissionExcludeCode
26
+ # @param [Boolean] Exclude comments from the scan.
27
+
28
+ def initialize(
29
+ comments = false
30
+ )
31
+ @comments = comments
32
+ end
33
+
34
+ def as_json(*_args)
35
+ {
36
+ comments: @comments,
37
+ }.select { |_k, v| !v.nil? }
38
+ end
39
+
40
+ def to_json(*options)
41
+ as_json(*options).to_json(*options)
42
+ end
43
+ end
44
+ end
@@ -23,16 +23,24 @@
23
23
  # =
24
24
 
25
25
  require_relative 'submission_properties.rb'
26
-
27
26
  require_relative 'actions.rb'
27
+ require_relative 'ai_generated_text.rb'
28
28
  require_relative 'author.rb'
29
29
  require_relative 'copyleaks_db.rb'
30
+ require_relative 'cross_languages.rb'
31
+ require_relative 'custom_metadata.rb'
30
32
  require_relative 'domains_mode.rb'
33
+ require_relative 'exclude_code.rb'
31
34
  require_relative 'exclude.rb'
32
35
  require_relative 'filter.rb'
36
+ require_relative 'indexing_repository.rb'
33
37
  require_relative 'scan_method_algorithm.rb'
34
38
  require_relative 'indexing.rb'
39
+ require_relative 'language.rb'
40
+ require_relative 'masking_policy.rb'
41
+ require_relative 'pdf_colors.rb'
35
42
  require_relative 'pdf_properties.rb'
43
+ require_relative 'pdf_version.rb'
36
44
  require_relative 'repository.rb'
37
45
  require_relative 'scanning.rb'
38
46
  require_relative 'scanning_exclude.rb'
@@ -41,5 +49,7 @@ require_relative 'sensitive_data_protection.rb'
41
49
  require_relative 'submission_properties.rb'
42
50
  require_relative 'webhooks.rb'
43
51
 
52
+
53
+
44
54
  module Copyleaks
45
55
  end
@@ -23,7 +23,7 @@
23
23
  # =
24
24
  module Copyleaks
25
25
  class SubmissionIndexing
26
- # @param [SubmissionRepository[]] repositories - Check inner properties of SubmissionRepository for more details.
26
+ # @param [SubmissionIndexingRepository[]] repositories - Check inner properties of SubmissionRepository for more details.
27
27
  def initialize(repositories)
28
28
  @repositories = repositories
29
29
  end
@@ -0,0 +1,47 @@
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 SubmissionIndexingRepository < SubmissionRepository
26
+ # @param [String] ID of a repository to add the scanned document to.
27
+ # @param [SubmissionMaskingPolicy] maskingPolicy specify the document maskig ploicy.
28
+ def initialize(id, maskingPolicy = nil)
29
+ super(id)
30
+ if !maskingPolicy.nil? && ![0, 1, 2].include?(maskingPolicy)
31
+ raise 'Copyleaks::SubmissionIndexingRepository - maskingPolicy - maskingPolicy must be of type SubmissionMaskingPolicy'
32
+ end
33
+ @maskingPolicy = maskingPolicy
34
+ end
35
+
36
+ def as_json(*_args)
37
+ {
38
+ id: @id,
39
+ maskingPolicy: @maskingPolicy,
40
+ }.select { |_k, v| !v.nil? }
41
+ end
42
+
43
+ def to_json(*options)
44
+ as_json(*options).to_json(*options)
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,41 @@
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 SubmissionLanguage
26
+ # @param [String] code - Language code for cross language plagiarism detection.
27
+ def initialize(code)
28
+ @code = code
29
+ end
30
+
31
+ def as_json(*_args)
32
+ {
33
+ code: @code,
34
+ }.select { |_k, v| !v.nil? }
35
+ end
36
+
37
+ def to_json(*options)
38
+ as_json(*options).to_json(*options)
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,34 @@
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 SubmissionMaskingPolicy
26
+
27
+ NO_MASK = 0
28
+
29
+ MASK_OTHER_USERS_FILES = 1
30
+
31
+ MASK_ALL_FILES = 2
32
+
33
+ end
34
+ end
@@ -0,0 +1,60 @@
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 SubmissionPdfColors
26
+ # @param [String] mainStrip - The color of the main strip in the header.
27
+ # @param [String] title - The color for titles in copyleaks result report.
28
+ # @param [String] identical - The highlight color for identical matches.
29
+ # @param [String] minorChanges - The highlight color for minor changes matches.
30
+ # @param [String] relatedMeaning - The highlight color for related meaning matches.
31
+
32
+ def initialize(
33
+ mainStrip = nil,
34
+ title = nil,
35
+ identical = nil,
36
+ minorChanges = nil,
37
+ relatedMeaning = nil
38
+ )
39
+ @mainStrip = mainStrip
40
+ @title = title
41
+ @identical = identical
42
+ @minorChanges = minorChanges
43
+ @relatedMeaning = relatedMeaning
44
+ end
45
+
46
+ def as_json(*_args)
47
+ {
48
+ mainStrip: @mainStrip,
49
+ title: @title,
50
+ identical: @identical,
51
+ minorChanges: @minorChanges,
52
+ relatedMeaning: @relatedMeaning
53
+ }.select { |_k, v| !v.nil? }
54
+ end
55
+
56
+ def to_json(*options)
57
+ as_json(*options).to_json(*options)
58
+ end
59
+ end
60
+ end
@@ -27,16 +27,28 @@ module Copyleaks
27
27
  # @param [String] title Customize the title for the PDF report.
28
28
  # @param [String] largeLogo Customize the logo image in the PDF report.
29
29
  # @param [Boolean] rtl When set to true the text in the report will be aligned from right to left.
30
+ # @param [SubmissionPdfVersion] verion - PDF version to generate.
31
+ # @param [SubmissionPdfColors] colors - Customizable colors.
32
+
30
33
  def initialize(
31
34
  create,
32
35
  title,
33
36
  largeLogo,
34
- rtl
37
+ rtl,
38
+ version = nil,
39
+ colors = nil
35
40
  )
41
+
42
+ if !colors.nil? && !colors.instance_of?(SubmissionPdfColors)
43
+ raise 'Copyleaks::SubmissionPDF - colors - colors must be of type SubmissionPdfColors'
44
+ end
45
+
36
46
  @create = create
37
47
  @title = title
38
48
  @largeLogo = largeLogo
39
49
  @rtl = rtl
50
+ @version = version
51
+ @colors = colors
40
52
  end
41
53
 
42
54
  def as_json(*_args)
@@ -44,7 +56,9 @@ module Copyleaks
44
56
  create: @create,
45
57
  title: @title,
46
58
  largeLogo: @largeLogo,
47
- rtl: @rtl
59
+ rtl: @rtl,
60
+ version: @version,
61
+ colors: @colors
48
62
  }.select { |_k, v| !v.nil? }
49
63
  end
50
64
 
@@ -0,0 +1,32 @@
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 SubmissionPdfVersion
26
+
27
+ V1 = 1
28
+
29
+ V2 = 2
30
+
31
+ end
32
+ end
@@ -27,16 +27,19 @@ module Copyleaks
27
27
  # @param [SubmissionScanningExclude] exclude Check inner properties of SubmissionScanningExclude for more details.
28
28
  # @param [SubmissionScanningRepository[]] repositories - Check inner properties of SubmissionScanningRepository for more details.
29
29
  # @param [SubmissionScanningCopyleaksDB] copyleaksDb Check inner properties for more details.
30
+ # @param [SubmissionCrossLanguages] crossLanguages
30
31
  def initialize(
31
32
  internet = false,
32
33
  exclude = nil,
33
34
  repositories = nil,
34
- copyleaksDb = nil
35
+ copyleaksDb = nil,
36
+ crossLanguages = nil
35
37
  )
36
38
  @internet = internet
37
39
  @exclude = exclude
38
40
  @repositories = repositories
39
41
  @copyleaksDb = copyleaksDb
42
+ @crossLanguages = crossLanguages
40
43
  end
41
44
 
42
45
  def as_json(*_args)
@@ -44,7 +47,8 @@ module Copyleaks
44
47
  internet: @internet,
45
48
  exclude: @exclude,
46
49
  repositories: @repositories,
47
- copyleaksDb: @copyleaksDb
50
+ copyleaksDb: @copyleaksDb,
51
+ crossLanguages: @crossLanguages
48
52
  }.select { |_k, v| !v.nil? }
49
53
  end
50
54
 
@@ -34,6 +34,7 @@ module Copyleaks
34
34
 
35
35
  def as_json(*_args)
36
36
  {
37
+ id: @id,
37
38
  includeMySubmissions: @includeMySubmissions,
38
39
  includeOthersSubmissions: @includeOthersSubmissions
39
40
  }.select { |_k, v| !v.nil? }
@@ -24,7 +24,8 @@
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, :scanMethodAlgorithm
27
+ :action, :author, :filters, :scanning, :indexing, :exclude, :pdf, :sensitiveDataProtection, :scanMethodAlgorithm,
28
+ :aiGeneratedText, :customMetadata
28
29
 
29
30
  # @param [SubmissionWebhooks] webhooks - Check inner properties for more details.
30
31
  # @param [Boolean] includeHtml - By default, Copyleaks will present the report in text format. If set to true, Copyleaks will also include html format.
@@ -42,10 +43,13 @@ module Copyleaks
42
43
  # @param [SubmissionPDF] pdf - Check inner properties for more details.
43
44
  # @param [SubmissionSensitiveData] sensitiveDataProtection - Check inner properties for more details.
44
45
  # @param [SubmissionScanMethodAlgorithm] scanMethodAlgorithm - Check inner properties for more details.
46
+ # @param [SubmissionAiGeneratedText] aiGeneratedText - Check inner properties for more details.
47
+ # @param [SubmissionCustomMetadata] customMetadata - Add custom properties that will be attached to your document in a Copyleaks repository.
45
48
  def initialize(
46
49
  webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil,
47
50
  sensitivityLevel = nil, cheatDetection = nil, action = nil, author = nil, filters = nil,
48
- scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil
51
+ scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil,
52
+ scanMethodAlgorithm = nil, aiGeneratedText = nil, customMetadata = nil
49
53
  )
50
54
  unless webhooks.instance_of?(SubmissionWebhooks)
51
55
  raise 'Copyleaks::SubmissionProperties - webhooks - webhooks must be of type SubmissionWebhooks'
@@ -93,7 +97,13 @@ module Copyleaks
93
97
  raise 'Copyleaks::SubmissionProperties - sensitiveDataProtection - sensitiveDataProtection must be of type SubmissionSensitiveData'
94
98
  end
95
99
  if !scanMethodAlgorithm.nil? && ![0, 1].include?(scanMethodAlgorithm)
96
- raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - action must be of type SubmissionScanMethodAlgorithm consts'
100
+ raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - scanMethodAlgorithm must be of type SubmissionScanMethodAlgorithm'
101
+ end
102
+ if !aiGeneratedText.nil? && !aiGeneratedText.instance_of?(SubmissionAiGeneratedText)
103
+ raise 'Copyleaks::SubmissionProperties - aiGeneratedText - aiGeneratedText must be of type SubmissionAiGeneratedText'
104
+ end
105
+ if !customMetadata.nil? && !(customMetadata.is_a?(Array) && customMetadata.all? { |element| element.is_a?(SubmissionCustomMetadata) })
106
+ raise 'Copyleaks::SubmissionProperties - customMetadata - customMetadata must be of type SubmissionCustomMetadata[]'
97
107
  end
98
108
 
99
109
  @webhooks = webhooks
@@ -103,6 +113,7 @@ module Copyleaks
103
113
  @expiration = expiration
104
114
  @sensitivityLevel = sensitivityLevel
105
115
  @cheatDetection = cheatDetection
116
+ @aiGeneratedText = aiGeneratedText
106
117
  @action = action
107
118
  @author = author
108
119
  @filters = filters
@@ -112,6 +123,7 @@ module Copyleaks
112
123
  @pdf = pdf
113
124
  @sensitiveDataProtection = sensitiveDataProtection
114
125
  @scanMethodAlgorithm = scanMethodAlgorithm
126
+ @customMetadata = customMetadata
115
127
  end
116
128
 
117
129
  def as_json(*_args)
@@ -123,6 +135,7 @@ module Copyleaks
123
135
  expiration: @expiration,
124
136
  sensitivityLevel: @sensitivityLevel,
125
137
  cheatDetection: @cheatDetection,
138
+ aiGeneratedText: @aiGeneratedText,
126
139
  action: @action,
127
140
  author: @author,
128
141
  filters: @filters,
@@ -131,7 +144,8 @@ module Copyleaks
131
144
  exclude: @exclude,
132
145
  pdf: @pdf,
133
146
  sensitiveDataProtection: @sensitiveDataProtection,
134
- scanMethodAlgorithm: @scanMethodAlgorithm
147
+ scanMethodAlgorithm: @scanMethodAlgorithm,
148
+ customMetadata: @customMetadata
135
149
  }.select { |_k, v| !v.nil? }
136
150
  end
137
151
 
@@ -1,3 +1,3 @@
1
1
  module Copyleaks
2
- VERSION = '3.1.2'
2
+ VERSION = '3.2.0'
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.2.0
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-06-08 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,14 +51,23 @@ 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
57
+ - lib/copyleaks/models/submissions/properties/cross_languages.rb
58
+ - lib/copyleaks/models/submissions/properties/custom_metadata.rb
56
59
  - lib/copyleaks/models/submissions/properties/domains_mode.rb
57
60
  - lib/copyleaks/models/submissions/properties/exclude.rb
61
+ - lib/copyleaks/models/submissions/properties/exclude_code.rb
58
62
  - lib/copyleaks/models/submissions/properties/filter.rb
59
63
  - lib/copyleaks/models/submissions/properties/index.rb
60
64
  - lib/copyleaks/models/submissions/properties/indexing.rb
65
+ - lib/copyleaks/models/submissions/properties/indexing_repository.rb
66
+ - lib/copyleaks/models/submissions/properties/language.rb
67
+ - lib/copyleaks/models/submissions/properties/masking_policy.rb
68
+ - lib/copyleaks/models/submissions/properties/pdf_colors.rb
61
69
  - lib/copyleaks/models/submissions/properties/pdf_properties.rb
70
+ - lib/copyleaks/models/submissions/properties/pdf_version.rb
62
71
  - lib/copyleaks/models/submissions/properties/repository.rb
63
72
  - lib/copyleaks/models/submissions/properties/scan_method_algorithm.rb
64
73
  - lib/copyleaks/models/submissions/properties/scanning.rb