rumors-api-client 0.3.2 → 0.3.3
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/rumors/api/client/base.rb +9 -1
- data/lib/rumors/api/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb067cb05b25c252c60d953419290b1d824b76af2c15f45252a024d694dde911
|
4
|
+
data.tar.gz: 7b6cf354855e5a2114c153794cf49ac6346508bf86ed9f83af4c4f0a0d75eda4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a3edefc6eb6119d078be33e5d2bb2602c2c90ff17d35073b0e03354221849329891cf2707561c0579eca366c73a171e65397d589ed7fcffd44fc4fa5f16af96
|
7
|
+
data.tar.gz: e9f0016e94fb539c6130299055e495d7b5751c8f5ffa83b2396e7f9b4fb23892d5913500073dfeb6ce0412f1e23e63d1325e2b4ff6aee7c61f2de57bf8733e6e
|
@@ -71,13 +71,21 @@ module Rumors
|
|
71
71
|
|
72
72
|
response_uris = response_url.path.split("/").reject { |path| path.empty? }
|
73
73
|
uris = url.path.split("/").reject { |path| path.empty? }
|
74
|
-
|
74
|
+
next unless equal_arrays?(response_uris, uris)
|
75
|
+
return true if url.query.nil?
|
76
|
+
querys = url.query.split('&')
|
77
|
+
response_querys = response_url.query.split('&')
|
78
|
+
return true if equal_arrays?(response_querys, querys)
|
75
79
|
end
|
76
80
|
end
|
77
81
|
|
78
82
|
false
|
79
83
|
end
|
80
84
|
|
85
|
+
def equal_arrays?(this_one, another)
|
86
|
+
this_one.size == another.size && (this_one & another) == this_one
|
87
|
+
end
|
88
|
+
|
81
89
|
def calculate_similarity(contents)
|
82
90
|
# NOTE: https://github.com/jpmckinney/tf-idf-similarity
|
83
91
|
most_like = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rumors-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carol H
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|