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 +4 -4
- data/README.md +0 -2
- data/lib/plagiarism/response.rb +14 -0
- data/plagiarism.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0a2d2b68d898e809cc3279479ff59a81f81c376
|
|
4
|
+
data.tar.gz: ce40f54fd1ef40379197ad613f0f982cf16e1ce4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9eaa6a64ef1b56b0cefca2274ce429eaf70712da7e4327f39a145688412731869fcd3e0709b4681e434fac33f1a176479b1cb905f9fd7411c06d55b0c58abc15
|
|
7
|
+
data.tar.gz: 8fef4b4322fc19d375be60796c2c695397de89c546ca1327c832f0ef4ec2e98e3dc201fae28eafc37ae9bebfccdf9fc38c1d73ff58ecde6ba563735c30768947
|
data/README.md
CHANGED
data/lib/plagiarism/response.rb
CHANGED
|
@@ -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.
|
|
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"
|