audiojs 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -16,7 +16,7 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install audiojs
18
18
 
19
- Put on manifest file (default, `application.js`):
19
+ Put on manifest file (usually, `application.js`):
20
20
 
21
21
  //= require audiojs
22
22
 
data/audiojs.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["subosito@gmail.com"]
7
7
  gem.description = %q{Audio.js on Rails Asset Pipeline}
8
8
  gem.summary = %q{audio.js is a drop-in javascript library that allows HTML5's <audio> tag to be used anywhere.}
9
- gem.homepage = ""
9
+ gem.homepage = "https://github.com/subosito/audiojs"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module Audiojs
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -3,11 +3,18 @@
3
3
  // Use the path to the audio.js file to create relative paths to the swf and player graphics
4
4
  // Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
5
5
  var path = (function() {
6
- var re = new RegExp('(audio|application)(\.min)?\.js.*'),
6
+ var re = new RegExp('([a-zA-Z0-9\-_]+)(\.min)?\.js.*'),
7
7
  scripts = document.getElementsByTagName('script');
8
+
8
9
  for (var i = 0, ii = scripts.length; i < ii; i++) {
9
10
  var path = scripts[i].getAttribute('src');
10
- if(re.test(path)) return path.replace(re, '');
11
+ if(re.test(path)) {
12
+ _th = path.substring(0,path.lastIndexOf("/")+1);
13
+ if ((typeof _th === 'undefined') || (_th == '')) {
14
+ return '/assets/';
15
+ }
16
+ return _th;
17
+ }
11
18
  }
12
19
  })();
13
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audiojs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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: 2012-04-10 00:00:00.000000000 Z
12
+ date: 2012-04-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Audio.js on Rails Asset Pipeline
15
15
  email:
@@ -29,7 +29,7 @@ files:
29
29
  - vendor/assets/javascripts/audiojs-player-graphics.gif
30
30
  - vendor/assets/javascripts/audiojs.js
31
31
  - vendor/assets/javascripts/audiojs.swf
32
- homepage: ''
32
+ homepage: https://github.com/subosito/audiojs
33
33
  licenses: []
34
34
  post_install_message:
35
35
  rdoc_options: []
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  segments:
45
45
  - 0
46
- hash: 284085885901173356
46
+ hash: -4268160289386271288
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  none: false
49
49
  requirements:
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  segments:
54
54
  - 0
55
- hash: 284085885901173356
55
+ hash: -4268160289386271288
56
56
  requirements: []
57
57
  rubyforge_project:
58
58
  rubygems_version: 1.8.11