sprockets-helpers 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sprockets/helpers/asset_path.rb +11 -12
- data/lib/sprockets/helpers/base_path.rb +101 -0
- data/lib/sprockets/helpers/file_path.rb +11 -40
- data/lib/sprockets/helpers/manifest_path.rb +3 -3
- data/lib/sprockets/helpers/version.rb +1 -1
- data/lib/sprockets/helpers.rb +32 -20
- data/spec/sprockets-helpers_spec.rb +95 -20
- metadata +41 -15
@@ -2,34 +2,33 @@ module Sprockets
|
|
2
2
|
module Helpers
|
3
3
|
# `AssetPath` generates a full path for an asset
|
4
4
|
# that exists in Sprockets environment.
|
5
|
-
class AssetPath <
|
6
|
-
|
7
|
-
|
5
|
+
class AssetPath < BasePath
|
6
|
+
def initialize(uri, asset, options = {})
|
7
|
+
@uri = uri
|
8
8
|
@options = {
|
9
9
|
:body => false,
|
10
10
|
:digest => Helpers.digest,
|
11
11
|
:prefix => Helpers.prefix
|
12
12
|
}.merge options
|
13
13
|
|
14
|
-
@
|
14
|
+
@uri.path = @options[:digest] ? asset.digest_path : asset.logical_path
|
15
15
|
end
|
16
16
|
|
17
17
|
protected
|
18
18
|
|
19
|
-
|
20
|
-
def rewrite_base_path(path) # :nodoc:
|
19
|
+
def rewrite_path
|
21
20
|
prefix = if options[:prefix].respond_to? :call
|
22
|
-
|
21
|
+
warn 'DEPRECATION WARNING: Using a Proc for Sprockets::Helpers.prefix is deprecated and will be removed in 1.0. Please use Sprockets::Helpers.asset_host instead.'
|
22
|
+
options[:prefix].call uri.path
|
23
23
|
else
|
24
24
|
options[:prefix].to_s
|
25
25
|
end
|
26
|
-
|
27
|
-
|
26
|
+
|
27
|
+
prepend_path(prefix)
|
28
28
|
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
options[:body] ? "#{path}?body=1" : path
|
30
|
+
def rewrite_query
|
31
|
+
append_query('body=1') if options[:body]
|
33
32
|
end
|
34
33
|
end
|
35
34
|
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'zlib'
|
3
|
+
|
4
|
+
module Sprockets
|
5
|
+
module Helpers
|
6
|
+
#
|
7
|
+
class BasePath
|
8
|
+
# The parsed URI from which to generate the full path to the asset.
|
9
|
+
attr_reader :uri
|
10
|
+
|
11
|
+
# The various options used when generating the path.
|
12
|
+
attr_reader :options
|
13
|
+
|
14
|
+
#
|
15
|
+
def initialize(uri, options = {})
|
16
|
+
@uri = uri
|
17
|
+
@options = options
|
18
|
+
end
|
19
|
+
|
20
|
+
# Returns the full path to the asset, complete with
|
21
|
+
# timestamp.
|
22
|
+
def to_s
|
23
|
+
rewrite_path
|
24
|
+
rewrite_query
|
25
|
+
rewrite_host
|
26
|
+
|
27
|
+
uri.to_s
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
|
32
|
+
# Hook for rewriting the base path.
|
33
|
+
def rewrite_path # :nodoc:
|
34
|
+
end
|
35
|
+
|
36
|
+
# Hook for rewriting the query string.
|
37
|
+
def rewrite_query # :nodoc:
|
38
|
+
end
|
39
|
+
|
40
|
+
# Hook for rewriting the host.
|
41
|
+
def rewrite_host # :nodoc:
|
42
|
+
if host = compute_asset_host
|
43
|
+
uri.host = host
|
44
|
+
uri.scheme = compute_scheme
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Pick an asset host for this source. Returns +nil+ if no host is set,
|
49
|
+
# the host if no wildcard is set, the host interpolated with the
|
50
|
+
# numbers 0-3 if it contains <tt>%d</tt> (the number is the source hash mod 4),
|
51
|
+
# or the value returned from invoking call on an object responding to call
|
52
|
+
# (proc or otherwise).
|
53
|
+
def compute_asset_host # :nodoc:
|
54
|
+
if host = options[:asset_host] || Helpers.asset_host
|
55
|
+
if host.respond_to?(:call)
|
56
|
+
host.call(uri.to_s)
|
57
|
+
elsif host =~ /%d/
|
58
|
+
host % (Zlib.crc32(uri.to_s) % 4)
|
59
|
+
else
|
60
|
+
host
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Pick a scheme for the protocol if we are using
|
66
|
+
# an asset host.
|
67
|
+
def compute_scheme # :nodoc:
|
68
|
+
protocol = options[:protocol] || Helpers.protocol
|
69
|
+
|
70
|
+
if protocol.nil? || protocol == :relative
|
71
|
+
nil
|
72
|
+
else
|
73
|
+
protocol.to_s.sub %r{://\z}, ''
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Prepends the given path. If the path is absolute
|
78
|
+
# An attempt to merge the URIs is made.
|
79
|
+
#
|
80
|
+
# TODO: Simplify this once Proc support for :prefix is removed.
|
81
|
+
def prepend_path(value) # :nodoc:
|
82
|
+
prefix_uri = URI.parse(value)
|
83
|
+
uri.path = File.join prefix_uri.path, uri.path
|
84
|
+
|
85
|
+
if prefix_uri.absolute?
|
86
|
+
@uri = prefix_uri.merge(uri)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Append the given query string to the URI
|
91
|
+
# instead of clobbering it.
|
92
|
+
def append_query(value) # :nodoc:
|
93
|
+
if uri.query.nil? || uri.query.empty?
|
94
|
+
uri.query = value
|
95
|
+
else
|
96
|
+
uri.query << ('&' + value)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -4,57 +4,28 @@ module Sprockets
|
|
4
4
|
# in the output path. It's used by #asset_path to generate
|
5
5
|
# paths when using asset tags like #javascript_include_tag,
|
6
6
|
# #stylesheet_link_tag, and #image_tag
|
7
|
-
class FilePath
|
8
|
-
# The path from which to generate the full path to the asset.
|
9
|
-
attr_reader :source
|
10
|
-
|
11
|
-
# The various options used when generating the path.
|
12
|
-
attr_reader :options
|
13
|
-
|
14
|
-
# The base directory the file would be found in
|
15
|
-
attr_reader :dir
|
16
|
-
|
17
|
-
#
|
18
|
-
def initialize(source, options = {})
|
19
|
-
@source = source.to_s
|
20
|
-
@options = options
|
21
|
-
@dir = options[:dir].to_s
|
22
|
-
end
|
23
|
-
|
24
|
-
# Returns the full path to the asset, complete with
|
25
|
-
# timestamp.
|
26
|
-
def to_s
|
27
|
-
path = rewrite_base_path(source)
|
28
|
-
path = rewrite_query(path)
|
29
|
-
path
|
30
|
-
end
|
7
|
+
class FilePath < BasePath
|
31
8
|
|
32
9
|
protected
|
33
10
|
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
File.join('/', dir, path)
|
39
|
-
else
|
40
|
-
path
|
11
|
+
# Hook for rewriting the base path.
|
12
|
+
def rewrite_path # :nodoc:
|
13
|
+
if uri.path[0] != ?/
|
14
|
+
prepend_path File.join('/', options[:dir].to_s)
|
41
15
|
end
|
42
16
|
end
|
43
17
|
|
44
|
-
#
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
"#{path}?#{timestamp.to_i}"
|
49
|
-
else
|
50
|
-
path
|
18
|
+
# Hook for rewriting the query string.
|
19
|
+
def rewrite_query # :nodoc:
|
20
|
+
if timestamp = compute_mtime
|
21
|
+
append_query(timestamp.to_i.to_s)
|
51
22
|
end
|
52
23
|
end
|
53
24
|
|
54
25
|
# Returns the mtime for the given path (relative to
|
55
26
|
# the output path). Returns nil if the file doesn't exist.
|
56
|
-
def
|
57
|
-
public_path = File.join(Helpers.public_path, path)
|
27
|
+
def compute_mtime # :nodoc:
|
28
|
+
public_path = File.join(Helpers.public_path, uri.path)
|
58
29
|
|
59
30
|
if File.exist?(public_path)
|
60
31
|
File.mtime(public_path)
|
@@ -3,14 +3,14 @@ module Sprockets
|
|
3
3
|
# `ManifestPath` uses the digest path and
|
4
4
|
# prepends the prefix.
|
5
5
|
class ManifestPath < AssetPath
|
6
|
-
|
7
|
-
|
6
|
+
def initialize(uri, path, options = {})
|
7
|
+
@uri = uri
|
8
8
|
@options = {
|
9
9
|
:body => false,
|
10
10
|
:prefix => Helpers.prefix
|
11
11
|
}.merge options
|
12
12
|
|
13
|
-
@
|
13
|
+
@uri.path = path.to_s
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/sprockets/helpers.rb
CHANGED
@@ -1,26 +1,27 @@
|
|
1
|
-
require 'sprockets/helpers/version'
|
2
1
|
require 'sprockets'
|
2
|
+
require 'sprockets/helpers/version'
|
3
|
+
require 'sprockets/helpers/base_path'
|
4
|
+
require 'sprockets/helpers/asset_path'
|
5
|
+
require 'sprockets/helpers/file_path'
|
6
|
+
require 'sprockets/helpers/manifest_path'
|
7
|
+
require 'uri'
|
3
8
|
|
4
9
|
module Sprockets
|
5
10
|
module Helpers
|
6
|
-
autoload :AssetPath, 'sprockets/helpers/asset_path'
|
7
|
-
autoload :FilePath, 'sprockets/helpers/file_path'
|
8
|
-
autoload :ManifestPath, 'sprockets/helpers/manifest_path'
|
9
|
-
|
10
|
-
# Pattern for checking if a given path is an external URI.
|
11
|
-
URI_MATCH = %r(^[-a-z]+://|^cid:|^//)
|
12
|
-
|
13
11
|
class << self
|
12
|
+
# Link to assets from a dedicated server.
|
13
|
+
attr_accessor :asset_host
|
14
|
+
|
14
15
|
# When true, the asset paths will return digest paths.
|
15
16
|
attr_accessor :digest
|
16
17
|
|
17
18
|
# Set the Sprockets environment to search for assets.
|
18
19
|
# This defaults to the context's #environment method.
|
19
20
|
attr_accessor :environment
|
20
|
-
|
21
|
+
|
21
22
|
# The manifest file used for lookup
|
22
23
|
attr_accessor :manifest
|
23
|
-
|
24
|
+
|
24
25
|
# The base URL the Sprocket environment is mapped to.
|
25
26
|
# This defaults to '/assets'.
|
26
27
|
def prefix
|
@@ -28,6 +29,14 @@ module Sprockets
|
|
28
29
|
end
|
29
30
|
attr_writer :prefix
|
30
31
|
|
32
|
+
# Customize the protocol when using asset hosts.
|
33
|
+
# If the value is :relative, A relative protocol ('//')
|
34
|
+
# will be used.
|
35
|
+
def protocol
|
36
|
+
@protocol ||= 'http://'
|
37
|
+
end
|
38
|
+
attr_writer :protocol
|
39
|
+
|
31
40
|
# The path to the public directory, where the assets
|
32
41
|
# not managed by Sprockets will be located.
|
33
42
|
# Defaults to './public'
|
@@ -72,26 +81,29 @@ module Sprockets
|
|
72
81
|
# asset_path 'http://www.example.com/js/xmlhr.js' # => 'http://www.example.com/js/xmlhr.js'
|
73
82
|
#
|
74
83
|
def asset_path(source, options = {})
|
75
|
-
|
84
|
+
uri = URI.parse(source)
|
85
|
+
|
86
|
+
# Return fast if the URI is absolute
|
87
|
+
return source if uri.absolute?
|
76
88
|
|
77
89
|
# Append extension if necessary
|
78
|
-
if options[:ext] && File.extname(
|
79
|
-
|
90
|
+
if options[:ext] && File.extname(uri.path).empty?
|
91
|
+
uri.path << ".#{options[:ext]}"
|
80
92
|
end
|
81
|
-
|
93
|
+
|
82
94
|
# If a manifest is present, try to grab the path from the manifest first
|
83
|
-
if Helpers.manifest && Helpers.manifest.assets[
|
84
|
-
return ManifestPath.new(Helpers.manifest.assets[
|
95
|
+
if Helpers.manifest && Helpers.manifest.assets[uri.path]
|
96
|
+
return ManifestPath.new(uri, Helpers.manifest.assets[uri.path], options).to_s
|
85
97
|
end
|
86
|
-
|
98
|
+
|
87
99
|
# If the source points to an asset in the Sprockets
|
88
100
|
# environment use AssetPath to generate the full path.
|
89
|
-
assets_environment.resolve(
|
90
|
-
return AssetPath.new(assets_environment[path], options).to_s
|
101
|
+
assets_environment.resolve(uri.path) do |path|
|
102
|
+
return AssetPath.new(uri, assets_environment[path], options).to_s
|
91
103
|
end
|
92
104
|
|
93
105
|
# Use FilePath for normal files on the file system
|
94
|
-
FilePath.new(
|
106
|
+
FilePath.new(uri, options).to_s
|
95
107
|
end
|
96
108
|
alias_method :path_to_asset, :asset_path
|
97
109
|
|
@@ -45,28 +45,90 @@ describe Sprockets::Helpers do
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
describe '.
|
48
|
+
describe '.asset_host' do
|
49
49
|
context 'that is a string' do
|
50
|
-
it '
|
50
|
+
it 'prepends the asset_host' do
|
51
51
|
within_construct do |c|
|
52
|
-
c.file 'assets/
|
53
|
-
|
54
|
-
|
55
|
-
Sprockets::Helpers.
|
56
|
-
context.asset_path('
|
57
|
-
|
52
|
+
c.file 'assets/main.js'
|
53
|
+
c.file 'public/logo.jpg'
|
54
|
+
|
55
|
+
Sprockets::Helpers.asset_host = 'assets.example.com'
|
56
|
+
context.asset_path('main.js').should == 'http://assets.example.com/assets/main.js'
|
57
|
+
context.asset_path('logo.jpg').should =~ %r(http://assets.example.com/logo.jpg\?\d+)
|
58
|
+
Sprockets::Helpers.asset_host = nil
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'with a wildcard' do
|
63
|
+
it 'cycles asset_host between 0-3' do
|
64
|
+
within_construct do |c|
|
65
|
+
c.file 'assets/main.css'
|
66
|
+
c.file 'public/logo.jpg'
|
67
|
+
|
68
|
+
Sprockets::Helpers.asset_host = 'assets%d.example.com'
|
69
|
+
context.asset_path('main.css').should =~ %r(http://assets[0-3].example.com/assets/main.css)
|
70
|
+
context.asset_path('logo.jpg').should =~ %r(http://assets[0-3].example.com/logo.jpg\?\d+)
|
71
|
+
Sprockets::Helpers.asset_host = nil
|
72
|
+
end
|
58
73
|
end
|
59
74
|
end
|
60
75
|
end
|
61
|
-
|
76
|
+
|
62
77
|
context 'that is a proc' do
|
63
|
-
it '
|
78
|
+
it 'prepends the returned asset_host' do
|
64
79
|
within_construct do |c|
|
65
|
-
c.file 'assets/
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
80
|
+
c.file 'assets/main.js'
|
81
|
+
c.file 'public/logo.jpg'
|
82
|
+
|
83
|
+
Sprockets::Helpers.asset_host = Proc.new { |source| File.basename(source, File.extname(source)) + '.assets.example.com' }
|
84
|
+
context.asset_path('main.js').should == 'http://main.assets.example.com/assets/main.js'
|
85
|
+
context.asset_path('logo.jpg').should =~ %r(http://logo.assets.example.com/logo.jpg\?\d+)
|
86
|
+
Sprockets::Helpers.asset_host = nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe '.prefix' do
|
93
|
+
it 'sets a custom assets prefix' do
|
94
|
+
within_construct do |c|
|
95
|
+
c.file 'assets/logo.jpg'
|
96
|
+
|
97
|
+
context.asset_path('logo.jpg').should == '/assets/logo.jpg'
|
98
|
+
Sprockets::Helpers.prefix = '/images'
|
99
|
+
context.asset_path('logo.jpg').should == '/images/logo.jpg'
|
100
|
+
Sprockets::Helpers.prefix = nil
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '.protocol' do
|
106
|
+
it 'sets the protocol to use with asset_hosts' do
|
107
|
+
within_construct do |c|
|
108
|
+
c.file 'assets/main.js'
|
109
|
+
c.file 'public/logo.jpg'
|
110
|
+
|
111
|
+
Sprockets::Helpers.asset_host = 'assets.example.com'
|
112
|
+
Sprockets::Helpers.protocol = 'https'
|
113
|
+
context.asset_path('main.js').should == 'https://assets.example.com/assets/main.js'
|
114
|
+
context.asset_path('logo.jpg').should =~ %r(https://assets.example.com/logo.jpg\?\d+)
|
115
|
+
Sprockets::Helpers.asset_host = nil
|
116
|
+
Sprockets::Helpers.protocol = nil
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context 'that is :relative' do
|
121
|
+
it 'sets a relative protocol' do
|
122
|
+
within_construct do |c|
|
123
|
+
c.file 'assets/main.js'
|
124
|
+
c.file 'public/logo.jpg'
|
125
|
+
|
126
|
+
Sprockets::Helpers.asset_host = 'assets.example.com'
|
127
|
+
Sprockets::Helpers.protocol = :relative
|
128
|
+
context.asset_path('main.js').should == '//assets.example.com/assets/main.js'
|
129
|
+
context.asset_path('logo.jpg').should =~ %r(\A//assets.example.com/logo.jpg\?\d+)
|
130
|
+
Sprockets::Helpers.asset_host = nil
|
131
|
+
Sprockets::Helpers.protocol = nil
|
70
132
|
end
|
71
133
|
end
|
72
134
|
end
|
@@ -101,6 +163,7 @@ describe Sprockets::Helpers do
|
|
101
163
|
it 'returns absolute paths' do
|
102
164
|
context.asset_path('/path/to/file.js').should == '/path/to/file.js'
|
103
165
|
context.asset_path('/path/to/file.jpg').should == '/path/to/file.jpg'
|
166
|
+
context.asset_path('/path/to/file.eot?#iefix').should == '/path/to/file.eot?#iefix'
|
104
167
|
end
|
105
168
|
|
106
169
|
it 'appends the extension for javascripts and stylesheets' do
|
@@ -118,9 +181,13 @@ describe Sprockets::Helpers do
|
|
118
181
|
within_construct do |c|
|
119
182
|
c.file 'public/main.js'
|
120
183
|
c.file 'public/favicon.ico'
|
184
|
+
c.file 'public/font.eot'
|
185
|
+
c.file 'public/font.svg'
|
121
186
|
|
122
187
|
context.asset_path('main', :ext => 'js').should =~ %r(/main.js\?\d+)
|
123
188
|
context.asset_path('/favicon.ico').should =~ %r(/favicon.ico\?\d+)
|
189
|
+
context.asset_path('font.eot?#iefix').should =~ %r(/font.eot\?\d+#iefix)
|
190
|
+
context.asset_path('font.svg#FontName').should =~ %r(/font.svg\?\d+#FontName)
|
124
191
|
end
|
125
192
|
end
|
126
193
|
end
|
@@ -150,17 +217,25 @@ describe Sprockets::Helpers do
|
|
150
217
|
it 'uses the digest path if configured' do
|
151
218
|
within_construct do |c|
|
152
219
|
c.file 'assets/main.js'
|
220
|
+
c.file 'assets/font.eot'
|
221
|
+
c.file 'assets/font.svg'
|
153
222
|
|
154
223
|
context.asset_path('main', :ext => 'js').should == '/assets/main.js'
|
155
224
|
context.asset_path('main', :ext => 'js', :digest => true).should =~ %r(/assets/main-[0-9a-f]+.js)
|
225
|
+
context.asset_path('font.eot?#iefix', :digest => true).should =~ %r(/assets/font-[0-9a-f]+.eot\?#iefix)
|
226
|
+
context.asset_path('font.svg#FontName', :digest => true).should =~ %r(/assets/font-[0-9a-f]+.svg#FontName)
|
156
227
|
end
|
157
228
|
end
|
158
229
|
|
159
230
|
it 'returns a body parameter' do
|
160
231
|
within_construct do |c|
|
161
232
|
c.file 'assets/main.js'
|
233
|
+
c.file 'assets/font.eot'
|
234
|
+
c.file 'assets/font.svg'
|
162
235
|
|
163
236
|
context.asset_path('main', :ext => 'js', :body => true).should == '/assets/main.js?body=1'
|
237
|
+
context.asset_path('font.eot?#iefix', :body => true).should == '/assets/font.eot?body=1#iefix'
|
238
|
+
context.asset_path('font.svg#FontName', :body => true).should == '/assets/font.svg?body=1#FontName'
|
164
239
|
end
|
165
240
|
end
|
166
241
|
end
|
@@ -171,19 +246,19 @@ describe Sprockets::Helpers do
|
|
171
246
|
within_construct do |c|
|
172
247
|
asset_file = c.file 'assets/application.js'
|
173
248
|
manifest_file = c.join 'manifest.json'
|
174
|
-
|
249
|
+
|
175
250
|
manifest = Sprockets::Manifest.new(env, manifest_file)
|
176
251
|
manifest.compile 'application.js'
|
177
|
-
|
252
|
+
|
178
253
|
Sprockets::Helpers.configure do |config|
|
179
254
|
config.digest = true
|
180
255
|
config.prefix = '/assets'
|
181
256
|
config.manifest = Sprockets::Manifest.new(env, manifest_file)
|
182
257
|
end
|
183
|
-
|
258
|
+
|
184
259
|
asset_file.delete
|
185
|
-
context.asset_path('application.js').should =~ %r(/assets/application-[0-9a-f]+.js)
|
186
|
-
|
260
|
+
context.asset_path('application.js').should =~ %r(/assets/application-[0-9a-f]+.js)
|
261
|
+
|
187
262
|
Sprockets::Helpers.digest = nil
|
188
263
|
Sprockets::Helpers.prefix = nil
|
189
264
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '2.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: appraisal
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0.4'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.4'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: rspec
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '2.6'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.6'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: test-construct
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: '1.2'
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.2'
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: rake
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
@@ -65,7 +85,12 @@ dependencies:
|
|
65
85
|
version: '0'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
69
94
|
description: Asset path helpers for Sprockets 2.x applications
|
70
95
|
email:
|
71
96
|
- me@petebrowne.com
|
@@ -87,6 +112,7 @@ files:
|
|
87
112
|
- lib/sprockets-helpers.rb
|
88
113
|
- lib/sprockets/helpers.rb
|
89
114
|
- lib/sprockets/helpers/asset_path.rb
|
115
|
+
- lib/sprockets/helpers/base_path.rb
|
90
116
|
- lib/sprockets/helpers/file_path.rb
|
91
117
|
- lib/sprockets/helpers/manifest_path.rb
|
92
118
|
- lib/sprockets/helpers/version.rb
|
@@ -107,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
133
|
version: '0'
|
108
134
|
segments:
|
109
135
|
- 0
|
110
|
-
hash: -
|
136
|
+
hash: -831447907
|
111
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
138
|
none: false
|
113
139
|
requirements:
|
@@ -116,10 +142,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
142
|
version: '0'
|
117
143
|
segments:
|
118
144
|
- 0
|
119
|
-
hash: -
|
145
|
+
hash: -831447907
|
120
146
|
requirements: []
|
121
147
|
rubyforge_project: sprockets-helpers
|
122
|
-
rubygems_version: 1.8.
|
148
|
+
rubygems_version: 1.8.23
|
123
149
|
signing_key:
|
124
150
|
specification_version: 3
|
125
151
|
summary: Asset path helpers for Sprockets 2.x applications
|