rbpod 0.0.4 → 0.0.5

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbpod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-21 00:00:00.000000000 Z
12
+ date: 2013-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -129,6 +129,8 @@ files:
129
129
  - ext/rbpod/database.h
130
130
  - ext/rbpod/device.c
131
131
  - ext/rbpod/device.h
132
+ - ext/rbpod/error.c
133
+ - ext/rbpod/error.h
132
134
  - ext/rbpod/extconf.rb
133
135
  - ext/rbpod/playlist.c
134
136
  - ext/rbpod/playlist.h
@@ -143,13 +145,16 @@ files:
143
145
  - lib/rbpod.rb
144
146
  - lib/rbpod/version.rb
145
147
  - rbpod.gemspec
146
- - spec/collection_spec.rb
147
- - spec/database_spec.rb
148
- - spec/device_spec.rb
149
- - spec/playlist_spec.rb
150
- - spec/rbpod_spec.rb
148
+ - spec/rbpod/collection_spec.rb
149
+ - spec/rbpod/database_spec.rb
150
+ - spec/rbpod/device_spec.rb
151
+ - spec/rbpod/playlist_collection_spec.rb
152
+ - spec/rbpod/playlist_spec.rb
153
+ - spec/rbpod/rbpod_spec.rb
154
+ - spec/rbpod/track_collection_spec.rb
155
+ - spec/rbpod/track_spec.rb
151
156
  - spec/spec_helper.rb
152
- - spec/track_spec.rb
157
+ - spec/support/shared_contexts.rb
153
158
  homepage: https://github.com/jmkeyes/rbpod
154
159
  licenses:
155
160
  - MIT
@@ -165,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
170
  version: '0'
166
171
  segments:
167
172
  - 0
168
- hash: 1001961729
173
+ hash: 995859569
169
174
  required_rubygems_version: !ruby/object:Gem::Requirement
170
175
  none: false
171
176
  requirements:
@@ -174,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
179
  version: '0'
175
180
  segments:
176
181
  - 0
177
- hash: 1001961729
182
+ hash: 995859569
178
183
  requirements:
179
184
  - libgpod-1.0
180
185
  rubyforge_project:
@@ -183,10 +188,13 @@ signing_key:
183
188
  specification_version: 3
184
189
  summary: Ruby bindings to the libgpod library.
185
190
  test_files:
186
- - spec/collection_spec.rb
187
- - spec/database_spec.rb
188
- - spec/device_spec.rb
189
- - spec/playlist_spec.rb
190
- - spec/rbpod_spec.rb
191
+ - spec/rbpod/collection_spec.rb
192
+ - spec/rbpod/database_spec.rb
193
+ - spec/rbpod/device_spec.rb
194
+ - spec/rbpod/playlist_collection_spec.rb
195
+ - spec/rbpod/playlist_spec.rb
196
+ - spec/rbpod/rbpod_spec.rb
197
+ - spec/rbpod/track_collection_spec.rb
198
+ - spec/rbpod/track_spec.rb
191
199
  - spec/spec_helper.rb
192
- - spec/track_spec.rb
200
+ - spec/support/shared_contexts.rb
@@ -1,39 +0,0 @@
1
- describe RbPod::Collection do
2
- before do
3
- @block = proc { |item| nil }
4
- @collection = RbPod::Collection.new
5
- end
6
-
7
- describe '.self' do
8
- it 'should include Enumerable' do
9
- @collection.class.should include(Enumerable)
10
- end
11
- end
12
-
13
- describe '#initialize' do
14
- it 'should be a Collection instance' do
15
- @collection.should be_instance_of(RbPod::Collection)
16
- end
17
- end
18
-
19
- describe '#each' do
20
- it 'should yield to a block and return itself' do
21
- @collection.each(&@block).should_not be_nil
22
- end
23
-
24
- it 'should return an Enumerator without a block' do
25
- @collection.each.should be_kind_of(Enumerator)
26
- end
27
- end
28
-
29
- describe '#length' do
30
- it 'should be zero' do
31
- @collection.length.should eq(0)
32
- end
33
-
34
- it 'should be aliased to #size' do
35
- @collection.should respond_to(:size)
36
- @collection.size.should eq(0)
37
- end
38
- end
39
- end
data/spec/device_spec.rb DELETED
@@ -1,83 +0,0 @@
1
- describe RbPod::Device do
2
- context 'On a device backed by a blank database' do
3
- before do
4
- @directory = within_temporary_directory
5
- database = RbPod::Database.create!(@directory)
6
- @device = database.device
7
- end
8
-
9
- after do
10
- # This is a godawful hack.
11
- FileUtils.remove_entry_secure(@directory)
12
- end
13
-
14
- describe '#initialize' do
15
- it 'should be a private method' do
16
- @device.singleton_class.private_methods(false).should include(:initialize)
17
- end
18
- end
19
-
20
- describe '#[]' do
21
- it 'should return a nil value' do
22
- @device['ModelNumStr'].should be_nil
23
- end
24
-
25
- it 'should return nil with an invalid key' do
26
- @device['NonExistentValue'].should be_nil
27
- end
28
-
29
- it 'should return nil when unsetting a key' do
30
- @device['NotARealKey'] = nil
31
- @device['NotARealKey'].should be_nil
32
- end
33
- end
34
-
35
- describe '#save!' do
36
- it 'should return nil' do
37
- @device.save!.should eq(nil)
38
- end
39
- end
40
-
41
- describe '#uuid' do
42
- it 'should be nil' do
43
- @device.uuid.should eq(nil)
44
- end
45
- end
46
-
47
- describe '#capacity' do
48
- it 'should be zero' do
49
- @device.capacity.should be_kind_of(Float)
50
- @device.capacity.should eq(0.0)
51
- end
52
- end
53
-
54
- describe '#generation' do
55
- it 'should be "Unknown"' do
56
- @device.generation.should be_kind_of(String)
57
- @device.generation.should eq('Unknown')
58
- end
59
- end
60
-
61
- describe '#model_name' do
62
- it 'should be "Invalid"' do
63
- @device.model_name.should be_kind_of(String)
64
- @device.model_name.should eq('Invalid')
65
- end
66
- end
67
-
68
- describe '#model_number' do
69
- it 'should be "Invalid"' do
70
- @device.model_number.should be_kind_of(String)
71
- @device.model_number.should eq('Invalid')
72
- end
73
- end
74
-
75
- %w[photos videos artwork podcasts chapter_images].each do |feature|
76
- describe "#supports_#{feature}?" do
77
- it 'should be false' do
78
- @device.send("supports_#{feature}?").should be_false
79
- end
80
- end
81
- end
82
- end
83
- end
File without changes