awestruct 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/awestruct/commands/server.rb +4 -8
- data/lib/awestruct/engine.rb +2 -1
- metadata +6 -20
@@ -1,10 +1,9 @@
|
|
1
|
-
require '
|
1
|
+
require 'webrick'
|
2
2
|
|
3
3
|
module Awestruct
|
4
4
|
module Commands
|
5
5
|
|
6
|
-
|
7
|
-
Mongrel::DirHandler::MIME_TYPES['.atom'] = 'application/atom+xml'
|
6
|
+
WEBrick::HTTPUtils::DefaultMimeTypes.store('atom', 'application/atom+xml')
|
8
7
|
|
9
8
|
class Server
|
10
9
|
attr_reader :server
|
@@ -16,11 +15,8 @@ module Awestruct
|
|
16
15
|
end
|
17
16
|
|
18
17
|
def run
|
19
|
-
@server =
|
20
|
-
|
21
|
-
@server.register("/", handler )
|
22
|
-
$stderr.puts "Launching server on http://#{@bind_addr}:#{@port}/"
|
23
|
-
@server.run.join
|
18
|
+
@server = WEBrick::HTTPServer.new( :DocumentRoot=>@path, :Port=>@port, :BindAddress=>@bind_addr )
|
19
|
+
@server.start
|
24
20
|
end
|
25
21
|
end
|
26
22
|
end
|
data/lib/awestruct/engine.rb
CHANGED
@@ -235,6 +235,7 @@ module Awestruct
|
|
235
235
|
end
|
236
236
|
|
237
237
|
def load_layouts
|
238
|
+
site.layouts.clear
|
238
239
|
dir_pathname = Pathname.new( dir )
|
239
240
|
Dir[ File.join( dir, config.layouts_dir, '*.haml' ) ].each do |layout_path|
|
240
241
|
layout_pathname = Pathname.new( layout_path )
|
@@ -380,7 +381,7 @@ module Awestruct
|
|
380
381
|
skin_pipeline_file = File.join( skin_ext_dir, 'pipeline.rb' )
|
381
382
|
if ( File.exists?( skin_pipeline_file ) )
|
382
383
|
skin_pipeline = eval File.read( skin_pipeline_file )
|
383
|
-
@helpers = skin_pipeline.helpers || []
|
384
|
+
@helpers = ( @helpers + skin_pipeline.helpers || [] ).flatten
|
384
385
|
end
|
385
386
|
end
|
386
387
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awestruct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bob McWhirter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-30 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id002
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: bluecloth
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
type: :runtime
|
90
90
|
version_requirements: *id005
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
92
|
+
name: org-ruby
|
93
93
|
prerelease: false
|
94
94
|
requirement: &id006 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
@@ -102,20 +102,6 @@ dependencies:
|
|
102
102
|
version: "0"
|
103
103
|
type: :runtime
|
104
104
|
version_requirements: *id006
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: org-ruby
|
107
|
-
prerelease: false
|
108
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
|
-
requirements:
|
111
|
-
- - ">="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
hash: 3
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
version: "0"
|
117
|
-
type: :runtime
|
118
|
-
version_requirements: *id007
|
119
105
|
description:
|
120
106
|
email: bob@mcwhirter.org
|
121
107
|
executables:
|