wire-framework 0.1.6.0 → 0.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8029fd3239ff8f787957849338915e540da75f87
4
- data.tar.gz: 79cb78ab379a3686efca80e827c5c43834b8a71e
3
+ metadata.gz: 499964b7126637d5d336e7f191416f0a520d7de1
4
+ data.tar.gz: 07eb2ed529f82a17fc5e21b63e90d2c258620e4a
5
5
  SHA512:
6
- metadata.gz: 557fbc73d49212fe4469d81dfa39d29ead0ffe3325f366fbed9fd88f6df66cc2acf4230c17e1056335b1f840399ae6773f004cd4978a77531e9a5311ccbf61c3
7
- data.tar.gz: 06c3444d8a889a930122e5472e69836586b706f34f86cdd647961af951e5ce130a6494d57cbf63a097c86ddec723ae345b85b0caf99359381bca4fb383e3e3b0
6
+ metadata.gz: b7ff7a82c9d32dede4884d92669662936c4d7021acd88cf51ea0193e3623aacef3094eccee1af3c3da6ee3f4e2aa6de21da586ec21ade599df2a58b0eda28d48
7
+ data.tar.gz: 295ae078764454736baa4745567c738c38581d1329536e02301db18b6fa6f7255dc712232c0e330a8d3b2766e28b08c6a27d546a9d0a3b0ac15ced36a865df81
data/lib/app/file.rb CHANGED
@@ -29,7 +29,7 @@ module Static
29
29
  if File.directory? path
30
30
  Dir.entries(path).sort.to_s
31
31
  else
32
- 401
32
+ 403
33
33
  end
34
34
  else
35
35
  404
@@ -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
- end
34
+ end
35
35
  end
36
36
  if renderer
37
37
  template = renderer['partial']
@@ -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
@@ -85,7 +85,7 @@ module Render
85
85
  result[2] = render_template(actions, context, template, result[2])
86
86
  end
87
87
  else
88
- result = [401, {}, 'Resource not specified']
88
+ result = [403, {}, 'Resource not specified']
89
89
  end
90
90
  result
91
91
  end
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
@@ -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
@@ -33,7 +33,7 @@ end
33
33
  # @author Bryan T. Meyers
34
34
  module Wire
35
35
  # Current version of the Wire Gem
36
- VERSION = '0.1.6.0'
36
+ VERSION = '0.1.6.1'
37
37
  end
38
38
 
39
39
  require_relative 'app'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wire-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.0
4
+ version: 0.1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan T. Meyers