wire-framework 0.1.6.0 → 0.1.6.1
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.
- checksums.yaml +4 -4
- data/lib/app/file.rb +1 -1
- data/lib/app/render/document.rb +2 -2
- data/lib/app/render/instant.rb +6 -1
- data/lib/app/render/page.rb +1 -1
- data/lib/app/repo/svn.rb +2 -2
- data/lib/closet/context.rb +2 -2
- data/lib/wire.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 499964b7126637d5d336e7f191416f0a520d7de1
|
|
4
|
+
data.tar.gz: 07eb2ed529f82a17fc5e21b63e90d2c258620e4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7ff7a82c9d32dede4884d92669662936c4d7021acd88cf51ea0193e3623aacef3094eccee1af3c3da6ee3f4e2aa6de21da586ec21ade599df2a58b0eda28d48
|
|
7
|
+
data.tar.gz: 295ae078764454736baa4745567c738c38581d1329536e02301db18b6fa6f7255dc712232c0e330a8d3b2766e28b08c6a27d546a9d0a3b0ac15ced36a865df81
|
data/lib/app/file.rb
CHANGED
data/lib/app/render/document.rb
CHANGED
|
@@ -28,10 +28,10 @@ module Render
|
|
|
28
28
|
response = context.forward(specific)
|
|
29
29
|
mime = response[1]['content-type']
|
|
30
30
|
renderer = nil
|
|
31
|
-
context.closet.renderers.each do |k,c|
|
|
31
|
+
context.closet.renderers.each do |k, c|
|
|
32
32
|
if c['mimes'].include? mime
|
|
33
33
|
renderer = c
|
|
34
|
-
|
|
34
|
+
end
|
|
35
35
|
end
|
|
36
36
|
if renderer
|
|
37
37
|
template = renderer['partial']
|
data/lib/app/render/instant.rb
CHANGED
|
@@ -38,6 +38,7 @@ module Render
|
|
|
38
38
|
status = 415
|
|
39
39
|
message = 'INSTANT: Unsupported MIME Type'
|
|
40
40
|
mime = "#{context.resource}/#{context.id}"
|
|
41
|
+
$stderr.puts mime
|
|
41
42
|
renderer = nil
|
|
42
43
|
context.closet.renderers.each do |k, v|
|
|
43
44
|
if v['mimes'].include? mime
|
|
@@ -46,12 +47,16 @@ module Render
|
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
if renderer
|
|
50
|
+
context.uri = ['http:','','host'] + context.query[:id].split('/')
|
|
49
51
|
result = renderer.render(self, { actions: actions,
|
|
50
52
|
context: context,
|
|
51
53
|
mime: mime,
|
|
52
54
|
response: body, })
|
|
53
55
|
name = context.config['template']
|
|
54
56
|
template = context.closet.templates[name]
|
|
57
|
+
context.resource = context.query[:resource]
|
|
58
|
+
context.uri = ['http:','','host','','instant', context.resource] + context.query[:id].split('/')
|
|
59
|
+
context.id = context.uri.last
|
|
55
60
|
if template
|
|
56
61
|
message = template['file'].render(self, { actions: actions,
|
|
57
62
|
context: context,
|
|
@@ -78,4 +83,4 @@ module Render
|
|
|
78
83
|
end
|
|
79
84
|
end
|
|
80
85
|
end
|
|
81
|
-
end
|
|
86
|
+
end
|
data/lib/app/render/page.rb
CHANGED
data/lib/app/repo/svn.rb
CHANGED
|
@@ -157,7 +157,7 @@ module Repo
|
|
|
157
157
|
folder_path = file_path.split('/')
|
|
158
158
|
folder_path.pop
|
|
159
159
|
folder_path = folder_path.join('/')
|
|
160
|
-
`svn update --parents #{options} #{file_path}`
|
|
160
|
+
`svn update --parents #{options} '#{file_path}'`
|
|
161
161
|
unless Dir.exist? folder_path
|
|
162
162
|
FileUtils.mkdir_p(folder_path)
|
|
163
163
|
end
|
|
@@ -166,7 +166,7 @@ module Repo
|
|
|
166
166
|
file.close
|
|
167
167
|
`svn add --force *`
|
|
168
168
|
$stderr.puts `svn status`
|
|
169
|
-
`svn propset svn:mime-type '#{mime ? mime : 'application/octet-stream'}' #{file_path}`
|
|
169
|
+
`svn propset svn:mime-type '#{mime ? mime : 'application/octet-stream'}' '#{file_path}'`
|
|
170
170
|
if $?.exitstatus != 0
|
|
171
171
|
break
|
|
172
172
|
end
|
data/lib/closet/context.rb
CHANGED
|
@@ -103,8 +103,8 @@ module Wire
|
|
|
103
103
|
@config = @closet.apps[@uri[1]]
|
|
104
104
|
if @config
|
|
105
105
|
@app = @uri[1]
|
|
106
|
-
@resource = @uri[2]
|
|
107
|
-
@id = @uri.length > 3 ? @uri[3...@uri.length].join('/') : nil
|
|
106
|
+
@resource = URI.unescape(@uri[2])
|
|
107
|
+
@id = @uri.length > 3 ? URI.unescape(@uri[3...@uri.length].join('/')) : nil
|
|
108
108
|
else
|
|
109
109
|
throw Exception.new("App: #{@uri[1]} is Undefined")
|
|
110
110
|
end
|
data/lib/wire.rb
CHANGED