sprockets-helpers 1.1.0 → 1.2.0
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.
- checksums.yaml +7 -0
- data/Appraisals +12 -8
- data/README.md +1 -1
- data/gemfiles/sprockets_2.0.gemfile +1 -1
- data/gemfiles/sprockets_2.1.gemfile +1 -1
- data/gemfiles/sprockets_2.2.gemfile +1 -1
- data/gemfiles/sprockets_2.3.gemfile +1 -1
- data/gemfiles/sprockets_2.4.gemfile +1 -1
- data/gemfiles/sprockets_2.5.gemfile +1 -1
- data/gemfiles/sprockets_2.6.gemfile +1 -1
- data/gemfiles/sprockets_2.7.gemfile +1 -1
- data/gemfiles/sprockets_2.8.gemfile +1 -1
- data/gemfiles/sprockets_2.9.gemfile +1 -1
- data/gemfiles/sprockets_3.0.gemfile +7 -0
- data/gemfiles/sprockets_3.1.gemfile +7 -0
- data/gemfiles/sprockets_3.2.gemfile +7 -0
- data/lib/sprockets/helpers.rb +27 -7
- data/lib/sprockets/helpers/version.rb +1 -1
- data/spec/spec_helper.rb +13 -3
- data/spec/sprockets-helpers_spec.rb +141 -35
- data/sprockets-helpers.gemspec +7 -6
- metadata +36 -52
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: be79a612f51a791d1b4d051d545ad091aabb98a6
|
4
|
+
data.tar.gz: e2050e1ec71751ec5975cdcdb735c5d68163948a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f734967a3f99e3d793dfd29aebd317d27a4ad419d0bf2f5b710e3d2c4c03b15a943a14f67e596edf4aed13df2196a2e90455ce5598ebd62643c73cdfca0ce76
|
7
|
+
data.tar.gz: 27a6de81e31e0ec0638ffc2fd44a3f70228a49a2f8f4acbc46c9eb111153892c18c56dc77905c4471bfa95d07329cf141911f5e4e92b687b90ce167e8a87f639
|
data/Appraisals
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
appraise 'sprockets-2.0' do
|
2
|
-
gem 'sprockets', '~> 2.0.0'
|
3
|
-
end
|
4
|
-
|
5
|
-
appraise 'sprockets-2.1' do
|
6
|
-
gem 'sprockets', '~> 2.1.0'
|
7
|
-
end
|
8
|
-
|
9
1
|
appraise 'sprockets-2.2' do
|
10
2
|
gem 'sprockets', '~> 2.2.0'
|
11
3
|
end
|
@@ -37,3 +29,15 @@ end
|
|
37
29
|
appraise 'sprockets-2.9' do
|
38
30
|
gem 'sprockets', '~> 2.9.0'
|
39
31
|
end
|
32
|
+
|
33
|
+
appraise 'sprockets-3.0' do
|
34
|
+
gem 'sprockets', '~> 3.0.0'
|
35
|
+
end
|
36
|
+
|
37
|
+
appraise 'sprockets-3.1' do
|
38
|
+
gem 'sprockets', '~> 3.1.0'
|
39
|
+
end
|
40
|
+
|
41
|
+
appraise 'sprockets-3.2' do
|
42
|
+
gem 'sprockets', '~> 3.2.0'
|
43
|
+
end
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# sprockets-helpers
|
2
2
|
|
3
|
-
**Asset path helpers for Sprockets
|
3
|
+
**Asset path helpers for Sprockets 3.x & <= 2.2 applications**
|
4
4
|
|
5
5
|
Sprockets::Helpers adds the asset_path helpers, familiar to Rails developers, to Sprockets 2.x assets and applications.
|
6
6
|
|
data/lib/sprockets/helpers.rb
CHANGED
@@ -9,6 +9,9 @@ require 'uri'
|
|
9
9
|
module Sprockets
|
10
10
|
module Helpers
|
11
11
|
class << self
|
12
|
+
# Indicates whenever we are using Sprockets 3.x.
|
13
|
+
attr_accessor :are_using_sprockets_3
|
14
|
+
|
12
15
|
# Link to assets from a dedicated server.
|
13
16
|
attr_accessor :asset_host
|
14
17
|
|
@@ -36,6 +39,7 @@ module Sprockets
|
|
36
39
|
# This defaults to '/assets'.
|
37
40
|
def prefix
|
38
41
|
@prefix ||= '/assets'
|
42
|
+
@prefix.respond_to?(:first) ? "/#{@prefix.first}" : @prefix
|
39
43
|
end
|
40
44
|
attr_writer :prefix
|
41
45
|
|
@@ -88,6 +92,9 @@ module Sprockets
|
|
88
92
|
end
|
89
93
|
end
|
90
94
|
|
95
|
+
# We are checking here to skip this at runtime
|
96
|
+
@are_using_sprockets_3 = Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('3.0')
|
97
|
+
|
91
98
|
# Returns the path to an asset either in the Sprockets environment
|
92
99
|
# or the public directory. External URIs are untouched.
|
93
100
|
#
|
@@ -121,6 +128,8 @@ module Sprockets
|
|
121
128
|
uri = URI.parse(source)
|
122
129
|
return source if uri.absolute?
|
123
130
|
|
131
|
+
options[:prefix] = Sprockets::Helpers.prefix unless options[:prefix]
|
132
|
+
|
124
133
|
if Helpers.debug || options[:debug]
|
125
134
|
options[:manifest] = false
|
126
135
|
options[:digest] = false
|
@@ -128,11 +137,12 @@ module Sprockets
|
|
128
137
|
end
|
129
138
|
|
130
139
|
source_ext = File.extname(source)
|
140
|
+
|
131
141
|
if options[:ext] && source_ext != ".#{options[:ext]}"
|
132
142
|
uri.path << ".#{options[:ext]}"
|
133
143
|
end
|
134
144
|
|
135
|
-
path = find_asset_path(uri, options)
|
145
|
+
path = find_asset_path(uri, source, options)
|
136
146
|
if options[:expand] && path.respond_to?(:to_a)
|
137
147
|
path.to_a
|
138
148
|
else
|
@@ -143,7 +153,7 @@ module Sprockets
|
|
143
153
|
|
144
154
|
def asset_tag(source, options = {}, &block)
|
145
155
|
raise ::ArgumentError, 'block missing' unless block
|
146
|
-
options = { :expand => Helpers.debug || Helpers.expand, :debug => Helpers.debug }.merge(options)
|
156
|
+
options = { :expand => !!Helpers.debug || !!Helpers.expand, :debug => Helpers.debug }.merge(options)
|
147
157
|
|
148
158
|
path = asset_path(source, options)
|
149
159
|
output = if options[:expand] && path.respond_to?(:map)
|
@@ -328,17 +338,27 @@ module Sprockets
|
|
328
338
|
Helpers.environment || environment
|
329
339
|
end
|
330
340
|
|
331
|
-
def find_asset_path(uri, options = {})
|
341
|
+
def find_asset_path(uri, source, options = {})
|
332
342
|
if Helpers.manifest && options[:manifest] != false
|
333
343
|
manifest_path = Helpers.manifest.assets[uri.path]
|
334
344
|
return Helpers::ManifestPath.new(uri, manifest_path, options) if manifest_path
|
335
345
|
end
|
336
346
|
|
337
|
-
|
338
|
-
|
339
|
-
end
|
347
|
+
if Sprockets::Helpers.are_using_sprockets_3
|
348
|
+
resolved = assets_environment.resolve(uri.path)
|
340
349
|
|
341
|
-
|
350
|
+
if resolved
|
351
|
+
return Helpers::AssetPath.new(uri, assets_environment[uri.path], options)
|
352
|
+
else
|
353
|
+
return Helpers::FilePath.new(uri, options)
|
354
|
+
end
|
355
|
+
else
|
356
|
+
assets_environment.resolve(uri.path) do |path|
|
357
|
+
return Helpers::AssetPath.new(uri, assets_environment[path], options)
|
358
|
+
end
|
359
|
+
|
360
|
+
return Helpers::FilePath.new(uri, options)
|
361
|
+
end
|
342
362
|
end
|
343
363
|
end
|
344
364
|
|
data/spec/spec_helper.rb
CHANGED
@@ -2,7 +2,7 @@ require 'sprockets'
|
|
2
2
|
require 'sprockets-helpers'
|
3
3
|
require 'sinatra/base'
|
4
4
|
require 'sinatra/sprockets/helpers'
|
5
|
-
require '
|
5
|
+
require 'test_construct'
|
6
6
|
require 'pathname'
|
7
7
|
|
8
8
|
# Requires supporting files with custom matchers and macros, etc,
|
@@ -10,7 +10,7 @@ require 'pathname'
|
|
10
10
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
11
|
|
12
12
|
RSpec.configure do |config|
|
13
|
-
config.include
|
13
|
+
config.include TestConstruct::Helpers
|
14
14
|
|
15
15
|
# Disable old `should` syntax
|
16
16
|
config.expect_with :rspec do |c|
|
@@ -28,7 +28,17 @@ RSpec.configure do |config|
|
|
28
28
|
# Returns a fresh context, that can be used to test helpers.
|
29
29
|
def context(logical_path = 'application.js', pathname = nil)
|
30
30
|
pathname ||= Pathname.new(File.join('assets', logical_path)).expand_path
|
31
|
-
|
31
|
+
|
32
|
+
if Sprockets::Helpers.are_using_sprockets_3
|
33
|
+
env.context_class.new(
|
34
|
+
:environment => env,
|
35
|
+
:name => logical_path,
|
36
|
+
:filename => pathname,
|
37
|
+
:metadata => {}
|
38
|
+
)
|
39
|
+
else
|
40
|
+
env.context_class.new env, logical_path, pathname
|
41
|
+
end
|
32
42
|
end
|
33
43
|
|
34
44
|
# Exemplary file system layout for usage in test-construct
|
@@ -7,10 +7,12 @@ describe Sprockets::Helpers do
|
|
7
7
|
c.file 'assets/main.css'
|
8
8
|
|
9
9
|
expect(context.asset_path('main.css')).to eq('/assets/main.css')
|
10
|
+
|
10
11
|
Sprockets::Helpers.configure do |config|
|
11
12
|
config.digest = true
|
12
13
|
config.prefix = '/themes'
|
13
14
|
end
|
15
|
+
|
14
16
|
expect(context.asset_path('main.css')).to match(%r(/themes/main-[0-9a-f]+.css))
|
15
17
|
Sprockets::Helpers.digest = nil
|
16
18
|
Sprockets::Helpers.prefix = nil
|
@@ -395,6 +397,11 @@ describe Sprockets::Helpers do
|
|
395
397
|
end
|
396
398
|
|
397
399
|
describe '#asset_tag' do
|
400
|
+
after do
|
401
|
+
Sprockets::Helpers.debug = nil
|
402
|
+
Sprockets::Helpers.expand = nil
|
403
|
+
end
|
404
|
+
|
398
405
|
it 'receives block to generate tag' do
|
399
406
|
actual = context.asset_tag('main.js') { |path| "<script src=#{path}></script>" }
|
400
407
|
expect(actual).to eq('<script src=/main.js></script>')
|
@@ -409,11 +416,20 @@ describe Sprockets::Helpers do
|
|
409
416
|
assets_layout(construct)
|
410
417
|
Sprockets::Helpers.expand = true
|
411
418
|
c = context
|
412
|
-
c
|
413
|
-
|
419
|
+
allow(c).to(
|
420
|
+
receive(:asset_path)
|
421
|
+
.and_return(context.asset_path('main.js'))
|
422
|
+
) # Spy
|
423
|
+
expect(c).to(
|
424
|
+
receive(:asset_path)
|
425
|
+
.with('main.js', {:expand => true, :debug => nil})
|
426
|
+
)
|
414
427
|
c.asset_tag('main.js') {}
|
415
428
|
Sprockets::Helpers.expand = false
|
416
|
-
c
|
429
|
+
expect(c).to(
|
430
|
+
receive(:asset_path)
|
431
|
+
.with('main.js', {:expand => false, :debug => nil})
|
432
|
+
)
|
417
433
|
c.asset_tag('main.js') {}
|
418
434
|
end
|
419
435
|
end
|
@@ -423,11 +439,20 @@ describe Sprockets::Helpers do
|
|
423
439
|
assets_layout(construct)
|
424
440
|
Sprockets::Helpers.debug = true
|
425
441
|
c = context
|
426
|
-
c
|
427
|
-
|
442
|
+
allow(c).to(
|
443
|
+
receive(:asset_path)
|
444
|
+
.and_return(context.asset_path('main.js'))
|
445
|
+
) # Spy
|
446
|
+
expect(c).to(
|
447
|
+
receive(:asset_path)
|
448
|
+
.with('main.js', {:expand => true, :debug => true})
|
449
|
+
)
|
428
450
|
c.asset_tag('main.js') {}
|
429
451
|
Sprockets::Helpers.debug = false
|
430
|
-
c
|
452
|
+
expect(c).to(
|
453
|
+
receive(:asset_path)
|
454
|
+
.with('main.js', {:expand => false, :debug => false})
|
455
|
+
)
|
431
456
|
c.asset_tag('main.js') {}
|
432
457
|
end
|
433
458
|
end
|
@@ -437,16 +462,35 @@ describe Sprockets::Helpers do
|
|
437
462
|
context.asset_tag('main.js', :expand => true) {}
|
438
463
|
end
|
439
464
|
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
465
|
+
context "in Sprockets 2.x" do
|
466
|
+
next if Sprockets::Helpers.are_using_sprockets_3
|
467
|
+
it 'generates tag for each asset' do
|
468
|
+
within_construct do |construct|
|
469
|
+
assets_layout(construct)
|
470
|
+
tags = context.asset_tag('main.js', :expand => true) do |path|
|
471
|
+
"<script src=\"#{path}\"></script>"
|
472
|
+
end
|
473
|
+
expect(tags.split('</script>').size).to eq(3)
|
474
|
+
expect(tags).to include('<script src="/assets/main.js?body=1"></script>')
|
475
|
+
expect(tags).to include('<script src="/assets/a.js?body=1"></script>')
|
476
|
+
expect(tags).to include('<script src="/assets/b.js?body=1"></script>')
|
477
|
+
end
|
478
|
+
end
|
479
|
+
end
|
480
|
+
|
481
|
+
context "in Sprockets 3.x" do
|
482
|
+
next unless Sprockets::Helpers.are_using_sprockets_3
|
483
|
+
it 'generates tag for each asset' do
|
484
|
+
within_construct do |construct|
|
485
|
+
assets_layout(construct)
|
486
|
+
tags = context.asset_tag('main.js', :expand => true) do |path|
|
487
|
+
"<script src=\"#{path}\"></script>"
|
488
|
+
end
|
489
|
+
expect(tags.split('</script>').size).to eq(3)
|
490
|
+
expect(tags).to include('<script src="/assets/main.self.js?body=1"></script>')
|
491
|
+
expect(tags).to include('<script src="/assets/a.self.js?body=1"></script>')
|
492
|
+
expect(tags).to include('<script src="/assets/b.self.js?body=1"></script>')
|
445
493
|
end
|
446
|
-
expect(tags.split('</script>')).to have(3).scripts
|
447
|
-
expect(tags).to include('<script src="/assets/main.js?body=1"></script>')
|
448
|
-
expect(tags).to include('<script src="/assets/a.js?body=1"></script>')
|
449
|
-
expect(tags).to include('<script src="/assets/b.js?body=1"></script>')
|
450
494
|
end
|
451
495
|
end
|
452
496
|
end
|
@@ -469,10 +513,17 @@ describe Sprockets::Helpers do
|
|
469
513
|
tags = context.asset_tag('main.js') do |path|
|
470
514
|
"<script src=\"#{path}\"></script>"
|
471
515
|
end
|
472
|
-
expect(tags.split('</script>')).to
|
473
|
-
|
474
|
-
|
475
|
-
|
516
|
+
expect(tags.split('</script>').size).to eq(3)
|
517
|
+
|
518
|
+
if Sprockets::Helpers.are_using_sprockets_3
|
519
|
+
expect(tags).to include('<script src="/assets/main.self.js?body=1"></script>')
|
520
|
+
expect(tags).to include('<script src="/assets/a.self.js?body=1"></script>')
|
521
|
+
expect(tags).to include('<script src="/assets/b.self.js?body=1"></script>')
|
522
|
+
else
|
523
|
+
expect(tags).to include('<script src="/assets/main.js?body=1"></script>')
|
524
|
+
expect(tags).to include('<script src="/assets/a.js?body=1"></script>')
|
525
|
+
expect(tags).to include('<script src="/assets/b.js?body=1"></script>')
|
526
|
+
end
|
476
527
|
|
477
528
|
Sprockets::Helpers.debug = false
|
478
529
|
Sprockets::Helpers.prefix = nil
|
@@ -497,13 +548,30 @@ describe Sprockets::Helpers do
|
|
497
548
|
end
|
498
549
|
|
499
550
|
describe 'when expanding' do
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
551
|
+
context 'in Sprockets 3.x' do
|
552
|
+
next unless Sprockets::Helpers.are_using_sprockets_3
|
553
|
+
it 'generates script tag for each javascript asset' do
|
554
|
+
within_construct do |construct|
|
555
|
+
assets_layout(construct)
|
556
|
+
tags = context.javascript_tag('main.js', :expand => true)
|
557
|
+
expect(tags).to include('<script src="/assets/main.self.js?body=1"></script>')
|
558
|
+
expect(tags).to include('<script src="/assets/a.self.js?body=1"></script>')
|
559
|
+
expect(tags).to include('<script src="/assets/b.self.js?body=1"></script>')
|
560
|
+
end
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
context 'in Sprockets 2.x' do
|
565
|
+
next if Sprockets::Helpers.are_using_sprockets_3
|
566
|
+
it 'generates script tag for each javascript asset' do
|
567
|
+
within_construct do |construct|
|
568
|
+
assets_layout(construct)
|
569
|
+
tags = context.javascript_tag('main.js', :expand => true)
|
570
|
+
|
571
|
+
expect(tags).to include('<script src="/assets/main.js?body=1"></script>')
|
572
|
+
expect(tags).to include('<script src="/assets/a.js?body=1"></script>')
|
573
|
+
expect(tags).to include('<script src="/assets/b.js?body=1"></script>')
|
574
|
+
end
|
507
575
|
end
|
508
576
|
end
|
509
577
|
end
|
@@ -527,19 +595,43 @@ describe Sprockets::Helpers do
|
|
527
595
|
end
|
528
596
|
|
529
597
|
describe 'when expanding' do
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
598
|
+
context 'in Sprockets 3.x' do
|
599
|
+
it 'generates stylesheet tag for each stylesheet asset' do
|
600
|
+
next unless Sprockets::Helpers.are_using_sprockets_3
|
601
|
+
within_construct do |construct|
|
602
|
+
assets_layout(construct)
|
603
|
+
tags = context.stylesheet_tag('main.css', :expand => true)
|
604
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/main.self.css?body=1">')
|
605
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/a.self.css?body=1">')
|
606
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/b.self.css?body=1">')
|
607
|
+
end
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
context "in Sprockets 2.x" do
|
612
|
+
next if Sprockets::Helpers.are_using_sprockets_3
|
613
|
+
it 'generates stylesheet tag for each stylesheet asset' do
|
614
|
+
within_construct do |construct|
|
615
|
+
assets_layout(construct)
|
616
|
+
tags = context.stylesheet_tag('main.css', :expand => true)
|
617
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/main.css?body=1">')
|
618
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/a.css?body=1">')
|
619
|
+
expect(tags).to include('<link rel="stylesheet" href="/assets/b.css?body=1">')
|
620
|
+
end
|
537
621
|
end
|
538
622
|
end
|
539
623
|
end
|
540
624
|
end
|
541
625
|
|
542
626
|
describe 'Sinatra integration' do
|
627
|
+
after do
|
628
|
+
::Sprockets::Helpers.environment = nil
|
629
|
+
::Sprockets::Helpers.public_path = nil
|
630
|
+
::Sprockets::Helpers.digest = nil
|
631
|
+
::Sprockets::Helpers.prefix = nil
|
632
|
+
::Sprockets::Helpers.expand = nil
|
633
|
+
end
|
634
|
+
|
543
635
|
it 'adds the helpers' do
|
544
636
|
app = Class.new(Sinatra::Base) do
|
545
637
|
register Sinatra::Sprockets::Helpers
|
@@ -561,7 +653,21 @@ describe Sprockets::Helpers do
|
|
561
653
|
|
562
654
|
expect(Sprockets::Helpers.environment).to be(custom_env)
|
563
655
|
expect(Sprockets::Helpers.prefix).to eq('/static')
|
564
|
-
expect(Sprockets::Helpers.digest).to
|
656
|
+
expect(Sprockets::Helpers.digest).to be_truthy
|
657
|
+
end
|
658
|
+
|
659
|
+
it 'uses first prefix if assets_prefix is an array' do
|
660
|
+
custom_env = Sprockets::Environment.new
|
661
|
+
|
662
|
+
app = Class.new(Sinatra::Base) do
|
663
|
+
set :sprockets, custom_env
|
664
|
+
set :assets_prefix, %w(assets vendor/assets)
|
665
|
+
|
666
|
+
register Sinatra::Sprockets::Helpers
|
667
|
+
end
|
668
|
+
|
669
|
+
expect(Sprockets::Helpers.environment).to be(custom_env)
|
670
|
+
expect(Sprockets::Helpers.prefix).to eq('/assets')
|
565
671
|
end
|
566
672
|
|
567
673
|
it 'manually configures with configure method' do
|
@@ -580,7 +686,7 @@ describe Sprockets::Helpers do
|
|
580
686
|
|
581
687
|
expect(Sprockets::Helpers.environment).to be(custom_env)
|
582
688
|
expect(Sprockets::Helpers.prefix).to eq('/static')
|
583
|
-
expect(Sprockets::Helpers.expand).to
|
689
|
+
expect(Sprockets::Helpers.expand).to be_truthy
|
584
690
|
end
|
585
691
|
end
|
586
692
|
end
|
data/sprockets-helpers.gemspec
CHANGED
@@ -5,11 +5,12 @@ require 'sprockets/helpers/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'sprockets-helpers'
|
7
7
|
s.version = Sprockets::Helpers::VERSION
|
8
|
+
s.licenses = ['MIT']
|
8
9
|
s.authors = ['Pete Browne']
|
9
10
|
s.email = ['me@petebrowne.com']
|
10
11
|
s.homepage = 'https://github.com/petebrowne/sprockets-helpers'
|
11
|
-
s.summary = 'Asset path helpers for Sprockets 2.x applications'
|
12
|
-
s.description = 'Asset path helpers for Sprockets 2.x applications'
|
12
|
+
s.summary = 'Asset path helpers for Sprockets 2.x & 3.x applications'
|
13
|
+
s.description = 'Asset path helpers for Sprockets 2.x & 3.x applications'
|
13
14
|
|
14
15
|
s.rubyforge_project = 'sprockets-helpers'
|
15
16
|
|
@@ -18,10 +19,10 @@ Gem::Specification.new do |s|
|
|
18
19
|
s.executables = `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }
|
19
20
|
s.require_paths = ['lib']
|
20
21
|
|
21
|
-
s.add_dependency 'sprockets', '
|
22
|
-
s.add_development_dependency 'appraisal', '~> 0
|
23
|
-
s.add_development_dependency 'rspec', '~>
|
24
|
-
s.add_development_dependency '
|
22
|
+
s.add_dependency 'sprockets', '>= 2.2'
|
23
|
+
s.add_development_dependency 'appraisal', '~> 2.0'
|
24
|
+
s.add_development_dependency 'rspec', '~> 3.3'
|
25
|
+
s.add_development_dependency 'test_construct', '~> 2.0'
|
25
26
|
s.add_development_dependency 'sinatra', '~> 1.4'
|
26
27
|
s.add_development_dependency 'rake'
|
27
28
|
end
|
metadata
CHANGED
@@ -1,120 +1,107 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Pete Browne
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sprockets
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '2.
|
19
|
+
version: '2.2'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '2.
|
26
|
+
version: '2.2'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: appraisal
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '0
|
33
|
+
version: '2.0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '0
|
40
|
+
version: '2.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
47
|
+
version: '3.3'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '3.3'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
56
|
+
name: test_construct
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
61
|
+
version: '2.0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- - ~>
|
66
|
+
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
68
|
+
version: '2.0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: sinatra
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- - ~>
|
73
|
+
- - "~>"
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '1.4'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- - ~>
|
80
|
+
- - "~>"
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '1.4'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rake
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
|
-
description: Asset path helpers for Sprockets 2.x applications
|
97
|
+
description: Asset path helpers for Sprockets 2.x & 3.x applications
|
111
98
|
email:
|
112
99
|
- me@petebrowne.com
|
113
100
|
executables: []
|
114
101
|
extensions: []
|
115
102
|
extra_rdoc_files: []
|
116
103
|
files:
|
117
|
-
- .gitignore
|
104
|
+
- ".gitignore"
|
118
105
|
- Appraisals
|
119
106
|
- Gemfile
|
120
107
|
- LICENSE
|
@@ -130,6 +117,9 @@ files:
|
|
130
117
|
- gemfiles/sprockets_2.7.gemfile
|
131
118
|
- gemfiles/sprockets_2.8.gemfile
|
132
119
|
- gemfiles/sprockets_2.9.gemfile
|
120
|
+
- gemfiles/sprockets_3.0.gemfile
|
121
|
+
- gemfiles/sprockets_3.1.gemfile
|
122
|
+
- gemfiles/sprockets_3.2.gemfile
|
133
123
|
- lib/sinatra/sprockets-helpers.rb
|
134
124
|
- lib/sinatra/sprockets/helpers.rb
|
135
125
|
- lib/sprockets-helpers.rb
|
@@ -143,35 +133,29 @@ files:
|
|
143
133
|
- spec/sprockets-helpers_spec.rb
|
144
134
|
- sprockets-helpers.gemspec
|
145
135
|
homepage: https://github.com/petebrowne/sprockets-helpers
|
146
|
-
licenses:
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
metadata: {}
|
147
139
|
post_install_message:
|
148
140
|
rdoc_options: []
|
149
141
|
require_paths:
|
150
142
|
- lib
|
151
143
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
144
|
requirements:
|
154
|
-
- -
|
145
|
+
- - ">="
|
155
146
|
- !ruby/object:Gem::Version
|
156
147
|
version: '0'
|
157
|
-
segments:
|
158
|
-
- 0
|
159
|
-
hash: -393383161037819423
|
160
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
149
|
requirements:
|
163
|
-
- -
|
150
|
+
- - ">="
|
164
151
|
- !ruby/object:Gem::Version
|
165
152
|
version: '0'
|
166
|
-
segments:
|
167
|
-
- 0
|
168
|
-
hash: -393383161037819423
|
169
153
|
requirements: []
|
170
154
|
rubyforge_project: sprockets-helpers
|
171
|
-
rubygems_version:
|
155
|
+
rubygems_version: 2.2.2
|
172
156
|
signing_key:
|
173
|
-
specification_version:
|
174
|
-
summary: Asset path helpers for Sprockets 2.x applications
|
157
|
+
specification_version: 4
|
158
|
+
summary: Asset path helpers for Sprockets 2.x & 3.x applications
|
175
159
|
test_files:
|
176
160
|
- spec/spec_helper.rb
|
177
161
|
- spec/sprockets-helpers_spec.rb
|