From 18121335c200b86a39f83a7cd240258c40a81f4e Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 14 Mar 2014 17:54:01 -0700 Subject: added support for environment specific providers (e.g. provider.production.json). requires latest leap_cli. --- provider_base/files/service-definitions/provider.json.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'provider_base/files/service-definitions/provider.json.erb') diff --git a/provider_base/files/service-definitions/provider.json.erb b/provider_base/files/service-definitions/provider.json.erb index 5d4c63a0..97454f81 100644 --- a/provider_base/files/service-definitions/provider.json.erb +++ b/provider_base/files/service-definitions/provider.json.erb @@ -1,6 +1,6 @@ <%= # grab some fields from provider.json - hsh = global.provider.pick( + hsh = provider.pick( :languages, :description, :name, :enrollment_policy, :default_language, :service ) -- cgit v1.2.3 From 615b5a218e843c9fe4e41729507b6ca1f14cf7b7 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 8 Apr 2014 10:51:42 -0700 Subject: minor: allow manual override of 'services' in provider.json --- provider_base/files/service-definitions/provider.json.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'provider_base/files/service-definitions/provider.json.erb') diff --git a/provider_base/files/service-definitions/provider.json.erb b/provider_base/files/service-definitions/provider.json.erb index 97454f81..3e055e9a 100644 --- a/provider_base/files/service-definitions/provider.json.erb +++ b/provider_base/files/service-definitions/provider.json.erb @@ -1,13 +1,13 @@ <%= # grab some fields from provider.json hsh = provider.pick( - :languages, :description, :name, + :languages, :description, :name, :services, :enrollment_policy, :default_language, :service ) hsh['domain'] = domain.full_suffix # advertise services that are 'user services' and for which there are actually nodes - hsh['services'] = global.services[:service_type => :user_service].field(:name).select do |service| + hsh['services'] ||= global.services[:service_type => :user_service].field(:name).select do |service| nodes_like_me[:services => service].any? end -- cgit v1.2.3