wire-framework 0.1.3.5 → 0.1.3.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91fca1c60f1325cd9814cbc2273f6916ef6e79f7
4
- data.tar.gz: 5ebbe83ef0c9bb160c82123347d11c3636219aa2
3
+ metadata.gz: 40c2c965b705e018734715deccacd7ca83216f98
4
+ data.tar.gz: 2936f44c334db1da55099a1697f252abab73090e
5
5
  SHA512:
6
- metadata.gz: fef64b437f3440bc118a0ffe158d4ceca2d872229e1469e9c92267644da044db2964846acab620c82970ab33d29f17ec26c086458b579dadb18913d66674bb76
7
- data.tar.gz: a4a2183a0a754397ab65b1d1290c6dc240c07b660823fcd9f0ad94f7de1801b7f144c33a5d15766a9340ac007334e320d2b764d315d82cd9dea849cd0698986e
6
+ metadata.gz: 05db63c5ae9aac4953acad39adc7e272f281f4f90dda4ec2a5e9aba217d53ac01507f19b8d8d40c2405223c0b2176d1d7b4681cdeb41f88fa663ce20654c2e51
7
+ data.tar.gz: 5016b59a72ce269683c90506b8aa212f95e25410f1ca806b18478f4c9b30308bf1a42b2b746f193b358a9f4d76cd65debbad876d2229abd23b7695e35241f87d
data/lib/app/render.rb CHANGED
@@ -94,8 +94,7 @@ module Render
94
94
  host = context.app[:remote_host]
95
95
  path = context.app[:remote_uri]
96
96
  resource = context.uri[2]
97
- referer = context.referer.join('/')
98
-
97
+ referer = context.referer.join('/')
99
98
  q = '?' + context.query_string
100
99
  id = context.uri[3...context.uri.length].join('/')
101
100
  headers = {referer: referer, remote_user: context.user}
@@ -33,6 +33,7 @@ module Wire
33
33
  attr_reader :action, :app, :body, :env, :json, :query,
34
34
  :query_string, :referer, :resource, :type,
35
35
  :uri, :user, :verb
36
+ attr_writer :referer
36
37
 
37
38
  # Maps HTTP verbs to actions
38
39
  HTTP_ACTIONS = {
@@ -71,12 +72,12 @@ module Wire
71
72
  @user = env['rack.session']['user']
72
73
  @verb = HTTP_VERBS[env['REQUEST_METHOD']]
73
74
  @action = HTTP_ACTIONS[env['REQUEST_METHOD']]
75
+ @uri = env['REQUEST_URI'].split('?')[0].split('/')
74
76
  if env['HTTP_REFERER']
75
77
  @referer = env['HTTP_REFERER'].split('/')
76
78
  else
77
- @referer = []
79
+ @referer = @uri
78
80
  end
79
- @uri = env['REQUEST_URI'].split('?')[0].split('/')
80
81
  app = $apps[@uri[1]]
81
82
  if app
82
83
  @app = app
data/lib/wire.rb CHANGED
@@ -24,5 +24,5 @@ end
24
24
  # @author Bryan T. Meyers
25
25
  module Wire
26
26
  # Current version of the Wire Gem
27
- VERSION = '0.1.3.5'
27
+ VERSION = '0.1.3.6'
28
28
  end
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.3.5
4
+ version: 0.1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan T. Meyers