mbj-assets 0.0.4 → 0.0.5
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 +4 -4
- data/.travis.yml +3 -1
- data/assets.gemspec +1 -1
- data/config/flay.yml +2 -2
- data/lib/assets/mime.rb +1 -0
- data/spec/assets/droid-sans.woff +0 -0
- data/spec/integration/assets/spike_spec.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d996f9fe46d686ff3e3a7a53ab924f757517ecc
|
4
|
+
data.tar.gz: 177760b2c163deaa7ec55fef2660cd83379de976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 192d7d3b26f56f0f4197ca298ca7398aa0ad296692ec179a089ef9cc0e5c825c48399e4d81a69804b7c432c20798edabe625ca20ad874aac34128c878918c6ef
|
7
|
+
data.tar.gz: bd727981a3461da0af95bacf7ffc78e2a4d68aa54a99848ab51a516129213dc53cab7cdee68f409f771756328002d9db379a5f377416f04592fda59b68eebfb2
|
data/.travis.yml
CHANGED
data/assets.gemspec
CHANGED
data/config/flay.yml
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
---
|
2
|
-
threshold:
|
3
|
-
total_score:
|
2
|
+
threshold: 14
|
3
|
+
total_score: 118
|
data/lib/assets/mime.rb
CHANGED
@@ -72,6 +72,7 @@ module Assets
|
|
72
72
|
SASS = new('.sass', 'text/plain; charset=UTF-8' )
|
73
73
|
SCSS = new('.scss', 'text/plain; charset=UTF-8' )
|
74
74
|
HTML = new('.html', 'text/html; charset=UTF-8' )
|
75
|
+
WOFF = new('.woff', 'application/font-woff' )
|
75
76
|
|
76
77
|
IMAGES = [
|
77
78
|
JPG, ICO, PNG, SVG, GIF
|
Binary file
|
@@ -28,9 +28,16 @@ describe Assets, 'and spiking around' do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
let(:web_fonts) do
|
32
|
+
repository.glob('*.woff').map do |name|
|
33
|
+
repository.file(name)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
31
37
|
let(:rules) do
|
32
38
|
rules = []
|
33
39
|
rules.concat(images)
|
40
|
+
rules.concat(web_fonts)
|
34
41
|
rules << repository.compile('application.coffee')
|
35
42
|
rules << stylesheet
|
36
43
|
end
|
@@ -83,6 +90,15 @@ describe Assets, 'and spiking around' do
|
|
83
90
|
its(:body) { should eql(expected_body) }
|
84
91
|
end
|
85
92
|
|
93
|
+
context 'accessing woff web font' do
|
94
|
+
let(:name) { 'droid-sans.woff' }
|
95
|
+
let(:extra_hash) { {} }
|
96
|
+
let(:expected_body) { File.read('spec/assets/droid-sans.woff') }
|
97
|
+
|
98
|
+
its(:content_type) { should eql('application/font-woff') }
|
99
|
+
its(:body) { should eql(expected_body) }
|
100
|
+
end
|
101
|
+
|
86
102
|
context 'compiling coffescript' do
|
87
103
|
let(:name) { 'application.js' }
|
88
104
|
let(:extra_hash) { {} }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mbj-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: adamantium
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- lib/assets/rule/rename.rb
|
211
211
|
- spec/assets/application.coffee
|
212
212
|
- spec/assets/application.sass
|
213
|
+
- spec/assets/droid-sans.woff
|
213
214
|
- spec/assets/fonts.css
|
214
215
|
- spec/assets/test.jpg
|
215
216
|
- spec/integration/assets/spike_spec.rb
|
@@ -240,6 +241,7 @@ summary: Playground for a small assets system
|
|
240
241
|
test_files:
|
241
242
|
- spec/assets/application.coffee
|
242
243
|
- spec/assets/application.sass
|
244
|
+
- spec/assets/droid-sans.woff
|
243
245
|
- spec/assets/fonts.css
|
244
246
|
- spec/assets/test.jpg
|
245
247
|
- spec/integration/assets/spike_spec.rb
|