Commit graph

145 commits

Author SHA1 Message Date
Tom Hughes
0defbf60e6 Mark CORS responses as uncacheable 2013-04-01 14:18:21 +01:00
Tom Hughes
f1a325684d Wait until after rails has initialise I18n to preload the resources 2013-04-01 14:18:21 +01:00
Tom Hughes
7bb267caec Force translations to be preloaded during startup 2013-04-01 14:18:21 +01:00
Tom Hughes
3374f50a5d Drop secret_token as we don't use it and it confuses people 2013-02-03 12:23:37 +00:00
Tom Hughes
8f02fe8269 Update to CPK 5.0.10 and remove monkey patch 2012-11-22 09:10:04 +00:00
Tom Hughes
d68368e0d5 Rework RTL handling to keep rules together 2012-11-19 10:39:30 +00:00
Tom Hughes
2cecfa7d01 Configure CORS to allow GET and POST to /oauth 2012-11-16 22:28:52 +00:00
Tom Hughes
9bc3196dee Monkey patch field_changed? support until CPK is updated 2012-11-12 19:15:20 +00:00
John Firebaugh
7751973871 Allow cross-origin requests to API 2012-10-22 19:11:52 +01:00
Tom Hughes
05b4406c14 Remove monkey patch for I18n which is no longer needed 2012-09-30 14:07:41 +01:00
Tom Hughes
81336c4a87 Monkey patch I18n::JS to ensure translations are in a fixed order
Without this the result of converting the hash to JSON can vary
which causes different hashes for the result JS asset.

This is only an issue with ruby 1.8 as ruby 1.9 hashes behave like
the ActiveSupport::OrderedHash and enumerate in insertion order.
2012-08-31 11:51:58 +01:00
Tom Hughes
0adb54ad86 Update to rails 3.2.6 2012-06-18 11:00:28 +01:00
Tom Hughes
f89dda9b90 Use memcache to store temporary OpenID data
OpenID nonces and associations need to be visible across all the
servers in the production cluster, so store them in memcache where
everything can see them properly.
2012-05-09 10:14:58 +01:00
Tom Hughes
afeee2923f Send a Content-Length header when streaming a file 2012-03-28 18:44:02 +01:00
Tom Hughes
5cae983622 Removed temporary code for promoting databases sessions to memcached 2012-03-28 10:04:56 +01:00
Tom Hughes
a48f2ac856 Update to rails-i18n 0.5.2 and remove monkey patch 2012-03-17 17:04:02 +00:00
Tom Hughes
b1cb7bb819 Drop the contents of <script> and <style> tags when we strip them 2012-03-17 16:37:01 +00:00
Tom Hughes
4d7c3db62c Use cache store for sessions when memcached is not available
Using cookie store is problematic because there is a limit to the
amount of session data you can store, and we sometimes overflow.
2012-03-06 10:42:37 +00:00
Tom Hughes
c5a54b779c Add a temporary hack to suppress some broken rails translations
See https://github.com/svenfuchs/rails-i18n/issues/194 for more
information and progress on an upstream fix.
2012-03-06 09:21:26 +00:00
Tom Hughes
a1321f2c50 Remove translation reload that is no longer needed
Now that we are using the rails-i18n gem the rails locales are added
to the path early on and we don't need to reload to get them.
2012-03-04 15:10:51 +00:00
Tom Hughes
06934ad375 Update rails-i18n to 0.5.1
This update allows us to drop our pluralization support, as rails-i18n
now takes care of that, and for a far wider range of locales.
2012-03-02 09:19:12 +00:00
Tom Hughes
57ba7d6f0b Switch to using memcache as the session store
As a temporary measure any session which is not found in memcache
will be looked for in the database instead.
2012-02-27 09:01:48 +00:00
Tom Hughes
f778b61c03 Refactor memcache connection handling 2012-02-27 09:01:47 +00:00
Tom Hughes
af13c42322 Refactor session persistence code 2012-02-26 21:44:17 +00:00
Tom Hughes
f2150a94cf Serve up paperclip attachments in a cache friendly way 2012-02-21 12:31:38 +00:00
Tom Hughes
9c02133098 Don't double up newlines in the log 2012-02-19 10:52:54 +00:00
Tom Hughes
21e3047ba6 CompressedMemCacheStore has been replaced by MemCacheStore 2012-02-19 10:44:36 +00:00
Tom Hughes
478f30d69f Remove backported code now we are using mail 2.4.1 2012-02-15 17:48:16 +00:00
Tom Hughes
4de07696d5 Turn session-persistence plugin into a library 2012-02-15 17:48:15 +00:00
Tom Hughes
e70396d70b Replace the file_column plugin with paperclip 2012-02-15 17:48:15 +00:00
Tom Hughes
29c1bab0e6 Turn output_compression plugin into a library 2012-02-15 17:48:15 +00:00
Tom Hughes
ca8e1bf188 Turn classic_pagination plugin into a library 2012-02-15 17:48:15 +00:00
Tom Hughes
10fb373e5e Switch to using http_accept_language as a gem 2012-02-15 17:48:15 +00:00
Tom Hughes
ee411e5154 Update to rails 3.2.0 2012-02-15 17:48:14 +00:00
Tom Hughes
d405637b05 Monkey patch mail to handle character encodings on ruby 1.8 2012-01-30 21:42:41 +00:00
Tom Hughes
a98a2a0213 Update CPK to 4.1.2 and drop monkey patch 2012-01-21 00:44:34 +00:00
Tom Hughes
1cc57c620f Monkey patch ActionCachePath to fix a bug
When infer_extension is not set ActionCachePath does not set the
extension from any explicitly specified format, and hence expiry
produces cache keys which don't have any extension and don't match
the keys generated when the cache entry was created.
2012-01-14 13:26:01 +00:00
Tom Hughes
ece52c818f Remove fallback from nb to no
Now that we are using nb for our translations we can drop the fallback
from nb to no and just have one the other way. This also allows us to
drop the monkey patch to support mutually recursive fallbacks.
2011-12-29 15:11:45 +00:00
Tom Hughes
d5561dd27a Use normal fallbacks to handle the no/nb confusion
This requires (for now) a monkey patch to the i18n fallback code, which
has been offered upstream as https://github.com/svenfuchs/i18n/pull/130.
2011-12-18 16:51:14 +00:00
Tom Hughes
5f0868bd49 Monkey patch in an upstream fix for I18n::Backend::Fallbacks
This can be removed when a new i18n gem release happens. It also allows
us to remvoe an old monkey patch that worked around the problem for one
specific translation key.
2011-12-18 15:54:38 +00:00
Tom Hughes
11cc7ebaa7 Use I18n::Backend::Simple.include directly 2011-12-18 15:49:21 +00:00
Tom Hughes
3f5374901e Allow generic URIs to use the registry format
This should stop OAuth complaining when it tries to parse a mapzen
callback URI of the form mapzen://osm_callback
2011-12-13 10:45:40 +00:00
Tom Hughes
d74cb34e1e Remove old unused monkey patch 2011-11-26 16:06:41 +00:00
Tom Hughes
ae8a114069 Make query cache disabling work again 2011-11-26 16:01:57 +00:00
Tom Hughes
0d6a51d74e Monkey patch CPK to fix problems with polymorphic has_many 2011-11-18 10:21:37 +00:00
Tom Hughes
56ddd1a21f Only apply the hard memory limit when running under passenger 2011-11-15 09:17:07 +00:00
Tom Hughes
69f535af32 Reinstate memory limits now we're not using rhino 2011-11-14 19:06:11 +00:00
Tom Hughes
49f4a78240 Disable hard memory limits 2011-11-14 09:42:58 +00:00
Tom Hughes
2cac555019 Force an I18n reload to work around ordering problem
Unfortunately the rails-i18n-updater plugin adds the rails translations
to the load path after rails has already loaded the translations, so we
have to force a reload to get the translated versions.
2011-11-14 09:42:57 +00:00
Tom Hughes
96c22b169a Get OAuth working, including a hack for Potlatch 2011-11-14 09:42:55 +00:00