quiyo 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.rdoc +0 -0
- data/Rakefile +0 -0
- data/VERSION +1 -1
- data/bin/quiyo +56 -8
- data/lib/quiyo/colors.rb +16 -7
- data/lib/quiyo/core.rb +53 -57
- data/lib/quiyo/database.rb +33 -34
- data/lib/quiyo/playback.rb +11 -12
- data/lib/quiyo/playlist.rb +21 -24
- data/lib/quiyo/server.rb +37 -39
- data/lib/quiyo/status.rb +71 -67
- data/lib/quiyo.rb +1 -11
- data/quiyo.gemspec +3 -5
- metadata +4 -6
- data/test/helper.rb +0 -18
- data/test/test_quiyo.rb +0 -7
data/.document
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.rdoc
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.2.1
|
data/bin/quiyo
CHANGED
@@ -11,19 +11,67 @@ print " __
|
|
11
11
|
\\/_/ \\/__/ is starting. Have patience, fool!
|
12
12
|
"
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
config_path = (ENV["XDG_CONFIG_HOME"] == NIL ? ENV["HOME"] + "/.config" : ENV["XDG_CONFIG_HOME"]) + "/quiyo"
|
15
|
+
|
16
|
+
unless File.exists?("#{config_path}/config.yml")
|
17
|
+
p "Generating configuration"
|
18
|
+
Dir.mkdir(config_path)
|
19
|
+
File.open("#{config_path}/config.yml", "w") { |f| f.write("
|
18
20
|
server: localhost
|
19
21
|
port: 6600
|
20
22
|
mpd_user: #{ENV["USER"]}
|
21
23
|
|
22
24
|
music_path: #{ENV["HOME"]}/Music
|
23
|
-
database: #{
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
database: #{config_path}/database.db
|
26
|
+
|
27
|
+
#
|
28
|
+
# Colors:
|
29
|
+
# %<color number (0-255)> - start color
|
30
|
+
# %n - stop color
|
31
|
+
#
|
32
|
+
# Placeholders:
|
33
|
+
# $state - Current state (play/pause/stop)
|
34
|
+
# $flags - Status flags (as in ncmpc: z = random, x = crossfade, r = repeat)
|
35
|
+
#
|
36
|
+
# Everything else is printed verbatim
|
37
|
+
#
|
38
|
+
|
39
|
+
prompt: %4$state%n(%7$flags%n) %2>>>%n
|
40
|
+
|
41
|
+
separator: ----~---~-~---------~~------~-
|
42
|
+
|
43
|
+
colors:
|
44
|
+
artist: 4
|
45
|
+
title: 1
|
46
|
+
album: 2
|
47
|
+
year: 7
|
48
|
+
separator: 238
|
49
|
+
info_key: 99
|
50
|
+
info_value: 185
|
51
|
+
error: 196
|
52
|
+
smiley_frown: 202
|
53
|
+
|
54
|
+
aliases:
|
55
|
+
np: nowplaying
|
56
|
+
stats: info
|
57
|
+
pl: play(action[1])
|
58
|
+
pa: pause
|
59
|
+
st: stop
|
60
|
+
nx: playnext
|
61
|
+
prev: playprevious
|
62
|
+
lspl: lsplist
|
63
|
+
clear: clearplist
|
64
|
+
add: addtoplist(action)
|
65
|
+
del: removefromplist(action[1])
|
66
|
+
lsartists: list('artists')
|
67
|
+
lsalbums: list('albums', action)
|
68
|
+
loves: loved
|
69
|
+
vol: vol(action[1])
|
70
|
+
exit: quit
|
71
|
+
v: action.drop(1).join(' ')" }
|
72
|
+
p "Sample configuration can be found at #{config_path}"
|
73
|
+
p "Edit the configuration, and re-run Quiyo"
|
74
|
+
abort
|
27
75
|
end
|
28
76
|
|
29
77
|
require "quiyo"
|
data/lib/quiyo/colors.rb
CHANGED
@@ -1,9 +1,18 @@
|
|
1
|
-
module Colors
|
2
|
-
def colorize(text, color_code)
|
3
|
-
"\001\e[38;5;#{color_code}m\002#{text}\001\e[0m\002"
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
1
|
class Quiyo
|
8
|
-
|
2
|
+
module Colors
|
3
|
+
def colorize(text, color_code)
|
4
|
+
"\001\e[38;5;#{color_code}m\002#{text}\001\e[0m\002"
|
5
|
+
end
|
6
|
+
|
7
|
+
def printsonglist(song)
|
8
|
+
print "[%s] %s : %s [%s]\n" % [
|
9
|
+
song["pos"],
|
10
|
+
colorize(song["artist"], CONF["colors"]["artist"]),
|
11
|
+
colorize(song["title"], CONF["colors"]["title"]),
|
12
|
+
colorize(song["album"], CONF["colors"]["album"])
|
13
|
+
]
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
include Colors
|
9
18
|
end
|
data/lib/quiyo/core.rb
CHANGED
@@ -1,59 +1,55 @@
|
|
1
|
-
module Core
|
2
|
-
def showprompt
|
3
|
-
Readline.completion_append_character = " "
|
4
|
-
Readline.completion_proc = Proc.new { |str|
|
5
|
-
Dir[PATH+str+'*'].grep( /^#{Regexp.escape(str)}/ )
|
6
|
-
}
|
7
|
-
|
8
|
-
def readline_hist
|
9
|
-
line = Readline.readline(prompt, true)
|
10
|
-
return nil if line.nil?
|
11
|
-
if line =~ /^\s*$/ or Readline::HISTORY.to_a[-2] == line
|
12
|
-
Readline::HISTORY.pop
|
13
|
-
end
|
14
|
-
line
|
15
|
-
end
|
16
|
-
|
17
|
-
while line = readline_hist
|
18
|
-
@mpd.connect unless @mpd.connected?
|
19
|
-
action = line.split
|
20
|
-
case action[0]
|
21
|
-
when "np", "now-playing"; nowplaying
|
22
|
-
when "info", "stats"; info
|
23
|
-
|
24
|
-
when "pl", "play"; play(action[1])
|
25
|
-
when "pa", "pause"; pause
|
26
|
-
when "st", "stop"; stop
|
27
|
-
when "nx", "next"; playnext
|
28
|
-
when "prev", "previous"; playprevious
|
29
|
-
|
30
|
-
when "lspl", "lsplaylist"; lsplist
|
31
|
-
when "clear", "clearplaylist"; clearplist
|
32
|
-
when "add", "addtoplaylist"; addtoplist(action)
|
33
|
-
|
34
|
-
when "search"; search(action)
|
35
|
-
when "lsartists", "list-artists"; list("artists")
|
36
|
-
when "lsalbums", "list-albums"; list("albums", action)
|
37
|
-
|
38
|
-
when "love"; love
|
39
|
-
when "loved", "loves"; loved
|
40
|
-
|
41
|
-
when "vol", "volume"; vol(action[1])
|
42
|
-
|
43
|
-
when "quit", "exit"; quit
|
44
|
-
|
45
|
-
when "v", "verbose"; eval(action.drop(1).join(" "))
|
46
|
-
|
47
|
-
else; help
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def help
|
53
|
-
p "Some help text here"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
1
|
class Quiyo
|
58
|
-
|
2
|
+
module Core
|
3
|
+
def readline_hist
|
4
|
+
line = Readline.readline(prompt, true)
|
5
|
+
return nil if line.nil?
|
6
|
+
if line =~ /^\s*$/ or Readline::HISTORY.to_a[-2] == line
|
7
|
+
Readline::HISTORY.pop
|
8
|
+
end
|
9
|
+
line
|
10
|
+
end
|
11
|
+
|
12
|
+
def showprompt
|
13
|
+
Readline.completion_append_character = " "
|
14
|
+
Readline.completion_proc = Proc.new { |str|
|
15
|
+
Dir[PATH+str+'*'].grep( /^#{Regexp.escape(str)}/ )
|
16
|
+
}
|
17
|
+
|
18
|
+
while line = self.readline_hist
|
19
|
+
@mpd.connect unless @mpd.connected?
|
20
|
+
action = line.split
|
21
|
+
actions = {
|
22
|
+
"np" => lambda { nowplaying() },
|
23
|
+
"info" => lambda { info },
|
24
|
+
"play" => lambda { play(action[1]) },
|
25
|
+
"pause" => lambda { pause },
|
26
|
+
"stop" => lambda { stop },
|
27
|
+
"next" => lambda { playnext },
|
28
|
+
"previous" => lambda { playprevious },
|
29
|
+
"lsplaylist" => lambda { lsplist },
|
30
|
+
"clearplaylist" => lambda { clearplist },
|
31
|
+
"addtoplaylist" => lambda { addtoplist(action) },
|
32
|
+
"delfromplaylist" => lambda { removefromplist(action[1]) },
|
33
|
+
"search" => lambda { search(action) },
|
34
|
+
"list-artists" => lambda { list("artists") },
|
35
|
+
"list-albums" => lambda { list("albums", action) },
|
36
|
+
"love" => lambda { love },
|
37
|
+
"loved" => lambda { loved },
|
38
|
+
"volume" => lambda { vol(action[1]) },
|
39
|
+
"quit" => lambda { quit },
|
40
|
+
"verbose" => lambda { eval(action.drop(1).join(" ")) }
|
41
|
+
}
|
42
|
+
|
43
|
+
CONF["aliases"].each { |k,v| actions[k] = lambda { eval(v) } }
|
44
|
+
|
45
|
+
actions[action[0]].call
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def help
|
51
|
+
p "Some help text here"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
include Core
|
59
55
|
end
|
data/lib/quiyo/database.rb
CHANGED
@@ -1,40 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
class Love # {{{
|
5
|
-
include DataMapper::Resource
|
1
|
+
class Quiyo
|
2
|
+
module Database
|
3
|
+
DataMapper.setup(:default, "sqlite3://" + CONF["database"])
|
6
4
|
|
7
|
-
|
8
|
-
|
9
|
-
property :loved_at, Time
|
10
|
-
end # }}}
|
5
|
+
class Love
|
6
|
+
include DataMapper::Resource
|
11
7
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
)
|
17
|
-
end
|
8
|
+
property :id, Serial
|
9
|
+
property :song, String
|
10
|
+
property :loved_at, Time
|
11
|
+
end
|
18
12
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
colorize(song["title"], 202),
|
26
|
-
colorize(song["album"], 107)
|
27
|
-
]
|
28
|
-
}
|
29
|
-
end
|
13
|
+
def love
|
14
|
+
@love = Love.create(
|
15
|
+
:song => @mpd.current_song["file"],
|
16
|
+
:loved_at => Time.now
|
17
|
+
)
|
18
|
+
end
|
30
19
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
20
|
+
def loved
|
21
|
+
Love.each { |s|
|
22
|
+
song = @mpd.songs(s.song).first
|
23
|
+
printf "[%s] %s : %s [%s]\n" % [
|
24
|
+
s.id,
|
25
|
+
colorize(song["artist"], CONF["colors"]["artist"]),
|
26
|
+
colorize(song["title"], CONF["colors"]["title"]),
|
27
|
+
colorize(song["album"], CONF["colors"]["album"])
|
28
|
+
]
|
29
|
+
}
|
30
|
+
end
|
37
31
|
|
38
|
-
|
39
|
-
|
32
|
+
if(!File.exists?(CONF["database"]))
|
33
|
+
DataMapper.auto_migrate!
|
34
|
+
else
|
35
|
+
DataMapper.auto_upgrade!
|
36
|
+
end
|
37
|
+
end
|
38
|
+
include Database
|
40
39
|
end
|
data/lib/quiyo/playback.rb
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
module Playback
|
2
|
-
def play(arg = nil); @mpd.play(arg); nowplaying; end
|
3
|
-
def playnext; @mpd.next; nowplaying; end
|
4
|
-
def playprevious; @mpd.previous; nowplaying; end
|
5
|
-
def stop; @mpd.stop; nowplaying; end
|
6
|
-
def pause
|
7
|
-
@mpd.paused? ? @mpd.pause=(false) : @mpd.pause=(true)
|
8
|
-
nowplaying
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
1
|
class Quiyo
|
13
|
-
|
2
|
+
module Playback
|
3
|
+
def play(arg = nil); @mpd.play(arg); nowplaying; end
|
4
|
+
def playnext; @mpd.next; nowplaying; end
|
5
|
+
def playprevious; @mpd.previous; nowplaying; end
|
6
|
+
def stop; @mpd.stop; nowplaying; end
|
7
|
+
def pause
|
8
|
+
@mpd.paused? ? @mpd.pause=(false) : @mpd.pause=(true)
|
9
|
+
nowplaying
|
10
|
+
end
|
11
|
+
end
|
12
|
+
include Playback
|
14
13
|
end
|
data/lib/quiyo/playlist.rb
CHANGED
@@ -1,28 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
colorize(s.artist, 99),
|
7
|
-
colorize(s.title, 202),
|
8
|
-
colorize(s.album, 107)
|
9
|
-
]
|
10
|
-
}
|
11
|
-
end
|
1
|
+
class Quiyo
|
2
|
+
module Playlist
|
3
|
+
def lsplist
|
4
|
+
@mpd.playlist.each { |s| printsonglist(s) }
|
5
|
+
end
|
12
6
|
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
def clearplist
|
8
|
+
@mpd.clear
|
9
|
+
end
|
16
10
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
11
|
+
def addtoplist(action)
|
12
|
+
@mpd.search(action[1], action.drop(2).join(" ")).each { |s|
|
13
|
+
@mpd.add(s.file)
|
14
|
+
}
|
15
|
+
rescue
|
16
|
+
puts "Usage: addtoplaylist searchstring"
|
17
|
+
end
|
25
18
|
|
26
|
-
|
27
|
-
|
19
|
+
def removefromplist(id)
|
20
|
+
@mpd.delete(id)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
include Playlist
|
28
25
|
end
|
data/lib/quiyo/server.rb
CHANGED
@@ -1,45 +1,43 @@
|
|
1
|
-
|
2
|
-
def quit
|
3
|
-
@mpd.disconnect
|
4
|
-
Process.exit
|
5
|
-
end
|
1
|
+
class Quiyo
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
def initialize(server, port, version)
|
4
|
+
print colorize("++", 197) + " Connecting to MPD at #{server}:#{port}..."
|
5
|
+
@mpd = MPD.new server, port
|
6
|
+
@mpd.connect
|
7
|
+
print colorize("Connected!\n", 70)
|
8
|
+
print colorize("++", 197) + " This is quiyo #{version}\n\n"
|
9
|
+
end
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
green(s.album)
|
19
|
-
]
|
20
|
-
}
|
21
|
-
rescue
|
22
|
-
p "Usage: search [artist|title|album] name"
|
23
|
-
end
|
11
|
+
module Server
|
12
|
+
def quit
|
13
|
+
@mpd.disconnect
|
14
|
+
Process.exit
|
15
|
+
end
|
24
16
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@mpd.albums(arg.drop(1).join(" ")).each { |s| p s }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
17
|
+
def vol(arg)
|
18
|
+
@mpd.volume=(arg)
|
19
|
+
rescue
|
20
|
+
p "Usage: vol [0-100]"
|
21
|
+
end
|
34
22
|
|
35
|
-
|
36
|
-
|
23
|
+
def search(action)
|
24
|
+
@mpd.search(action[1], action.drop(2).join(" ")).each { |s|
|
25
|
+
printf "%s : %s [%s]\n" % [
|
26
|
+
colorize(s.artist, 99),
|
27
|
+
colorize(s.title, 202),
|
28
|
+
colorize(s.album, 107)
|
29
|
+
]
|
30
|
+
}
|
31
|
+
end
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
def list(type, arg = nil)
|
34
|
+
case type
|
35
|
+
when "artists"
|
36
|
+
@mpd.artists.each { |s| p s }
|
37
|
+
when "albums"
|
38
|
+
@mpd.albums(arg.drop(1).join(" ")).each { |s| p s }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
include Server
|
45
43
|
end
|
data/lib/quiyo/status.rb
CHANGED
@@ -1,77 +1,81 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
1
|
+
class Quiyo
|
2
|
+
module Status
|
3
|
+
def nowplaying
|
4
|
+
song = @mpd.current_song
|
5
|
+
print "%s by %s on %s [%s]\n" % [
|
6
|
+
colorize(song["title"], CONF["colors"]["title"]),
|
7
|
+
colorize(song["artist"], CONF["colors"]["artist"]),
|
8
|
+
colorize(song["album"], CONF["colors"]["album"]),
|
9
|
+
colorize(song["date"], CONF["colors"]["year"])
|
10
|
+
]
|
11
|
+
rescue
|
12
|
+
print "%s playing right now, stoopid %s\n" % [
|
13
|
+
colorize("Nothing", CONF["colors"]["error"]),
|
14
|
+
colorize(":(", CONF["colors"]["smiley_frown"])
|
15
|
+
]
|
16
|
+
end
|
18
17
|
|
19
|
-
|
18
|
+
def info
|
19
|
+
def _print(key, value)
|
20
|
+
print "%-20s %s\n" % [
|
21
|
+
colorize(key.capitalize + ":", CONF["colors"]["info_key"]),
|
22
|
+
colorize(value, CONF["colors"]["info_value"])
|
23
|
+
]
|
24
|
+
end
|
20
25
|
|
21
|
-
|
22
|
-
|
26
|
+
s = @mpd.status
|
27
|
+
sid = @mpd.song_with_id(s[:songid])
|
23
28
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
29
|
+
# Get current song
|
30
|
+
%w{artist title album date file}.each { |k|
|
31
|
+
_print(k, sid[k])
|
32
|
+
}
|
33
|
+
_print "DURATION", time(sid["time"])
|
34
|
+
print colorize(CONF["separator"], CONF["colors"]["separator"]), "\n"
|
30
35
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
# Get MPD Status
|
37
|
+
%w{volume repeat random playlistlength xfade}.each { |k|
|
38
|
+
_print(k, s[k])
|
39
|
+
}
|
40
|
+
print colorize(CONF["separator"], CONF["colors"]["separator"]), "\n"
|
36
41
|
|
37
|
-
|
42
|
+
s = @mpd.stats
|
38
43
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
+
# Get MPD Stats
|
45
|
+
%w{artists albums songs}.each { |k|
|
46
|
+
_print(k, s[k])
|
47
|
+
}
|
48
|
+
print colorize(CONF["separator"], CONF["colors"]["separator"]), "\n"
|
44
49
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
# Get MPD Times
|
51
|
+
%w{uptime playtime db_playtime}.each { |k,v|
|
52
|
+
_print(k, time(s[k]))
|
53
|
+
}
|
54
|
+
end
|
50
55
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
def time(sec)
|
57
|
+
string = ""
|
58
|
+
time = sec.to_i
|
59
|
+
days = (time/86400)
|
60
|
+
hours = (time/3600 - days * 24)
|
61
|
+
minutes = (time/60 - (hours * 60 + days * 1440))
|
62
|
+
seconds = (time - (minutes * 60 + hours * 3600 + days * 86400))
|
63
|
+
{ "d" => days, "h" => hours, "m" => minutes, "s" => seconds}.each { |k,v|
|
64
|
+
string += "%02d%s " % [v, k] if v > 0
|
65
|
+
}
|
66
|
+
return string
|
67
|
+
end
|
63
68
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
|
76
|
-
include Status
|
69
|
+
def prompt
|
70
|
+
return CONF["prompt"]
|
71
|
+
.gsub(/%(\d+)/, "\001\e[38;5;\\1m\002")
|
72
|
+
.gsub("%n", "\001\e[0m\002")
|
73
|
+
.gsub("$state", @mpd.status["state"])
|
74
|
+
.gsub("$flags",
|
75
|
+
(@mpd.status["repeat"] == "1" ? "r" : "") +
|
76
|
+
(@mpd.status["random"] == "1" ? "z" : "") +
|
77
|
+
(@mpd.status["xfade"] != "0" ? "x" : "")) + " "
|
78
|
+
end
|
79
|
+
end
|
80
|
+
include Status
|
77
81
|
end
|
data/lib/quiyo.rb
CHANGED
@@ -14,17 +14,7 @@
|
|
14
14
|
].each { |m| require m }
|
15
15
|
|
16
16
|
# ...and this...
|
17
|
-
|
18
|
-
ENV["XDG_CONFIG_DIRS"].split(":").each { |d|
|
19
|
-
config_paths << d
|
20
|
-
}
|
21
|
-
|
22
|
-
config_paths.each { |p|
|
23
|
-
if File.exists?("#{p}/quiyo/config.yml")
|
24
|
-
CONF = YAML.load_file "#{p}/quiyo/config.yml"
|
25
|
-
break
|
26
|
-
end
|
27
|
-
}
|
17
|
+
CONF = YAML.load_file (ENV["XDG_CONFIG_HOME"] == NIL ? ENV["HOME"] + "/.config" : ENV["XDG_CONFIG_HOME"]) + "/quiyo/config.yml"
|
28
18
|
|
29
19
|
# ...and this, too!
|
30
20
|
%w[
|
data/quiyo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{quiyo}
|
8
|
-
s.version = "0.1
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["crshd"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-20}
|
13
13
|
s.default_executable = %q{quiyo}
|
14
14
|
s.description = %q{Inspired by pimpd2}
|
15
15
|
s.email = %q{crshd@mail.com}
|
@@ -34,9 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/quiyo/playlist.rb",
|
35
35
|
"lib/quiyo/server.rb",
|
36
36
|
"lib/quiyo/status.rb",
|
37
|
-
"quiyo.gemspec"
|
38
|
-
"test/helper.rb",
|
39
|
-
"test/test_quiyo.rb"
|
37
|
+
"quiyo.gemspec"
|
40
38
|
]
|
41
39
|
s.homepage = %q{http://github.com/crshd/quiyo}
|
42
40
|
s.licenses = ["MIT"]
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
+
- 2
|
7
8
|
- 1
|
8
|
-
|
9
|
-
version: 0.1.0
|
9
|
+
version: 0.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- crshd
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-09-20 00:00:00 +00:00
|
18
18
|
default_executable: quiyo
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -125,8 +125,6 @@ files:
|
|
125
125
|
- lib/quiyo/server.rb
|
126
126
|
- lib/quiyo/status.rb
|
127
127
|
- quiyo.gemspec
|
128
|
-
- test/helper.rb
|
129
|
-
- test/test_quiyo.rb
|
130
128
|
has_rdoc: true
|
131
129
|
homepage: http://github.com/crshd/quiyo
|
132
130
|
licenses:
|
@@ -141,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
139
|
requirements:
|
142
140
|
- - ">="
|
143
141
|
- !ruby/object:Gem::Version
|
144
|
-
hash:
|
142
|
+
hash: 1102096542118000620
|
145
143
|
segments:
|
146
144
|
- 0
|
147
145
|
version: "0"
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'quiyo'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|