nicoquery 0.1.8.6 → 0.1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nicoquery/object_mapper/video_array.rb +4 -1
- data/lib/nicoquery/version.rb +1 -1
- data/spec/object_mapper/video_array_spec.rb +10 -2
- 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: 551fceab0b13540d8e87fa99e5ef72f4d98f38ec
|
4
|
+
data.tar.gz: 2d206bc95ab49a75022be258c301c0cba1fa5b31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff691c9cc7c99862457c6880c0df4536a7ee5c330b21e2d7933f6cc7d0a2bb4a8181bed4998fee7f051d746112fed21bef1461ae22dfc9ea5f03f6c81af9eea
|
7
|
+
data.tar.gz: 45f39371bc9119ead3ac08ef65b9827cc51b7cff4c6a9d49a9e93e5876e9af6167609d0c614933f94916f4f1e28cb534cd9b220edb9792a42dad6475f4333944
|
data/Gemfile.lock
CHANGED
@@ -93,7 +93,10 @@ module NicoQuery
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def tags
|
96
|
-
@hash['tags']['tag_info'].
|
96
|
+
tag_hash = @hash['tags']['tag_info'].instance_of? Array
|
97
|
+
tag_hash = [ @hash['tags']['tag_info'] ] unless tag_hash.instance_of? Array
|
98
|
+
|
99
|
+
tag_hash.each_with_object([]) do |tag, array|
|
97
100
|
array << { text: tag['tag'] }
|
98
101
|
end
|
99
102
|
end
|
data/lib/nicoquery/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe "NicoQuery::ObjectMapper::VideoArray" do
|
|
8
8
|
@result = NicoQuery::ObjectMapper::VideoArray.new xml
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
context "sm20415650" do
|
12
12
|
subject { @result.movies[0] }
|
13
13
|
|
14
14
|
describe "#title" do
|
@@ -81,6 +81,14 @@ describe "NicoQuery::ObjectMapper::VideoArray" do
|
|
81
81
|
expect(subject.tags).to be_a_kind_of Array
|
82
82
|
end
|
83
83
|
end
|
84
|
-
|
85
84
|
end
|
85
|
+
|
86
|
+
# context "when a movie doesn't contain more than one tag" do
|
87
|
+
# describe "#tags" do
|
88
|
+
# it "returns number of mylist references" do
|
89
|
+
# expect(subject.tags).to be_a_kind_of Array
|
90
|
+
# end
|
91
|
+
# end
|
92
|
+
# end
|
93
|
+
|
86
94
|
end
|