madride 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,11 +14,16 @@ module Madride
14
14
  register_engine '.slim', SlimTemplate
15
15
  register_engine '.haml', Tilt::HamlTemplate
16
16
 
17
+ # text/html extension is .htm, so we need to reassign aliases map manually
18
+
19
+ @trail.alias_extension '.slim', '.html'
20
+ @trail.alias_extension '.haml', '.html'
21
+ @trail.alias_extension '.htm', '.html'
22
+
17
23
  Madride.paths.each do |path|
18
24
  append_path path
19
25
  end
20
26
 
21
-
22
27
  @context_class.send(:include, ContextPatch)
23
28
  end
24
29
 
@@ -3,9 +3,6 @@ require "slim"
3
3
 
4
4
  module Madride
5
5
  class SlimTemplate < Slim::Template
6
- class << self
7
- attr_reader :default_mime_type
8
- @default_mime_type = 'text/html'
9
- end
6
+ self.default_mime_type = 'text/html'
10
7
  end
11
8
  end
@@ -1,3 +1,3 @@
1
1
  module Madride
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -39,5 +39,12 @@ module Madride
39
39
  environment.paths.should include "/foo"
40
40
  environment.paths.should include fixtures_path('bar').to_s
41
41
  end
42
+
43
+
44
+ it "should allow omit .html prefix extension" do
45
+ asset = environment["simple.html"]
46
+ asset.should_not be_nil
47
+ asset.to_s.should match(%r{<title>\s*Simple Page\s*</title>})
48
+ end
42
49
  end
43
50
  end
@@ -0,0 +1,6 @@
1
+ html
2
+ head
3
+ title Simple Page
4
+
5
+ body
6
+ p A simple page without .html extenion prefix
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madride
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-02 00:00:00.000000000 Z
12
+ date: 2012-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -176,6 +176,7 @@ files:
176
176
  - spec/fixtures/pages/index.html.slim
177
177
  - spec/fixtures/pages/music.html.slim
178
178
  - spec/fixtures/pages/music/bands.html.slim
179
+ - spec/fixtures/pages/simple.slim
179
180
  - spec/server_spec.rb
180
181
  - spec/spec_helper.rb
181
182
  homepage: https://github.com/madride/madride
@@ -192,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
193
  version: '0'
193
194
  segments:
194
195
  - 0
195
- hash: -676681393
196
+ hash: -393285937
196
197
  required_rubygems_version: !ruby/object:Gem::Requirement
197
198
  none: false
198
199
  requirements:
@@ -201,13 +202,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
202
  version: '0'
202
203
  segments:
203
204
  - 0
204
- hash: -676681393
205
+ hash: -393285937
205
206
  requirements: []
206
207
  rubyforge_project:
207
208
  rubygems_version: 1.8.23
208
209
  signing_key:
209
210
  specification_version: 3
210
- summary: madride-1.0.6
211
+ summary: madride-1.0.7
211
212
  test_files:
212
213
  - spec/.gitkeep
213
214
  - spec/environment_spec.rb
@@ -219,5 +220,6 @@ test_files:
219
220
  - spec/fixtures/pages/index.html.slim
220
221
  - spec/fixtures/pages/music.html.slim
221
222
  - spec/fixtures/pages/music/bands.html.slim
223
+ - spec/fixtures/pages/simple.slim
222
224
  - spec/server_spec.rb
223
225
  - spec/spec_helper.rb