plagiarism2 0.0.10 → 0.0.11

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
  SHA1:
3
- metadata.gz: 1659c91b9a5c1df2bd8dfe1ef8056f89998ef0a1
4
- data.tar.gz: 3a25bc7675055068558848a822581968f883e4f3
3
+ metadata.gz: 636e2299c2b5d463b4f9ea2fef28807ef96433c7
4
+ data.tar.gz: cf8bbbd31d55287f05bfd29e63489a794473ccc0
5
5
  SHA512:
6
- metadata.gz: 747600709a0b3a0ad499258287140f75877d1afc7463dd170ae16719bfe94d5d0eeac529880f1fc4448519fcc655ffb70da5741d2cfeb7b490f39553db9ba02e
7
- data.tar.gz: 4ed4fa7f0940a45a345dda9d0063abc167acdd7fa91c8a1569427d07eeaee502c384fb753214a32285490dbc2d028d5d825e204dc70a94ad921db535953a5923
6
+ metadata.gz: 38232af5aba8d2ca8b4c421877f4a89a041c52db58c9019bbf965aa9409ce1eb26e0f3d80b03dd406e8e57ad205abf78806354ea839dbe23797472ecbb16b806
7
+ data.tar.gz: 49c13d48a4efae6a34aaf036511fa44b65efef9525e571b011075addeaf93238581a3e77532bbc41288178c1ac16f4061adcbf0666101dc8aadb05707578a789
data/README.md CHANGED
@@ -23,7 +23,7 @@ Add in your config
23
23
  ```ruby
24
24
  Plagiarism.configure do |config|
25
25
  config.threshold = 0.8 # => default is 0.8
26
- config.strategies = [xxx] # => [:google, :bing, :duck, :yahoo, :free_google]
26
+ config.strategies = [xxx] # => [:google, :bing, :duck, :yahoo]
27
27
  config.whitelists = ['www.ring.md']
28
28
  end
29
29
  ```
@@ -21,7 +21,7 @@ module Plagiarism
21
21
  method_option :path, aliases: '-p', desc: 'where put the config', type: :string, default: CONFIG_PATH
22
22
  def init
23
23
  create_file options[:path], <<-STRING
24
- strategies: "free_google"
24
+ strategies: "yahoo"
25
25
  whitelists: "www.ring.md, blog.ring.md"
26
26
  bing_key: xxx
27
27
  google_key: xxx
@@ -1,6 +1,5 @@
1
1
  require 'plagiarism/strategries/engine'
2
2
  require 'plagiarism/strategries/google'
3
- require 'plagiarism/strategries/free_google'
4
3
  require 'plagiarism/strategries/bing'
5
4
  require 'plagiarism/strategries/duck'
6
5
  require 'plagiarism/strategries/yahoo'
@@ -9,7 +8,7 @@ module Plagiarism
9
8
  module Strategy
10
9
  extend self
11
10
 
12
- def get(name = :free_google)
11
+ def get(name = :yahoo)
13
12
  Strategies.const_get(name.to_s.split('_').map(&:capitalize).join(''))
14
13
  end
15
14
 
@@ -1,3 +1,3 @@
1
1
  module Plagiarism
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plagiarism2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - MQuy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -146,7 +146,6 @@ files:
146
146
  - lib/plagiarism/strategries/bing.rb
147
147
  - lib/plagiarism/strategries/duck.rb
148
148
  - lib/plagiarism/strategries/engine.rb
149
- - lib/plagiarism/strategries/free_google.rb
150
149
  - lib/plagiarism/strategries/google.rb
151
150
  - lib/plagiarism/strategries/yahoo.rb
152
151
  - lib/plagiarism/strategy.rb
@@ -177,3 +176,4 @@ signing_key:
177
176
  specification_version: 4
178
177
  summary: Check the unique content on internet.
179
178
  test_files: []
179
+ has_rdoc:
@@ -1,25 +0,0 @@
1
- module Plagiarism
2
- module Strategies
3
- class FreeGoogle < Engine
4
- URL = 'https://ajax.googleapis.com/ajax/services/search/web'
5
- VERSION = '1.0'
6
-
7
- class << self
8
-
9
- def fetch(content, params)
10
- Typhoeus.get URL, params: params.merge(v: VERSION, q: content, rsz: :large)
11
- end
12
-
13
- def iterate(response, action = :all?)
14
- results = JSON.parse(response)['responseData']['results'] rescue []
15
- results.send(action) do |r|
16
- uri = URI.parse URI::encode(r['unescapedUrl'])
17
- yield uri
18
- end
19
- end
20
-
21
- end
22
-
23
- end
24
- end
25
- end