ids_please 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ids_please/base_parser.rb +1 -1
- data/lib/ids_please.rb +1 -1
- data/spec/ids_please/basic_spec.rb +12 -0
- 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: 71c43f0f021c3e31d48e900162f1cdbb0bcb0591
|
4
|
+
data.tar.gz: 7feef5dcfdf2a0ff1a5076b5802a1ffcb85bf4fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0606463138c74600656f3402032d7322f49ed838eb5e7ecd95345284f72e5f8b6b3595e887b549d5a05deb507bbfe22f658c2916a94560dbb7728f71237ff0ec
|
7
|
+
data.tar.gz: 2dc7643226c2792d33a094c165b4101298ce04d23955a353f94c5e7e46ed83754a19bacd79894df0108b09bd7c7123830b7965b847408becb3b14e1f217cc9e8
|
data/lib/ids_please.rb
CHANGED
@@ -24,12 +24,24 @@ describe IdsPlease do
|
|
24
24
|
http://vka.com/not_recognized
|
25
25
|
)
|
26
26
|
|
27
|
+
not_parseble_links = %w(
|
28
|
+
http://vk.com
|
29
|
+
http://soundcloud.com
|
30
|
+
)
|
31
|
+
|
27
32
|
it 'not recognizes wrong links' do
|
28
33
|
recognizer = IdsPlease.new(*not_recognazible_links)
|
29
34
|
recognizer.recognize
|
30
35
|
expect(recognizer.recognized.values.flatten.count).to eq(0)
|
31
36
|
end
|
32
37
|
|
38
|
+
it 'not parse wrong links' do
|
39
|
+
@recognizer = IdsPlease.new(*not_parseble_links)
|
40
|
+
@recognizer.parse
|
41
|
+
expect(@recognizer.parsed[:vkontakte]).to eq([])
|
42
|
+
expect(@recognizer.parsed[:soundcloud]).to eq([])
|
43
|
+
end
|
44
|
+
|
33
45
|
context 'recognize social networks properly' do
|
34
46
|
before :each do
|
35
47
|
@recognizer = IdsPlease.new(*recognazible_links)
|