the_little_streamer 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/the_little_streamer +3 -2
  2. metadata +4 -4
@@ -6,6 +6,7 @@ require 'rubygems'
6
6
  require 'taglib2'
7
7
  require 'sinatra'
8
8
  require 'cgi'
9
+ require 'uri'
9
10
  require 'pathname'
10
11
 
11
12
  #Supply a directory with all the music in it
@@ -98,7 +99,7 @@ end
98
99
 
99
100
  #Create a link
100
101
  def link root, path, text = path, params = {}
101
- full_path = root.split('/').map! {|r| CGI.escape r }.join('/') << "/" << CGI.escape(path)
102
+ full_path = root.split('/').map! {|r| URI.escape r }.join('/') << "/" << URI.escape(path)
102
103
  params = params.map { |k, v| "#{k}=#{v}" }.join "&"
103
104
  "<a href=\"#{full_path}?#{params}\">#{text}</a>"
104
105
  end
@@ -115,7 +116,7 @@ end
115
116
  #Audio tag
116
117
  def audio path
117
118
  <<-HTML
118
- <audio id='player' onEnded='javascript:play_next()' src=#{("/" << CGI.escape(path)).inspect} autobuffer controls autoplay >
119
+ <audio id='player' onEnded='javascript:play_next()' src=#{("/" << URI.escape(path)).inspect} autobuffer controls autoplay >
119
120
  You need the power of HTML5!
120
121
  </audio>
121
122
  <script type="text/javascript">
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_little_streamer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Collins
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-18 00:00:00 Z
18
+ date: 2012-02-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sinatra