font_assets 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -101,3 +101,11 @@ License
101
101
  -------
102
102
 
103
103
  Font Assets is released under the MIT license.
104
+
105
+ Contributors
106
+ ------------
107
+
108
+ * [Nathanial Bibler](https://github.com/nbibler)
109
+ * [Eric Allam](https://github.com/rubymaverick)
110
+ * [Ryan Montgomery](https://github.com/rmontgomery429)
111
+ * [Jack Foy](https://github.com/jfoy)
@@ -7,7 +7,7 @@ module FontAssets
7
7
  initializer "font_assets.configure_rails_initialization" do |app|
8
8
  config.font_assets.origin ||= "*"
9
9
 
10
- app.middleware.insert_before 'ActionDispatch::Static', FontAssets::Middleware, config.font_assets.origin
10
+ app.middleware.insert_before 'Rack::Lock', FontAssets::Middleware, config.font_assets.origin
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module FontAssets
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -3,17 +3,17 @@ require 'font_assets/middleware'
3
3
 
4
4
  describe FontAssets::Middleware do
5
5
  it 'passes all Rack::Lint checks' do
6
- app = Rack::Lint.new(FontAssets::Middleware.new(inner_app, 'http://test.local'))
6
+ app = Rack::Lint.new(load_app)
7
7
  request app, '/'
8
8
  end
9
9
 
10
10
  context 'for GET requests' do
11
11
  context 'to font assets' do
12
12
  let(:app) { load_app 'http://test.origin' }
13
- let(:call) { request app, '/test.ttf' }
13
+ let(:response) { request app, '/test.ttf' }
14
14
 
15
15
  context 'the response headers' do
16
- subject { call[1] }
16
+ subject { response[1] }
17
17
 
18
18
  its(["Access-Control-Allow-Headers"]) { should == "x-requested-with" }
19
19
  its(["Access-Control-Max-Age"]) { should == "3628800" }
@@ -25,10 +25,10 @@ describe FontAssets::Middleware do
25
25
 
26
26
  context 'to non-font assets' do
27
27
  let(:app) { load_app }
28
- let(:call) { request app, '/' }
28
+ let(:response) { request app, '/' }
29
29
 
30
30
  context 'the response headers' do
31
- subject { call[1] }
31
+ subject { response[1] }
32
32
 
33
33
  its(["Access-Control-Allow-Headers"]) { should be_nil }
34
34
  its(["Access-Control-Max-Age"]) { should be_nil }
@@ -41,10 +41,10 @@ describe FontAssets::Middleware do
41
41
 
42
42
  context 'for OPTIONS requests' do
43
43
  let(:app) { load_app 'http://test.options' }
44
- let(:call) { request app, '/test.ttf', :method => 'OPTIONS' }
44
+ let(:response) { request app, '/test.ttf', :method => 'OPTIONS' }
45
45
 
46
46
  context 'the response headers' do
47
- subject { call[1] }
47
+ subject { response[1] }
48
48
 
49
49
  its(["Access-Control-Allow-Headers"]) { should == "x-requested-with" }
50
50
  its(["Access-Control-Max-Age"]) { should == "3628800" }
@@ -57,7 +57,7 @@ describe FontAssets::Middleware do
57
57
  end
58
58
 
59
59
  context 'the response body' do
60
- subject { call[2] }
60
+ subject { response[2] }
61
61
  it { should be_empty }
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: font_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-01-18 00:00:00.000000000Z
12
+ date: 2012-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
16
- requirement: &2164268920 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164268920
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &2164268420 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '2.0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2164268420
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.0'
36
46
  description: Improve font serving in Rails 3.1
37
47
  email:
38
48
  - rubymaverick@gmail.com
@@ -75,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
85
  version: '0'
76
86
  requirements: []
77
87
  rubyforge_project: font_assets
78
- rubygems_version: 1.8.10
88
+ rubygems_version: 1.8.23
79
89
  signing_key:
80
90
  specification_version: 3
81
91
  summary: Improve font serving in Rails 3.1