plagiarism-checker 2.1.0 → 2.1.1

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
  SHA1:
3
- metadata.gz: fc69af416df5c9fdcb6d97788f556ad594c301bb
4
- data.tar.gz: 92d7e25795452ed9a1241fdedd10e47e3c99b502
3
+ metadata.gz: d505c3202beab2a3fb6b94e7d1ba33e11563f3ec
4
+ data.tar.gz: 650078b90aed95d6fe05b703cb689f3abdeb7d9f
5
5
  SHA512:
6
- metadata.gz: d4bd6b1e0658ee937925892c82b8fe988826f63e84879bca2a4d353889204cb218eede696765db27b4566fc4eac1837d89c60086ecd6aafa78dee07b72a32daa
7
- data.tar.gz: 6b1d88d3a9aa67ff33567156d8da0c21b7da34b96bdc1be983094166cf64ea2517d2af3fa8a868e569be96da3752a9c22af89a6e1ff48cd496a522158a8c21ac
6
+ metadata.gz: 72633294ef59a7cca317fa774608a9e19887a5bf9e608de4499ffa9730ae9efe04a8707d1812b6c8b40407061d28c382b52deeaf70569ebdb5faaba033fd5fd2
7
+ data.tar.gz: b548cefb5cf621e19b1593c78fbd14ce525aa50475bdbe682cf0433fa802871bda5325642a49e03facc30e75089f1961456d82d4e43eef71e159e8b373e5c452
@@ -15,7 +15,7 @@ puts "You have #{cloud.get_credits_balance} credits"
15
15
 
16
16
  # Process Configuration
17
17
  CopyleaksApi::Config.sandbox_mode = true # Sandbox mode will not consume any credits while returning dummy results
18
- CopyleaksApi::Config.http_callback = 'http://yoursite.here/callback/completion/{PID}'
18
+ CopyleaksApi::Config.http_callback = 'http://yoursite.here/callback/completion/'
19
19
  # For testing purposes you can use http://requestb.in
20
20
 
21
21
  #CopyleaksApi::Config
@@ -24,11 +24,12 @@ CopyleaksApi::Config.http_callback = 'http://yoursite.here/callback/completion/{
24
24
  #CopyleaksApi::Config do |config|
25
25
  # config.sanbox_mode = true
26
26
  # config.allow_partial_scan = true
27
- # config.http_callback = 'http://yoursite.here/callback/{PID}'
28
- # config.in_progress_result = 'http://yoursite.here/callback/results/{PID}'
27
+ # config.http_callback = 'http://yoursite.here/callback/completion/'
28
+ # config.in_progress_result = 'http://yoursite.here/callback/results/'
29
29
  # config.email_callback = 'your@email.com'
30
30
  # config.custom_fields = { some_field: 'and its value' }
31
31
  # config.compare_only = true # Only while using create-by-files
32
+ # config.import_to_database_only = true # To only upload your file to our database, will not consume any credits.
32
33
  #end
33
34
 
34
35
 
@@ -26,6 +26,7 @@ CopyleaksApi::Config.sandbox_mode = true # Sandbox mode will not consume any cr
26
26
  # config.email_callback = 'your@email.com'
27
27
  # config.custom_fields = { some_field: 'and its value' }
28
28
  # config.compare_only = true # Only while using create-by-files
29
+ # config.import_to_database_only = true # To only upload your file to our database, will not consume any credits.
29
30
  #end
30
31
 
31
32
 
@@ -128,6 +128,7 @@ module CopyleaksApi
128
128
  authentication_header(options),
129
129
  sandbox_header,
130
130
  compare_only_header,
131
+ import_to_database_only_header,
131
132
  in_progress_result(options),
132
133
  content_type_header(options),
133
134
  partial_scan_header(options),
@@ -149,6 +150,11 @@ module CopyleaksApi
149
150
  { 'copyleaks-compare-documents-for-similarity' => '' }
150
151
  end
151
152
 
153
+ def import_to_database_only_header
154
+ return {} unless Config.import_to_database_only
155
+ { 'copyleaks-index-only' => '' }
156
+ end
157
+
152
158
  # Receive callback every time we find a new result without waiting for completion
153
159
  def in_progress_result(options)
154
160
  return {} if options[:no_http_callback] || options[:no_callbacks]
@@ -7,11 +7,12 @@ module CopyleaksApi
7
7
  email_callback: nil,
8
8
  custom_fields: {},
9
9
  compare_only: false,
10
+ import_to_database_only: false,
10
11
  in_progress_result: nil,
11
12
  }.freeze
12
13
 
13
14
  class << self
14
- attr_writer :sandbox_mode, :compare_only, :http_callback, :email_callback, :custom_fields, :allow_partial_scan, :in_progress_result
15
+ attr_writer :sandbox_mode, :compare_only, :http_callback, :email_callback, :custom_fields, :allow_partial_scan, :import_to_database_only, :in_progress_result
15
16
 
16
17
  DEFAULTS.each do |attr, value|
17
18
  # getters for all options
@@ -1,3 +1,3 @@
1
1
  module CopyleaksApi
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.1.1'.freeze
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: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Copyleaks ltd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-08 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
@@ -113,8 +113,8 @@ files:
113
113
  - bin/console
114
114
  - bin/setup
115
115
  - copyleaks_api.gemspec
116
- - example_async.rb
117
- - example_syncronized.rb
116
+ - example_asynchronous.rb
117
+ - example_synchronous.rb
118
118
  - lib/copyleaks_api.rb
119
119
  - lib/copyleaks_api/Models/ResultRecord.rb
120
120
  - lib/copyleaks_api/access_token.rb