wire-framework 0.1.6.4 → 0.1.6.5

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: 7d8930ca50a8bf6237ede80003ee158fc30c1b2a
4
- data.tar.gz: f12766c644b4d2d1b13edf53471750d96aecf541
3
+ metadata.gz: 00bb9c131f074315c355d7095175b784c4b2e639
4
+ data.tar.gz: 98aeb7b42a546f09e1c9a18a3947308820c19578
5
5
  SHA512:
6
- metadata.gz: d0a33fe23a61707bb407fedc016a74d66755bd3608d911c52782a16ad75cf4cdcc12991c7272fc55b322d31522e12ff271f9dfe5ed120d93eda1ee92e114b76a
7
- data.tar.gz: 200e0be6eeab670222e5ba0926d988a7fdbf9fe130e77cd622339a5ceabd99105469fe2db94159e9fbfa384c400fcc778881b224ed36d1206a2b4fedaccbb374
6
+ metadata.gz: c95d46edca794f1feba145dc529ebb84eb64c246a26ec2a00668c498d01c4018022db403c20eb158249a1fa0488c2aa9f42925d1e11b827033f45d2f23eae469
7
+ data.tar.gz: 35d145361ad22aa393eaa90e4dc0d60eb202d94be11ea37699d078d468b739c409c237466b2733d514f893dcb37c2f5652f70d225e52775efb9837281e079679
data/lib/app/db.rb CHANGED
@@ -39,7 +39,10 @@ module DB
39
39
  conf.each do |k,v|
40
40
  config[k.to_sym] = v
41
41
  end
42
- Sequel.connect(config)
42
+ db = Sequel.connect(config)
43
+ db.extension(:connection_validator)
44
+ db.pool.connection_validation_timeout = 30
45
+ db
43
46
  end
44
47
 
45
48
  # Read all of the configs in './config/dbs'
@@ -149,6 +152,7 @@ module DB
149
152
  instance = model[context.id]
150
153
  return 404 unless instance
151
154
  instance.update(context.json)
155
+ [200, {}, object.to_json]
152
156
  end
153
157
 
154
158
  # Remove a specific object from the DB table
data/lib/app/file.rb CHANGED
@@ -52,6 +52,7 @@ module Static
52
52
  else
53
53
  mime = `mimetype --brief #{ext_path}`
54
54
  end
55
+ mime.strip!
55
56
  headers = {}
56
57
  headers['Content-Type'] = mime
57
58
  headers['Cache-Control'] = 'public'
@@ -48,7 +48,7 @@ module Render
48
48
  mime: mime,
49
49
  response: body })
50
50
  else
51
- body
51
+ return [404, {}, 'EDITOR: Editing of this file type is not supported']
52
52
  end
53
53
  end
54
54
 
@@ -103,7 +103,7 @@ module Wire
103
103
  @config = @closet.apps[@uri[1]]
104
104
  if @config
105
105
  @app = @uri[1]
106
- @resource = URI.unescape(@uri[2])
106
+ @resource = @uri.length >= 3 ? URI.unescape(@uri[2]) : nil
107
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")
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.4'
36
+ VERSION = '0.1.6.5'
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.4
4
+ version: 0.1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan T. Meyers