toast 1.0.4 → 1.0.5

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: bdefce8bc09422d780b660db05cbe93fbf3dd3d0
4
- data.tar.gz: 9d596dba374e4602c302b83b5944683f1881981a
3
+ metadata.gz: 772413c8ee1efdef4c30fab99bf05f27baa10c7e
4
+ data.tar.gz: d0ee34f0376eaffd2040be8c6a0f6dec5bfc4445
5
5
  SHA512:
6
- metadata.gz: 837a7d4e4518a105190ee3dcf7ca9898ad3fc7e8397379cbe84b046afa5825cc9cd1dac0a0ddd1805c105197d8628dc090a0030d8e30edc4338943edbf890d94
7
- data.tar.gz: 55d02a759ac0fa75686b5a7b0137d1cc479b339beaaa4f58ac3f82cfd20debc8f7e65d295e8444def7b41308c80bfdecb681a029fd9824c6a7363991a4f97946
6
+ metadata.gz: 71bb1e2dc3c97ce7822296edb4ca120f9d7d8828fafb9ac3e9dc6659a5d00c102d52015f0ea94248a86952bd86a1a8661c4971060f588d3f4ba93de82b1b0186
7
+ data.tar.gz: c7518f883e787bd902c8ce9b48fe8ec8062eb1242351146df3f3e0decec88a7ea5caed80352c14922ca74e64d57190f7bd0ee6d9a0f5a6bd5a561b7833efd3a5
@@ -1,3 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- mount Toast::RackApp.new, at: '/*toast_path'
2
+ match '*toast_path', to: Toast::RackApp.new, via: :all
3
3
  end
@@ -12,8 +12,9 @@ module Toast::RequestHelpers
12
12
  # relies on HTTP_X_FORWARDED* headers
13
13
  def base_uri request
14
14
  port = ":#{request.port}" unless request.port.in?([80,443])
15
- path = request.path.sub(request.path_parameters[:toast_path]+'/','')
16
- (request.protocol + request.host + port.to_s + path).chomp('/')
15
+ # remove recource path part form full path (namespace remains)
16
+ path = request.path.sub(request.path_parameters[:toast_path],'')
17
+ (request.protocol + request.host + port.to_s + path).chomp('/')
17
18
  end
18
19
 
19
20
  def represent_one record, config
@@ -1,3 +1,3 @@
1
1
  module Toast
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - robokopp (Robert Annies)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails