rack-server-pages 0.0.1 → 0.0.2
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/rack/server_pages.rb +4 -4
- data/public/README.erb +1 -2
- data/rack-server-pages.gemspec +3 -2
- metadata +7 -6
data/lib/rack/server_pages.rb
CHANGED
@@ -8,7 +8,7 @@ require 'forwardable'
|
|
8
8
|
|
9
9
|
module Rack
|
10
10
|
class ServerPages
|
11
|
-
VERSION = '0.0.
|
11
|
+
VERSION = '0.0.2'
|
12
12
|
|
13
13
|
def self.call(env)
|
14
14
|
new.call(env)
|
@@ -160,12 +160,12 @@ module Rack
|
|
160
160
|
require 'erb'
|
161
161
|
|
162
162
|
def self.extensions(ext = nil)
|
163
|
-
|
164
|
-
|
163
|
+
@extensions = ext if ext
|
164
|
+
@extensions ||= %w(erb rhtml)
|
165
165
|
end
|
166
166
|
|
167
167
|
def find_template
|
168
|
-
(@file =~ /\.(#{
|
168
|
+
(@file =~ /\.(#{self.class.extensions.join('|')})$/) and ::File.exist?(@file) ? self : nil
|
169
169
|
end
|
170
170
|
|
171
171
|
def render(scope, &block)
|
data/public/README.erb
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
<% layout('public/_layout.html') %>
|
2
|
-
<%# Rack::ServerPages::Template.tilt? ? layout('_layout.html') : headers['Content-Type'] = 'text/plain' %>
|
1
|
+
<% Rack::ServerPages::Template.tilt? ? layout('public/_layout.html') : headers['Content-Type'] = 'text/plain' %>
|
3
2
|
<%= partial 'README.md' %>
|
data/rack-server-pages.gemspec
CHANGED
@@ -7,9 +7,10 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Rack::ServerPages::VERSION
|
8
8
|
s.authors = ["Masato Igarashi"]
|
9
9
|
s.email = ["m@igrs.jp"]
|
10
|
-
s.homepage = "http://
|
10
|
+
s.homepage = "http://github.com/migrs/rack-server-pages"
|
11
11
|
s.summary = %q{Rack middleware and appilcation for serving dynamic pages in very simple way.}
|
12
|
-
s.description = %q{
|
12
|
+
s.description = %q{Rack middleware and appilcation for serving dynamic pages in very simple way.
|
13
|
+
There are no controllers and no models, just only views like a asp, jsp and php!}
|
13
14
|
|
14
15
|
s.rubyforge_project = "rack-server-pages"
|
15
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-server-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-31 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement: &
|
16
|
+
requirement: &70102886225200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,9 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
26
|
-
and
|
24
|
+
version_requirements: *70102886225200
|
25
|
+
description: ! "Rack middleware and appilcation for serving dynamic pages in very
|
26
|
+
simple way.\n There are no controllers and no models, just only
|
27
|
+
views like a asp, jsp and php!"
|
27
28
|
email:
|
28
29
|
- m@igrs.jp
|
29
30
|
executables: []
|
@@ -76,7 +77,7 @@ files:
|
|
76
77
|
- views/examples/wiki.html.wiki
|
77
78
|
- views/examples/yajl.json.yajl
|
78
79
|
- views/script.js.coffee
|
79
|
-
homepage: http://
|
80
|
+
homepage: http://github.com/migrs/rack-server-pages
|
80
81
|
licenses: []
|
81
82
|
post_install_message:
|
82
83
|
rdoc_options: []
|