plagiarism-checker 3.1.3 → 3.2.0

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: 524a7020e06e02585a7cb3ce7b045283b71c99420e9af6503c98448c26cfc87a
4
- data.tar.gz: 9afacdb5523ba19853121372f6033106ba9c64ba92d270192797266a7d254f61
3
+ metadata.gz: 656faf7755f82079293190fdf4fa9cbcbbc2c463e97e4c932d2f81f2629e2b1e
4
+ data.tar.gz: e615b998dd2308698c970109dd9e1f9535f563280edf413f7bf3d6d03f5324fa
5
5
  SHA512:
6
- metadata.gz: 58de7422fa492f654a1e3af71869f530c189eb891d3f31cd302bb30d40d3d443f130a4248058031ab5e33b3d79841468023e6f83fb8d38ba2c5324a91c2278be
7
- data.tar.gz: d665f8acc700ee5ca81dd036e6756a0af8fe4a90db5a013a94c865af8b2b97c68b2241ba9b5b26007e8df66e8b7690e73b5a7678ef974b6c9cedb47572af16ed
6
+ metadata.gz: 24e07928948af2e76cad6265d6179c28009f50a24d064d9ee9b3e86d61652d4beb5c6b2be87e084c1cdcd8f47f9eb8f4e8e25d6c89ce58711013fbb9d6881556
7
+ data.tar.gz: c02fd1978bf35209158633a3437f38a770a7a67e342629508eb8d7d19204b831c38adcbd6460604a9e2895ab119997a4a62621df7e93e336181a7f83d1475646
@@ -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,17 +23,24 @@
23
23
  # =
24
24
 
25
25
  require_relative 'submission_properties.rb'
26
-
27
26
  require_relative 'actions.rb'
28
27
  require_relative 'ai_generated_text.rb'
29
28
  require_relative 'author.rb'
30
29
  require_relative 'copyleaks_db.rb'
30
+ require_relative 'cross_languages.rb'
31
+ require_relative 'custom_metadata.rb'
31
32
  require_relative 'domains_mode.rb'
33
+ require_relative 'exclude_code.rb'
32
34
  require_relative 'exclude.rb'
33
35
  require_relative 'filter.rb'
36
+ require_relative 'indexing_repository.rb'
34
37
  require_relative 'scan_method_algorithm.rb'
35
38
  require_relative 'indexing.rb'
39
+ require_relative 'language.rb'
40
+ require_relative 'masking_policy.rb'
41
+ require_relative 'pdf_colors.rb'
36
42
  require_relative 'pdf_properties.rb'
43
+ require_relative 'pdf_version.rb'
37
44
  require_relative 'repository.rb'
38
45
  require_relative 'scanning.rb'
39
46
  require_relative 'scanning_exclude.rb'
@@ -42,5 +49,7 @@ require_relative 'sensitive_data_protection.rb'
42
49
  require_relative 'submission_properties.rb'
43
50
  require_relative 'webhooks.rb'
44
51
 
52
+
53
+
45
54
  module Copyleaks
46
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,11 +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
51
  scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil,
49
- scanMethodAlgorithm = nil, aiGeneratedText = nil
52
+ scanMethodAlgorithm = nil, aiGeneratedText = nil, customMetadata = nil
50
53
  )
51
54
  unless webhooks.instance_of?(SubmissionWebhooks)
52
55
  raise 'Copyleaks::SubmissionProperties - webhooks - webhooks must be of type SubmissionWebhooks'
@@ -99,6 +102,9 @@ module Copyleaks
99
102
  if !aiGeneratedText.nil? && !aiGeneratedText.instance_of?(SubmissionAiGeneratedText)
100
103
  raise 'Copyleaks::SubmissionProperties - aiGeneratedText - aiGeneratedText must be of type SubmissionAiGeneratedText'
101
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[]'
107
+ end
102
108
 
103
109
  @webhooks = webhooks
104
110
  @includeHtml = includeHtml
@@ -117,6 +123,7 @@ module Copyleaks
117
123
  @pdf = pdf
118
124
  @sensitiveDataProtection = sensitiveDataProtection
119
125
  @scanMethodAlgorithm = scanMethodAlgorithm
126
+ @customMetadata = customMetadata
120
127
  end
121
128
 
122
129
  def as_json(*_args)
@@ -137,7 +144,8 @@ module Copyleaks
137
144
  exclude: @exclude,
138
145
  pdf: @pdf,
139
146
  sensitiveDataProtection: @sensitiveDataProtection,
140
- scanMethodAlgorithm: @scanMethodAlgorithm
147
+ scanMethodAlgorithm: @scanMethodAlgorithm,
148
+ customMetadata: @customMetadata
141
149
  }.select { |_k, v| !v.nil? }
142
150
  end
143
151
 
@@ -1,3 +1,3 @@
1
1
  module Copyleaks
2
- VERSION = '3.1.3'
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.3
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: 2023-01-24 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
@@ -54,12 +54,20 @@ files:
54
54
  - lib/copyleaks/models/submissions/properties/ai_generated_text.rb
55
55
  - lib/copyleaks/models/submissions/properties/author.rb
56
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
57
59
  - lib/copyleaks/models/submissions/properties/domains_mode.rb
58
60
  - lib/copyleaks/models/submissions/properties/exclude.rb
61
+ - lib/copyleaks/models/submissions/properties/exclude_code.rb
59
62
  - lib/copyleaks/models/submissions/properties/filter.rb
60
63
  - lib/copyleaks/models/submissions/properties/index.rb
61
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
62
69
  - lib/copyleaks/models/submissions/properties/pdf_properties.rb
70
+ - lib/copyleaks/models/submissions/properties/pdf_version.rb
63
71
  - lib/copyleaks/models/submissions/properties/repository.rb
64
72
  - lib/copyleaks/models/submissions/properties/scan_method_algorithm.rb
65
73
  - lib/copyleaks/models/submissions/properties/scanning.rb