Skip to content

Commit

Permalink
Remove piwik integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jandd committed May 20, 2018
1 parent ef238f7 commit be28e75
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 47 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -19,7 +19,7 @@ install:
- pip install coveralls

env:
- DJANGO_SETTINGS_MODULE="coffeestats.settings.test" COFFEESTATS_MAIL_FROM_ADDRESS="travisci@example.org" COFFEESTATS_PGSQL_DATABASE="coffeestats" COFFEESTATS_PGSQL_HOSTNAME="127.0.0.1" COFFEESTATS_PGSQL_USER="postgres" COFFEESTATS_PGSQL_PASSWORD="" COFFEESTATS_PGSQL_PORT="" COFFEESTATS_PIWIK_HOST="localhost" COFFEESTATS_PIWIK_SITEID="1" COFFEESTATS_SITE_ADMINMAIL="admin@example.org" COFFEESTATS_SITE_NAME="Coffeestats Travis CI testsite" COFFEESTATS_DOMAIN_NAME=localhost COFFEESTATS_SITE_SECRET="6892a651-3f9f-4b6d-ad34-03531acf7a7e"
- DJANGO_SETTINGS_MODULE="coffeestats.settings.test" COFFEESTATS_MAIL_FROM_ADDRESS="travisci@example.org" COFFEESTATS_PGSQL_DATABASE="coffeestats" COFFEESTATS_PGSQL_HOSTNAME="127.0.0.1" COFFEESTATS_PGSQL_USER="postgres" COFFEESTATS_PGSQL_PASSWORD="" COFFEESTATS_PGSQL_PORT="" COFFEESTATS_SITE_ADMINMAIL="admin@example.org" COFFEESTATS_SITE_NAME="Coffeestats Travis CI testsite" COFFEESTATS_DOMAIN_NAME=localhost COFFEESTATS_SITE_SECRET="6892a651-3f9f-4b6d-ad34-03531acf7a7e"

before_script:
- "export DISPLAY=:99.0"
Expand Down
7 changes: 0 additions & 7 deletions coffeestats/caffeine/context_processors.py
Expand Up @@ -83,10 +83,3 @@ def mainnav(request):
def socialurls(request):
return {'social': {'googleplus': settings.GOOGLE_PLUS_URL,
'twitter': settings.TWITTER_URL}}


def piwikdata(request):
return {
'piwik_host': settings.PIWIK_HOST,
'piwik_siteid': settings.PIWIK_SITEID,
}
10 changes: 0 additions & 10 deletions coffeestats/caffeine/tests/test_context_processors.py
Expand Up @@ -10,7 +10,6 @@
SubNav,
SubNavItem,
mainnav,
piwikdata,
socialurls,
)

Expand Down Expand Up @@ -106,12 +105,3 @@ def test_twitter_in_result(self):
self.assertIn('twitter', result['social'])
self.assertEqual(result['social']['twitter'],
settings.TWITTER_URL)


class TestPiwikdataContextProcessor(TestCase):
def test_piwikdata_is_dict(self):
request = HttpRequest()
result = piwikdata(request)
self.assertIsInstance(result, dict)
self.assertIn('piwik_host', result)
self.assertIn('piwik_siteid', result)
3 changes: 0 additions & 3 deletions coffeestats/coffeestats/settings/base.py
Expand Up @@ -170,7 +170,6 @@ def get_env_variable(var_name, default=None):
'absolute.context_processors.absolute',
'caffeine.context_processors.mainnav',
'caffeine.context_processors.socialurls',
'caffeine.context_processors.piwikdata',
],
}
},
Expand Down Expand Up @@ -237,8 +236,6 @@ def get_env_variable(var_name, default=None):
CAFFEINE_DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'
GOOGLE_PLUS_URL = 'https://plus.google.com/108309823073824027966'
TWITTER_URL = 'https://twitter.com/coffeestats'
PIWIK_SITEID = get_env_variable('COFFEESTATS_PIWIK_SITEID')
PIWIK_HOST = get_env_variable('COFFEESTATS_PIWIK_HOST')

MESSAGE_TAGS = {
message_constants.DEBUG: 'flash-debug',
Expand Down
5 changes: 0 additions & 5 deletions coffeestats/templates/base.html
Expand Up @@ -134,11 +134,6 @@ <h1><a href="{% url 'home' %}" title="{% trans '... about what keeps you awake a
});
}) ;
</script>
{% if piwik_siteid %}
<!-- Piwik -->
{% include "piwik_javascript.js" %}
<!-- End Piwik Code -->
{% endif %}
{% block extra_js %}{% endblock extra_js %}
</body>
</html>
13 changes: 0 additions & 13 deletions coffeestats/templates/piwik_javascript.js

This file was deleted.

4 changes: 0 additions & 4 deletions salt/roots/pillar/coffeestats.sls
Expand Up @@ -4,10 +4,6 @@ database:
database: coffeestats
port: 5432

#piwik:
# host:
# siteid:

general:
mailfrom: coffeestats@vagrant.local
sitename: Coffeestats in a vagrant box
Expand Down
2 changes: 0 additions & 2 deletions salt/roots/salt/coffeestats/coffeestats.uwsgi.ini
Expand Up @@ -13,8 +13,6 @@ env = COFFEESTATS_PGSQL_HOSTNAME=localhost
env = COFFEESTATS_PGSQL_PASSWORD={{ pillar['database']['password'] }}
env = COFFEESTATS_PGSQL_PORT={{ pillar['database']['port'] }}
env = COFFEESTATS_PGSQL_USER={{ pillar['database']['user'] }}
env = COFFEESTATS_PIWIK_HOST={{ salt['pillar.get']('piwik:host', 'piwik.localhost') }}
env = COFFEESTATS_PIWIK_SITEID={{ salt['pillar.get']('piwik:siteid', '1') }}
env = COFFEESTATS_SITE_ADMINMAIL={{ pillar['general']['adminemail'] }}
env = COFFEESTATS_SITE_NAME="{{ pillar['general']['sitename'] }}"
env = COFFEESTATS_SITE_SECRET={{ pillar['general']['sitesecret'] }}
Expand Down
2 changes: 0 additions & 2 deletions salt/roots/salt/coffeestats/csdev.sh
Expand Up @@ -5,8 +5,6 @@ export COFFEESTATS_PGSQL_HOSTNAME=localhost
export COFFEESTATS_PGSQL_PASSWORD={{ pillar['database']['password'] }}
export COFFEESTATS_PGSQL_PORT={{ pillar['database']['port'] }}
export COFFEESTATS_PGSQL_USER={{ pillar['database']['user'] }}
export COFFEESTATS_PIWIK_HOST={{ salt['pillar.get']('piwik:host', 'piwik.localhost') }}
export COFFEESTATS_PIWIK_SITEID={{ salt['pillar.get']('piwik:siteid', '1') }}
export COFFEESTATS_SITE_ADMINMAIL={{ pillar['general']['adminemail'] }}
export COFFEESTATS_SITE_NAME="{{ pillar['general']['sitename'] }}"
export COFFEESTATS_SITE_SECRET={{ pillar['general']['sitesecret'] }}
Expand Down

0 comments on commit be28e75

Please sign in to comment.