From 24f0cc3c64aab59db436e0827ba24ec08023100a Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 24 May 2014 01:35:54 -0700 Subject: added support for /provider.json served from static site. --- provider_base/services/static.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'provider_base/services') diff --git a/provider_base/services/static.json b/provider_base/services/static.json index d9155a84..3bbc1240 100644 --- a/provider_base/services/static.json +++ b/provider_base/services/static.json @@ -1,6 +1,13 @@ { "static": { - "formats": "=> (self.static.domains||{}).values.collect{|d| (d.locations||{}).values.collect{|l|l['format']}}.flatten.uniq" + "formats": "=> (self.static.domains||{}).values.collect{|d| (d.locations||{}).values.collect{|l|l['format']}}.flatten.uniq", + // include a copy of provider.json in case any of the configured domains happens to match provider.domain + "bootstrap_files": { + "domain": "= provider.domain", + "enabled": "= (self.static.domains||{})[provider.domain] ? true : false", + "provider_json": "=> static.bootstrap_files.enabled ? try{nodes_like_me[:services => 'webapp'].values.first.definition_files['provider']} : nil", + "client_version": "= static.bootstrap_files.enabled ? provider.client_version : nil" + } }, "service_type": "public_service" } \ No newline at end of file -- cgit v1.2.3 From 4e3d168d103fea6476694997275c4df4821535f3 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 30 May 2014 14:52:26 -0700 Subject: static site: added rack support, added custom apache config --- provider_base/services/static.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'provider_base/services') diff --git a/provider_base/services/static.json b/provider_base/services/static.json index 3bbc1240..c8ca5b1a 100644 --- a/provider_base/services/static.json +++ b/provider_base/services/static.json @@ -1,6 +1,6 @@ { "static": { - "formats": "=> (self.static.domains||{}).values.collect{|d| (d.locations||{}).values.collect{|l|l['format']}}.flatten.uniq", + "formats": "=> try{static.domains.values.collect{|d| try{d.locations.values.collect{|l|l.format}} }.flatten.compact.uniq} || []", // include a copy of provider.json in case any of the configured domains happens to match provider.domain "bootstrap_files": { "domain": "= provider.domain", -- cgit v1.2.3 From a590f5f3ca1eb21f761c40979b3c87c0f5310018 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 2 Jun 2014 13:01:21 -0700 Subject: static site: gracefully handle static sites that are not configured. --- provider_base/services/static.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'provider_base/services') diff --git a/provider_base/services/static.json b/provider_base/services/static.json index c8ca5b1a..d9f52b36 100644 --- a/provider_base/services/static.json +++ b/provider_base/services/static.json @@ -4,7 +4,7 @@ // include a copy of provider.json in case any of the configured domains happens to match provider.domain "bootstrap_files": { "domain": "= provider.domain", - "enabled": "= (self.static.domains||{})[provider.domain] ? true : false", + "enabled": "= !! try{static.domains[provider.domain]}", "provider_json": "=> static.bootstrap_files.enabled ? try{nodes_like_me[:services => 'webapp'].values.first.definition_files['provider']} : nil", "client_version": "= static.bootstrap_files.enabled ? provider.client_version : nil" } -- cgit v1.2.3