sinatra-assetpack 0.0.11 → 0.0.12.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -96,7 +96,9 @@ module Sinatra
96
96
  session = Rack::Test::Session.new(@assets.app)
97
97
  paths.map { |path|
98
98
  result = session.get(path)
99
- result.body if result.status == 200
99
+ response_encoding = result.content_type.split(/;\s*charset\s*=\s*/).last.upcase rescue 'ASCII-8BIT'
100
+ # p [:combined, path, result.body.encoding.name, response_encoding]
101
+ result.body.force_encoding(response_encoding).encode(Encoding.default_external || 'ASCII-8BIT') if result.status == 200
100
102
  }.join("\n")
101
103
  end
102
104
 
@@ -1,7 +1,7 @@
1
1
  module Sinatra
2
2
  module AssetPack
3
3
  def self.version
4
- "0.0.11"
4
+ "0.0.12.pre1"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1 @@
1
+ $(function() { alert("Hellö"); });
@@ -0,0 +1,2 @@
1
+ x = ->
2
+ alert 'yö'
data/test/app/app.rb CHANGED
@@ -29,6 +29,11 @@ class Main < Sinatra::Base
29
29
  '/js/hell*.js'
30
30
  ]
31
31
 
32
+ js :encoding, '/js/encoding.js', [
33
+ '/js/yoe.js',
34
+ '/js/helloe.js'
35
+ ]
36
+
32
37
  css :application, '/css/application.css', [
33
38
  '/css/screen.css'
34
39
  ]
@@ -0,0 +1,8 @@
1
+ require File.expand_path('../test_helper', __FILE__)
2
+
3
+ class AppTest < UnitTest
4
+ test 'encoding' do
5
+ app.set :reload_templates, false
6
+ get '/js/encoding.js'
7
+ end
8
+ end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-assetpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
5
- prerelease:
4
+ version: 0.0.12.pre1
5
+ prerelease: 7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rico Sta. Cruz
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-20 00:00:00.000000000Z
12
+ date: 2012-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
16
- requirement: &2152651000 !ruby/object:Gem::Requirement
16
+ requirement: &2152235760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152651000
24
+ version_requirements: *2152235760
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sinatra
27
- requirement: &2152650180 !ruby/object:Gem::Requirement
27
+ requirement: &2152235300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2152650180
35
+ version_requirements: *2152235300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jsmin
38
- requirement: &2152649180 !ruby/object:Gem::Requirement
38
+ requirement: &2152234800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2152649180
46
+ version_requirements: *2152234800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rack-test
49
- requirement: &2152648100 !ruby/object:Gem::Requirement
49
+ requirement: &2152234320 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2152648100
57
+ version_requirements: *2152234320
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: yui-compressor
60
- requirement: &2152646860 !ruby/object:Gem::Requirement
60
+ requirement: &2152233840 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2152646860
68
+ version_requirements: *2152233840
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sass
71
- requirement: &2152645840 !ruby/object:Gem::Requirement
71
+ requirement: &2152233320 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2152645840
79
+ version_requirements: *2152233320
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: haml
82
- requirement: &2152644700 !ruby/object:Gem::Requirement
82
+ requirement: &2152232700 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2152644700
90
+ version_requirements: *2152232700
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: coffee-script
93
- requirement: &2152643520 !ruby/object:Gem::Requirement
93
+ requirement: &2152231900 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2152643520
101
+ version_requirements: *2152231900
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: contest
104
- requirement: &2152639780 !ruby/object:Gem::Requirement
104
+ requirement: &2152246000 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *2152639780
112
+ version_requirements: *2152246000
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: mocha
115
- requirement: &2152639140 !ruby/object:Gem::Requirement
115
+ requirement: &2152245260 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *2152639140
123
+ version_requirements: *2152245260
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: stylus
126
- requirement: &2152638260 !ruby/object:Gem::Requirement
126
+ requirement: &2152244580 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *2152638260
134
+ version_requirements: *2152244580
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: uglifier
137
- requirement: &2152637340 !ruby/object:Gem::Requirement
137
+ requirement: &2152243720 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2152637340
145
+ version_requirements: *2152243720
146
146
  description: Package your assets for Sinatra.
147
147
  email:
148
148
  - rico@sinefunc.com
@@ -220,8 +220,10 @@ files:
220
220
  - test/app/app/images/email.png
221
221
  - test/app/app/js/_ignoreme.js
222
222
  - test/app/app/js/hello.js
223
+ - test/app/app/js/helloe.js
223
224
  - test/app/app/js/hi.coffee
224
225
  - test/app/app/js/ugly.js
226
+ - test/app/app/js/yoe.coffee
225
227
  - test/app/app/js_glob/a/b/c1/hello.js
226
228
  - test/app/app/js_glob/a/b/c2/hi.js
227
229
  - test/app/app/js_glob/a/b/c2/hola.js
@@ -229,6 +231,7 @@ files:
229
231
  - test/arity_test.rb
230
232
  - test/build_test.rb
231
233
  - test/cache_test.rb
234
+ - test/combined_test.rb
232
235
  - test/compressed_test.rb
233
236
  - test/glob_test.rb
234
237
  - test/helpers_test.rb
@@ -265,12 +268,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
265
268
  required_rubygems_version: !ruby/object:Gem::Requirement
266
269
  none: false
267
270
  requirements:
268
- - - ! '>='
271
+ - - ! '>'
269
272
  - !ruby/object:Gem::Version
270
- version: '0'
273
+ version: 1.3.1
271
274
  requirements: []
272
275
  rubyforge_project:
273
- rubygems_version: 1.8.10
276
+ rubygems_version: 1.8.17
274
277
  signing_key:
275
278
  specification_version: 3
276
279
  summary: Asset packager for Sinatra.