popcap 0.9.5 → 0.9.6

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: 19c8a2f61072567a49cd9cfb4dad74e9bb766741
4
- data.tar.gz: e694ba3707d3d62326c089804c0eeea990bc531c
3
+ metadata.gz: 9b3b58f3733fa6dda024a590f0fa0ddbcf580fad
4
+ data.tar.gz: 9f0dbfbe989d23335c673342dbe0522f4a71a3a9
5
5
  SHA512:
6
- metadata.gz: 2f06b264c3438911551fee0766ce57312a23d703e86e7b1673025d0ffcf73d8cc3d5dbefe26d7c5aa64a91fb064dbe825c17180ef2e8d8c9d4df4e3a81f5995b
7
- data.tar.gz: 949a6fab5d0f834592a37e40f1cf4456fbe42fbf2bea3fe5376e8006ca161e881d3311225031402fd5cb066caa2cf56f9fa0eac2561a5cc798afe02a32c729ee
6
+ metadata.gz: 1ea0fa3e0723b96961452df6bff16bafa4b38c89d17b0487f3584049389992c8f33ca6117825870684921431665bc0125d4812a5bd88139ab92dbb67494218bb
7
+ data.tar.gz: b4cd2de89a68a9c37f90382a2c500860a59a95effb2244d001da960967f11c442942fd4db3c5533f63ed55aa523ac566588902d172dc3cc1455670815fc33db2
@@ -47,7 +47,7 @@ module PopCap
47
47
  end
48
48
 
49
49
  def tags_hash
50
- parsed_json['tags']
50
+ parsed_json['tags'] || parsed_json
51
51
  end
52
52
 
53
53
  def parsed_json
@@ -1,3 +1,3 @@
1
1
  module PopCap
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
@@ -4,6 +4,7 @@ require 'pop_cap/audio_file'
4
4
 
5
5
  module PopCap
6
6
  describe AudioFile do
7
+
7
8
  let(:audio_file) { AudioFile.new(filepath) }
8
9
  let(:filepath) { File.realpath(PopCapSpecHelper::SAMPLE_FILE) }
9
10
  let(:included_modules) { AudioFile.included_modules }
@@ -29,6 +29,15 @@ module PopCap
29
29
  unformatted = UnformattedHash.new(json)
30
30
  expect(unformatted.hash).to eq({filesize: '10', artist: 'artist'})
31
31
  end
32
+
33
+ context "JSON does not contain 'tags' element" do
34
+ let(:json) { '{"format":{"size":"10"}}' }
35
+
36
+ it "returns a valid #unformatted hash" do
37
+ unformatted = UnformattedHash.new(json)
38
+ expect(unformatted.hash).to eq({filesize: '10'})
39
+ end
40
+ end
32
41
  end
33
42
 
34
43
  describe '.hash' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Culley Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-13 00:00:00.000000000 Z
11
+ date: 2013-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reek