push
travis-ci
21 of 21 new or added lines in 4 files covered. (100.0%)
489 of 498 relevant lines covered (98.19%)
22.3 hits per line
1 |
# encoding: UTF-8
|
|
2 |
|
|
3 |
require "faraday"
|
7✔ |
4 |
require "faraday_middleware"
|
7✔ |
5 |
require "json"
|
7✔ |
6 |
|
|
7 |
module Dandelionapi |
7✔ |
8 |
|
|
9 |
class TextSimilarity |
7✔ |
10 |
|
|
11 |
class Request < Comparison::Request |
7✔ |
12 |
|
|
13 |
ENDPOINT = "/sim/v1" |
7✔ |
14 |
|
|
15 |
MANDATORY_FIELDS_1 = [
|
7✔ |
16 |
"text1",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
17 |
"url1",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
18 |
"html1",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
19 |
"html_fragment1"
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
20 |
] |
|
21 |
|
|
22 |
MANDATORY_FIELDS_2 = [
|
7✔ |
23 |
"text2",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
24 |
"url2",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
25 |
"html2",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
26 |
"html_fragment2"
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
27 |
] |
|
28 |
|
|
29 |
OPTIONAL_FIELDS = [
|
7✔ |
30 |
"lang",
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
31 |
"bow"
|
2 only rbx-2.4.1 and rbx-2.5.2 ✔ |
32 |
] |
|
33 |
|
|
34 |
def compare(options) |
7✔ |
35 |
params = options |
× |
36 |
call(ENDPOINT, params)
|
× |
37 |
end
|
|
38 |
|
|
39 |
end
|
|
40 |
end
|
|
41 |
|
|
42 |
end
|