sprockets-helpers 0.2.0 → 0.2.1

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.
@@ -84,6 +84,7 @@ module Sprockets
84
84
  # Use FilePath for normal files on the file system
85
85
  FilePath.new(source, options).to_s
86
86
  end
87
+ alias_method :path_to_asset, :asset_path
87
88
 
88
89
  # Computes the path to a javascript asset either in the Sprockets
89
90
  # environment or the public directory. If the +source+ filename has no extension,
@@ -108,6 +109,7 @@ module Sprockets
108
109
  def javascript_path(source, options = {})
109
110
  asset_path source, { :dir => "javascripts", :ext => "js" }.merge(options)
110
111
  end
112
+ alias_method :path_to_javascript, :javascript_path
111
113
 
112
114
  # Computes the path to a stylesheet asset either in the Sprockets
113
115
  # environment or the public directory. If the +source+ filename has no extension,
@@ -132,6 +134,7 @@ module Sprockets
132
134
  def stylesheet_path(source, options = {})
133
135
  asset_path source, { :dir => "stylesheets", :ext => "css" }.merge(options)
134
136
  end
137
+ alias_method :path_to_stylesheet, :stylesheet_path
135
138
 
136
139
  # Computes the path to an image asset either in the Sprockets environment
137
140
  # or the public directory. External URIs are untouched.
@@ -155,6 +158,7 @@ module Sprockets
155
158
  def image_path(source, options = {})
156
159
  asset_path source, { :dir => "images" }.merge(options)
157
160
  end
161
+ alias_method :path_to_image, :image_path
158
162
 
159
163
  protected
160
164
 
@@ -19,7 +19,7 @@ module Sprockets
19
19
  # Prepends the base path if the path is not
20
20
  # already an absolute path.
21
21
  def rewrite_base_path(path) # :nodoc:
22
- File.join @options[:prefix], path
22
+ File.join @options[:prefix].to_s, path
23
23
  end
24
24
 
25
25
  # Rewrite the query string to inlcude body flag if necessary.
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Helpers
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-helpers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pete Browne