vae 0.8.7 → 0.8.8

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: 39924c8d796d9a87ad852d2ee481a202700072c2
4
- data.tar.gz: 9fc626218a52979e7bb0201022d0f1c4fbe8afc4
3
+ metadata.gz: 761457171c2221f8f3f9b9fcdfd6da2a939d662f
4
+ data.tar.gz: 1a5571a6c4fb9786ef729f44f7299858262a7495
5
5
  SHA512:
6
- metadata.gz: dffb28f5f715e02402c63ea45908dd1a4ca9e282be6314487e07b51182eb61135c958c39294d01835379950f9c1a0fd2e1e2e57e2aa06533a264b37dddb20f37
7
- data.tar.gz: 03e23527502a066b8bc8f04ced5b03d5a10abcb6031c0d9d235562716aa3f6ea80c2265f6a4ec99f90324d2cf23f4c1e880e2d721f763705d9b619c63018c340
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.subdomain + ".vaeplatform." + (ENV['VAEPLATFORM_LOCAL'] ? "dev" : "com")
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("#{subdomain}.vaesite.com")
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(site, req)
4
+ def self.fetch_from_vaeplatform(subdomain, req)
5
5
  local = ENV['VAEPLATFORM_LOCAL']
6
- http = Net::HTTP.new(vaeplatform_host(site), (local ? 80 : 443))
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(site)
20
- "#{site}." + (ENV['VAEPLATFORM_LOCAL'] ? "vaeplatform.test" : "vaeplatform.com")
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(site)
24
- "http#{ENV['VAEPLATFORM_LOCAL'] ? '' : 's'}://#{vaeplatform_host(site)}"
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
@@ -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.subdomain}.vaesite.com#{req.params["REQUEST_URI"]}"}
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.7"
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.7
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-03-02 00:00:00.000000000 Z
12
+ date: 2018-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png