rapper 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown CHANGED
@@ -126,7 +126,7 @@ Rapper's got a Gemfile. You know what to do.
126
126
 
127
127
  ## Version history
128
128
 
129
- * **0.2.3** - Add tag_paths() to get all file paths for a given asset.
129
+ * **0.2.4** - Add tag_paths() to get all file paths for a given asset.
130
130
  * **0.2.2** - Change tag_root behavior to not add `.../assets` path suffix when a `destination_root` is defined.
131
131
  * **0.2.1** - Add tag_files() to get all file paths for a given asset.
132
132
  * **0.2.0** - Custom asset destination roots, fix Rake task.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -60,11 +60,12 @@ module Rapper
60
60
 
61
61
  # Same as `tag_files`, but includes version query string if needed.
62
62
  def tag_paths( type, name )
63
+ definition = @definitions[type]
63
64
  if self.get_config( 'version' )
64
65
  version = definition.get_version( name )
65
- tag_paths( type, name ).map{|path| "#{path}?v=#{version}"}
66
+ tag_files( type, name ).map{|path| "#{path}?v=#{version}"}
66
67
  else
67
- tag_paths( type, name )
68
+ tag_files( type, name )
68
69
  end
69
70
  end
70
71
 
data/rapper.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rapper}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyson Tate"]
@@ -32,6 +32,14 @@ test_custom_destination:
32
32
  definition_root: spec/fixtures/config/asset_definitions/custom_destination
33
33
  bundle: true
34
34
  compress: false
35
+ test_tag_paths:
36
+ <<: *base
37
+ bundle: true
38
+ version: true
39
+ test_tag_paths_no_bundle:
40
+ <<: *base
41
+ bundle: false
42
+ version: true
35
43
  xhtml_tags:
36
44
  <<: *base
37
45
  version: false
data/spec/rapper_spec.rb CHANGED
@@ -68,12 +68,14 @@ describe Rapper do
68
68
  ]
69
69
  end
70
70
 
71
- it "provides tag files" do
72
- rapper = Rapper::Engine.new( "spec/fixtures/config/assets.yml", "test" )
71
+ it "provides tag files and paths" do
72
+ rapper = Rapper::Engine.new( "spec/fixtures/config/assets.yml", "test_tag_paths" )
73
73
  rapper.tag_files( "javascripts", "multiple_files" ).should == ["/javascripts/assets/multiple_files.js"]
74
+ rapper.tag_paths( "javascripts", "multiple_files" ).should == ["/javascripts/assets/multiple_files.js?v=f3d9"]
74
75
 
75
- rapper = Rapper::Engine.new( "spec/fixtures/config/assets.yml", "test_no_bundle" )
76
+ rapper = Rapper::Engine.new( "spec/fixtures/config/assets.yml", "test_tag_paths_no_bundle" )
76
77
  rapper.tag_files( "javascripts", "multiple_files" ).should == ["/javascripts/simple_1.js", "/javascripts/simple_2.js"]
78
+ rapper.tag_paths( "javascripts", "multiple_files" ).should == ["/javascripts/simple_1.js?v=f3d9", "/javascripts/simple_2.js?v=f3d9"]
77
79
  end
78
80
  end
79
81
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyson Tate