juicer 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- juicer (1.0.17)
4
+ juicer (1.1.1)
5
5
  cmdparse
6
6
  nokogiri (>= 1.5.0)
7
- rubyzip
7
+ rubyzip (= 0.9.9)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
@@ -23,11 +23,14 @@ GEM
23
23
  rdoc
24
24
  json (1.7.5)
25
25
  metaclass (0.0.1)
26
+ mini_portile (0.5.2)
26
27
  mocha (0.12.7)
27
28
  metaclass (~> 0.0.1)
28
29
  multi_json (1.3.6)
29
- nokogiri (1.5.5)
30
- nokogiri (1.5.5-x86-mingw32)
30
+ nokogiri (1.6.0)
31
+ mini_portile (~> 0.5.0)
32
+ nokogiri (1.6.0-x86-mingw32)
33
+ mini_portile (~> 0.5.0)
31
34
  rake (0.9.2.2)
32
35
  rdoc (3.12)
33
36
  json (~> 1.4)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -3,7 +3,7 @@ require "logger"
3
3
  module Juicer
4
4
 
5
5
  # :stopdoc:
6
- VERSION = "1.1.0"
6
+ VERSION = "1.1.1"
7
7
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
8
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
9
  LOGGER = Logger.new(STDOUT)
@@ -84,7 +84,7 @@ module Juicer
84
84
  type = [:soft, :hard, :rails, :md5].include?(type) ? type : :soft
85
85
  parameter = nil if type == :rails
86
86
  file = self.clean(file, parameter)
87
- filename = file.split("?").first
87
+ filename = file.split(/[\?\#]/).first
88
88
  raise ArgumentError.new("#{file} could not be found") unless File.exists?(filename)
89
89
  mtime = File.mtime(filename).to_i
90
90
 
@@ -95,10 +95,10 @@ module Juicer
95
95
  return "#{file}#{file.index('?') ? '' : "?#{mtime}"}"
96
96
  elsif type == :md5
97
97
  md5 = Digest::MD5.hexdigest(File.read(filename))
98
- return file.sub(/(\.[^\.]+$)/, "-#{parameter}#{md5}" + '\1')
98
+ return file.sub(/(\.[^\.]+([\?\#].*)?$)/, "-#{parameter}#{md5}" + '\1')
99
99
  end
100
100
 
101
- file.sub(/(\.[^\.]+$)/, "-#{parameter}#{mtime}" + '\1')
101
+ file.sub(/(\.[^\.]+([\?\#].*)?$)/, "-#{parameter}#{mtime}" + '\1')
102
102
  end
103
103
 
104
104
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: