Christopher Allan Webber [Wed, 15 May 2013 16:11:24 +0000 (11:11 -0500)]
Oh right, actually add that hook we just documented, "template_context_prerender" :)
This commit sponsored by William Goudie. Thanks Bill! :)
Christopher Allan Webber [Wed, 15 May 2013 16:10:25 +0000 (11:10 -0500)]
Hook->hooks since there's more than one of them :)
Christopher Allan Webber [Wed, 15 May 2013 15:37:41 +0000 (10:37 -0500)]
Adding global context hooks & fixing method names->symbolic view names in docs
This commit sponsored by Sheila Miguez. Thanks Sheila!
Christopher Allan Webber [Tue, 14 May 2013 21:09:55 +0000 (16:09 -0500)]
Added documentation on view specific hooks
This commit sponsored by Matthew Woodward. Thank you!
Christopher Allan Webber [Tue, 14 May 2013 19:29:23 +0000 (14:29 -0500)]
Documenting the test_modify_context and context_modified_app methods
Christopher Allan Webber [Tue, 14 May 2013 19:24:27 +0000 (14:24 -0500)]
Fully working context hooks, both template/view and global level, with tests
Needs documentation though... that's coming next :)
This commit sponsored by Luca Tius. Thanks Luca!
Christopher Allan Webber [Sun, 12 May 2013 21:17:35 +0000 (16:17 -0500)]
Merge branch 'master' into 623_context_hooks
Christopher Allan Webber [Sun, 12 May 2013 21:07:28 +0000 (16:07 -0500)]
Removing reference to nose (thanks for catching, Elrond!)
This commit sponsored by Kevin McCarthy. Thank you!
Christopher Allan Webber [Sun, 12 May 2013 20:55:59 +0000 (15:55 -0500)]
Tests should no longer use the environment-variable-related-setup and set up in app instead
This should remove a bunch of confusing cruft. I hate using that
environment variable! Also that old code was fragile.
This commit sponsored by Stephen Milton. Thanks!
Christopher Allan Webber [Sun, 12 May 2013 16:45:31 +0000 (11:45 -0500)]
Making the uncomment-able db string match the one that we use in the install docs
This commit sponsored by Denise Merkel. Thanks, Mom! Happy Mother's Day!
Christopher Allan Webber [Sat, 11 May 2013 22:02:26 +0000 (17:02 -0500)]
Moving the get_original_date method over to the MediaManager.
This fixes a bug so that it doesn't explode if the media_data doesn't
exist.
This commit sponsored by Ole-Morten Duesund. Thank you!
Christopher Allan Webber [Sat, 11 May 2013 18:56:02 +0000 (13:56 -0500)]
Updated "created on" feature to reflect new "hover for real time" tooling
Christopher Allan Webber [Sat, 11 May 2013 18:48:42 +0000 (13:48 -0500)]
Merge remote-tracking branch 'refs/remotes/tryggvib/532-exif-creation-date'
Conflicts:
mediagoblin/config_spec.ini
mediagoblin/templates/mediagoblin/user_pages/media.html
Christopher Allan Webber [Sat, 11 May 2013 15:19:31 +0000 (10:19 -0500)]
Merge remote-tracking branch 'gabithume/146_debug_message'
Christopher Allan Webber [Sat, 11 May 2013 01:26:55 +0000 (20:26 -0500)]
Use the controller's symbolic/lookup name as part of the key for context hooks
This commit sponsored by David Collins. Thank you!
Christopher Allan Webber [Sat, 11 May 2013 01:19:16 +0000 (20:19 -0500)]
Merge branch 'master' into 623_context_hooks
Christopher Allan Webber [Fri, 10 May 2013 21:33:52 +0000 (16:33 -0500)]
Merge remote-tracking branch 'refs/remotes/dthompson/453_disable_comments'
Christopher Allan Webber [Fri, 10 May 2013 16:26:55 +0000 (11:26 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Fri, 10 May 2013 16:23:36 +0000 (11:23 -0500)]
Merge remote-tracking branch 'refs/remotes/merge-requests/47'
Elrond [Sun, 5 May 2013 15:02:00 +0000 (17:02 +0200)]
piwigo: Better logging for login.
Elrond [Fri, 29 Mar 2013 13:48:08 +0000 (14:48 +0100)]
piwigo: Let getStatus return the current user.
If there is a user logged in, show his name.
Elrond [Fri, 29 Mar 2013 13:49:13 +0000 (14:49 +0100)]
Create new session system for piwigo plugin.
Using the brand new itsdangerous sessions to power the
sessions for piwigo.
The real point is: Clients want to have the session in a
"pwg_id" cookie and don't accept any other cookie name.
Elrond [Mon, 25 Mar 2013 14:34:21 +0000 (15:34 +0100)]
piwigo: Add .images.add including form handling.
To make things a bit easier, switch to WTForms
for validating the received data.
Elrond [Sun, 5 May 2013 14:45:37 +0000 (16:45 +0200)]
piwigo: Remove possibly_add_cookie.
This one was a fake thing to make clients happy.
Real sessions coming sonn.
Christopher Allan Webber [Wed, 8 May 2013 20:21:15 +0000 (15:21 -0500)]
Fix the new config "plugin spec" loading code so it doesn't break on no plugins section
Christopher Allan Webber [Wed, 8 May 2013 20:20:27 +0000 (15:20 -0500)]
Fixing API setup with new plugin "config spec" world
It shouldn't reference the config until in the setup_plugin() method,
else there's a race condition.
Christopher Allan Webber [Wed, 8 May 2013 19:38:13 +0000 (14:38 -0500)]
Ah right, and here's the config we intend to use for these context modified tests :)
This commit sponsored by Xavier Gulliot. Thanks Xavier!
Christopher Allan Webber [Wed, 8 May 2013 19:35:31 +0000 (14:35 -0500)]
The beginning of context hooks.
Not the working solution, but getting there conceptually. Basically
we'll have a key with the view and the template as a tuple which is
the context hook that anyone can attach to.
However, some changes have still to be made:
- The unit test doesn't work yet and contains a set_trace ;)
- We'll probably switch the "view" component from being the callable
to the "urlgen"'able name per Elrond's suggestion
- Found a bug in unit tests related to running custom apps for
different configs... hm. I need to fix this!
Nonetheless, making progress.
This commit sponsored by... wait a minute... Christopher Webber?!
Christopher Allan Webber [Wed, 8 May 2013 15:57:23 +0000 (10:57 -0500)]
Documenting plugin configuration
This commit sponsored by David Krupicz. Thanks, David!
Christopher Allan Webber [Wed, 8 May 2013 15:54:43 +0000 (10:54 -0500)]
Unit tests for plugins defining their own config_spec.ini!
This commit sponsored by David Ahmed. Thank you!
Christopher Allan Webber [Wed, 8 May 2013 15:37:38 +0000 (10:37 -0500)]
Allow plugins to install their own config_spec.ini if they like.
This commit sponsored by Timothy Vollmer. Thanks Tim!
Joar Wandborg [Sun, 5 May 2013 20:24:34 +0000 (22:24 +0200)]
Removed unused imports in httpapiauth
Elrond [Sun, 5 May 2013 12:29:57 +0000 (14:29 +0200)]
Use collection.url_for_self more; Add missing /a.
Using collection.url_for_self(request.urlgen) instead
of request.urlgen(lengthy) is so much nicer, so using
it around the place.
Also added a few missing </a> in one template.
Elrond [Thu, 2 May 2013 21:38:07 +0000 (23:38 +0200)]
Fix typo in new stl MEDIA_MANAGER.
Elrond [Tue, 30 Apr 2013 21:44:56 +0000 (23:44 +0200)]
Fix media manager reference in video.
An uninstantiated bare media manager doesn't any more
support ["something"]. You need to do .something.
Fixed for .source_type().
Praveen Kumar [Mon, 29 Apr 2013 00:15:05 +0000 (05:45 +0530)]
Make all media types use the new MediaManager classes.
Gabi Thume [Tue, 30 Apr 2013 03:35:22 +0000 (20:35 -0700)]
Fixing ticket #146 - Make messaging system testable
Elrond [Mon, 29 Apr 2013 22:24:45 +0000 (00:24 +0200)]
Add warning about crypt/itsdangeroussecret.bin.
You should not leak that file, really.
Elrond [Sat, 27 Apr 2013 22:14:50 +0000 (00:14 +0200)]
Create redir_obj and use it around.
This is a shortcut function to redirect to the main page
for an object. Objects currently supported: media entries
and collections.
And go around and replace various places to use this.
Elrond [Sun, 21 Apr 2013 12:45:40 +0000 (14:45 +0200)]
Rewrite resize_image to use proc_state.store_public.
This hopefully makes the code nicer and easier to change.
Elrond [Sun, 21 Apr 2013 12:45:40 +0000 (14:45 +0200)]
image resizing: Refactor some decisions into resize_tool.
Loading the thumb/medium sizes from the config, saving
things to the db, and loading the image is now all done by
resize_tool. It still calls resize_image for the actual
work.
Elrond [Sat, 27 Apr 2013 15:01:09 +0000 (17:01 +0200)]
Make uuid look like a uuid.
If we really have to create a visible uuid (for a slug in
this case), don't try to hide the fact that it is a uuid.
So format it like a uuid.
Elrond [Sat, 27 Apr 2013 13:04:56 +0000 (15:04 +0200)]
Remove extra indentation left over from previous commit.
This only removes an unneeded extra indentation, left over
from the previous removal of code around.
Extra commit so it is easy to check that it only changes
indentation.
Elrond [Sat, 27 Apr 2013 12:52:08 +0000 (14:52 +0200)]
Fix translations for collections and drop useless try.
Don't do: _("With some value: %s" % value)
Please do: _("WIth some value: %s") % value
Fixed for collection messages.
Also removed a
try:
some_code.
except Exception as e:
raise
No point in doing that.
Fixing the indentation of some_code comes in an extra
commit, because changing indentation is annoying enough
alone, so don't mix it with other changes.
Christopher Allan Webber [Fri, 26 Apr 2013 21:13:05 +0000 (16:13 -0500)]
word-wrapping the public/queue storage explainations in storage.rst
Christopher Allan Webber [Fri, 26 Apr 2013 21:08:39 +0000 (16:08 -0500)]
Merge remote-tracking branch 'refs/remotes/npigeon/ticket-660'
Christopher Allan Webber [Fri, 26 Apr 2013 20:27:44 +0000 (15:27 -0500)]
Switch "sqlite_refcheck" keyword arg to "migrations" which Elrond thinks is cleaner
Also, if migrations is true, *explicitly* say that foreign key checking is off
Christopher Allan Webber [Fri, 26 Apr 2013 20:09:03 +0000 (15:09 -0500)]
Don't turn on sqlite refcheck stuff during migrations
Christopher Allan Webber [Fri, 26 Apr 2013 16:12:46 +0000 (11:12 -0500)]
Merge remote-tracking branch 'refs/remotes/rodney757/issue643' into mergetest
Rodney Ewing [Fri, 26 Apr 2013 14:32:39 +0000 (07:32 -0700)]
Removed an unused import
Elrond [Thu, 25 Apr 2013 11:53:19 +0000 (13:53 +0200)]
Unit test for ReallyLazyProxy.
LazyProxy caches its value. So create a unit test for
lazy_pass_to_ugettext to make sure its returned proxy
actually gives a different translation when the locale
is switched.
Elrond [Thu, 25 Apr 2013 12:16:17 +0000 (14:16 +0200)]
No lazy_* needed here; Add ReallyLazyProxy.__repr__.
One should use lazy_* only if you have a good reason.
This one found by our unit tests!
For example add_message adds the message to the session,
the session needs to be serialized (with json) and well,
LazyProxy is not serializable.
To aid in debugging, gave our ReallyLazyProxy a __repr__.
Christopher Allan Webber [Wed, 24 Apr 2013 21:39:59 +0000 (16:39 -0500)]
Adding ReallyLazyProxy, a proxy that does what we expect :)
Christopher Allan Webber [Wed, 24 Apr 2013 19:39:16 +0000 (14:39 -0500)]
Switching non-forms back to using normal pass_to_ugettext
Aditi Mittal [Mon, 22 Apr 2013 13:48:45 +0000 (19:18 +0530)]
Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.
Rodney Ewing [Wed, 24 Apr 2013 01:28:10 +0000 (18:28 -0700)]
Check for duplicate collection slugs and make them unique. Add unique constraint to collection.slug model
Elrond [Fri, 1 Mar 2013 12:16:41 +0000 (13:16 +0100)]
Create set_thread_locale and use it.
Setting up a new template env should not directly touch the
translation tools, but go through a function in
translations.py.
Elrond [Wed, 24 Apr 2013 13:20:32 +0000 (15:20 +0200)]
resize_image: Change calling style a bit.
- entry: not used, removed.
- proc_state: going to be used, added.
- size_limits: not used, removed.
Alon Levy [Tue, 23 Apr 2013 06:39:51 +0000 (09:39 +0300)]
mediagoblin/submit/lib.py: fix typo
Signed-off-by: Alon Levy <alon@pobox.com>
Elrond [Tue, 23 Apr 2013 10:29:17 +0000 (12:29 +0200)]
Create add_media_to_collection()
The ideas is by Alon Levy.
Not only media_collect, but also other places might want to
add media to a collection. So refactor this into a function
for easier usage.
Elrond [Mon, 22 Apr 2013 20:17:41 +0000 (22:17 +0200)]
Doc string for ProcessingState.
Elrond [Sun, 21 Apr 2013 09:42:58 +0000 (11:42 +0200)]
resize_image: Refactor config loading a small bit.
Well, get the config into a local variable, for easier access.
Elrond [Sun, 21 Apr 2013 17:19:40 +0000 (19:19 +0200)]
Cleanup storage after test, and test .delete_dir().
The storage tests work in the system's tmpdir. The python
docs say, we should clean up after using things. Yes the
directory should be cleaned up on reboot, but if running
tests a lot, the tmpdir could fill up, so we should really
cleanup.
So use the new .delete_dir() on the storage interface to
cleanup test dirs and get them finally removed with
os.rmdir. All nicely packed into cleanup_storage().
Christopher Allan Webber [Sat, 20 Apr 2013 22:19:56 +0000 (17:19 -0500)]
Merge remote-tracking branch 'remotes/npigeon/ticket-601'
Christopher Allan Webber [Sat, 20 Apr 2013 16:03:48 +0000 (11:03 -0500)]
bumping image quality to 90, after conversation with Elrond
Christopher Allan Webber [Sat, 20 Apr 2013 15:51:48 +0000 (10:51 -0500)]
Bumping the default image quality up to 85.
dunkyp [Sat, 20 Apr 2013 15:50:51 +0000 (10:50 -0500)]
image quality can be set in config file
(cherry-picked from
https://gitorious.org/~dunkyp/mediagoblin/dunkyps-mediagoblin/commits/image_quality)
Elrond [Fri, 19 Apr 2013 22:24:09 +0000 (00:24 +0200)]
Refactor test configs.
All the hook_* tests use the same config, so refactor it.
Christopher Allan Webber [Fri, 19 Apr 2013 21:51:14 +0000 (16:51 -0500)]
removing old callable utilities and porting stuff over.
Christopher Allan Webber [Fri, 19 Apr 2013 21:31:23 +0000 (16:31 -0500)]
Let's not use reserved keywords :)
Christopher Allan Webber [Fri, 19 Apr 2013 21:29:03 +0000 (16:29 -0500)]
changing the things to document in api.rst
Christopher Allan Webber [Fri, 19 Apr 2013 21:28:41 +0000 (16:28 -0500)]
Added new tests to test hook_transform()
Christopher Allan Webber [Fri, 19 Apr 2013 21:28:24 +0000 (16:28 -0500)]
we should be returning the result, not None!
Christopher Allan Webber [Fri, 19 Apr 2013 21:16:26 +0000 (16:16 -0500)]
Adjusting tests to use hook_handle and hook_runall
Christopher Allan Webber [Fri, 19 Apr 2013 19:58:22 +0000 (14:58 -0500)]
fixing hook_handle for when result is never assigned, avoid reference without assignent
Christopher Allan Webber [Fri, 19 Apr 2013 19:25:02 +0000 (14:25 -0500)]
As Elrond points out, we might as well .pop() default_handler
Christopher Allan Webber [Fri, 19 Apr 2013 18:56:05 +0000 (13:56 -0500)]
Hooks: the Next Generation!
I have not tested any of this but it looks right ;)
Christopher Allan Webber [Fri, 19 Apr 2013 18:22:03 +0000 (13:22 -0500)]
A warning about the plugin API being unstable.
Christopher Allan Webber [Fri, 19 Apr 2013 18:13:32 +0000 (13:13 -0500)]
And... pyblosxom code removed again :)
We agreed on a new direction on IRC last night...
Christopher Allan Webber [Thu, 18 Apr 2013 22:03:25 +0000 (17:03 -0500)]
pyblosxom run_callback hoisted
Christopher Allan Webber [Thu, 18 Apr 2013 16:15:47 +0000 (11:15 -0500)]
Moving the rest of the relevant tests to have test_app set up in "def setup()" as well
Christopher Allan Webber [Thu, 18 Apr 2013 15:53:00 +0000 (10:53 -0500)]
at pytest author's advice, changing the way _setup back to -> setup
They showed me how to use @pytest.fixture, which allowed us to pass the
test into setup!
Elrond [Fri, 29 Mar 2013 13:36:37 +0000 (14:36 +0100)]
piwigo: Send NotImplemented for unknown methods.
That's somewhat, what piwigo does.
Elrond [Fri, 22 Mar 2013 15:07:07 +0000 (16:07 +0100)]
Use check_file_field in pwg_images_addSimple.
Elrond [Thu, 18 Apr 2013 13:53:09 +0000 (15:53 +0200)]
Start to use six for basestring.
six allows us to smoothly get more forward compatible with
py3. The idea is to change things over to use six, when/if
we feel a need for it.
Elrond [Wed, 17 Apr 2013 20:08:10 +0000 (22:08 +0200)]
stl:blender_render() - Remove useless arg_string.
Christopher Allan Webber [Wed, 17 Apr 2013 15:03:33 +0000 (10:03 -0500)]
Fixing typo in calling render_http_exception
Christopher Allan Webber [Wed, 17 Apr 2013 12:41:00 +0000 (07:41 -0500)]
ppoppler -> poppler tyop fix
Elrond [Wed, 13 Mar 2013 21:38:28 +0000 (22:38 +0100)]
Turning image's media manager into a new style class.
images are the first media type to use the new style class
based media manager.
Elrond [Tue, 19 Mar 2013 11:42:28 +0000 (12:42 +0100)]
Add sniff_handler method to mediamanagers.
The MediaManagerBase gets a fallback "return False" one.
The Compat-Manager checks in the dict and calls that one or
returns False.
Elrond [Tue, 19 Mar 2013 11:50:00 +0000 (12:50 +0100)]
Add MediaManagerBase class.
This is the base class for all new style class based media
managers.
Elrond [Fri, 8 Mar 2013 19:51:32 +0000 (20:51 +0100)]
MediaManager: Use .foo instead of ['foo'].
To make .media_fetch_order work, create a property.
Elrond [Fri, 8 Mar 2013 13:37:33 +0000 (14:37 +0100)]
First step towards a MediaManager class: Compat one.
To get us moving towards a MediaManager class, the first
idea is to create a class that wraps our current dict based
manager and makes all users happy.
Alon Levy [Wed, 17 Apr 2013 08:23:37 +0000 (11:23 +0300)]
update documentation for s/nose/py.test/
Signed-off-by: Alon Levy <alon@pobox.com>
Alon Levy [Mon, 8 Apr 2013 08:19:56 +0000 (11:19 +0300)]
PIL: Support systems with Pillow and without
Fixes for systems with Pillow, but leaves a "try: except ImportError" to
support anything that doesn't have a PIL top level import.
Signed-off-by: Alon Levy <alon@pobox.com>
Alon Levy [Wed, 17 Apr 2013 07:47:02 +0000 (10:47 +0300)]
pdf/processing.py: don't use check_output, only in python>=2.7
Signed-off-by: Alon Levy <alon@pobox.com>
Elrond [Mon, 15 Apr 2013 22:33:38 +0000 (00:33 +0200)]
Refactor test resources into new resources.py
Elrond [Mon, 15 Apr 2013 21:34:27 +0000 (23:34 +0200)]
PDF: Use pytest.mark.skipif for skipping tests
Instead of leaving test early if they can not run, use the
pytest.mark.skipif marked to tell the test system not to
even run the test.
This also adds to the stats, because skipped tests are
counted differently. Thus making it obvious, that some
tests did not run, because of any reason.
Christopher Allan Webber [Tue, 16 Apr 2013 21:08:51 +0000 (16:08 -0500)]
Switch to an apparently newer version of pdf.js per irc.mozilla.org #pdfjs recommendations
nattily pigeonfowl [Tue, 16 Apr 2013 20:28:04 +0000 (16:28 -0400)]
Updating branch...
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin into ticket-660