sinatra-assetpack 0.2.4 → 0.2.5

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: e2a2068da395988d50351d523f18c6bb4cbb3372
4
- data.tar.gz: b2be00f2e3fb9ac6212260ee0386885c49f80b22
3
+ metadata.gz: 8c378d50e90ff9951fd36094821ce63447303069
4
+ data.tar.gz: 9139010b8da5ebdf69c6977cb701245d0eb0b0ae
5
5
  SHA512:
6
- metadata.gz: a5513b043a8d0e79ea4aa593594458be7c542446cae01462e6aa9ad5da58507cf6a0e3216b91ef7600f9ffa77520b5a6103bb86e97226a7fc068d172bfa1b942
7
- data.tar.gz: 2ec358eb59ea3381386cc303f49cbc05bd71266c9d41bdd1ed44ceae01dcc95d53d9c56dd77d3b4da507ea42b9bf5c966d38fd8b921fbcdf45bf8a67757773f2
6
+ metadata.gz: 2a6f7cc4c382eefe9f2402f03f647121f1b8d2e3eb3f6240244b6cd5e57891624710514760ada8f439ea93f289b9c4a58463bc0d680dcdb27feedd6c36de6e2d
7
+ data.tar.gz: f619ae206a4917fda73d64765cd3421631a9df930fc3268629618604e1f3e939570db7fa70db69dea2856cb2c7d145573a60000f785dd4d612f7ab32b0195224
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ bundler_args: --without debug
2
3
  rvm:
3
4
  - 1.8.7
4
5
  - 1.9.2
@@ -1,3 +1,8 @@
1
+ ## v0.2.5 - June 11, 2013
2
+
3
+ ### Fixed
4
+ * Fixed an issue with Last-Modified headers & packaged asssets. (#111)
5
+
1
6
  ## v0.2.4 - June 8, 2013
2
7
 
3
8
  ### Added
data/Gemfile CHANGED
@@ -1,3 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # Gems for gem development
4
+ group :debug do
5
+ gem 'debugger'
6
+ gem 'awesome_print'
7
+ end
8
+
3
9
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinatra-assetpack (0.2.4)
4
+ sinatra-assetpack (0.2.5)
5
5
  backports
6
6
  jsmin
7
7
  rack-test
@@ -15,13 +15,21 @@ GEM
15
15
  Platform (>= 0.4.0)
16
16
  open4
17
17
  Platform (0.4.0)
18
+ awesome_print (1.1.0)
18
19
  backports (3.3.1)
19
20
  coffee-script (2.2.0)
20
21
  coffee-script-source
21
22
  execjs
22
23
  coffee-script-source (1.6.1)
24
+ columnize (0.3.6)
23
25
  commonjs (0.2.6)
24
26
  contest (0.1.3)
27
+ debugger (1.6.0)
28
+ columnize (>= 0.3.1)
29
+ debugger-linecache (~> 1.2.0)
30
+ debugger-ruby_core_source (~> 1.2.1)
31
+ debugger-linecache (1.2.0)
32
+ debugger-ruby_core_source (1.2.2)
25
33
  execjs (1.4.0)
26
34
  multi_json (~> 1.0)
27
35
  gem-release (0.6.0)
@@ -42,8 +50,8 @@ GEM
42
50
  rack (>= 1.0)
43
51
  rake (10.0.3)
44
52
  sass (3.2.7)
45
- sinatra (1.4.2)
46
- rack (~> 1.5, >= 1.5.2)
53
+ sinatra (1.4.3)
54
+ rack (~> 1.4)
47
55
  rack-protection (~> 1.4)
48
56
  tilt (~> 1.3, >= 1.3.4)
49
57
  stylus (0.7.1)
@@ -62,8 +70,10 @@ PLATFORMS
62
70
  ruby
63
71
 
64
72
  DEPENDENCIES
73
+ awesome_print
65
74
  coffee-script
66
75
  contest
76
+ debugger
67
77
  gem-release
68
78
  haml
69
79
  less
@@ -13,7 +13,8 @@ module Sinatra
13
13
  # Returns the maximum mtime for a given list of files.
14
14
  # It will return nil if none of them are found.
15
15
  def mtime_for(files)
16
- files.map { |f| File.mtime(f).to_i if f.is_a?(String) && File.file?(f) }.compact.max
16
+ time = files.map { |f| File.mtime(f).to_i if f.is_a?(String) && File.file?(f) }.compact.max
17
+ Time.at(time) if time
17
18
  end
18
19
 
19
20
  # Adds a cache buster for the given path.
@@ -62,7 +62,7 @@ module Sinatra
62
62
 
63
63
  # Send headers
64
64
  content_type fmt.to_sym
65
- last_modified File.mtime(fn).to_i
65
+ last_modified File.mtime(fn)
66
66
  assets_expires
67
67
 
68
68
  format = File.extname(fn)[1..-1]
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module AssetPack
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
 
5
5
  # @deprecated Please use AssetPack::VERSION instead
6
6
  def self.version
@@ -5,7 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.version = Sinatra::AssetPack::VERSION
6
6
  s.summary = %{Asset packager for Sinatra.}
7
7
  s.description = %Q{Package your assets for Sinatra.}
8
- s.authors = ['Rico Sta. Cruz']
8
+ s.authors = ['Rico Sta. Cruz', 'Jean-Philippe Doyle']
9
+ s.licenses = ['MIT']
9
10
  s.email = ['rico@sinefunc.com']
10
11
  s.homepage = 'http://github.com/rstacruz/sinatra-assetpack'
11
12
  s.files = `git ls-files`.strip.split("\n")
@@ -0,0 +1,21 @@
1
+ require File.expand_path('../test_helper', __FILE__)
2
+
3
+ class HeadersTest < UnitTest
4
+ setup do
5
+ app.set :reload_templates, true
6
+
7
+ @file = File.join(app.root, 'app', 'packages', 'a_package', 'package.js')
8
+ FileUtils.touch(@file)
9
+ @httpdate = File.mtime(@file).httpdate
10
+ end
11
+
12
+ test "individual route" do
13
+ get '/packages/a_package/package.js'
14
+ assert_equal @httpdate, last_response.headers['Last-Modified']
15
+ end
16
+
17
+ test "package route" do
18
+ get '/packages/a_package.b1946ac92492d2347c6235b4d2611184.js'
19
+ assert_equal @httpdate, last_response.headers['Last-Modified']
20
+ end
21
+ end
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-assetpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rico Sta. Cruz
8
+ - Jean-Philippe Doyle
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain:
@@ -29,7 +30,7 @@ cert_chain:
29
30
  kzgF4O2OL+8O23we4E1LvfRn5gV77Dij6s9V4HHzMBuLwnNb8T+6lOnUWbtiIddD
30
31
  e8c8i7PlrzhVJ/8sXUJsCkyE8d2MyRyjlxM=
31
32
  -----END CERTIFICATE-----
32
- date: 2013-06-08 00:00:00.000000000 Z
33
+ date: 2013-06-12 00:00:00.000000000 Z
33
34
  dependencies:
34
35
  - !ruby/object:Gem::Dependency
35
36
  name: backports
@@ -367,6 +368,7 @@ files:
367
368
  - test/combined_test.rb
368
369
  - test/compressed_test.rb
369
370
  - test/glob_test.rb
371
+ - test/headers_test.rb
370
372
  - test/helpers_test.rb
371
373
  - test/ignore_test.rb
372
374
  - test/img_test.rb
@@ -389,7 +391,8 @@ files:
389
391
  - test/unit_test.rb
390
392
  - test/yui_test.rb
391
393
  homepage: http://github.com/rstacruz/sinatra-assetpack
392
- licenses: []
394
+ licenses:
395
+ - MIT
393
396
  metadata: {}
394
397
  post_install_message:
395
398
  rdoc_options: []
metadata.gz.sig CHANGED
Binary file