ruby-ampache 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/ruby-ampache +26 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/bin/ruby-ampache
CHANGED
@@ -19,6 +19,30 @@ require File.join(File.dirname(__FILE__),'..','lib','lib-ampache')
|
|
19
19
|
require File.join(File.dirname(__FILE__),'..','lib','lib-classes')
|
20
20
|
|
21
21
|
|
22
|
+
# XXX monkey patch for utf8 on ruby 1.9
|
23
|
+
if /^1\.9/ === RUBY_VERSION then
|
24
|
+
class HighLine
|
25
|
+
def wrap (text)
|
26
|
+
text = text.force_encoding("UTF-8")
|
27
|
+
wrapped = [ ]
|
28
|
+
text.each_line do |line|
|
29
|
+
while line =~ /([^\n]{#{@wrap_at + 1},})/
|
30
|
+
search = $1.dup
|
31
|
+
replace = $1.dup
|
32
|
+
if index = replace.rindex(" ", @wrap_at)
|
33
|
+
replace[index, 1] = "\n"
|
34
|
+
replace.sub!(/\n[ \t]+/, "\n")
|
35
|
+
line.sub!(search, replace)
|
36
|
+
else
|
37
|
+
line[$~.begin(1) + @wrap_at, 0] = "\n"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
wrapped << line
|
41
|
+
end
|
42
|
+
return wrapped.join
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
22
46
|
|
23
47
|
# Ampache ruby parameters
|
24
48
|
begin
|
@@ -28,8 +52,8 @@ rescue
|
|
28
52
|
end
|
29
53
|
|
30
54
|
# ruby-ampache highline version
|
31
|
-
|
32
|
-
|
55
|
+
$terminal.wrap_at = 80
|
56
|
+
$terminal.page_at = 22
|
33
57
|
|
34
58
|
def print_albums(albums)
|
35
59
|
choose do |menu|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-ampache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- ghedmat
|