plagiarism-checker 3.4.0 → 3.5.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/copyleaks/ai_detection_client.rb +98 -98
  3. data/lib/copyleaks/models/submissions/ai_detection/ai_detection_submission_model.rb +50 -50
  4. data/lib/copyleaks/models/submissions/ai_detection/natural_language_submission_model.rb +52 -52
  5. data/lib/copyleaks/models/submissions/ai_detection/source_code_submission_model.rb +55 -55
  6. data/lib/copyleaks/models/submissions/index.rb +1 -0
  7. data/lib/copyleaks/models/submissions/webhooks/CompletedWebhook.rb +46 -0
  8. data/lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb +43 -0
  9. data/lib/copyleaks/models/submissions/webhooks/ErrorWebhook.rb +41 -0
  10. data/lib/copyleaks/models/submissions/webhooks/ExportCompletedWebhook.rb +44 -0
  11. data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Metadata.rb +89 -0
  12. data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/StatusWebhook.rb +41 -0
  13. data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Webhook.rb +43 -0
  14. data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Notifications.rb +43 -0
  15. data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Results.rb +68 -0
  16. data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb +61 -0
  17. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ErrorModels/Error.rb +46 -0
  18. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ExportModels/Task.rb +49 -0
  19. data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultScore.rb +42 -0
  20. data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb +60 -0
  21. data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsRepositories.rb +49 -0
  22. data/lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb +65 -0
  23. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Batch.rb +46 -0
  24. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Database.rb +46 -0
  25. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb +42 -0
  26. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Repositories.rb +57 -0
  27. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/RepositoryMetadata.rb +30 -0
  28. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb +40 -0
  29. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/SharedResultsModel.rb +46 -0
  30. data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Tags.rb +33 -0
  31. data/lib/copyleaks/models/submissions/webhooks/IndexedWebhook.rb +29 -0
  32. data/lib/copyleaks/models/submissions/webhooks/NewResultWebhook.rb +46 -0
  33. data/lib/copyleaks/models/submissions/webhooks/index.rb +34 -0
  34. data/lib/copyleaks/models/submissions/writing_assistant/score_weights.rb +54 -54
  35. data/lib/copyleaks/models/submissions/writing_assistant/writing_assistant_submission_model.rb +56 -56
  36. data/lib/copyleaks/version.rb +1 -1
  37. data/lib/copyleaks/writing_assistant_client.rb +81 -81
  38. metadata +31 -4
  39. data/.vscode/launch.json +0 -35
@@ -1,54 +1,54 @@
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
-
25
- module Copyleaks
26
- class ScoreWeights
27
- # @param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0
28
- # @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0
29
- # @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0
30
- # @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0
31
-
32
- attr_accessor :grammar_score_weight, :mechanics_score_weight, :sentence_structure_score_weight, :word_choice_score_weight
33
-
34
- def initialize(grammar_score_weight, mechanics_score_weight, sentence_structure_score_weight, word_choice_score_weight)
35
- @grammar_score_weight = grammar_score_weight
36
- @mechanics_score_weight = mechanics_score_weight
37
- @sentence_structure_score_weight = sentence_structure_score_weight
38
- @word_choice_score_weight = word_choice_score_weight
39
- end
40
-
41
- def as_json(*_args)
42
- {
43
- grammarScoreWeight: @grammar_score_weight,
44
- mechanicsScoreWeight: @mechanics_score_weight,
45
- sentenceStructureScoreWeight: @sentence_structure_score_weight,
46
- wordChoiceScoreWeight: @word_choice_score_weight
47
- }.reject { |_k, v| v.nil? }
48
- end
49
-
50
- def to_json(*options)
51
- as_json(*options).to_json(*options)
52
- end
53
- end
54
- end
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
+
25
+ module Copyleaks
26
+ class ScoreWeights
27
+ # @param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0
28
+ # @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0
29
+ # @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0
30
+ # @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0
31
+
32
+ attr_accessor :grammar_score_weight, :mechanics_score_weight, :sentence_structure_score_weight, :word_choice_score_weight
33
+
34
+ def initialize(grammar_score_weight, mechanics_score_weight, sentence_structure_score_weight, word_choice_score_weight)
35
+ @grammar_score_weight = grammar_score_weight
36
+ @mechanics_score_weight = mechanics_score_weight
37
+ @sentence_structure_score_weight = sentence_structure_score_weight
38
+ @word_choice_score_weight = word_choice_score_weight
39
+ end
40
+
41
+ def as_json(*_args)
42
+ {
43
+ grammarScoreWeight: @grammar_score_weight,
44
+ mechanicsScoreWeight: @mechanics_score_weight,
45
+ sentenceStructureScoreWeight: @sentence_structure_score_weight,
46
+ wordChoiceScoreWeight: @word_choice_score_weight
47
+ }.reject { |_k, v| v.nil? }
48
+ end
49
+
50
+ def to_json(*options)
51
+ as_json(*options).to_json(*options)
52
+ end
53
+ end
54
+ end
@@ -1,56 +1,56 @@
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
-
25
- module Copyleaks
26
- class WritingAssistantSubmissionModel
27
- attr_accessor :text, :sandbox, :language, :score
28
-
29
- # @param [String] Text to produce Writing Assistant report for. 1 >= characters <= 25000
30
- # @param [Boolean] Use sandbox mode to test your integration with the Copyleaks API without consuming any credits.
31
- # @param [String] language The language code of your content. Optional; if not provided, the system will attempt to auto-detect the language.
32
- # @param [ScoreWeights] an object containing the score weights for different writing aspects (e.g., grammar, mechanics). Optional.
33
- def initialize(text, sandbox = false, language = nil, score = nil)
34
- unless text.instance_of?(String)
35
- raise 'Copyleaks::SourceCodeSubmissionModel - text - text must be of type String'
36
- end
37
- @text = text
38
- @sandbox = sandbox
39
- @language = language
40
- @score = score
41
- end
42
-
43
- def as_json(*_args)
44
- {
45
- text: @text,
46
- sandbox: @sandbox,
47
- language: @language,
48
- score: @score
49
- }.reject { |_k, v| v.nil? }
50
- end
51
-
52
- def to_json(*options)
53
- as_json(*options).to_json(*options)
54
- end
55
- end
56
- end
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
+
25
+ module Copyleaks
26
+ class WritingAssistantSubmissionModel
27
+ attr_accessor :text, :sandbox, :language, :score
28
+
29
+ # @param [String] Text to produce Writing Assistant report for. 1 >= characters <= 25000
30
+ # @param [Boolean] Use sandbox mode to test your integration with the Copyleaks API without consuming any credits.
31
+ # @param [String] language The language code of your content. Optional; if not provided, the system will attempt to auto-detect the language.
32
+ # @param [ScoreWeights] an object containing the score weights for different writing aspects (e.g., grammar, mechanics). Optional.
33
+ def initialize(text, sandbox = false, language = nil, score = nil)
34
+ unless text.instance_of?(String)
35
+ raise 'Copyleaks::SourceCodeSubmissionModel - text - text must be of type String'
36
+ end
37
+ @text = text
38
+ @sandbox = sandbox
39
+ @language = language
40
+ @score = score
41
+ end
42
+
43
+ def as_json(*_args)
44
+ {
45
+ text: @text,
46
+ sandbox: @sandbox,
47
+ language: @language,
48
+ score: @score
49
+ }.reject { |_k, v| v.nil? }
50
+ end
51
+
52
+ def to_json(*options)
53
+ as_json(*options).to_json(*options)
54
+ end
55
+ end
56
+ end
@@ -1,3 +1,3 @@
1
1
  module Copyleaks
2
- VERSION = '3.4.0'
2
+ VERSION = '3.5.0'
3
3
  end
@@ -1,81 +1,81 @@
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
-
25
- module Copyleaks
26
- class WritingAssistantClient
27
- def initialize(api_client)
28
- @api_client = api_client
29
- end
30
-
31
- # Get a list of correction types supported within the Writing Assistant API. Correction types apply to all supported languages. The supplied language code for this request is used to determine the language of the texts returned.
32
- # * Exceptions:
33
- # * * CommandExceptions: Server reject the request. See response status code,
34
- # headers and content for more info.
35
- # * * UnderMaintenanceException: Copyleaks servers are unavailable for maintenance.
36
- # We recommend to implement exponential backoff algorithm as described here:
37
- # https://api.copyleaks.com/documentation/v3/exponential-backoff
38
- # @param [languageCode] The language for the returned texts to be in. Language codes are in ISO 639-1 standard. Supported Values: en - English
39
- def get_correction_types(language_code)
40
- path = "/v1/writing-feedback/correction-types/#{language_code}"
41
-
42
- headers = {
43
- 'Content-Type' => 'application/json',
44
- 'User-Agent' => Config.user_agent
45
- }
46
-
47
- request = Net::HTTP::Get.new(path, headers)
48
- ClientUtils.handle_response(@api_client.request(request), 'get_correction_types')
49
- end
50
-
51
- # Use Copyleaks Writing Assistant to generate grammar, spelling and sentence corrections for a given text.
52
- # * Exceptions:
53
- # * * CommandExceptions: Server reject the request. See response status code,
54
- # headers and content for more info.
55
- # * * UnderMaintenanceException: Copyleaks servers are unavailable for maintenance.
56
- # We recommend to implement exponential backoff algorithm as described here:
57
- # https://api.copyleaks.com/documentation/v3/exponential-backoff
58
- # @param [CopyleaksAuthToken] authToken Copyleaks authentication token
59
- # @param [String] scanId Attach your own scan Id
60
- # @param [SourceCodeSubmissionModel] submission document
61
- def submit_text(authToken, scanId, submission)
62
- raise 'scanId is Invalid, must be instance of String' if scanId.nil? || !scanId.instance_of?(String)
63
- raise 'submission is invalid, must be an instance of WritingAssistantSubmissionModel' if submission.nil? || !submission.instance_of?(Copyleaks::WritingAssistantSubmissionModel)
64
-
65
- ClientUtils.verify_auth_token(authToken)
66
-
67
- path = "/v1/writing-feedback/#{scanId}/check"
68
-
69
- headers = {
70
- 'Content-Type' => 'application/json',
71
- 'User-Agent' => Config.user_agent,
72
- 'Authorization' => "Bearer #{authToken.accessToken}"
73
- }
74
-
75
- request = Net::HTTP::Post.new(path, headers)
76
- request.body = submission.to_json
77
-
78
- ClientUtils.handle_response(@api_client.request(request), 'submit_writing_assistant')
79
- end
80
- end
81
- end
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
+
25
+ module Copyleaks
26
+ class WritingAssistantClient
27
+ def initialize(api_client)
28
+ @api_client = api_client
29
+ end
30
+
31
+ # Get a list of correction types supported within the Writing Assistant API. Correction types apply to all supported languages. The supplied language code for this request is used to determine the language of the texts returned.
32
+ # * Exceptions:
33
+ # * * CommandExceptions: Server reject the request. See response status code,
34
+ # headers and content for more info.
35
+ # * * UnderMaintenanceException: Copyleaks servers are unavailable for maintenance.
36
+ # We recommend to implement exponential backoff algorithm as described here:
37
+ # https://api.copyleaks.com/documentation/v3/exponential-backoff
38
+ # @param [languageCode] The language for the returned texts to be in. Language codes are in ISO 639-1 standard. Supported Values: en - English
39
+ def get_correction_types(language_code)
40
+ path = "/v1/writing-feedback/correction-types/#{language_code}"
41
+
42
+ headers = {
43
+ 'Content-Type' => 'application/json',
44
+ 'User-Agent' => Config.user_agent
45
+ }
46
+
47
+ request = Net::HTTP::Get.new(path, headers)
48
+ ClientUtils.handle_response(@api_client.request(request), 'get_correction_types')
49
+ end
50
+
51
+ # Use Copyleaks Writing Assistant to generate grammar, spelling and sentence corrections for a given text.
52
+ # * Exceptions:
53
+ # * * CommandExceptions: Server reject the request. See response status code,
54
+ # headers and content for more info.
55
+ # * * UnderMaintenanceException: Copyleaks servers are unavailable for maintenance.
56
+ # We recommend to implement exponential backoff algorithm as described here:
57
+ # https://api.copyleaks.com/documentation/v3/exponential-backoff
58
+ # @param [CopyleaksAuthToken] authToken Copyleaks authentication token
59
+ # @param [String] scanId Attach your own scan Id
60
+ # @param [SourceCodeSubmissionModel] submission document
61
+ def submit_text(authToken, scanId, submission)
62
+ raise 'scanId is Invalid, must be instance of String' if scanId.nil? || !scanId.instance_of?(String)
63
+ raise 'submission is invalid, must be an instance of WritingAssistantSubmissionModel' if submission.nil? || !submission.instance_of?(Copyleaks::WritingAssistantSubmissionModel)
64
+
65
+ ClientUtils.verify_auth_token(authToken)
66
+
67
+ path = "/v1/writing-feedback/#{scanId}/check"
68
+
69
+ headers = {
70
+ 'Content-Type' => 'application/json',
71
+ 'User-Agent' => Config.user_agent,
72
+ 'Authorization' => "Bearer #{authToken.accessToken}"
73
+ }
74
+
75
+ request = Net::HTTP::Post.new(path, headers)
76
+ request.body = submission.to_json
77
+
78
+ ClientUtils.handle_response(@api_client.request(request), 'submit_writing_assistant')
79
+ end
80
+ end
81
+ 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.4.0
4
+ version: 3.5.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: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-07-01 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
@@ -23,7 +23,6 @@ extensions: []
23
23
  extra_rdoc_files: []
24
24
  files:
25
25
  - ".gitignore"
26
- - ".vscode/launch.json"
27
26
  - Gemfile
28
27
  - LICENSE.txt
29
28
  - README.md
@@ -84,6 +83,33 @@ files:
84
83
  - lib/copyleaks/models/submissions/properties/writing_feedback.rb
85
84
  - lib/copyleaks/models/submissions/submission_model.rb
86
85
  - lib/copyleaks/models/submissions/url_submission_model.rb
86
+ - lib/copyleaks/models/submissions/webhooks/CompletedWebhook.rb
87
+ - lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb
88
+ - lib/copyleaks/models/submissions/webhooks/ErrorWebhook.rb
89
+ - lib/copyleaks/models/submissions/webhooks/ExportCompletedWebhook.rb
90
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Metadata.rb
91
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/StatusWebhook.rb
92
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Webhook.rb
93
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Notifications.rb
94
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Results.rb
95
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb
96
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ErrorModels/Error.rb
97
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ExportModels/Task.rb
98
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultScore.rb
99
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb
100
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsRepositories.rb
101
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb
102
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Batch.rb
103
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Database.rb
104
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb
105
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Repositories.rb
106
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/RepositoryMetadata.rb
107
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb
108
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/SharedResultsModel.rb
109
+ - lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Tags.rb
110
+ - lib/copyleaks/models/submissions/webhooks/IndexedWebhook.rb
111
+ - lib/copyleaks/models/submissions/webhooks/NewResultWebhook.rb
112
+ - lib/copyleaks/models/submissions/webhooks/index.rb
87
113
  - lib/copyleaks/models/submissions/writing_assistant/score_weights.rb
88
114
  - lib/copyleaks/models/submissions/writing_assistant/writing_assistant_submission_model.rb
89
115
  - lib/copyleaks/utils/copyleaks_client.utils.rb
@@ -113,7 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
139
  - !ruby/object:Gem::Version
114
140
  version: '0'
115
141
  requirements: []
116
- rubygems_version: 3.3.5
142
+ rubyforge_project:
143
+ rubygems_version: 2.7.6
117
144
  signing_key:
118
145
  specification_version: 4
119
146
  summary: Detects plagiarism and checks content distribution online.
data/.vscode/launch.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "Debug Local File",
9
- "type": "Ruby",
10
- "request": "launch",
11
- "program": "${workspaceRoot}/main.rb"
12
- },
13
- // Launch the debugger for any given program. In this case, it will run the current file using Ruby
14
- {
15
- "type": "ruby_lsp",
16
- "name": "Debug",
17
- "request": "launch",
18
- "program": "ruby ${file}"
19
- },
20
- // Launch the debugger for the current test file
21
- {
22
- "type": "ruby_lsp",
23
- "request": "launch",
24
- "name": "Debug test file",
25
- "program": "ruby -Itest ${relativeFile}"
26
- },
27
- // Attach the debugger client to an existing Ruby process that has already been launched with the debugger
28
- // server
29
- {
30
- "type": "ruby_lsp",
31
- "request": "attach",
32
- "name": "Attach to existing server"
33
- }
34
- ]
35
- }