radiant-booking_app-extension 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/app/controllers/page_mount_controller.rb +18 -9
- data/config/routes.rb +0 -1
- data/radiant-booking_app-extension.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55efe97874af8834b63eab525715118924e4b38a
|
4
|
+
data.tar.gz: 5fe8d585ccc5957bf3320f616575f5994b22d758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b67c9e3fc95998ae632a9f73656aa86eeeecd742ca3ba1330b01031304ba5cf28e2931c31abac32a0f56d77189106dd267af8d08078571e108ed7689e451c727
|
7
|
+
data.tar.gz: 24ef32b55f26641660db56e29260d73572d4618567bd64b4f0c4c045a021ed083e37211f12d241e991fa9a9d579460262261b4a90e730d25d05fc8d0808238c9
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
+# Change Log
|
2
|
+
+All notable changes to this project will be documented in this file.
|
3
|
+
+This project adheres to [Semantic Versioning](http://semver.org/).
|
4
|
+
+This changelog adheres to [Keep a
|
5
|
+
CHANGELOG](http://keepachangelog.com/).
|
6
|
+
|
7
|
+
## Unreleased
|
8
|
+
### Changed
|
9
|
+
- [TT-1567] Hack for exclusive products fixed by storing additional details
|
10
|
+
(Requires CMS to use ajax login)
|
11
|
+
|
12
|
+
### Removed
|
13
|
+
- [TT-938] Remove deprecated secure-pay url
|
14
|
+
|
15
|
+
### Updated
|
16
|
+
- [TT-1377] Maintain the files original status code when proxying
|
17
|
+
- [TT-1340] Proxy more content-types as file
|
@@ -17,6 +17,9 @@ class PageMountController < SiteController
|
|
17
17
|
# ... or determine if having blank cookies means "don't set anything buddy"
|
18
18
|
session[:proxied_cookies] = response.cookies unless response.cookies.blank?
|
19
19
|
|
20
|
+
# Must be done before redirect (for logout)
|
21
|
+
store_client_type_id_in_cms_session(response, request)
|
22
|
+
|
20
23
|
if response.redirect?
|
21
24
|
redirect_to response.redirect_location
|
22
25
|
return
|
@@ -36,11 +39,10 @@ class PageMountController < SiteController
|
|
36
39
|
send_file(proxy_response)
|
37
40
|
else
|
38
41
|
@title = proxy_response.headers[:x_title]
|
39
|
-
store_client_type_id_in_cms_session(proxy_response) if login_details_request?(request)
|
40
42
|
render text: proxy_response.body,
|
41
43
|
content_type: proxy_response.content_type,
|
42
44
|
status: proxy_response.code,
|
43
|
-
layout:
|
45
|
+
layout: (request.path != '/app_cells')
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
@@ -50,13 +52,19 @@ class PageMountController < SiteController
|
|
50
52
|
|
51
53
|
private
|
52
54
|
|
53
|
-
def store_client_type_id_in_cms_session(
|
55
|
+
def store_client_type_id_in_cms_session(response, request)
|
54
56
|
# Special Hack so CC can show exclusive products for clients
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
case request.path
|
58
|
+
when '/parties/login.json'
|
59
|
+
json = JSON.parse(response.body)
|
60
|
+
session[:client_id] = json['client_id']
|
61
|
+
session[:client_type_id] = json['client_type_id']
|
62
|
+
session[:client_type_is_agent] = json['client_type_is_agent']
|
63
|
+
when '/parties/logout'
|
64
|
+
session[:client_id] = nil
|
65
|
+
session[:client_type_id] = nil
|
66
|
+
session[:client_type_is_agent] = nil
|
67
|
+
end
|
60
68
|
end
|
61
69
|
|
62
70
|
def http_proxy(url)
|
@@ -95,6 +103,7 @@ class PageMountController < SiteController
|
|
95
103
|
|
96
104
|
def send_file(proxy_response)
|
97
105
|
send_data proxy_response.body,
|
106
|
+
status: proxy_response.code,
|
98
107
|
type: proxy_response.content_type,
|
99
108
|
disposition: proxy_response.content_disposition
|
100
109
|
end
|
@@ -127,7 +136,7 @@ class PageMountController < SiteController
|
|
127
136
|
headers[:content_disposition] || DEFAULT_CONTENT_DISPOSITION
|
128
137
|
end
|
129
138
|
|
130
|
-
delegate :body, :
|
139
|
+
delegate :body, :code, to: :response
|
131
140
|
|
132
141
|
def headers
|
133
142
|
@response.body.headers
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "radiant-booking_app-extension"
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.2.0'
|
4
4
|
spec.authors = ["Michael Noack"]
|
5
5
|
spec.email = ["support@travellink.com.au"]
|
6
6
|
spec.description = %q{Integrate booking app with radiant}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-booking_app-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: radius
|
@@ -73,6 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- CHANGELOG.md
|
76
77
|
- Rakefile
|
77
78
|
- app/controllers/page_mount_controller.rb
|
78
79
|
- app/views/page_mount/proxy.erb
|