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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 627a8a675fc9b7f41b4e86eb8a61a2fc9954f92d
4
- data.tar.gz: fd3a86e2e053d00352296391304252e6f3fe5dcf
3
+ metadata.gz: 551fceab0b13540d8e87fa99e5ef72f4d98f38ec
4
+ data.tar.gz: 2d206bc95ab49a75022be258c301c0cba1fa5b31
5
5
  SHA512:
6
- metadata.gz: 668f145733245e11127f0067c79df7927ade84a8f05f2e4acec6ec9e0f1877f250a8dcbe564c4d9341f38c66fd9e3f023b6c59744f0fe6e35d8d68f1f5d58f91
7
- data.tar.gz: 7d5e0d0fbbbaace40e7ef3157623fc58bf98d864ab5a94db4614587a46902008a3b7129a53a98b6c01b0001271b8589ad877f62785a84107deff1ca445191dbb
6
+ metadata.gz: 5ff691c9cc7c99862457c6880c0df4536a7ee5c330b21e2d7933f6cc7d0a2bb4a8181bed4998fee7f051d746112fed21bef1461ae22dfc9ea5f03f6c81af9eea
7
+ data.tar.gz: 45f39371bc9119ead3ac08ef65b9827cc51b7cff4c6a9d49a9e93e5876e9af6167609d0c614933f94916f4f1e28cb534cd9b220edb9792a42dad6475f4333944
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nicoquery (0.1.8.6)
4
+ nicoquery (0.1.8.7)
5
5
  activesupport (~> 4.0.0)
6
6
  i18n
7
7
  nicoapi
@@ -93,7 +93,10 @@ module NicoQuery
93
93
  end
94
94
 
95
95
  def tags
96
- @hash['tags']['tag_info'].each_with_object([]) do |tag, array|
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
@@ -1,3 +1,3 @@
1
1
  module NicoQuery
2
- VERSION = "0.1.8.6"
2
+ VERSION = "0.1.8.7"
3
3
  end
@@ -8,7 +8,7 @@ describe "NicoQuery::ObjectMapper::VideoArray" do
8
8
  @result = NicoQuery::ObjectMapper::VideoArray.new xml
9
9
  end
10
10
 
11
- describe "sm20415650" do
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nicoquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.6
4
+ version: 0.1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masami Yonehara