plagiarism-checker 3.3.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.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/lib/copyleaks/ai_detection_client.rb +98 -98
- data/lib/copyleaks/api.rb +4 -21
- data/lib/copyleaks/app.config.rb +0 -0
- data/lib/copyleaks/models/auth_token.rb +0 -0
- data/lib/copyleaks/models/delete_request_model.rb +0 -0
- data/lib/copyleaks/models/exceptions/{auth_exipred_exception.rb → auth_expired_exception.rb} +2 -4
- data/lib/copyleaks/models/exceptions/command_exception.rb +11 -4
- data/lib/copyleaks/models/exceptions/index.rb +1 -1
- data/lib/copyleaks/models/exceptions/rate_limit_exception.rb +2 -4
- data/lib/copyleaks/models/exceptions/under_maintenance_exception.rb +2 -4
- data/lib/copyleaks/models/exports/export_crawled_version.rb +0 -0
- data/lib/copyleaks/models/exports/export_model.rb +0 -0
- data/lib/copyleaks/models/exports/export_pdf_report.rb +0 -0
- data/lib/copyleaks/models/exports/export_results.rb +0 -0
- data/lib/copyleaks/models/exports/index.rb +0 -0
- data/lib/copyleaks/models/id_object.rb +0 -0
- data/lib/copyleaks/models/index.rb +0 -0
- data/lib/copyleaks/models/start_request_model.rb +0 -0
- data/lib/copyleaks/models/submissions/ai_detection/ai_detection_submission_model.rb +50 -50
- data/lib/copyleaks/models/submissions/ai_detection/natural_language_submission_model.rb +52 -52
- data/lib/copyleaks/models/submissions/ai_detection/source_code_submission_model.rb +55 -55
- data/lib/copyleaks/models/submissions/file_ocr_submission_model.rb +0 -0
- data/lib/copyleaks/models/submissions/file_submission_model.rb +0 -0
- data/lib/copyleaks/models/submissions/index.rb +1 -0
- data/lib/copyleaks/models/submissions/properties/actions.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/ai_generated_text.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/author.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/copyleaks_db.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/cross_languages.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/custom_metadata.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/domains_mode.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/exclude.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/exclude_code.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/filter.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/index.rb +1 -0
- data/lib/copyleaks/models/submissions/properties/indexing.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/indexing_repository.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/language.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/masking_policy.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/pdf_colors.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/pdf_properties.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/pdf_version.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/repository.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/scan_method_algorithm.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/scanning.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/scanning_exclude.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/scanning_repository.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/submission_properties.rb +9 -3
- data/lib/copyleaks/models/submissions/properties/webhooks.rb +0 -0
- data/lib/copyleaks/models/submissions/properties/writing_feedback.rb +53 -0
- data/lib/copyleaks/models/submissions/submission_model.rb +0 -0
- data/lib/copyleaks/models/submissions/url_submission_model.rb +0 -0
- data/lib/copyleaks/models/submissions/webhooks/CompletedWebhook.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb +43 -0
- data/lib/copyleaks/models/submissions/webhooks/ErrorWebhook.rb +41 -0
- data/lib/copyleaks/models/submissions/webhooks/ExportCompletedWebhook.rb +44 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Metadata.rb +89 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/StatusWebhook.rb +41 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/BaseModels/Webhook.rb +43 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Notifications.rb +43 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/Results.rb +68 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb +61 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ErrorModels/Error.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ExportModels/Task.rb +49 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultScore.rb +42 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb +60 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsRepositories.rb +49 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb +65 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Batch.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Database.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb +42 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Repositories.rb +57 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/RepositoryMetadata.rb +30 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb +40 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/SharedResultsModel.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Tags.rb +33 -0
- data/lib/copyleaks/models/submissions/webhooks/IndexedWebhook.rb +29 -0
- data/lib/copyleaks/models/submissions/webhooks/NewResultWebhook.rb +46 -0
- data/lib/copyleaks/models/submissions/webhooks/index.rb +34 -0
- data/lib/copyleaks/models/submissions/writing_assistant/score_weights.rb +54 -54
- data/lib/copyleaks/models/submissions/writing_assistant/writing_assistant_submission_model.rb +56 -56
- data/lib/copyleaks/utils/copyleaks_client.utils.rb +56 -64
- data/lib/copyleaks/utils/status-code.utils.rb +0 -0
- data/lib/copyleaks/version.rb +1 -1
- data/lib/copyleaks/writing_assistant_client.rb +81 -81
- data/lib/copyleaks.rb +0 -0
- data/lib/index.rb +0 -0
- metadata +36 -7
@@ -1,64 +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 ClientUtils
|
27
|
-
def self.handle_response(response, used_by)
|
28
|
-
if Utils.is_success_status_code(response.code)
|
29
|
-
if response.body.nil? || response.body == ''
|
30
|
-
nil
|
31
|
-
else
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
elsif Utils.
|
37
|
-
raise
|
38
|
-
|
39
|
-
raise
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
_expiresTime = DateTime.parse(authToken.expires)
|
58
|
-
|
59
|
-
if _expiresTime <= _time
|
60
|
-
raise AuthExipredException.new.reason # expired
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
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 ClientUtils
|
27
|
+
def self.handle_response(response, used_by)
|
28
|
+
if Utils.is_success_status_code(response.code)
|
29
|
+
if response.body.nil? || response.body == ''
|
30
|
+
nil
|
31
|
+
else
|
32
|
+
JSON.parse(response.body)
|
33
|
+
end
|
34
|
+
elsif Utils.is_under_maintenance_response(response.code)
|
35
|
+
raise UnderMaintenanceException
|
36
|
+
elsif Utils.is_rate_limit_response(response.code)
|
37
|
+
raise RateLimitException
|
38
|
+
else
|
39
|
+
raise CommandException.new(response: response, used_by: used_by)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.verify_auth_token(authToken)
|
44
|
+
if authToken.nil? || !authToken.instance_of?(CopyleaksAuthToken)
|
45
|
+
raise 'authToken is Invalid, must be instance of CopyleaksAuthToken'
|
46
|
+
end
|
47
|
+
|
48
|
+
_time = DateTime.now
|
49
|
+
_expiresTime = DateTime.parse(authToken.expires)
|
50
|
+
|
51
|
+
if _expiresTime <= _time
|
52
|
+
raise AuthExpiredException # expired
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
File without changes
|
data/lib/copyleaks/version.rb
CHANGED
@@ -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
|
data/lib/copyleaks.rb
CHANGED
File without changes
|
data/lib/index.rb
CHANGED
File without changes
|
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
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Copyleaks ltd
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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
|
@@ -35,7 +35,7 @@ files:
|
|
35
35
|
- lib/copyleaks/app.config.rb
|
36
36
|
- lib/copyleaks/models/auth_token.rb
|
37
37
|
- lib/copyleaks/models/delete_request_model.rb
|
38
|
-
- lib/copyleaks/models/exceptions/
|
38
|
+
- lib/copyleaks/models/exceptions/auth_expired_exception.rb
|
39
39
|
- lib/copyleaks/models/exceptions/command_exception.rb
|
40
40
|
- lib/copyleaks/models/exceptions/index.rb
|
41
41
|
- lib/copyleaks/models/exceptions/rate_limit_exception.rb
|
@@ -80,8 +80,36 @@ files:
|
|
80
80
|
- lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb
|
81
81
|
- lib/copyleaks/models/submissions/properties/submission_properties.rb
|
82
82
|
- lib/copyleaks/models/submissions/properties/webhooks.rb
|
83
|
+
- lib/copyleaks/models/submissions/properties/writing_feedback.rb
|
83
84
|
- lib/copyleaks/models/submissions/submission_model.rb
|
84
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
|
85
113
|
- lib/copyleaks/models/submissions/writing_assistant/score_weights.rb
|
86
114
|
- lib/copyleaks/models/submissions/writing_assistant/writing_assistant_submission_model.rb
|
87
115
|
- lib/copyleaks/utils/copyleaks_client.utils.rb
|
@@ -96,7 +124,7 @@ metadata:
|
|
96
124
|
homepage_uri: https://api.copyleaks.com
|
97
125
|
source_code_uri: https://github.com/Copyleaks/Ruby-Plagiarism-Checker
|
98
126
|
changelog_uri: https://github.com/Copyleaks/Ruby-Plagiarism-Checker/releases
|
99
|
-
post_install_message:
|
127
|
+
post_install_message:
|
100
128
|
rdoc_options: []
|
101
129
|
require_paths:
|
102
130
|
- lib
|
@@ -111,8 +139,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
139
|
- !ruby/object:Gem::Version
|
112
140
|
version: '0'
|
113
141
|
requirements: []
|
114
|
-
|
115
|
-
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 2.7.6
|
144
|
+
signing_key:
|
116
145
|
specification_version: 4
|
117
146
|
summary: Detects plagiarism and checks content distribution online.
|
118
147
|
test_files: []
|