jimmy_jukebox 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jimmy_jukebox/artists.rb +8 -3
- data/lib/jimmy_jukebox/jukebox.rb +12 -1
- data/lib/jimmy_jukebox/load_jukebox_code.rb +17 -4
- data/lib/jimmy_jukebox/song.rb +6 -3
- data/lib/jimmy_jukebox/song_loader.rb +78 -40
- data/lib/jimmy_jukebox/songs/Bach.yml +154 -0
- data/lib/jimmy_jukebox/songs/Beethoven.yml +0 -1
- data/lib/jimmy_jukebox/songs/Chopin.yml +48 -0
- data/lib/jimmy_jukebox/songs/FranzSchubert.yml +39 -0
- data/lib/jimmy_jukebox/songs/Haydn.yml +48 -0
- data/lib/jimmy_jukebox/songs/Mendelssohn.yml +58 -0
- data/lib/jimmy_jukebox/songs/Mozart.yml +142 -0
- data/lib/jimmy_jukebox/songs/Vivaldi.yml +53 -0
- data/lib/jimmy_jukebox/user_interface.rb +4 -1
- data/lib/jimmy_jukebox/version.rb +2 -2
- data/spec/song_loader_spec.rb +124 -47
- data/spec/song_spec.rb +14 -0
- metadata +13 -6
data/spec/song_spec.rb
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'jimmy_jukebox/song'
|
3
3
|
require 'jimmy_jukebox/user_config'
|
4
|
+
require 'jimmy_jukebox/jukebox'
|
4
5
|
|
5
6
|
include JimmyJukebox
|
6
7
|
|
8
|
+
# don't actually play music
|
9
|
+
module JimmyJukebox
|
10
|
+
class Song
|
11
|
+
def spawn_method(command, arg)
|
12
|
+
lambda { |command, arg| sleep(5) }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
7
17
|
describe Song do
|
8
18
|
|
9
19
|
before(:each) do
|
@@ -38,14 +48,18 @@ describe Song do
|
|
38
48
|
describe "#paused?" do
|
39
49
|
|
40
50
|
before(:each) do
|
51
|
+
@uc = UserConfig.new
|
52
|
+
@jj = Jukebox.new(@uc)
|
41
53
|
@song = Song.new("~/Music/JAZZ/art_tatum.mp3")
|
42
54
|
end
|
43
55
|
|
44
56
|
it "is initially not paused" do
|
57
|
+
@song.play(@uc, @jj)
|
45
58
|
@song.paused?.should be_false
|
46
59
|
end
|
47
60
|
|
48
61
|
it "is paused after calling #pause" do
|
62
|
+
@song.play
|
49
63
|
@song.pause
|
50
64
|
@song.paused?.should be_true
|
51
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jimmy_jukebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.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-02-
|
12
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -107,8 +107,8 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
-
description: jimmy_jukebox plays random MP3 & OGG songs
|
111
|
-
|
110
|
+
description: jimmy_jukebox downloads great music and plays random MP3 & OGG songs
|
111
|
+
under a directory (or set of directories)
|
112
112
|
email: james@jameslavin.com
|
113
113
|
executables:
|
114
114
|
- play_jukebox
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/jimmy_jukebox/load_jukebox_code.rb
|
130
130
|
- lib/jimmy_jukebox/songs/BillieHoliday.yml
|
131
131
|
- lib/jimmy_jukebox/songs/CharlieParker.yml
|
132
|
+
- lib/jimmy_jukebox/songs/FranzSchubert.yml
|
132
133
|
- lib/jimmy_jukebox/songs/CharlieChristian.yml
|
133
134
|
- lib/jimmy_jukebox/songs/BennieMoten.yml
|
134
135
|
- lib/jimmy_jukebox/songs/FletcherHenderson.yml
|
@@ -139,6 +140,7 @@ files:
|
|
139
140
|
- lib/jimmy_jukebox/songs/LouisArmstrong.yml
|
140
141
|
- lib/jimmy_jukebox/songs/DjangoReinhardt.yml
|
141
142
|
- lib/jimmy_jukebox/songs/RedNorvo.yml
|
143
|
+
- lib/jimmy_jukebox/songs/Mendelssohn.yml
|
142
144
|
- lib/jimmy_jukebox/songs/LionelHampton.yml
|
143
145
|
- lib/jimmy_jukebox/songs/ArtTatum.yml
|
144
146
|
- lib/jimmy_jukebox/songs/BixBeiderbecke.yml
|
@@ -149,11 +151,16 @@ files:
|
|
149
151
|
- lib/jimmy_jukebox/songs/DukeEllington.yml
|
150
152
|
- lib/jimmy_jukebox/songs/BennyGoodman.yml
|
151
153
|
- lib/jimmy_jukebox/songs/CountBasie.yml
|
154
|
+
- lib/jimmy_jukebox/songs/Bach.yml
|
152
155
|
- lib/jimmy_jukebox/songs/ArchibaldCampBanjo.yml
|
156
|
+
- lib/jimmy_jukebox/songs/Mozart.yml
|
157
|
+
- lib/jimmy_jukebox/songs/Haydn.yml
|
153
158
|
- lib/jimmy_jukebox/songs/SidneyBechet.yml
|
159
|
+
- lib/jimmy_jukebox/songs/Vivaldi.yml
|
154
160
|
- lib/jimmy_jukebox/songs/Beethoven.yml
|
155
161
|
- lib/jimmy_jukebox/songs/JamesPJohnson.yml
|
156
162
|
- lib/jimmy_jukebox/songs/JellyRollMorton.yml
|
163
|
+
- lib/jimmy_jukebox/songs/Chopin.yml
|
157
164
|
- lib/jimmy_jukebox/songs/Ragtime.yml
|
158
165
|
- lib/jimmy_jukebox/songs/EarlHines.yml
|
159
166
|
- spec/jimmy_jukebox_spec.rb
|
@@ -166,8 +173,8 @@ files:
|
|
166
173
|
- bin/load_jukebox
|
167
174
|
homepage: https://github.com/JamesLavin/jimmy_jukebox
|
168
175
|
licenses: []
|
169
|
-
post_install_message: I really hope you enjoy the great jazz
|
170
|
-
gem!
|
176
|
+
post_install_message: I really hope you enjoy the great jazz and classical music downloadable
|
177
|
+
using this gem!
|
171
178
|
rdoc_options: []
|
172
179
|
require_paths:
|
173
180
|
- lib
|