Commit Graph

85 Commits

Author SHA1 Message Date
Chad Birch
0fbea80d45 Integrate AutoModerator into the site 2015-03-31 14:56:19 -06:00
Neil Williams
653c6e5113 Upgrade authentication providers to modern system.
This is more consistent with other providers and makes it possible for
providers to live outside r2.
2015-03-19 11:52:06 -07:00
Neil Williams
2b4c3d1fd3 Move CDN client IP verification to a provider.
This makes the base controller a bit cleaner and should be more
flexible.
2015-03-19 11:51:39 -07:00
xiongchiamiov
d3919b9357 Install python-mock for tests
We've been using the `mock` module for one of our tests, but seem to have never
added it to any of the installation scripts.
2015-03-16 14:00:43 -07:00
Keith Mitchell
aa87a4e944 Use unidecode for better slugs 2015-02-26 11:53:26 -08:00
Neil Williams
af09fa8dee Update license headers to 2015.
The highlight of each year for me.
2015-01-08 13:35:03 -08:00
Keith Mitchell
7d93774781 setup.py: Pin requests version to <1.0.0
The requests lib changed significantly and incompatible to
our usage in version 1.0.0.

(Specifically, response.json became response.json())
2014-10-06 10:26:41 -07:00
Neil Williams
90cfcaaecc Update license headers to 2014.
Ok, now I'm getting some angst in my commit messages like my
predecessors had.  I understand now.  It's a terrible burden.  Why must
the calendar progress?  Why must numbers increment?  The world is
forever turning.

The future is here.

It is 2014.
2014-05-02 16:26:31 -04:00
Neil Williams
dce6b6d84f CSS Filter: replace cssutils with tinycss2.
The aim of this patch is to allow a mostly equivalent subset of CSS
through as the cssutils-based parser did.

The subset of valid properties represented in this are the entirety of
CSS2.1 plus a handful of newer ones that are already in active use on
reddit.

Several IE hacks like the "filter" property, "_height", etc. are no
longer allowed.
2014-04-29 11:09:43 -07:00
Neil Williams
a681324228 Remove obviated workaround for babel bug.
This bug is no longer an issue since we upgraded to Babel 1.3.
2014-01-24 11:43:51 -08:00
Neil Williams
8f7db4f3da Media Provider: Add "filesystem" provider for local nginx.
This media provider is for simple single-server installations where an
HTTP server running on the same machine handles serving of the static
media files.

An appropriate setup with nginx is now the default in the new install
script.
2013-10-14 13:55:56 -07:00
Neil Williams
5cbea9cdf4 Factor S3 media uploads out to new provider system.
This introduces a new "provider" system which allows core pieces of
code to be swapped out for different hosting setups.
2013-10-14 13:55:56 -07:00
Brian Simpson
53c6a41e49 Update Babel to 1.0. 2013-10-09 16:28:43 -04:00
Neil Williams
c20db7e11d Use cythonize to manage translation of .pyx -> .c.
This removes the need to run `make pyx` before running setup.py on an
initial install which had stopped working due to various imports needed
for the makefile. Additionally, cythonize is capable of tracking
dependencies the cython files have, such as external headers or other
cython files.

I had to upgrade setuptools to distribute to get v0.6.16 which is the
minimum required to properly use `cythonize` due to a bug in setuptools:

https://bitbucket.org/tarek/distribute/issue/195/
2013-09-27 14:05:38 -07:00
Neil Williams
ad08a19060 setup.py: Ensure we get WebTest <= 1.4.3.
The 2.x series of WebTest requires WebOb >= 1.2 which won't work for us.
2013-09-27 14:05:38 -07:00
Neil Williams
a035d8b9e2 setup.py: Remove obsolete line.
This should've gone away in 8b7b3a307b.
2013-09-27 14:05:38 -07:00
Neil Williams
89a56de538 setup.py: Include a dependency link for PyCAPTCHA 0.4.
PyPI only has versions for Python 2.3 and 2.4. Modern installs that
don't use our PPA to get a debianized copy of this library fail when
trying to resolve the setup.py install_requires dependencies. This fixes
the problem by using a reddit-hosted tarball of the 0.4 source (taken
directly from the source SVN repo).
2013-09-27 14:05:38 -07:00
Brian Simpson
ed18fc5b21 Delete g.countries. 2013-09-27 15:20:41 -04:00
bsimpson63
5967acfa83 Use an ad server to select promos for spotlight.
Replaces client side weighted random selection.
2013-09-18 19:40:38 -04:00
Neil Williams
928e51e886 i18n: Work around bug in babel's "extract_messages". 2013-07-24 13:54:41 -07:00
Neil Williams
e408d2903d setup.py: Remove unnecessary babel commands.
These are defined by default when babel is around. No need to
specify them manually.
2013-07-24 13:54:41 -07:00
Neil Williams
8af415476b Update and fix license headers for 2013.
Angst!
2013-03-19 20:03:40 -07:00
Neil Williams
3574a64992 Add an optional paste-filter compatible Gzipping middleware.
The paste-supplied gzip middleware is primarily for testing and is
insufficient in that it:

1) is unable to require a minimum size for gzipping
2) does not correctly add the "Vary: Accept-Encoding" header

it is also somewhat difficult to add those features given its structure.
2013-03-07 15:21:01 -08:00
bsimpson63
3d511075a0 Stripe payments for reddit gold. 2013-02-15 14:12:15 -05:00
Neil Williams
7a81779ad7 Upgrade to Pylons 0.9.7. 2013-02-01 14:39:29 -08:00
Neil Williams
ce6450841e setup.py: Update snudown link to new GitHub download URL. 2013-01-16 10:20:50 -08:00
Neil Williams
3e73f5769c setup.py: Remove unused and potentially confusing commands. 2013-01-02 15:27:11 -08:00
Neil Williams
54223e8825 Make it possible to run all automated tests via nosetests.
This setup assumes the existence of a `test.ini` file. No current tests
mutate backend state, but that may happen in the future so don't make
your test.ini point at production!
2013-01-02 15:27:11 -08:00
Logan Hanks
1468f32a2a Drop in replacement code for python-statsd. 2012-10-23 14:30:13 -07:00
Neil Williams
88662070a2 setup.py: Update dependencies now that they're all officially released. 2012-10-11 14:36:29 -07:00
Keith Mitchell
992eaf7394 Add schema to reddit's l2cs parser
This should eliminate user 'error' where the user
tries to search against a field that doesn't exist

It also paves the way for more schema-based features
in the future.
2012-10-03 14:38:29 -07:00
Andre D
5fe4e997d8 Wiki: Base wiki code
- Updates snudown dep
2012-09-11 15:43:07 -07:00
Neil Williams
0b09f25b28 Add basic support for ZooKeeper via Kazoo.
At this point, we can connect and pass authentication credentials!
2012-08-02 17:14:36 -07:00
Neil Williams
e2f3dba37f setup.py: Ensure webhelpers==0.6.4.
Newer webhelpers packages cause issues with Routes.
2012-07-09 13:17:19 -07:00
Neil Williams
4ba3b66834 setup.py: Add missing lxml dependency.
filters.py depends on lxml. This dependency was missing.
2012-07-09 13:17:19 -07:00
Neil Williams
f50bab028d setup.py: Gracefully handle when Cython is not installed. 2012-07-09 13:17:19 -07:00
Neil Williams
dc10f7cedf setup.py: Add temporary Pycassa 1.7 download link.
reddit relies on pycassa/pycassa@91a5887def
but at time of writing there still isn't a release that contains this
patch. Until that's available, we'll add a custom download link.
2012-07-09 13:17:19 -07:00
Neil Williams
914b949286 Update / add license headers.
I'm actually quite excited to do this.
2012-06-19 14:02:42 -07:00
Neil Williams
29e579e078 Clean up r2.lib.helpers and remove unused dependency on webhelpers. 2012-06-18 11:54:37 -07:00
Keith Mitchell
6e301e220d Add l2cs to setup.py 2012-06-14 15:26:06 -07:00
Neil Williams
ba54ed713a tdb_cassandra: Use Cassandra-native serialization for Date columns.
This has a couple of advantages:
 * interoperability with Cassandra tools (cassandra-cli / cqlsh)
 * smaller by 5-6 bytes on every column

From here on out, date columns will be written in the Cassandra
standard 8-byte integer (number of milliseconds since epoch) format.
Old-style stringified epoch seconds will be read properly.

This relies on Pycassa's new UTC-based behaviour in 1.7.
2012-06-04 14:45:34 -07:00
Neil Williams
3699db9c92 Remove pycassa version requirement for flexibility. 2012-02-29 12:10:36 -08:00
Neil Williams
3dce43b09a Fix snudown package url. 2012-02-13 17:55:34 -08:00
Logan Hanks
59421ba17f Upgrade to the 0.7 series of SQLAlchemy. 2012-01-31 15:57:47 -08:00
Neil Williams
b75ee5da5e Upgrade to pycassa 1.4 2012-01-27 16:11:15 -08:00
Neil Williams
06c933df56 Upgrade to snudown 1.0.4 and add /u/ support. 2012-01-27 15:50:11 -08:00
Neil Williams
f52759f0da Upgrade to Snudown 1.0.3. 2012-01-20 17:32:53 -08:00
Neil Williams
54e7eee58b Snudown v1.0.2 supports git:// schemes. 2011-12-09 12:01:58 -08:00
Logan Hanks
a1c371a572 Add python-statsd dependency. 2011-11-22 13:57:05 -08:00
Neil Williams
8b7b3a307b Remove discount (markdown interpreter). 2011-11-21 14:32:17 -08:00