Browse Source

Remove intercom and raven.

master
Nick Sergeant 6 years ago
parent
commit
863d2aeadb
  1. 2
      README.md
  2. 6
      Vagrantfile
  3. 72
      git-pre-commit
  4. 1
      requirements.txt
  5. 3
      settings.py
  6. 2
      settings_local.py-template
  7. 3
      templates/base.html
  8. 16
      utils/templatetags/intercom.py

2
README.md

@ -28,9 +28,7 @@ Install [Vagrant](https://www.vagrantup.com/) and either [VirtualBox](https://ww
3. `heroku addons:add heroku-postgresql:hobby-dev`
4. `heroku addons:add searchbox`
8. `heroku config:add DEBUG=False`
9. `heroku config:add INTERCOM_SECRET_KEY=`
9. `heroku config:add POSTMARK_API_KEY=`
11. `heroku config:add RAVEN_CONFIG_DSN=`
12. `heroku config:add SECRET_KEY=`
13. `heroku config:add STRIPE_SECRET_KEY=`
14. `heroku config:add USE_SSL=False`

6
Vagrantfile vendored

@ -1,6 +0,0 @@
Vagrant.configure("2") do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.hostname = "local.snipt.net"
config.vm.synced_folder ".", "/var/www/snipt/"
config.vm.network "forwarded_port", guest: 80, host: 80
end

72
git-pre-commit

@ -1,72 +0,0 @@
#!/bin/bash
cat media/css/bootstrap.min.css \
media/css/blog-themes/pro-adams/style.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/themes.css \
> media/css/pro.css
cat media/css/bootstrap.min.css \
media/css/style.css \
media/css/themes.css \
media/css/chosen.css \
media/css/codemirror.css \
media/css/codemirror-themes/ambiance.css \
media/css/codemirror-themes/blackboard.css \
media/css/codemirror-themes/cobalt.css \
media/css/codemirror-themes/eclipse.css \
media/css/codemirror-themes/elegant.css \
media/css/codemirror-themes/erlang-dark.css \
media/css/codemirror-themes/lesser-dark.css \
media/css/codemirror-themes/monokai.css \
media/css/codemirror-themes/neat.css \
media/css/codemirror-themes/night.css \
media/css/codemirror-themes/rubyblue.css \
media/css/codemirror-themes/solarized.css \
media/css/codemirror-themes/twilight.css \
media/css/codemirror-themes/vibrant-ink.css \
media/css/codemirror-themes/xq-dark.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/blog-themes/default/style.css \
> media/css/snipt.css
cat media/js/src/account.js|jsmin > media/js/src/account.min.js
cat media/js/src/snipts.js|jsmin > media/js/src/snipts.min.js
cat media/js/src/jobs.js|jsmin > media/js/src/jobs.min.js
cat media/js/src/application.js|jsmin > media/js/src/application.min.js
cat media/js/src/team.js|jsmin > media/js/src/team.min.js
cat media/js/src/modules/site.js|jsmin > media/js/src/modules/site.min.js
cat media/js/src/modules/snipt.js|jsmin > media/js/src/modules/snipt.min.js
cat media/js/src/pro.js|jsmin > media/js/src/pro.min.js
cat media/js/libs/jquery.min.js \
media/js/libs/jquery-ui.min.js \
media/js/libs/angular.min.js \
media/js/libs/angular-route.min.js \
media/js/libs/underscore.js \
media/js/libs/json2.js \
media/js/libs/backbone.js \
media/js/libs/bootstrap.min.js \
media/js/plugins/jquery.hotkeys.js \
media/js/plugins/jquery.infieldlabel.js \
media/js/plugins/jquery.chosen.js \
media/js/src/application.min.js \
media/js/src/modules/site.min.js \
media/js/src/modules/snipt.min.js \
media/js/src/account.min.js \
media/js/src/snipts.min.js \
media/js/src/search.min.js \
media/js/src/jobs.min.js \
media/js/libs/codemirror.js \
media/js/libs/highlight.js \
> media/js/snipt-all.min.js
cat media/js/libs/highlight.js \
media/js/src/pro.js \
> media/js/pro-all.min.js
git add /Users/Nick/Code/snipt/media/css/pro.css
git add /Users/Nick/Code/snipt/media/css/snipt.css
git add /Users/Nick/Code/snipt/media/js/snipt-all.min.js
git add /Users/Nick/Code/snipt/media/js/pro-all.min.js
git add /Users/Nick/Code/snipt/media/js/src/modules/site.min.js

1
requirements.txt

@ -23,7 +23,6 @@ py-bcrypt==0.4
pycrypto==2.6.1
python-dateutil==2.5.3
python-postmark==0.4.10
raven==5.31.0
requests==2.11.1
six==1.9.0
smartypants==1.8.6

3
settings.py

@ -40,7 +40,6 @@ DEBUG = True if 'DEBUG' in os.environ else False
DEFAULT_FROM_EMAIL = 'support@snipt.net'
EMAIL_BACKEND = 'postmark.django_backend.EmailBackend'
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
INTERCOM_SECRET_KEY = os.environ.get('INTERCOM_SECRET_KEY', '')
INTERNAL_IPS = ('127.0.0.1',)
LANGUAGE_CODE = 'en-us'
LOGIN_REDIRECT_URL = '/login-redirect/'
@ -61,7 +60,6 @@ PASSWORD_HASHERS = (
)
POSTMARK_API_KEY = os.environ.get('POSTMARK_API_KEY', '')
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
RAVEN_CONFIG = {'dsn': os.environ.get('RAVEN_CONFIG_DSN', '')}
REGISTRATION_EMAIL_HTML = False
ROOT_URLCONF = 'urls'
SECRET_KEY = os.environ.get('SECRET_KEY', 'changeme')
@ -121,7 +119,6 @@ INSTALLED_APPS = (
'markdown_deux',
'pagination',
'postmark',
'raven.contrib.django.raven_compat',
'registration',
'snipts',
'storages',

2
settings_local.py-template

@ -1,8 +1,6 @@
CSRF_COOKIE_SECURE = False
DEBUG = True
INTERCOM_SECRET_KEY = ''
POSTMARK_API_KEY = ''
RAVEN_CONFIG = {'dsn': ''}
SECRET_KEY = 'changeme'
SESSION_COOKIE_SECURE = False
SSLIFY_DISABLE = False

3
templates/base.html

@ -262,9 +262,6 @@
<li class="roadmap">
<a href="https://github.com/nicksergeant/snipt/issues?state=open"><span>Bugs & feature requests</span></a>
</li>
<li class="roadmap">
<a href="http://getsentry.com/"><span>Shipped with confidence</span></a>
</li>
</ul>
</nav>
<div class="linode">

16
utils/templatetags/intercom.py

@ -1,16 +0,0 @@
import hmac
import hashlib
import os
from django import template
from django.conf import settings
register = template.Library()
@register.filter
def intercom_sha_256(user_id):
return hmac.new(os.environ.get('INTERCOM_SECRET_KEY',
settings.INTERCOM_SECRET_KEY),
str(user_id),
digestmod=hashlib.sha256).hexdigest()
Loading…
Cancel
Save