soxer 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -1
- data/lib/soxer/skel/empty/app.rb +9 -32
- data/lib/soxer/skel/empty/config.ru +4 -1
- data/soxer.gemspec +1 -1
- metadata +3 -3
data/CHANGES
CHANGED
data/lib/soxer/skel/empty/app.rb
CHANGED
@@ -3,38 +3,15 @@ require "rubygems"
|
|
3
3
|
require "sinatra"
|
4
4
|
require "soxer"
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
get '*.*' do
|
16
|
-
file = File.join( settings.root, settings.origin, params[:splat].join('.') )
|
17
|
-
case params[:splat][1]
|
18
|
-
when /[jpg|png|pdf|doc|xls|pdf]/ then send_file(file, :disposition => nil)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
post '*/?' do
|
23
|
-
content_type "text/html", :charset => "utf-8"
|
24
|
-
page = get_page
|
25
|
-
page['layout'] ||= 'layout'
|
26
|
-
haml page['content'], :layout => page['layout'].to_sym, :locals => { :page => page }
|
27
|
-
end
|
28
|
-
|
29
|
-
get '*/?' do
|
30
|
-
content_type "text/html", :charset => "utf-8"
|
31
|
-
|
32
|
-
if params[:splat][0] =~ /-atom$/ then
|
33
|
-
set :haml, { :format => :xhtml }
|
34
|
-
content_type "application/atom+xml", :charset => "utf-8"
|
6
|
+
class SoxerApp < Sinatra::Base
|
7
|
+
register Sinatra::Soxer
|
8
|
+
|
9
|
+
# Only for sending forms... not a part of Soxer per se...
|
10
|
+
post '*/?' do
|
11
|
+
content_type "text/html", :charset => "utf-8"
|
12
|
+
page = get_page
|
13
|
+
page['layout'] ||= 'layout'
|
14
|
+
haml page['content'], :layout => page['layout'].to_sym, :locals => { :page => page }
|
35
15
|
end
|
36
16
|
|
37
|
-
page = get_page
|
38
|
-
page['layout'] ||= 'layout'
|
39
|
-
haml page['content'], :layout => page['layout'].to_sym, :locals => { :page => page }
|
40
17
|
end
|
data/soxer.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 6
|
10
|
+
version: 0.9.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Toni Anzlovar
|