jimmy_jukebox 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ module JimmyJukebox
2
+
3
+ AUDIO_FORMATS = {/\.mp3$/i => 'mp3',
4
+ /\.ogg$/i => 'ogg',
5
+ /\.wav$/i => 'wav',
6
+ /.flac$/i => 'flac'}
7
+
8
+ end
9
+
@@ -0,0 +1,64 @@
1
+ module JimmyJukebox
2
+
3
+ module HandleLoadJukeboxInput
4
+
5
+ def no_argv0
6
+ puts "You must select an artist to use 'load_jukebox'."
7
+ puts "For example: 'load_jukebox at' to load Art Tatum"
8
+ puts "Another example: 'load_jukebox dr' to load Django Reinhardt"
9
+ exit
10
+ end
11
+
12
+ def invalid_artist
13
+ puts "No action taken in response to your command 'load_jukebox #{ARGV[0]}'."
14
+ puts "JimmyJukebox does not recognize '#{ARGV[0]}'. You must select a valid artist."
15
+ puts "For example, valid artists include: 'bh' for Billie Holiday, 'cb' for Count Basie, and 'lh' for Lionel Hampton"
16
+ puts "Please see the README for a complete list of valid artists."
17
+ exit
18
+ end
19
+
20
+ def valid_artist?(arg)
21
+ ARTISTS.has_key?(arg.to_sym)
22
+ end
23
+
24
+ def valid_genre?(arg)
25
+ # probably shouldn't hardcode these
26
+ valid_genres = [/^JAZZ$/i, /^CLASSICAL$/i, /^BLUEGRASS$/i, /^BANJO$/i, /^ROCK$/i]
27
+ valid_genres.any? { |g| g =~ arg }
28
+ end
29
+
30
+ def artist_name(arg)
31
+ ARTISTS[arg.to_sym][:name]
32
+ end
33
+
34
+ def valid_integer?(arg)
35
+ arg && arg.to_i.is_a?(Integer) && arg.to_i > 0
36
+ end
37
+
38
+ def process_artist
39
+ if valid_integer?(ARGV[1])
40
+ JimmyJukebox::SongLoader.new.send(artist_name(ARGV[0]), ARGV[1].to_i)
41
+ else
42
+ JimmyJukebox::SongLoader.new.send(artist_name(ARGV[0]))
43
+ end
44
+ end
45
+
46
+ def process_sample
47
+ if ARGV[1].nil?
48
+ JimmyJukebox::SongLoader.new.download_sample_genre(1)
49
+ elsif valid_integer?(ARGV[1]) && valid_genre?(ARGV[2])
50
+ JimmyJukebox::SongLoader.new.download_sample_genre(ARGV[1].to_i, ARGV[2].upcase)
51
+ elsif valid_genre?(ARGV[1]) && valid_integer?(ARGV[2])
52
+ JimmyJukebox::SongLoader.new.download_sample_genre(ARGV[2].to_i, ARGV[1].upcase)
53
+ elsif valid_integer?(ARGV[1])
54
+ JimmyJukebox::SongLoader.new.download_sample_genre(ARGV[1].to_i)
55
+ elsif valid_genre?(ARGV[1])
56
+ JimmyJukebox::SongLoader.new.download_sample_genre(1, ARGV[1].upcase)
57
+ else
58
+ JimmyJukebox::SongLoader.new.download_sample_genre(1)
59
+ end
60
+ end
61
+
62
+ end
63
+
64
+ end
@@ -5,39 +5,16 @@ require 'jimmy_jukebox/song_loader'
5
5
  require 'jimmy_jukebox/artists'
6
6
  include Artists
7
7
 
8
- def no_argv0
9
- puts "You must select an artist to use 'load_jukebox'."
10
- puts "For example: 'load_jukebox at' to load Art Tatum"
11
- puts "Another example: 'load_jukebox dr' to load Django Reinhardt"
12
- exit
13
- end
14
-
15
- def invalid_artist
16
- puts "No action taken in response to your command 'load_jukebox #{ARGV[0]}'."
17
- puts "JimmyJukebox does not recognize '#{ARGV[0]}'. You must select a valid artist."
18
- puts "For example, valid artists include: 'bh' for Billie Holiday, 'cb' for Count Basie, and 'lh' for Lionel Hampton"
19
- puts "Please see the README for a complete list of valid artists."
20
- exit
21
- end
22
-
23
- def valid_artist?(arg)
24
- ARTISTS.has_key?(arg.to_sym)
25
- end
26
-
27
- def artist_name(arg)
28
- ARTISTS[arg.to_sym][:name]
29
- end
30
-
31
- def valid_integer?(arg)
32
- arg && arg.to_i.is_a?(Integer)
33
- end
8
+ require 'jimmy_jukebox/handle_load_jukebox_input'
9
+ include HandleLoadJukeboxInput
34
10
 
35
11
  no_argv0 unless ARGV[0]
36
12
 
37
- invalid_artist unless valid_artist?(ARGV[0])
38
-
39
- if valid_integer?(ARGV[1])
40
- JimmyJukebox::SongLoader.new.send(artist_name(ARGV[0]), ARGV[1].to_i)
13
+ if ARGV[0] =~ /sample/i
14
+ process_sample
15
+ elsif valid_artist?(ARGV[0])
16
+ process_artist
41
17
  else
42
- JimmyJukebox::SongLoader.new.send(artist_name(ARGV[0]))
18
+ invalid_artist
43
19
  end
20
+
@@ -2,11 +2,6 @@ require_relative "display_options"
2
2
 
3
3
  module JimmyJukebox
4
4
 
5
- AUDIO_FORMATS = {/\.mp3$/i => 'mp3',
6
- /\.ogg$/i => 'ogg',
7
- /\.wav$/i => 'wav',
8
- /.flac$/i => 'flac'}
9
-
10
5
  class Song
11
6
 
12
7
  include JimmyJukebox::DisplayOptions
@@ -3,6 +3,7 @@ require 'fileutils'
3
3
  require 'yaml'
4
4
  require 'uri'
5
5
 
6
+ require 'jimmy_jukebox/constants'
6
7
  require 'jimmy_jukebox/artists'
7
8
  include Artists
8
9
 
@@ -12,15 +13,32 @@ class Object
12
13
  end
13
14
  end
14
15
 
16
+ class Hash
17
+ def rand_key
18
+ keys.at(Random.new.rand(0..(keys.size - 1)))
19
+ end
20
+
21
+ def rand_pair
22
+ k = rand_key
23
+ return k, fetch(k)
24
+ end
25
+
26
+ def rand_pair!
27
+ k,v = rand_pair
28
+ delete( k )
29
+ return k,v
30
+ end
31
+ end
32
+
15
33
  require 'jimmy_jukebox/user_config'
16
34
  include JimmyJukebox
17
35
 
36
+ require 'jimmy_jukebox/song'
37
+
18
38
  module JimmyJukebox
19
39
 
20
40
  class SongLoader
21
41
 
22
- MUSIC_TYPES = /\.mp3$|\.ogg$/i
23
-
24
42
  attr_reader :user_config
25
43
 
26
44
  def initialize
@@ -31,33 +49,77 @@ module JimmyJukebox
31
49
  def define_artist(name)
32
50
  metaclass.instance_eval do
33
51
  define_method(name) do |max_num = nil|
34
- save_dir = user_config.default_music_dir + artist_name_to_subdir_name(name.to_s)
52
+ save_dir = user_config.root_music_dir + artist_name_to_subdir_name(name.to_s)
35
53
  songs = YAML::load_file(File.dirname(__FILE__) + "/songs/#{artist_name_to_yaml_file(name.to_s)}")
36
54
  download_num_songs(songs, save_dir, max_num)
37
55
  end
38
56
  end
39
57
  end
40
58
 
59
+ def all_songs(genre = nil) # valid genres: 'JAZZ', 'CLASSICAL', 'BLUEGRASS', 'BANJO', 'ROCK'
60
+ all_songs = {}
61
+ ARTISTS.values.each do |artist|
62
+ next if genre && artist[:genre] != genre
63
+ fn = File.dirname(__FILE__) + "/songs/#{artist_name_to_yaml_file(artist[:name].to_s)}"
64
+ if File.exists?(fn)
65
+ YAML::load_file(fn).each do |song|
66
+ all_songs[song] = artist
67
+ end
68
+ end
69
+ end
70
+ all_songs
71
+ end
41
72
 
42
- def sample_jazz(num_songs)
43
- # create array of all possible songs
73
+ def sample_genre(num_songs, genre = nil)
44
74
  # loop through array and download num_songs new songs (or until end of array reached)
45
- raise "not yet implemented"
75
+ sample = {}
76
+ available_songs = all_songs(genre)
77
+ num_songs.times do
78
+ unless available_songs.length == 0
79
+ k, v = available_songs.rand_pair!
80
+ sample[k] = v
81
+ end
82
+ end
83
+ sample
84
+ end
85
+
86
+ def download_sample_genre(num_songs = 1, genre = nil)
87
+ sample = sample_genre(num_songs, genre)
88
+ sample.each do |song_url, artist|
89
+ save_dir = user_config.root_music_dir + artist_name_to_subdir_name(artist[:name].to_s)
90
+ download_song(song_url, save_dir)
91
+ end
46
92
  end
47
93
 
48
94
  def sample_classical(num_songs)
49
95
  raise "not yet implemented"
50
96
  end
51
97
 
98
+ def valid_music_format_extension?(song_filename)
99
+ JimmyJukebox::AUDIO_FORMATS.keys.any? { |k|
100
+ song_filename =~ k
101
+ }
102
+ end
103
+
104
+ def strip_music_format_extension(song_filename)
105
+ fn = song_filename.dup
106
+ JimmyJukebox::AUDIO_FORMATS.keys.each do |k|
107
+ fn.gsub!(k,"") if fn =~ k
108
+ end
109
+ fn
110
+ end
111
+
52
112
  def version_of_song_in_dir_or_subdir?(song_filename, save_dir)
113
+ extensionless_song_filename = strip_music_format_extension(song_filename)
53
114
  existing_files = all_subdir_music_files_extensionless(save_dir)
54
- existing_files.include?(song_filename.gsub(SongLoader::MUSIC_TYPES,"")) # does extensionless song_filename exist in directory?
115
+ existing_files.include?(extensionless_song_filename) # does extensionless song_filename exist in directory?
55
116
  end
56
117
 
57
118
  def version_of_song_under_specific_dir?(song_filename, save_dir)
58
- existing_files = Dir.entries(".").delete_if { |f| !f.match(SongLoader::MUSIC_TYPES) } # delete unless .mp3 or .ogg
59
- existing_files.map! { |f| f.gsub(SongLoader::MUSIC_TYPES,"") } # strip extensions
60
- existing_files.include?(song_filename.gsub(SongLoader::MUSIC_TYPES,"")) ? true : false # does extensionless song_filename exist in directory?
119
+ extensionless_song_filename = strip_music_format_extension(song_filename)
120
+ existing_files = Dir.entries(".").delete_if { |f| !valid_music_format_extension?(f) } # delete unless valid format
121
+ existing_files.map! { |f| strip_music_format_extension(f) } # strip extensions
122
+ existing_files.include?(extensionless_song_filename) # does extensionless song_filename exist in directory?
61
123
  end
62
124
 
63
125
  def all_subdir_music_files(dir)
@@ -65,12 +127,12 @@ module JimmyJukebox
65
127
  if "".respond_to?(:force_encoding) # Ruby 1.8 doesn't have string encoding or String#force_encoding
66
128
  existing_files.delete_if { |f| !f.force_encoding("UTF-8").valid_encoding? } # avoid "invalid byte sequence in UTF-8 (ArgumentError)"
67
129
  end
68
- existing_files.delete_if { |f| !f.match(SongLoader::MUSIC_TYPES) } # delete unless .mp3, .MP3, .ogg or .OGG
130
+ existing_files.delete_if { |f| !valid_music_format_extension?(f) } # delete unless valid format
69
131
  existing_files.map { |f| File.basename(f) } # strip any path info preceding the filename
70
132
  end
71
133
 
72
134
  def all_subdir_music_files_extensionless(dir)
73
- all_subdir_music_files(dir).map! { |f| f.gsub(SongLoader::MUSIC_TYPES,"") } # strip extensions
135
+ all_subdir_music_files(dir).map! { |f| strip_music_format_extension(f) } # strip extensions
74
136
  end
75
137
 
76
138
  def create_save_dir(save_dir)
@@ -105,14 +167,14 @@ module JimmyJukebox
105
167
  def download_num_songs(song_urls, save_dir, max_num = nil)
106
168
  current_songs = all_subdir_music_files(save_dir)
107
169
  do_not_have = downloadable(song_urls, current_songs)
108
- puts "You already have all songs for this artist" if do_not_have.empty?
170
+ puts "You already have all #{current_songs.length} songs for this artist" if do_not_have.empty?
109
171
  if max_num
110
172
  more_songs = max_num - current_songs.length
111
173
  if more_songs > 0
112
174
  do_not_have = n_random_songs(do_not_have, more_songs)
113
175
  else
114
176
  puts "You already have #{current_songs.length} songs by this artist and are requesting a maximum of #{max_num} songs"
115
- do_not_have = []
177
+ return nil
116
178
  end
117
179
  end
118
180
  download_songs(do_not_have, save_dir)
@@ -138,6 +200,7 @@ module JimmyJukebox
138
200
  end
139
201
 
140
202
  def download_song(song_url, save_dir)
203
+ create_save_dir(save_dir) unless File.directory?(save_dir)
141
204
  savename = song_savename(song_url)
142
205
  return if song_already_exists?(savename, save_dir)
143
206
  puts "Downloading #{savename} to #{save_dir}"
@@ -1,5 +1,6 @@
1
1
  require 'fileutils'
2
2
  require 'forwardable'
3
+ require 'rbconfig'
3
4
 
4
5
  require 'jimmy_jukebox/artists'
5
6
  require 'jimmy_jukebox/song'
@@ -23,10 +24,12 @@ module JimmyJukebox
23
24
 
24
25
  class UserConfig
25
26
 
27
+ class FileHoldingDirectoriesNotFoundException < Exception; end
28
+
26
29
  extend Forwardable
27
30
 
28
31
  attr_writer :music_directories
29
- attr_accessor :songs, :music_player_detector
32
+ attr_accessor :songs, :music_player_detector, :argv0
30
33
  def_delegators :@music_player_detector, :ogg_player, :mp3_player, :wav_player, :flac_player
31
34
 
32
35
  DEFAULT_PLAYLIST_DIR = File.expand_path(File.join("~",".jimmy_jukebox"))
@@ -40,6 +43,7 @@ module JimmyJukebox
40
43
 
41
44
  def initialize
42
45
  self.songs = []
46
+ self.argv0 = ARGV[0]
43
47
  set_music_players
44
48
  generate_directories_list
45
49
  generate_song_list
@@ -56,24 +60,28 @@ module JimmyJukebox
56
60
  /^rock$/i => rock_dir }
57
61
  end
58
62
 
63
+ def root_music_dir
64
+ @root_music_dir || default_music_dir
65
+ end
66
+
59
67
  def default_music_dir
60
68
  File.expand_path(File.join("~","Music"))
61
69
  end
62
70
 
63
71
  def bluegrass_dir
64
- default_music_dir + '/BLUEGRASS'
72
+ root_music_dir + '/BLUEGRASS'
65
73
  end
66
74
 
67
75
  def jazz_dir
68
- default_music_dir + '/JAZZ'
76
+ root_music_dir + '/JAZZ'
69
77
  end
70
78
 
71
79
  def rock_dir
72
- default_music_dir + '/ROCK'
80
+ root_music_dir + '/ROCK'
73
81
  end
74
82
 
75
83
  def classical_dir
76
- default_music_dir + '/CLASSICAL'
84
+ root_music_dir + '/CLASSICAL'
77
85
  end
78
86
 
79
87
  def set_music_players
@@ -94,10 +102,12 @@ module JimmyJukebox
94
102
  end
95
103
 
96
104
  def set_music_directories_from_file
97
- if File.exists?(File.expand_path(ARGV[0]))
98
- @music_directories_file = File.expand_path(ARGV[0])
99
- elsif File.exists?( File.expand_path( File.join(DEFAULT_PLAYLIST_DIR, ARGV[0]) ) )
100
- @music_directories_file = File.expand_path(File.join(DEFAULT_PLAYLIST_DIR, ARGV[0]))
105
+ if File.exists?(File.expand_path(argv0))
106
+ @music_directories_file = File.expand_path(argv0)
107
+ elsif File.exists?( File.expand_path( File.join(DEFAULT_PLAYLIST_DIR, argv0) ) )
108
+ @music_directories_file = File.expand_path(File.join(DEFAULT_PLAYLIST_DIR, argv0))
109
+ else
110
+ raise FileHoldingDirectoriesNotFoundException, "Can't find the file #{argv0}"
101
111
  end
102
112
  load_top_level_directories_from_file
103
113
  end
@@ -111,25 +121,29 @@ module JimmyJukebox
111
121
  reg_ex ? shortcuts[reg_ex] : nil
112
122
  end
113
123
 
114
- def generate_directories_list
115
- # ARGV[0] can be "jazz.txt" (a file holding directory names),
124
+ def set_top_music_directories
125
+ # argv0 can be "jazz.txt" (a file holding directory names),
116
126
  # a shortcut (like 'j' or 'jazz' for jazz or 'r' or 'rock' for rock),
117
127
  # an artist shortcut (like 'bg' for Benny Goodman or 'md' for Miles Davis),
118
128
  # a directory path (like "~/Music/JAZZ")
119
129
  # or nil
120
- if ARGV.empty?
121
- music_directories << default_music_dir
122
- elsif dir = shortcut_to_dir(ARGV[0].strip)
130
+ if argv0.nil?
131
+ music_directories << root_music_dir
132
+ elsif dir = shortcut_to_dir(argv0)
123
133
  music_directories << dir
124
- elsif ARTISTS.keys.include?(ARGV[0].to_sym)
125
- music_directories << default_music_dir + artist_key_to_subdir_name(ARGV[0].to_sym)
126
- elsif is_a_txt_file?(ARGV[0].strip)
134
+ elsif ARTISTS.keys.include?(argv0.to_sym)
135
+ music_directories << root_music_dir + artist_key_to_subdir_name(argv0.to_sym)
136
+ elsif is_a_txt_file?(argv0)
127
137
  set_music_directories_from_file
128
- elsif is_a_directory?(ARGV[0].strip)
129
- music_directories << File.expand_path(ARGV[0].strip)
138
+ elsif is_a_directory?(argv0)
139
+ music_directories << File.expand_path(argv0)
130
140
  else
131
- music_directories << default_music_dir
141
+ music_directories << root_music_dir
132
142
  end
143
+ end
144
+
145
+ def generate_directories_list
146
+ set_top_music_directories
133
147
  create_nonexistent_music_directories
134
148
  add_all_subdirectories
135
149
  end
@@ -147,7 +161,7 @@ module JimmyJukebox
147
161
 
148
162
  def is_a_directory?(whatever)
149
163
  return false unless whatever
150
- File.directory?(File.expand_path(whatever)) ? true : false
164
+ File.directory?(File.expand_path(whatever))
151
165
  end
152
166
 
153
167
  def load_top_level_directories_from_file
@@ -176,8 +190,8 @@ module JimmyJukebox
176
190
  def generate_song_list
177
191
  music_directories.each do |music_dir|
178
192
  files = Dir.entries(File.expand_path(music_dir))
179
- if "".respond_to?(:force_encoding) # Ruby 1.8 doesn't have string encoding or String#force_encoding
180
- files.delete_if { |f| !f.force_encoding("UTF-8").valid_encoding? } # avoid "invalid byte sequence in UTF-8 (ArgumentError)"
193
+ if "".respond_to?(:force_encoding) # Ruby 1.8 doesn't have string encoding or String#force_encoding
194
+ files.delete_if { |f| !f.force_encoding("UTF-8").valid_encoding? } # avoid "invalid byte sequence in UTF-8 (ArgumentError)"
181
195
  end
182
196
  files.delete_if { |f| AUDIO_FORMATS.keys.all? { |re| !f.match(re) } }
183
197
  files.map! { |f| File.expand_path(music_dir) + '/' + f }
@@ -1,4 +1,9 @@
1
- require 'io/console'
1
+ begin
2
+ require 'io/console'
3
+ rescue LoadError
4
+ puts "*** JimmyJukebox uses io/console, which is built into Ruby 1.9.3. I recommend running JimmyJukebox on 1.9.3. You could instead install the 'io-console' gem, but the most recent version works only with 1.9.3, so try \"gem install io-console -v '0.3'\" ***"
5
+ exit
6
+ end
2
7
 
3
8
  if JimmyJukebox::RUNNING_JRUBY
4
9
  class IO
@@ -1,4 +1,4 @@
1
1
  module JimmyJukebox
2
- VERSION = '0.5.9'
3
- DATE = '2013-03-18'
2
+ VERSION = '0.6.0'
3
+ DATE = '2013-03-26'
4
4
  end
data/lib/jimmy_jukebox.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'jimmy_jukebox/constants'
1
2
  require 'jimmy_jukebox/user_config'
2
3
  require 'jimmy_jukebox/song'
3
4
  require 'jimmy_jukebox/jukebox'
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+ require_relative '../lib/jimmy_jukebox/handle_load_jukebox_input'
3
+
4
+ include JimmyJukebox::HandleLoadJukeboxInput
5
+
6
+ describe "#valid_genre?" do
7
+
8
+ before do
9
+ ARGV.clear
10
+ ARGV[0] = 'sample'
11
+ end
12
+
13
+ it "should recognize 'jazz' as a valid genre" do
14
+ valid_genre?('jazz').should be_true
15
+ end
16
+
17
+ it "should recognize 'bluegrass' as a valid genre" do
18
+ valid_genre?('jazz').should be_true
19
+ end
20
+
21
+ it "should recognize 'banjo' as a valid genre" do
22
+ valid_genre?('jazz').should be_true
23
+ end
24
+
25
+ it "should recognize 'rock' as a valid genre" do
26
+ valid_genre?('jazz').should be_true
27
+ end
28
+
29
+ it "should recognize 'classical' as a valid genre" do
30
+ valid_genre?('classical').should be_true
31
+ end
32
+
33
+ it "should recognize 'JAZZ' as a valid genre" do
34
+ valid_genre?('JAZZ').should be_true
35
+ end
36
+
37
+ it "should not recognize 'invalid' as a valid genre" do
38
+ valid_genre?('invalid').should_not be_true
39
+ end
40
+
41
+ end
@@ -7,10 +7,107 @@ require 'fakefs/safe'
7
7
  require 'jimmy_jukebox/song'
8
8
  require 'jimmy_jukebox/song_loader'
9
9
 
10
- describe "SongLoader" do
10
+ describe SongLoader do
11
+
12
+ # WARNING: This section does NOT use FakeFS::SpecHelpers
13
+
14
+ describe "#download_sample_genre" do
15
+
16
+ before(:each) do
17
+ ARGV.clear
18
+ @sl = JimmyJukebox::SongLoader.new
19
+ end
20
+
21
+ context "no genre or num specified" do
22
+
23
+ it "downloads one song" do
24
+ @sl.should_receive(:download_song).once
25
+ @sl.download_sample_genre
26
+ end
27
+
28
+ end
29
+
30
+ context "genre 'JAZZ' and num 10 specified" do
31
+
32
+ it "downloads 10 songs" do
33
+ @sl.should_receive(:download_song).exactly(10).times
34
+ @sl.download_sample_genre(10, 'JAZZ')
35
+ end
36
+
37
+ end
38
+
39
+ context "genre 'CLASSICAL' and num 1 specified" do
40
+
41
+ it "downloads one song" do
42
+ @sl.should_receive(:download_song).once
43
+ @sl.download_sample_genre(1, 'CLASSICAL')
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+
50
+ describe "#sample_genre" do
51
+
52
+ context "genre is nil" do
53
+ let(:sampled_songs) { SongLoader.new.sample_genre(13) }
54
+
55
+ it "should select the indicated # of songs" do
56
+ sampled_songs.length.should == 13
57
+ end
58
+
59
+ end
60
+
61
+ context "genre == 'JAZZ'" do
62
+ let(:sampled_songs) { SongLoader.new.sample_genre(10, 'JAZZ') }
63
+
64
+ it "should select the indicated # of jazz songs" do
65
+ sampled_songs.length.should == 10
66
+ sampled_songs.values.each do |artist|
67
+ artist[:genre].should == 'JAZZ'
68
+ end
69
+ end
70
+
71
+ end
72
+
73
+ context "genre == 'CLASSICAL'" do
74
+ let(:sampled_songs) { SongLoader.new.sample_genre(12, 'CLASSICAL') }
75
+
76
+ it "should select the indicated # of classical songs" do
77
+ sampled_songs.length.should == 12
78
+ sampled_songs.values.each do |artist|
79
+ artist[:genre].should == 'CLASSICAL'
80
+ end
81
+ end
82
+
83
+ end
84
+
85
+ end
86
+
87
+ describe "#all_songs" do
88
+
89
+ context "no genre specified" do
90
+
91
+ let(:all_songs) { SongLoader.new.all_songs }
92
+
93
+ it "should include songs from artist lists" do
94
+ all_songs.keys.should include "http://archive.org/download/MozartSinfoniaConcertanteK.364spivakovMintz/02Mozart_SinfoniaConcertanteInEFlatK364-2.Andante.mp3"
95
+ all_songs.keys.should include "http://archive.org/download/WinnerRagtimeBand-TheTurkeyTrot1912/WinnerRagtimeBand-TurkeyTrot1912.mp3"
96
+ end
97
+
98
+ end
99
+
100
+ context "genre 'JAZZ' specified" do
101
+
102
+ let(:all_songs) { SongLoader.new.all_songs('JAZZ') }
103
+
104
+ it "should include only songs from jazz artist lists" do
105
+ all_songs.keys.should_not include "http://archive.org/download/MozartSinfoniaConcertanteK.364spivakovMintz/02Mozart_SinfoniaConcertanteInEFlatK364-2.Andante.mp3"
106
+ all_songs.keys.should include "http://archive.org/download/WinnerRagtimeBand-TheTurkeyTrot1912/WinnerRagtimeBand-TurkeyTrot1912.mp3"
107
+ end
108
+
109
+ end
11
110
 
12
- it "should have a SUPPORTED_MUSIC_TYPES of '/\.mp3$|\.ogg$/i'" do
13
- SongLoader::MUSIC_TYPES.should == /\.mp3$|\.ogg$/i
14
111
  end
15
112
 
16
113
  end
@@ -20,10 +20,143 @@ describe UserConfig do
20
20
  # end
21
21
  #end
22
22
 
23
- #describe "#set_default_mp3_dir" do
24
- #
25
- #
26
- #end
23
+ describe "#initialize" do
24
+ let(:user_config) { UserConfig.new }
25
+
26
+ describe "blank ARGV" do
27
+
28
+ it "uses the default directory" do
29
+ user_config.music_directories.first.should == UserConfig.new.default_music_dir
30
+ user_config.music_directories.length.should == 1
31
+ end
32
+
33
+ end
34
+
35
+ describe "non-standard dir ARGV" do
36
+ let(:nonstd_dir) { "~/my_music_dir" }
37
+
38
+ it "uses the non-standard directory" do
39
+ full_dir = File.expand_path(nonstd_dir)
40
+ FileUtils.mkdir_p(full_dir)
41
+ ARGV[0] = nonstd_dir
42
+ user_config.music_directories.first.should == full_dir
43
+ user_config.music_directories.length.should == 1
44
+ ARGV[0] = nil
45
+ end
46
+
47
+ end
48
+
49
+ describe "artist dir ARGV" do
50
+ let(:artist_param) { 'jrm' }
51
+
52
+ it "uses the artist directory" do
53
+ artist_dir = File.expand_path("~/Music/JAZZ/Jelly_Roll_Morton")
54
+ FileUtils.mkdir_p(artist_dir)
55
+ ARGV[0] = artist_param
56
+ user_config.music_directories.first.should == artist_dir
57
+ user_config.music_directories.length.should == 1
58
+ ARGV[0] = nil
59
+ end
60
+
61
+ end
62
+
63
+ describe "shortcut 'j' ARGV" do
64
+ let(:shortcut_param) { 'j' }
65
+
66
+ it "finds all the jazz directories" do
67
+ at_dir = File.expand_path("~/Music/JAZZ/Art_Tatum")
68
+ de_dir = File.expand_path("~/Music/JAZZ/Duke_Ellington")
69
+ FileUtils.mkdir_p(at_dir)
70
+ FileUtils.mkdir_p(de_dir)
71
+ ARGV[0] = shortcut_param
72
+ user_config.music_directories.should include at_dir
73
+ user_config.music_directories.should include de_dir
74
+ user_config.music_directories.length.should == 3
75
+ ARGV[0] = nil
76
+ end
77
+
78
+ end
79
+
80
+ describe "(playlist) file as ARGV" do
81
+ let(:dir1) { '~/path2/artist1' }
82
+ let(:dir2) { '~/path3/artist2' }
83
+ let(:d1) { File.expand_path(dir1) }
84
+ let(:d2) { File.expand_path(dir2) }
85
+
86
+ before(:each) do
87
+ FileUtils.mkdir_p(d1)
88
+ FileUtils.mkdir_p(d2)
89
+ end
90
+
91
+ context "full filepath given" do
92
+ let(:file_param) { '~/path/my_music_dirs.txt' }
93
+ let(:d0) { File.expand_path('~/path') }
94
+
95
+ it "uses the file's directories" do
96
+ FileUtils.mkdir_p(d0)
97
+ File.open(File.expand_path(file_param), "w") { |f|
98
+ f.puts dir1
99
+ f.puts dir2
100
+ }
101
+ ARGV[0] = file_param
102
+ user_config.music_directories.should include d1
103
+ user_config.music_directories.should include d2
104
+ ARGV[0] = nil
105
+ end
106
+
107
+ end
108
+
109
+ context "only filename given" do
110
+ let(:file_param) { 'my_music_dirs.txt' }
111
+ let(:d0) { File.expand_path('~/.jimmy_jukebox') }
112
+
113
+ it "uses the file's directories" do
114
+ FileUtils.mkdir_p(d0)
115
+ File.open(File.expand_path(d0 + '/' + file_param), "w") { |f|
116
+ f.puts dir1
117
+ f.puts dir2
118
+ }
119
+ ARGV[0] = file_param
120
+ user_config.music_directories.should include d1
121
+ user_config.music_directories.should include d2
122
+ ARGV[0] = nil
123
+ end
124
+
125
+ end
126
+
127
+ end
128
+
129
+ end
130
+
131
+ describe "#files" do
132
+ let(:user_config) { UserConfig.new }
133
+ let(:dir1) { '~/Music/artist1' }
134
+ let(:dir2) { '~/Music/artist2' }
135
+ let(:d1) { File.expand_path(dir1) }
136
+ let(:d2) { File.expand_path(dir2) }
137
+
138
+ before(:each) do
139
+ FileUtils.mkdir_p(d1)
140
+ FileUtils.mkdir_p(d1 + '/subdir')
141
+ FileUtils.mkdir_p(d2)
142
+ FileUtils.touch d1 + '/song1.mp3'
143
+ FileUtils.touch d1 + '/subdir/song2.ogg'
144
+ FileUtils.touch d1 + '/subdir/song5.afdsdf'
145
+ FileUtils.touch d2 + '/song3.flac'
146
+ FileUtils.touch d2 + '/song4.wav'
147
+ FileUtils.touch d2 + '/song5.WAV'
148
+ end
149
+
150
+ it "generates a complete song list" do
151
+ user_config.songs.should include File.expand_path(d1 + '/song1.mp3')
152
+ user_config.songs.should include File.expand_path(d1 + '/subdir/song2.ogg')
153
+ user_config.songs.should include File.expand_path(d2 + '/song3.flac')
154
+ user_config.songs.should include File.expand_path(d2 + '/song4.wav')
155
+ user_config.songs.should include File.expand_path(d2 + '/song5.WAV')
156
+ user_config.songs.length.should == 5
157
+ end
158
+
159
+ end
27
160
 
28
161
  describe "#is_a_directory?" do
29
162
  it "accepts relative paths" do
@@ -36,7 +169,7 @@ describe UserConfig do
36
169
  describe "#shortcuts" do
37
170
 
38
171
  it "finds dirs based on regex keys" do
39
- UserConfig.new().shortcuts[/^bluegrass$/i] == UserConfig.new().bluegrass_dir
172
+ UserConfig.new.shortcuts[/^bluegrass$/i] == UserConfig.new().bluegrass_dir
40
173
  end
41
174
 
42
175
  end
@@ -44,7 +177,7 @@ describe UserConfig do
44
177
  describe "#shortcut_to_dir" do
45
178
 
46
179
  it "knows 'r' means rock-and-roll" do
47
- UserConfig.new().shortcut_to_dir('r') == UserConfig.new().rock_dir
180
+ UserConfig.new.shortcut_to_dir('r') == UserConfig.new().rock_dir
48
181
  end
49
182
 
50
183
  end
metadata CHANGED
@@ -1,125 +1,114 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jimmy_jukebox
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.5.9
4
+ version: 0.6.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Lavin
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-18 00:00:00.000000000 Z
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - ">="
19
+ - - ! '>='
19
20
  - !ruby/object:Gem::Version
20
- version: !binary |-
21
- MA==
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
22
25
  none: false
23
- requirement: !ruby/object:Gem::Requirement
24
26
  requirements:
25
- - - ">="
27
+ - - ! '>='
26
28
  - !ruby/object:Gem::Version
27
- version: !binary |-
28
- MA==
29
- none: false
30
- prerelease: false
31
- type: :development
29
+ version: '0'
32
30
  - !ruby/object:Gem::Dependency
33
31
  name: rspec-core
34
- version_requirements: !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
35
34
  requirements:
36
- - - ">="
35
+ - - ! '>='
37
36
  - !ruby/object:Gem::Version
38
- version: !binary |-
39
- MA==
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
40
41
  none: false
41
- requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ">="
43
+ - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: !binary |-
46
- MA==
47
- none: false
48
- prerelease: false
49
- type: :development
45
+ version: '0'
50
46
  - !ruby/object:Gem::Dependency
51
47
  name: rspec-mocks
52
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
53
50
  requirements:
54
- - - ">="
51
+ - - ! '>='
55
52
  - !ruby/object:Gem::Version
56
- version: !binary |-
57
- MA==
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
58
57
  none: false
59
- requirement: !ruby/object:Gem::Requirement
60
58
  requirements:
61
- - - ">="
59
+ - - ! '>='
62
60
  - !ruby/object:Gem::Version
63
- version: !binary |-
64
- MA==
65
- none: false
66
- prerelease: false
67
- type: :development
61
+ version: '0'
68
62
  - !ruby/object:Gem::Dependency
69
63
  name: rspec-expectations
70
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
71
66
  requirements:
72
- - - ">="
67
+ - - ! '>='
73
68
  - !ruby/object:Gem::Version
74
- version: !binary |-
75
- MA==
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
76
73
  none: false
77
- requirement: !ruby/object:Gem::Requirement
78
74
  requirements:
79
- - - ">="
75
+ - - ! '>='
80
76
  - !ruby/object:Gem::Version
81
- version: !binary |-
82
- MA==
83
- none: false
84
- prerelease: false
85
- type: :development
77
+ version: '0'
86
78
  - !ruby/object:Gem::Dependency
87
79
  name: fakefs
88
- version_requirements: !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
89
82
  requirements:
90
- - - ">="
83
+ - - ! '>='
91
84
  - !ruby/object:Gem::Version
92
- version: !binary |-
93
- MA==
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
94
89
  none: false
95
- requirement: !ruby/object:Gem::Requirement
96
90
  requirements:
97
- - - ">="
91
+ - - ! '>='
98
92
  - !ruby/object:Gem::Version
99
- version: !binary |-
100
- MA==
101
- none: false
102
- prerelease: false
103
- type: :development
93
+ version: '0'
104
94
  - !ruby/object:Gem::Dependency
105
95
  name: fakeweb
106
- version_requirements: !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
107
98
  requirements:
108
- - - ">="
99
+ - - ! '>='
109
100
  - !ruby/object:Gem::Version
110
- version: !binary |-
111
- MA==
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
112
105
  none: false
113
- requirement: !ruby/object:Gem::Requirement
114
106
  requirements:
115
- - - ">="
107
+ - - ! '>='
116
108
  - !ruby/object:Gem::Version
117
- version: !binary |-
118
- MA==
119
- none: false
120
- prerelease: false
121
- type: :development
122
- description: jimmy_jukebox downloads great music and plays random MP3 & OGG songs under a directory (or set of directories)
109
+ version: '0'
110
+ description: jimmy_jukebox downloads great music and plays random MP3 & OGG songs
111
+ under a directory (or set of directories)
123
112
  email: james@jameslavin.com
124
113
  executables:
125
114
  - play_jukebox
@@ -130,111 +119,109 @@ files:
130
119
  - roadmap.txt
131
120
  - LICENSE.txt
132
121
  - lib/jimmy_jukebox.rb
133
- - lib/jimmy_jukebox/version.rb
134
- - lib/jimmy_jukebox/artists.rb
135
- - lib/jimmy_jukebox/song.rb
136
- - lib/jimmy_jukebox/jukebox.rb
122
+ - lib/jimmy_jukebox/handle_load_jukebox_input.rb
137
123
  - lib/jimmy_jukebox/display_options.rb
138
124
  - lib/jimmy_jukebox/music_player_detector.rb
139
- - lib/jimmy_jukebox/user_config.rb
125
+ - lib/jimmy_jukebox/load_jukebox_code.rb
140
126
  - lib/jimmy_jukebox/user_interface.rb
127
+ - lib/jimmy_jukebox/user_config.rb
128
+ - lib/jimmy_jukebox/jukebox.rb
129
+ - lib/jimmy_jukebox/constants.rb
130
+ - lib/jimmy_jukebox/song.rb
131
+ - lib/jimmy_jukebox/version.rb
141
132
  - lib/jimmy_jukebox/song_loader.rb
142
- - lib/jimmy_jukebox/load_jukebox_code.rb
143
- - lib/jimmy_jukebox/songs/BillieHoliday.yml
133
+ - lib/jimmy_jukebox/artists.rb
134
+ - lib/jimmy_jukebox/songs/Mozart.yml
135
+ - lib/jimmy_jukebox/songs/JellyRollMorton.yml
136
+ - lib/jimmy_jukebox/songs/DizzyGillespie.yml
137
+ - lib/jimmy_jukebox/songs/SidneyBechet.yml
138
+ - lib/jimmy_jukebox/songs/Haydn.yml
144
139
  - lib/jimmy_jukebox/songs/ModernJazzQuartet.yml
145
- - lib/jimmy_jukebox/songs/CharlieParker.yml
146
- - lib/jimmy_jukebox/songs/JohannesBrahms.yml
140
+ - lib/jimmy_jukebox/songs/LesBrown.yml
147
141
  - lib/jimmy_jukebox/songs/FranzSchubert.yml
148
- - lib/jimmy_jukebox/songs/CharlieChristian.yml
149
- - lib/jimmy_jukebox/songs/BennieMoten.yml
150
- - lib/jimmy_jukebox/songs/FletcherHenderson.yml
151
- - lib/jimmy_jukebox/songs/ColemanHawkins.yml
142
+ - lib/jimmy_jukebox/songs/EarlHines.yml
143
+ - lib/jimmy_jukebox/songs/CharlieParker.yml
144
+ - lib/jimmy_jukebox/songs/EarlScruggs.yml
152
145
  - lib/jimmy_jukebox/songs/JazzMedleys.yml
146
+ - lib/jimmy_jukebox/songs/FletcherHenderson.yml
153
147
  - lib/jimmy_jukebox/songs/KingOliver.yml
154
- - lib/jimmy_jukebox/songs/JohnColtrane.yml
155
- - lib/jimmy_jukebox/songs/OriginalDixielandJazzBand.yml
148
+ - lib/jimmy_jukebox/songs/DukeEllington.yml
149
+ - lib/jimmy_jukebox/songs/ArtTatum.yml
150
+ - lib/jimmy_jukebox/songs/BixBeiderbecke.yml
151
+ - lib/jimmy_jukebox/songs/BennyGoodman.yml
152
+ - lib/jimmy_jukebox/songs/ColemanHawkins.yml
156
153
  - lib/jimmy_jukebox/songs/OscarPeterson.yml
157
- - lib/jimmy_jukebox/songs/Dixieland.yml
158
- - lib/jimmy_jukebox/songs/LouisArmstrong.yml
154
+ - lib/jimmy_jukebox/songs/OriginalDixielandJazzBand.yml
155
+ - lib/jimmy_jukebox/songs/JohnColtrane.yml
159
156
  - lib/jimmy_jukebox/songs/DjangoReinhardt.yml
160
- - lib/jimmy_jukebox/songs/RedNorvo.yml
161
- - lib/jimmy_jukebox/songs/Mendelssohn.yml
157
+ - lib/jimmy_jukebox/songs/JohannesBrahms.yml
158
+ - lib/jimmy_jukebox/songs/CliffordHayesJugBlowers.yml
162
159
  - lib/jimmy_jukebox/songs/ScottJoplin.yml
163
- - lib/jimmy_jukebox/songs/LionelHampton.yml
164
- - lib/jimmy_jukebox/songs/ArtTatum.yml
165
- - lib/jimmy_jukebox/songs/BixBeiderbecke.yml
160
+ - lib/jimmy_jukebox/songs/Vivaldi.yml
161
+ - lib/jimmy_jukebox/songs/BillieHoliday.yml
162
+ - lib/jimmy_jukebox/songs/MauriceRavel.yml
163
+ - lib/jimmy_jukebox/songs/Beethoven.yml
164
+ - lib/jimmy_jukebox/songs/Ragtime.yml
166
165
  - lib/jimmy_jukebox/songs/ArtieShaw.yml
166
+ - lib/jimmy_jukebox/songs/Dixieland.yml
167
167
  - lib/jimmy_jukebox/songs/MilesDavis.yml
168
- - lib/jimmy_jukebox/songs/HoraceSilver.yml
169
- - lib/jimmy_jukebox/songs/BudPowell.yml
170
- - lib/jimmy_jukebox/songs/ChuckBerry.yml
171
- - lib/jimmy_jukebox/songs/PaulWhiteman.yml
172
- - lib/jimmy_jukebox/songs/CliffordHayesJugBlowers.yml
168
+ - lib/jimmy_jukebox/songs/LionelHampton.yml
173
169
  - lib/jimmy_jukebox/songs/GlennMiller.yml
174
- - lib/jimmy_jukebox/songs/LesBrown.yml
175
- - lib/jimmy_jukebox/songs/CannonballAdderley.yml
176
- - lib/jimmy_jukebox/songs/DizzyGillespie.yml
177
- - lib/jimmy_jukebox/songs/DukeEllington.yml
178
- - lib/jimmy_jukebox/songs/BillEvans.yml
179
- - lib/jimmy_jukebox/songs/BennyGoodman.yml
180
- - lib/jimmy_jukebox/songs/CountBasie.yml
170
+ - lib/jimmy_jukebox/songs/LouisArmstrong.yml
171
+ - lib/jimmy_jukebox/songs/BillMonroe.yml
181
172
  - lib/jimmy_jukebox/songs/Bach.yml
173
+ - lib/jimmy_jukebox/songs/BennieMoten.yml
174
+ - lib/jimmy_jukebox/songs/CharlieChristian.yml
175
+ - lib/jimmy_jukebox/songs/RedNorvo.yml
176
+ - lib/jimmy_jukebox/songs/Chopin.yml
177
+ - lib/jimmy_jukebox/songs/Mendelssohn.yml
178
+ - lib/jimmy_jukebox/songs/CountBasie.yml
182
179
  - lib/jimmy_jukebox/songs/ArchibaldCampBanjo.yml
183
- - lib/jimmy_jukebox/songs/Mozart.yml
184
- - lib/jimmy_jukebox/songs/Haydn.yml
185
- - lib/jimmy_jukebox/songs/SidneyBechet.yml
186
- - lib/jimmy_jukebox/songs/Vivaldi.yml
187
- - lib/jimmy_jukebox/songs/Beethoven.yml
180
+ - lib/jimmy_jukebox/songs/ChuckBerry.yml
181
+ - lib/jimmy_jukebox/songs/CannonballAdderley.yml
188
182
  - lib/jimmy_jukebox/songs/JamesPJohnson.yml
189
- - lib/jimmy_jukebox/songs/CecilTaylor.yml
190
- - lib/jimmy_jukebox/songs/JellyRollMorton.yml
191
- - lib/jimmy_jukebox/songs/Chopin.yml
192
- - lib/jimmy_jukebox/songs/Ragtime.yml
193
- - lib/jimmy_jukebox/songs/Monk.yml
194
- - lib/jimmy_jukebox/songs/EarlHines.yml
195
- - lib/jimmy_jukebox/songs/EarlScruggs.yml
196
- - lib/jimmy_jukebox/songs/BillMonroe.yml
197
- - lib/jimmy_jukebox/songs/MauriceRavel.yml
198
- - spec/jimmy_jukebox_spec.rb
199
- - spec/song_loader_spec.rb
200
183
  - spec/user_config_spec.rb
201
184
  - spec/artists_spec.rb
202
- - spec/music_player_detector_spec.rb
203
185
  - spec/song_spec.rb
186
+ - spec/music_player_detector_spec.rb
204
187
  - spec/spec_helper.rb
188
+ - spec/song_loader_spec.rb
189
+ - spec/load_jukebox_code_spec.rb
190
+ - spec/jimmy_jukebox_spec.rb
205
191
  - bin/play_jukebox
206
192
  - bin/load_jukebox
207
193
  homepage: https://github.com/JamesLavin/jimmy_jukebox
208
194
  licenses: []
209
- post_install_message: I really hope you enjoy the great jazz, classical, bluegrass, and early rock music downloadable using this gem!
195
+ post_install_message: I really hope you enjoy the great jazz, classical, bluegrass,
196
+ and early rock music downloadable using this gem!
210
197
  rdoc_options: []
211
198
  require_paths:
212
199
  - lib
213
200
  required_ruby_version: !ruby/object:Gem::Requirement
201
+ none: false
214
202
  requirements:
215
- - - ">="
203
+ - - ! '>='
216
204
  - !ruby/object:Gem::Version
217
- version: !binary |-
218
- MA==
219
- none: false
205
+ version: '0'
220
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
+ none: false
221
208
  requirements:
222
- - - ">="
209
+ - - ! '>='
223
210
  - !ruby/object:Gem::Version
224
- version: !binary |-
225
- MA==
226
- none: false
211
+ version: '0'
227
212
  requirements: []
228
213
  rubyforge_project: jimmy_jukebox
229
- rubygems_version: 1.8.24
230
- signing_key:
214
+ rubygems_version: 1.8.23
215
+ signing_key:
231
216
  specification_version: 3
232
217
  summary: plays your MP3 & OGG files and lets you easily download music
233
218
  test_files:
234
- - spec/jimmy_jukebox_spec.rb
235
- - spec/song_loader_spec.rb
236
219
  - spec/user_config_spec.rb
237
220
  - spec/artists_spec.rb
238
- - spec/music_player_detector_spec.rb
239
221
  - spec/song_spec.rb
222
+ - spec/music_player_detector_spec.rb
240
223
  - spec/spec_helper.rb
224
+ - spec/song_loader_spec.rb
225
+ - spec/load_jukebox_code_spec.rb
226
+ - spec/jimmy_jukebox_spec.rb
227
+ has_rdoc:
@@ -1,3 +0,0 @@
1
- ---
2
- - http://archive.org/download/BillEvansTrio-GloriasSteptake2/01.GloriasSteptake2.mp3
3
- - http://archive.org/download/BlueInGreen/03-BlueInGreen.mp3
@@ -1,3 +0,0 @@
1
- ---
2
- - http://archive.org/download/BudPowell-UnPocoLoco/14.Track14.mp3
3
- - http://archive.org/download/BudPowell-SomebodyLovesMe/BudPowell-SomebodyLovesMe.mp3
@@ -1,3 +0,0 @@
1
- ---
2
- - http://archive.org/download/CecilTaylor-Conquistador/01-Conquistador.mp3
3
- - http://archive.org/download/OtekiCaz27.05.2012/OtekiCaz20120527.
@@ -1,2 +0,0 @@
1
- ---
2
- - http://archive.org/download/JazzInspirationHoraceSilver/345678.mp3
@@ -1,3 +0,0 @@
1
- ---
2
- - http://archive.org/download/JustAGigolo/TheloniousMonk-02-JustAGigolotake1.mp3
3
- -
@@ -1,5 +0,0 @@
1
- ---
2
- - http://archive.org/download/PaulWhiteman-4UneditedWavFiles-TwoUncommon/InaBoat.wav
3
- - http://archive.org/download/PaulWhiteman-4UneditedWavFiles-TwoUncommon/Sweetheart.wav
4
- - http://archive.org/download/PaulWhiteman-4UneditedWavFiles-TwoUncommon/TheJapaneseSandman.wav
5
- - http://archive.org/download/PaulWhiteman-4UneditedWavFiles-TwoUncommon/Whispering.wav