merb-assets 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,6 +4,8 @@ require "extlib"
4
4
  require 'merb-core/tasks/merb_rake_helper'
5
5
  require "spec/rake/spectask"
6
6
 
7
+ require File.join(File.dirname(__FILE__), "../merb-core/lib/merb-core/version.rb")
8
+
7
9
  ##############################################################################
8
10
  # Package && release
9
11
  ##############################################################################
@@ -17,7 +19,7 @@ GEM_EMAIL = "ez@engineyard.com"
17
19
 
18
20
  GEM_NAME = "merb-assets"
19
21
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
20
- GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.8") + PKG_BUILD
22
+ GEM_VERSION = Merb::VERSION + PKG_BUILD
21
23
 
22
24
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
25
 
@@ -35,7 +37,7 @@ spec = Gem::Specification.new do |s|
35
37
  s.author = GEM_AUTHOR
36
38
  s.email = GEM_EMAIL
37
39
  s.homepage = PROJECT_URL
38
- s.add_dependency('merb-core', '>= 0.9.8')
40
+ s.add_dependency('merb-core', "= #{Merb::VERSION}")
39
41
  s.require_path = 'lib'
40
42
  s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
41
43
  end
@@ -114,7 +114,7 @@ module Merb
114
114
  opts[:src] ||= opts.delete(:path) + img
115
115
  end
116
116
  random = opts.delete(:reload) || Merb::Config[:reload_templates]
117
- opts[:src] += random_query_string if random
117
+ opts[:src] += opts[:src].include?('?') ? "&#{random_query_string}" : "?#{random_query_string}" if random
118
118
  %{<img #{ opts.to_xml_attributes } />}
119
119
  end
120
120
 
@@ -442,7 +442,7 @@ module Merb
442
442
 
443
443
  for script in scripts
444
444
  src = asset_path(:javascript, script)
445
- src += random_query_string if reload
445
+ src += src.include?('?') ? "&#{random_query_string}" : "?#{random_query_string}" if reload
446
446
  attrs = {
447
447
  :src => src,
448
448
  :type => "text/javascript"
@@ -504,7 +504,7 @@ module Merb
504
504
 
505
505
  for stylesheet in stylesheets
506
506
  href = asset_path(:stylesheet, stylesheet)
507
- href += random_query_string if reload
507
+ href += href.include?('?') ? "&#{random_query_string}" : "?#{random_query_string}" if reload
508
508
  attrs = {
509
509
  :href => href,
510
510
  :type => "text/css",
@@ -642,8 +642,8 @@ module Merb
642
642
  end
643
643
 
644
644
  def random_query_string
645
- Time.now.strftime("?%m%d%H%M%S#{rand(99)}")
645
+ Time.now.strftime("%m%d%H%M%S#{rand(99)}")
646
646
  end
647
647
 
648
648
  end
649
- end
649
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-06 00:00:00 +03:00
12
+ date: 2008-10-13 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,9 +18,9 @@ dependencies:
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ">="
21
+ - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.8
23
+ version: 0.9.9
24
24
  version:
25
25
  description: Merb plugin that provides the helpers for assets and asset bundling
26
26
  email: ez@engineyard.com