sinatra-assetpack 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 85807c666c94309174caeec412e18a2e42a032a0
4
- data.tar.gz: 432466f8a853a360fd18bd68c35b86274d1ec682
3
+ metadata.gz: 188c63c21768ada8ce6b04d78d71cc57a0910379
4
+ data.tar.gz: 54d64ece5af1de3334eafa6cc35caae866b7ce3c
5
5
  SHA512:
6
- metadata.gz: cb9ef79de434ac6e32982ca5f1e395e541e019947fd90cb4ed6a354adb15057448a3103bb1772c5c6b086380680ec2d52ead133a8bbe0ead8c2bfddea6766402
7
- data.tar.gz: 9cfe6c2dd7de1580d132dc3153a9b01ee900fa1f736bb6d1081800cb8a7d5feb7a40b5b504dbee3763b7b1a7c43fcb8d6e35eb7f591aa45a916d0774c479e204
6
+ metadata.gz: eb6d31246a8b947ca3fcc032b3d98638ca913c1cfffc9cbb567e7649286999bc0d112137382bd43023b32c4e926f67a301ae8ab7335f03fa518d4c2903be9768
7
+ data.tar.gz: 033400d94121789374c1a5b770a22362d6a50fe4706056a54535d033c347bf560a854411cc489c4490c9c21ae59aaa9d2f01b110d14f9ee860eb6234c63a8dee
@@ -1,2 +1,3 @@
1
- p7�_�Na��q���`Zs8~����`�eH!�r�7��^��R�Ϡ;)t���L��۫X�����R�U�Ǝ�'S���'huB� ~~S��ǡN���,�w� Q�8�,
2
- 3%e'6o�vr����`�jW'OCVC��b��Pϳ�1>ЇEK +��sqQ9Q����J&�vl�̸!��
1
+ (Fv ��/u�_�
2
+ ���N���Y*��~�*�g&mxl��:ly�C�o�sޚ_��O��f|\��Bͼ��`��m}8X��
3
+ �'���E�6dW)*�u[�ik �����7m�,AZ �EI=���F�t�����=
data.tar.gz.sig CHANGED
@@ -1,4 +1,2 @@
1
- _��2�㕳�K��XM)(
2
- FQX.͙�5��BR��B RAB���?S��e5u�|��\B8
3
- ��
4
- �n/P ��s^�p�_Wd��ܚ�v6X-�p�\m��m�� 1j�蘧f7�G��=t>�����Nw �ݤ0����#]z�VŹ��;�|��Ԣ֊�uL�jl۷���Y��W9b�XZ:��.�j�&���k�!�X�r�Ft˩��~��>�)g"I����@�� 0��E|iK��>T�L'������-�trW�B
1
+ ���R�{�54x����x� �.s�Y^ �� b�Q�A�#��G��� ��e���a[PK2"Kw���6M��.�Qq!pl@�e����I'f��1X�
2
+ �ʬ6 �ߛ#=���F���R@2��I�\Ի�2�$����sX�C�'v�7�����0�Z�{�0+��pz�k��J�5���v9�/�z7wK���*=�pJ��꓏�_��9�nWA�tD��؟�ϖ���3�fsc�Z�Jȕ��Y
@@ -1,3 +1,12 @@
1
+ ## v0.2.7 - June 22, 2013
2
+
3
+ ### Fixed
4
+ * Change glob matching behaviour to match Dir#glob. (#108)
5
+
6
+ ### Improvements
7
+ * Removed contest development dependency.
8
+ * Rewrote glob method with reduced complexity.
9
+
1
10
  ## v0.2.6 - June 18, 2013
2
11
 
3
12
  ### Fixed
data/Gemfile CHANGED
@@ -2,12 +2,13 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Gems for gem development
4
4
  group :debug do
5
- gem 'debugger'
5
+ gem 'debugger', :platform => 'mri'
6
6
  gem 'awesome_print'
7
7
  gem 'gem-release'
8
8
  end
9
9
 
10
10
  group :test do
11
+ gem 'contest'
11
12
  gem 'rake'
12
13
  gem 'mocha'
13
14
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinatra-assetpack (0.2.5)
4
+ sinatra-assetpack (0.2.7)
5
5
  jsmin
6
6
  rack-test
7
7
  sinatra
@@ -266,26 +266,22 @@ module Sinatra
266
266
  #
267
267
  # glob('spec')
268
268
  # glob(['spec1', 'spec2' ...])
269
- # glob('spec', preserve: true)
270
269
  #
271
- # If `preserve` is set to true, it will preserve any specs that are not
272
- # wildcards that don't match anything.
273
- #
274
- def glob(match, options={})
275
- match = [*match] # Force array-ness
276
-
277
- paths = match.map { |spec|
278
- if options[:preserve] && !spec.include?('*')
279
- spec
270
+ def glob(match)
271
+ paths = Array.new(match) # Force array-ness
272
+
273
+ paths.map! do |spec|
274
+ if spec.include?('*')
275
+ files.select do |file, _|
276
+ # Dir#glob like source matching
277
+ File.fnmatch?(spec, file, File::FNM_PATHNAME | File::FNM_DOTMATCH)
278
+ end.sort
280
279
  else
281
- files.keys.select { |f| File.fnmatch?(spec, f) }.sort
280
+ [spec, files[spec]]
282
281
  end
283
- }.flatten
284
-
285
- paths = paths.uniq
286
- tuples = paths.map { |key| [key, files[key]] }
282
+ end
287
283
 
288
- Hash[*tuples.flatten]
284
+ Hash[*paths.flatten]
289
285
  end
290
286
 
291
287
  # Fetches the contents of a dynamic asset. If `cache_dynamic_assets` is set,
@@ -37,7 +37,7 @@ module Sinatra
37
37
 
38
38
  # Returns a list of URIs
39
39
  def paths_and_files
40
- list = @assets.glob(@filespecs, :preserve => true)
40
+ list = @assets.glob(@filespecs)
41
41
  list.reject! { |path, file| @assets.ignored?(path) }
42
42
  list
43
43
  end
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module AssetPack
3
- VERSION = "0.2.6"
3
+ VERSION = "0.2.7"
4
4
 
5
5
  # @deprecated Please use AssetPack::VERSION instead
6
6
  def self.version
@@ -21,8 +21,6 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Supported preprocessors (each is optional)
23
23
  s.add_development_dependency 'coffee-script'
24
- s.add_development_dependency 'coffee-script'
25
- s.add_development_dependency 'contest'
26
24
  s.add_development_dependency 'haml'
27
25
  s.add_development_dependency 'less'
28
26
  s.add_development_dependency 'sass'
@@ -0,0 +1 @@
1
+ alert("lvl2");
@@ -0,0 +1 @@
1
+ alert('lvl1');
@@ -21,6 +21,8 @@ class GlobTest < UnitTest
21
21
  should "match double-star globs recursively" do
22
22
  app.stubs(:development?).returns(true)
23
23
  get '/a'
24
+ assert body.include?("lvl1.")
25
+ assert body.include?("lvl2.")
24
26
  assert body.include?("a/b/c1/hello.")
25
27
  assert body.include?("a/b/c2/hi.")
26
28
  assert body.include?("a/b/c2/hola.")
@@ -1,4 +1,6 @@
1
1
  require File.expand_path('../test_helper', __FILE__)
2
+ require 'stylus'
3
+ require 'stylus/tilt'
2
4
 
3
5
  class StylusTest < UnitTest
4
6
  class App < Main
@@ -1,12 +1,5 @@
1
1
  require 'contest'
2
- require 'jsmin'
3
- require 'tilt'
4
- require 'haml'
5
- require 'sass'
6
- require 'stylus'
7
- require 'stylus/tilt'
8
2
  require 'rack/test'
9
- require 'yaml'
10
3
  require 'mocha/setup'
11
4
 
12
5
  ENV['RACK_ENV'] = 'test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-assetpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rico Sta. Cruz
@@ -30,7 +30,7 @@ cert_chain:
30
30
  kzgF4O2OL+8O23we4E1LvfRn5gV77Dij6s9V4HHzMBuLwnNb8T+6lOnUWbtiIddD
31
31
  e8c8i7PlrzhVJ/8sXUJsCkyE8d2MyRyjlxM=
32
32
  -----END CERTIFICATE-----
33
- date: 2013-06-19 00:00:00.000000000 Z
33
+ date: 2013-06-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: jsmin
@@ -102,34 +102,6 @@ dependencies:
102
102
  - - '>='
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
- - !ruby/object:Gem::Dependency
106
- name: coffee-script
107
- requirement: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - '>='
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- type: :development
113
- prerelease: false
114
- version_requirements: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- - !ruby/object:Gem::Dependency
120
- name: contest
121
- requirement: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- type: :development
127
- prerelease: false
128
- version_requirements: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - '>='
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
105
  - !ruby/object:Gem::Dependency
134
106
  name: haml
135
107
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +284,8 @@ files:
312
284
  - test/app/app/js_glob/a/b/c1/hello.js
313
285
  - test/app/app/js_glob/a/b/c2/hi.js
314
286
  - test/app/app/js_glob/a/b/c2/hola.js
287
+ - test/app/app/js_glob/a/lvl2.js
288
+ - test/app/app/js_glob/lvl1.js
315
289
  - test/app/app/packages/a_package/package.css
316
290
  - test/app/app/packages/a_package/package.js
317
291
  - test/app/app/packages/a_package/package.png
metadata.gz.sig CHANGED
Binary file