spotify 7.0.2 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,9 +46,9 @@ module Spotify
46
46
  # @attr [Fixnum] sample_rate
47
47
  # @attr [Fixnum] channels
48
48
  class AudioFormat < FFI::Struct
49
- layout :sample_type => :sampletype,
50
- :sample_rate => :int,
51
- :channels => :int
49
+ layout :sample_type, :sampletype,
50
+ :sample_rate, :int,
51
+ :channels, :int
52
52
  end
53
53
 
54
54
  # FFI::Struct for Audio Buffer Stats.
@@ -56,8 +56,8 @@ module Spotify
56
56
  # @attr [Fixnum] samples
57
57
  # @attr [Fixnum] stutter
58
58
  class AudioBufferStats < FFI::Struct
59
- layout :samples => :int,
60
- :stutter => :int
59
+ layout :samples, :int,
60
+ :stutter, :int
61
61
  end
62
62
 
63
63
  #
@@ -107,21 +107,21 @@ module Spotify
107
107
  # @attr [callback(:pointer):void] stop_playback
108
108
  # @attr [callback(:pointer, :pointer):void] get_audio_buffer_stats
109
109
  class SessionCallbacks < FFI::Struct
110
- layout :logged_in => callback([ :pointer, :error ], :void),
111
- :logged_out => callback([ :pointer ], :void),
112
- :metadata_updated => callback([ :pointer ], :void),
113
- :connection_error => callback([ :pointer, :error ], :void),
114
- :message_to_user => callback([ :pointer, :string ], :void),
115
- :notify_main_thread => callback([ :pointer ], :void),
116
- :music_delivery => callback([ :pointer, :pointer, :pointer, :int ], :int),
117
- :play_token_lost => callback([ :pointer ], :void),
118
- :log_message => callback([ :pointer, :string ], :void),
119
- :end_of_track => callback([ :pointer ], :void),
120
- :streaming_error => callback([ :pointer, :error ], :void),
121
- :userinfo_updated => callback([ :pointer ], :void),
122
- :start_playback => callback([ :pointer ], :void),
123
- :stop_playback => callback([ :pointer ], :void),
124
- :get_audio_buffer_stats => callback([ :pointer, :pointer ], :void)
110
+ layout :logged_in, callback([ :pointer, :error ], :void),
111
+ :logged_out, callback([ :pointer ], :void),
112
+ :metadata_updated, callback([ :pointer ], :void),
113
+ :connection_error, callback([ :pointer, :error ], :void),
114
+ :message_to_user, callback([ :pointer, :string ], :void),
115
+ :notify_main_thread, callback([ :pointer ], :void),
116
+ :music_delivery, callback([ :pointer, :pointer, :pointer, :int ], :int),
117
+ :play_token_lost, callback([ :pointer ], :void),
118
+ :log_message, callback([ :pointer, :string ], :void),
119
+ :end_of_track, callback([ :pointer ], :void),
120
+ :streaming_error, callback([ :pointer, :error ], :void),
121
+ :userinfo_updated, callback([ :pointer ], :void),
122
+ :start_playback, callback([ :pointer ], :void),
123
+ :stop_playback, callback([ :pointer ], :void),
124
+ :get_audio_buffer_stats, callback([ :pointer, :pointer ], :void)
125
125
  end
126
126
 
127
127
  # FFI::Struct for Session configuration.
@@ -136,17 +136,17 @@ module Spotify
136
136
  # @attr [Fixnum] dont_save_metadata_for_playlists
137
137
  # @attr [Fixnum] initially_unload_playlists
138
138
  class SessionConfig < FFI::Struct
139
- layout :api_version => :int,
140
- :cache_location => :pointer,
141
- :settings_location => :pointer,
142
- :application_key => :pointer,
143
- :application_key_size => :size_t,
144
- :user_agent => :pointer,
145
- :callbacks => :pointer,
146
- :userdata => :pointer,
147
- :compress_playlists => :int,
148
- :dont_save_metadata_for_playlists => :int,
149
- :initially_unload_playlists => :int
139
+ layout :api_version, :int,
140
+ :cache_location, :pointer,
141
+ :settings_location, :pointer,
142
+ :application_key, :pointer,
143
+ :application_key_size, :size_t,
144
+ :user_agent, :pointer,
145
+ :callbacks, :pointer,
146
+ :userdata, :pointer,
147
+ :compress_playlists, :int,
148
+ :dont_save_metadata_for_playlists, :int,
149
+ :initially_unload_playlists, :int
150
150
  end
151
151
 
152
152
  #
@@ -280,26 +280,26 @@ module Spotify
280
280
  # Searching
281
281
  #
282
282
  # @see http://developer.spotify.com/en/libspotify/docs/group__search.html
283
- enum :radio_genre, {
284
- :alt_pop_rock => 0x1,
285
- :blues => 0x2,
286
- :country => 0x4,
287
- :disco => 0x8,
288
- :funk => 0x10,
289
- :hard_rock => 0x20,
290
- :heavy_metal => 0x40,
291
- :rap => 0x80,
292
- :house => 0x100,
293
- :jazz => 0x200,
294
- :new_wave => 0x400,
295
- :rnb => 0x800,
296
- :pop => 0x1000,
297
- :punk => 0x2000,
298
- :reggae => 0x4000,
299
- :pop_rock => 0x8000,
300
- :soul => 0x10000,
301
- :techno => 0x20000
302
- }.flatten
283
+ enum :radio_genre, [
284
+ :alt_pop_rock, 0x1,
285
+ :blues , 0x2,
286
+ :country , 0x4,
287
+ :disco , 0x8,
288
+ :funk , 0x10,
289
+ :hard_rock , 0x20,
290
+ :heavy_metal , 0x40,
291
+ :rap , 0x80,
292
+ :house , 0x100,
293
+ :jazz , 0x200,
294
+ :new_wave , 0x400,
295
+ :rnb , 0x800,
296
+ :pop , 0x1000,
297
+ :punk , 0x2000,
298
+ :reggae , 0x4000,
299
+ :pop_rock , 0x8000,
300
+ :soul , 0x10000,
301
+ :techno , 0x20000
302
+ ]
303
303
 
304
304
 
305
305
  attach_function :search_create, :sp_search_create, [ :pointer, :string, :int, :int, :int, :int, :int, :int, callback([:pointer, :pointer], :void), :pointer ], :pointer
@@ -374,19 +374,19 @@ module Spotify
374
374
  # @attr [callback(:pointer, :int, :string, :pointer):void] track_message_changed
375
375
  # @attr [callback(:pointer, :pointer):void] subscribers_changed
376
376
  class PlaylistCallbacks < FFI::Struct
377
- layout :tracks_added => callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
378
- :tracks_removed => callback([ :pointer, :pointer, :int, :pointer ], :void),
379
- :tracks_moved => callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
380
- :playlist_renamed => callback([ :pointer, :pointer ], :void),
381
- :playlist_state_changed => callback([ :pointer, :pointer ], :void),
382
- :playlist_update_in_progress => callback([ :pointer, :bool, :pointer ], :void),
383
- :playlist_metadata_updated => callback([ :pointer, :pointer ], :void),
384
- :track_created_changed => callback([ :pointer, :int, :pointer, :int, :pointer ], :void),
385
- :track_seen_changed => callback([ :pointer, :int, :bool, :pointer ], :void),
386
- :description_changed => callback([ :pointer, :string, :pointer ], :void),
387
- :image_changed => callback([ :pointer, :pointer, :pointer ], :void),
388
- :track_message_changed => callback([ :pointer, :int, :string, :pointer ], :void),
389
- :subscribers_changed => callback([ :pointer, :pointer ], :void)
377
+ layout :tracks_added, callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
378
+ :tracks_removed, callback([ :pointer, :pointer, :int, :pointer ], :void),
379
+ :tracks_moved, callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
380
+ :playlist_renamed, callback([ :pointer, :pointer ], :void),
381
+ :playlist_state_changed, callback([ :pointer, :pointer ], :void),
382
+ :playlist_update_in_progress, callback([ :pointer, :bool, :pointer ], :void),
383
+ :playlist_metadata_updated, callback([ :pointer, :pointer ], :void),
384
+ :track_created_changed, callback([ :pointer, :int, :pointer, :int, :pointer ], :void),
385
+ :track_seen_changed, callback([ :pointer, :int, :bool, :pointer ], :void),
386
+ :description_changed, callback([ :pointer, :string, :pointer ], :void),
387
+ :image_changed, callback([ :pointer, :pointer, :pointer ], :void),
388
+ :track_message_changed, callback([ :pointer, :int, :string, :pointer ], :void),
389
+ :subscribers_changed, callback([ :pointer, :pointer ], :void)
390
390
  end
391
391
 
392
392
  # FFI::Struct for Subscribers of a Playlist.
@@ -394,8 +394,8 @@ module Spotify
394
394
  # @attr [Fixnum] count
395
395
  # @attr [Pointer<String>] subscribers
396
396
  class Subscribers < FFI::Struct
397
- layout :count => :uint,
398
- :subscribers => :pointer # array of count strings
397
+ layout :count, :uint,
398
+ :subscribers, :pointer # array of count strings
399
399
  end
400
400
 
401
401
  #
@@ -425,10 +425,10 @@ module Spotify
425
425
  # @attr [callback(:pointer, :pointer, :int, :int, :pointer):void] playlist_moved
426
426
  # @attr [callback(:pointer, :pointer):void] container_loaded
427
427
  class PlaylistContainerCallbacks < FFI::Struct
428
- layout :playlist_added => callback([ :pointer, :pointer, :int, :pointer ], :void),
429
- :playlist_removed => callback([ :pointer, :pointer, :int, :pointer ], :void),
430
- :playlist_moved => callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
431
- :container_loaded => callback([ :pointer, :pointer ], :void)
428
+ layout :playlist_added, callback([ :pointer, :pointer, :int, :pointer ], :void),
429
+ :playlist_removed, callback([ :pointer, :pointer, :int, :pointer ], :void),
430
+ :playlist_moved, callback([ :pointer, :pointer, :int, :int, :pointer ], :void),
431
+ :container_loaded, callback([ :pointer, :pointer ], :void)
432
432
  end
433
433
 
434
434
  #
@@ -1,3 +1,3 @@
1
1
  module Spotify
2
- VERSION = [7, 0, 2].join('.')
2
+ VERSION = [7, 0, 3].join('.')
3
3
  end
@@ -90,7 +90,7 @@ describe "enums" do
90
90
  end
91
91
 
92
92
  it "should match the definition" do
93
- attached_enum.symbol_map.sort_by { |k, v| -k.size }.each do |(key, value)|
93
+ attached_enum.symbol_map.sort_by { |k, v| -k.to_s.size }.each do |(key, value)|
94
94
  k, v = original_enum.find { |x, _| x.match key.to_s }
95
95
  v.must_equal value.to_s
96
96
  original_enum.delete(k)
metadata CHANGED
@@ -1,103 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spotify
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 7
7
- - 0
8
- - 2
9
- version: 7.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 7.0.3
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Kim Burgestrand
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-04-18 00:00:00 +02:00
12
+ date: 2011-04-18 00:00:00.000000000 +02:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: ffi
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &2153189120 !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
19
+ requirements:
26
20
  - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 0
31
- - 0
21
+ - !ruby/object:Gem::Version
32
22
  version: 1.0.0
33
23
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: yard
37
24
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *2153189120
26
+ - !ruby/object:Gem::Dependency
27
+ name: yard
28
+ requirement: &2153188700 !ruby/object:Gem::Requirement
39
29
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
46
34
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: rbgccxml
50
35
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *2153188700
37
+ - !ruby/object:Gem::Dependency
38
+ name: rbgccxml
39
+ requirement: &2153188240 !ruby/object:Gem::Requirement
52
40
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
58
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
59
45
  type: :development
60
- version_requirements: *id003
61
- - !ruby/object:Gem::Dependency
62
- name: minitest
63
46
  prerelease: false
64
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *2153188240
48
+ - !ruby/object:Gem::Dependency
49
+ name: minitest
50
+ requirement: &2153187740 !ruby/object:Gem::Requirement
65
51
  none: false
66
- requirements:
52
+ requirements:
67
53
  - - ~>
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 2
71
- - 0
72
- - 0
54
+ - !ruby/object:Gem::Version
73
55
  version: 2.0.0
74
56
  type: :development
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: bundler
78
57
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ version_requirements: *2153187740
59
+ - !ruby/object:Gem::Dependency
60
+ name: bundler
61
+ requirement: &2153187240 !ruby/object:Gem::Requirement
80
62
  none: false
81
- requirements:
63
+ requirements:
82
64
  - - ~>
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 1
86
- - 0
87
- - 0
65
+ - !ruby/object:Gem::Version
88
66
  version: 1.0.0
89
67
  type: :development
90
- version_requirements: *id005
68
+ prerelease: false
69
+ version_requirements: *2153187240
91
70
  description:
92
- email:
71
+ email:
93
72
  - kim@burgestrand.se
94
73
  executables: []
95
-
96
74
  extensions: []
97
-
98
75
  extra_rdoc_files: []
99
-
100
- files:
76
+ files:
101
77
  - .gemtest
102
78
  - .gitignore
103
79
  - Gemfile
@@ -111,36 +87,31 @@ files:
111
87
  - spotify.gemspec
112
88
  has_rdoc: true
113
89
  homepage: https://github.com/Burgestrand/libspotify-ruby
114
- licenses:
90
+ licenses:
115
91
  - X11 License
116
92
  post_install_message:
117
93
  rdoc_options: []
118
-
119
- require_paths:
94
+ require_paths:
120
95
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
96
+ required_ruby_version: !ruby/object:Gem::Requirement
122
97
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- segments:
127
- - 0
128
- version: "0"
129
- required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
103
  none: false
131
- requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- segments:
135
- - 0
136
- version: "0"
137
- requirements:
104
+ requirements:
105
+ - - ! '>='
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements:
138
109
  - libspotify, v0.0.7
139
110
  rubyforge_project:
140
- rubygems_version: 1.3.7
111
+ rubygems_version: 1.6.2
141
112
  signing_key:
142
113
  specification_version: 3
143
114
  summary: Bare-bones Ruby bindings for libspotify
144
- test_files:
115
+ test_files:
145
116
  - spec/api.h
146
117
  - spec/spotify_spec.rb