vitrine 0.0.5 → 0.0.6
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.
- data/lib/version.rb +1 -1
- data/lib/vitrine.rb +10 -3
- data/vitrine.gemspec +2 -2
- metadata +3 -3
data/lib/version.rb
CHANGED
data/lib/vitrine.rb
CHANGED
@@ -89,8 +89,13 @@ class Vitrine::App < Sinatra::Base
|
|
89
89
|
specific_view = extensionless_path + ".*"
|
90
90
|
view_index = extensionless_path + "/index.*"
|
91
91
|
|
92
|
+
# Catch-all template for HTML5 apps using pushState
|
93
|
+
catch_all = "/catch_all.*"
|
94
|
+
|
95
|
+
possible_globs = [specific_view, view_index, catch_all]
|
96
|
+
|
92
97
|
# Glob for all the possibilites
|
93
|
-
possibilites =
|
98
|
+
possibilites = possible_globs.map do | pattern |
|
94
99
|
Dir.glob(File.join(settings.views, pattern))
|
95
100
|
end.flatten.reject do | e |
|
96
101
|
e =~ /\.DS_Store/ # except DS_Store
|
@@ -103,12 +108,14 @@ class Vitrine::App < Sinatra::Base
|
|
103
108
|
|
104
109
|
# If nothing is found just bail
|
105
110
|
unless template_path
|
106
|
-
|
111
|
+
err = possible_globs.map{|e| e.inspect }.join(', ')
|
112
|
+
raise "No template found - tried #{er}"
|
107
113
|
end
|
108
114
|
|
115
|
+
$stderr.puts "Rendering via template #{template_path.inspect}"
|
116
|
+
|
109
117
|
# Auto-pick the template engine out of the extension
|
110
118
|
template_engine = File.extname(template_path).gsub(/^\./, '')
|
111
|
-
|
112
119
|
render(template_engine, File.read(template_path), :layout => get_layout)
|
113
120
|
end
|
114
121
|
|
data/vitrine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "vitrine"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julik Tarkhanov"]
|
12
|
-
s.date = "2013-11-
|
12
|
+
s.date = "2013-11-05"
|
13
13
|
s.description = " Serves ERB templates with live CoffeeScript and SASS "
|
14
14
|
s.email = "me@julik.nl"
|
15
15
|
s.executables = ["vitrine"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vitrine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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: 2013-11-
|
12
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash: -
|
145
|
+
hash: -735079750998949370
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|