moss_ruby 1.1.0 → 1.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/lib/moss_ruby.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6388f6ab27c44a591101464aa52b353023baf4e8
|
|
4
|
+
data.tar.gz: a6ea6678cab87b739629d4dfe96070b5b07d9669
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 230ff756021bca01adfb49e4f91103b421922b8ef10a05dde7754681d9426d0ccc2b32bbbddbefda2a4908f21b81b66d3be173961b97f72e8d75cce59debaeed
|
|
7
|
+
data.tar.gz: 1533a081ee20ba3f568338e1663af6bce61c6f8827360a4c8a07988f23eab25bab0b1bfafa6d15e6e3020bc490da586f5b6486e132aff417468a833acb7acee3
|
data/lib/moss_ruby.rb
CHANGED
|
@@ -167,7 +167,8 @@ class MossRuby
|
|
|
167
167
|
callback.call("Checking match #{match + 1} (id #{id})") unless callback.nil?
|
|
168
168
|
|
|
169
169
|
# read the two match files
|
|
170
|
-
|
|
170
|
+
match_url = "#{uri}/match#{id}-top.html"
|
|
171
|
+
match_top = open(match_url).read
|
|
171
172
|
|
|
172
173
|
callback.call(" - checking match #{match} percents") unless callback.nil?
|
|
173
174
|
top = read_pcts match_top
|
|
@@ -195,12 +196,16 @@ class MossRuby
|
|
|
195
196
|
{
|
|
196
197
|
filename: data[0][:filename],
|
|
197
198
|
html: strip_a("<PRE>#{data[0][:html]}</PRE>"),
|
|
198
|
-
pct: Integer(top[:pct0])
|
|
199
|
+
pct: Integer(top[:pct0]),
|
|
200
|
+
url: match_url,
|
|
201
|
+
part_url: "#{uri}/match#{id}-0.html"
|
|
199
202
|
},
|
|
200
203
|
{
|
|
201
204
|
filename: data[1][:filename],
|
|
202
205
|
html: strip_a("<PRE>#{data[1][:html]}</PRE>"),
|
|
203
|
-
pct: Integer(top[:pct1])
|
|
206
|
+
pct: Integer(top[:pct1]),
|
|
207
|
+
url: match_url,
|
|
208
|
+
part_url: "#{uri}/match#{id}-1.html"
|
|
204
209
|
}
|
|
205
210
|
]
|
|
206
211
|
end
|
|
@@ -213,11 +218,6 @@ class MossRuby
|
|
|
213
218
|
|
|
214
219
|
private
|
|
215
220
|
|
|
216
|
-
# <tr><td><a href="http://moss.stanford.edu/results/916994582/match0.html">./done/COS10009-5/4936175/27258/ (51%)</a>
|
|
217
|
-
# </td><td><a href="http://moss.stanford.edu/results/916994582/match0.html">./done/COS10009-5/4928431/34630/ (51%)</a>
|
|
218
|
-
# </td><td align="right">80
|
|
219
|
-
# </td></tr>
|
|
220
|
-
|
|
221
221
|
def get_matches(uri, min_pct, callback)
|
|
222
222
|
result = Array.new
|
|
223
223
|
begin
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moss_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Cain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Moss-ruby is an unofficial ruby gem for the Moss system for Detecting
|
|
14
14
|
Software Plagiarism (http://theory.stanford.edu/~aiken/moss/)
|