plagiarism 0.1.0 → 0.1.1

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: 7ade6a7ba134174de6ea534c5af530e9c217fe64
4
- data.tar.gz: 76be3b73bd7c18fb59faafa37165e9a123150f61
3
+ metadata.gz: c0a2d2b68d898e809cc3279479ff59a81f81c376
4
+ data.tar.gz: ce40f54fd1ef40379197ad613f0f982cf16e1ce4
5
5
  SHA512:
6
- metadata.gz: e69458e5af8d77b6b6d06b7098c587f8941655c59d6eb568ada3919b7bd6e8e0960db6cafcedf45fdad3dea71191a8f0031e85eed072f1a22d1a4329bac4c819
7
- data.tar.gz: d65947e99d90ac5fcc892eca6b622603404c64d9edd41a255254c3ae98c7ef2006fe33ee2804952f8e43a7427eee33b218453a1c77285065bdec02f9d9972482
6
+ metadata.gz: 9eaa6a64ef1b56b0cefca2274ce429eaf70712da7e4327f39a145688412731869fcd3e0709b4681e434fac33f1a176479b1cb905f9fd7411c06d55b0c58abc15
7
+ data.tar.gz: 8fef4b4322fc19d375be60796c2c695397de89c546ca1327c832f0ef4ec2e98e3dc201fae28eafc37ae9bebfccdf9fc38c1d73ff58ecde6ba563735c30768947
data/README.md CHANGED
@@ -11,8 +11,6 @@ Plagiarism is a Ruby wrapper for the Copyscape (http://copyscape.com) Premium AP
11
11
 
12
12
  gem install plagiarism
13
13
 
14
- require 'plagiarism'
15
-
16
14
 
17
15
  Once you have your Copyscape username and API key you'll need to configure them.
18
16
 
@@ -12,14 +12,28 @@ module Plagiarism
12
12
  end
13
13
 
14
14
 
15
+ # Return true if the API call succeeded
15
16
  def success?
16
17
  @response.ok? && @doc.css("error").text == ""
17
18
  end
18
19
 
19
20
 
21
+ # Return true if the API call did not succeed
20
22
  def error?
21
23
  not success?
22
24
  end
23
25
 
26
+
27
+ # Return the body of the response
28
+ def body
29
+ @response ? @response.response.body : nil
30
+ end
31
+
32
+
33
+ # Return the HTTP status code from the response
34
+ def status_code
35
+ @response ? @response.response.code : nil
36
+ end
37
+
24
38
  end
25
39
  end
data/plagiarism.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'plagiarism'
3
- gem.version = '0.1.0'
3
+ gem.version = '0.1.1'
4
4
  gem.summary = "A Ruby wrapper for the Copyscape Premium API"
5
5
  gem.description = "Search for plagiarism and check your content for originality with Copyscape"
6
6
  gem.homepage = "https://github.com/zohlgren/plagiarism"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plagiarism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Ohlgren