diff --git a/.env.development b/.env.development index 95a7332..b5613d1 100644 --- a/.env.development +++ b/.env.development @@ -27,3 +27,4 @@ NEW_RELIC_LICENSE_KEY= GOOGLE_API_KEY= GOOGLE_CALENDAR_ID= +GOOGLE_CALENDAR=enabled \ No newline at end of file diff --git a/.env.example b/.env.example index 9ec022c..4e69e17 100644 --- a/.env.example +++ b/.env.example @@ -46,3 +46,4 @@ NEW_RELIC_LICENSE_KEY= GOOGLE_API_KEY= GOOGLE_CALENDAR_ID= +GOOGLE_CALENDAR=enabled \ No newline at end of file diff --git a/.env.test b/.env.test index df76ffc..c7fb3bd 100644 --- a/.env.test +++ b/.env.test @@ -34,3 +34,4 @@ OPENSSL_CONF=/etc/ssl/ GOOGLE_API_KEY= GOOGLE_CALENDAR_ID= +GOOGLE_CALENDAR=enabled \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 37831ab..541c2e2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -183,11 +183,11 @@ module ApplicationHelper end def upcoming_matches - calendar.upcoming || [] + ENV['GOOGLE_CALENDAR'] == "disabled" ? (calendar.upcoming || []) : [] end def upcoming_nsltv - calendar.upcoming_nsltv || [] + ENV['GOOGLE_CALENDAR'] == "disabled" ? (calendar.upcoming || []) : [] end def gathers_url