vae 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/full_stack.rb +1 -1
- data/lib/site.rb +10 -1
- data/lib/vae_local.rb +6 -6
- data/lib/vae_site_servlet.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 761457171c2221f8f3f9b9fcdfd6da2a939d662f
|
4
|
+
data.tar.gz: 1a5571a6c4fb9786ef729f44f7299858262a7495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db78d7bbbd4f60af90212f6466f812b57b0c7bdc72228bd1400d538364bee92edcd205b0be34f0aabbaeaa4f523d1d2f5410528bf36cf2c51cece797dd4d6868
|
7
|
+
data.tar.gz: 0171b03a0a6d04991e7ec9441c90ba76171dbf29c441ab54f10fbc36e3d94a689738b4c1231c1fc78ecc75a613a54b2e508d9e81431172f76ce2745a25f056bf
|
data/lib/full_stack.rb
CHANGED
@@ -80,7 +80,7 @@ class FullStack
|
|
80
80
|
}
|
81
81
|
@pids << fork {
|
82
82
|
Dir.chdir(serve_root)
|
83
|
-
ENV['VAE_LOCAL_BACKSTAGE'] = @site.
|
83
|
+
ENV['VAE_LOCAL_BACKSTAGE'] = @site.subdomain_base + ".vaeplatform." + (ENV['VAEPLATFORM_LOCAL'] ? "dev" : "com")
|
84
84
|
ENV['VAE_LOCAL_SECRET_KEY'] = @site.secret_key
|
85
85
|
ENV['VAE_LOCAL_DATA_PATH'] = @site.data_path
|
86
86
|
if options[:php_runtime] == "hhvm"
|
data/lib/site.rb
CHANGED
@@ -13,9 +13,14 @@ class Site
|
|
13
13
|
@data = login_to_server
|
14
14
|
end
|
15
15
|
|
16
|
+
def domain
|
17
|
+
subdomain =~ /\./ ? subdomain : "#{subdomain}.vaesite.com"
|
18
|
+
end
|
19
|
+
|
16
20
|
def fetch_from_server(req)
|
17
|
-
http = Net::HTTP.new(
|
21
|
+
http = Net::HTTP.new(domain, 443)
|
18
22
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
23
|
+
http.use_ssl = true
|
19
24
|
http.start { |http|
|
20
25
|
http.read_timeout = 120
|
21
26
|
http.request(req)
|
@@ -47,4 +52,8 @@ class Site
|
|
47
52
|
rescue JSON::ParserError
|
48
53
|
raise VaeError, "An unknown error occurred signing into Vae Platform. Please email support for help."
|
49
54
|
end
|
55
|
+
|
56
|
+
def subdomain_base
|
57
|
+
subdomain.split(".").first
|
58
|
+
end
|
50
59
|
end
|
data/lib/vae_local.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class VaeLocal
|
2
2
|
BANNER = "Vae local preview server, version #{VER}"
|
3
3
|
|
4
|
-
def self.fetch_from_vaeplatform(
|
4
|
+
def self.fetch_from_vaeplatform(subdomain, req)
|
5
5
|
local = ENV['VAEPLATFORM_LOCAL']
|
6
|
-
http = Net::HTTP.new(vaeplatform_host(
|
6
|
+
http = Net::HTTP.new(vaeplatform_host(subdomain), (local ? 80 : 443))
|
7
7
|
http.use_ssl = true unless local
|
8
8
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
9
9
|
http.start { |http|
|
@@ -16,12 +16,12 @@ class VaeLocal
|
|
16
16
|
!system("lsof -i:#{port}", out: '/dev/null')
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.vaeplatform_host(
|
20
|
-
"#{
|
19
|
+
def self.vaeplatform_host(subdomain)
|
20
|
+
"#{subdomain.split(".").first}." + (ENV['VAEPLATFORM_LOCAL'] ? "vaeplatform.test" : "vaeplatform.com")
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.vaeplatform_url(
|
24
|
-
"http#{ENV['VAEPLATFORM_LOCAL'] ? '' : 's'}://#{vaeplatform_host(
|
23
|
+
def self.vaeplatform_url(subdomain)
|
24
|
+
"http#{ENV['VAEPLATFORM_LOCAL'] ? '' : 's'}://#{vaeplatform_host(subdomain)}"
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.read_auth_keys
|
data/lib/vae_site_servlet.rb
CHANGED
@@ -182,7 +182,7 @@ class VaeSiteServlet < Servlet
|
|
182
182
|
end
|
183
183
|
else
|
184
184
|
if req.params["REQUEST_URI"] =~ /^\/__data\// or req.params["REQUEST_URI"] =~ /^\/__assets\//
|
185
|
-
from_vae = { 'location' => "http://#{@site.
|
185
|
+
from_vae = { 'location' => "http://#{@site.domain}#{req.params["REQUEST_URI"]}"}
|
186
186
|
puts "#{req.params["REQUEST_URI"]} static asset"
|
187
187
|
else
|
188
188
|
from_vae = fetch_from_vae_and_include_source_of_current_page(req, req.params["REQUEST_METHOD"])
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VER = "0.8.
|
1
|
+
VER = "0.8.8"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Action Verb, LLC
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|