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
Elrond [Mon, 15 Apr 2013 20:02:47 +0000 (22:02 +0200)]
test_timesince() doesn't need a complete test_app.
Christopher Allan Webber [Mon, 15 Apr 2013 20:55:24 +0000 (15:55 -0500)]
Removing unused imports
Christopher Allan Webber [Mon, 15 Apr 2013 20:31:22 +0000 (15:31 -0500)]
Removing unused imports and an unused media_files dict reference
Alon Levy [Mon, 15 Apr 2013 20:01:59 +0000 (15:01 -0500)]
pdf: use pdf.js in an iframe
Alon Levy [Wed, 27 Mar 2013 10:21:10 +0000 (12:21 +0200)]
add pdf media type
The new media type supports pdf and a subset of media recognized by libreoffice via
unoconv.
Every document added goes through:
* conversion to pdf with unoconv if not already a pdf
* creation of thumbnail and medium sized image, and pdfinfo generates
some information (even for unoconv produces docs - should fix this)
Poppler (pdftocairo, pdfinfo) is used. http://poppler.freedesktop.org/
A working but uglified pdf.js integration exists, which is enabled by
setting pdf.pdf_js=true mediagoblin_local.ini (disabled in mediagoblin.ini)
Adds one test to the test_submission test suite, and another separate test_pdf suite.
The tests are only run if media_types.pdf.processing.check_prerequisites passes, so
the test suite will not require any extra package.
TODO: make test suite say 'skipped' in that case instead of just 'ok'
Signed-off-by: Alon Levy <alon@pobox.com>
Alon Levy [Tue, 9 Apr 2013 22:30:01 +0000 (01:30 +0300)]
document submodule usage
Signed-off-by: Alon Levy <alon@pobox.com>
Christopher Allan Webber [Sun, 14 Apr 2013 01:21:14 +0000 (20:21 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Sun, 14 Apr 2013 01:11:11 +0000 (20:11 -0500)]
Merge remote-tracking branch 'refs/remotes/tsyesika/599-allow-email-login'
Nathan Yergler [Sat, 13 Apr 2013 22:54:18 +0000 (15:54 -0700)]
Merge remote-tracking branch 'joar-github/oauth/refresh_tokens'
This merges the patch for Issue #548.
Christopher Allan Webber [Sat, 13 Apr 2013 19:12:25 +0000 (14:12 -0500)]
Text-align the headers on the media panel to the left to avoid confusion
Thanks to Tsyesika for pointing this out!
Christopher Allan Webber [Sat, 13 Apr 2013 17:10:23 +0000 (12:10 -0500)]
Adding Jessica Tallon to AUTHORS!
Christopher Allan Webber [Sat, 13 Apr 2013 17:06:19 +0000 (12:06 -0500)]
Comment when/author link styling changes
Christopher Allan Webber [Sat, 13 Apr 2013 16:58:50 +0000 (11:58 -0500)]
Why not also display the times on when these media were created
Christopher Allan Webber [Sat, 13 Apr 2013 16:57:16 +0000 (11:57 -0500)]
Changing translations to say "amount of time ago", basically
Previously they were just "amount of time"... I think this fits a bit better.
Christopher Allan Webber [Sat, 13 Apr 2013 16:42:34 +0000 (11:42 -0500)]
Merge remote-tracking branch 'refs/remotes/tsyesika/394-fuzzy-timestamp'
Jessica T [Fri, 12 Apr 2013 21:07:44 +0000 (22:07 +0100)]
Allows you to use your username or email to login
Jessica T [Fri, 12 Apr 2013 01:38:24 +0000 (02:38 +0100)]
Adds the fuzzy timestamp to the admin panel too
Jessica T [Fri, 12 Apr 2013 00:40:15 +0000 (01:40 +0100)]
Adds the unit tests and removes useless function we don't use
Christopher Allan Webber [Thu, 11 Apr 2013 21:57:11 +0000 (16:57 -0500)]
adding callable_runone and callable_runall to the docs
Jessica T [Thu, 11 Apr 2013 21:37:48 +0000 (22:37 +0100)]
Adds the timesince ability which fixes #394
Christopher Allan Webber [Wed, 10 Apr 2013 22:53:05 +0000 (17:53 -0500)]
Merge branch '637_friendlier_hooks'
Christopher Allan Webber [Wed, 10 Apr 2013 22:52:49 +0000 (17:52 -0500)]
Switch several functions over to using the new callable_run* tools!
Christopher Allan Webber [Wed, 10 Apr 2013 22:42:29 +0000 (17:42 -0500)]
Remove unhandled_okay from kwargs if it's there before passing to functions.
Christopher Allan Webber [Wed, 10 Apr 2013 22:36:21 +0000 (17:36 -0500)]
callable hook convenience functions.. now work, and with tests!
- Added three "callables" test plugins.
- updated callable_runone to check for unhandled_okay in the kwargs
dict.
All passing!
Christopher Allan Webber [Wed, 10 Apr 2013 21:08:08 +0000 (16:08 -0500)]
Open Source -> Free Software from the borrowed extlib repositories
We're a GNU project, gotta get with the GNU world order ;)
Christopher Allan Webber [Wed, 10 Apr 2013 15:52:39 +0000 (10:52 -0500)]
Adding some help about what to do if flup flakes out on you
Christopher Allan Webber [Wed, 10 Apr 2013 15:08:09 +0000 (10:08 -0500)]
Fix sessions so they work across the site.
Elrond [Tue, 9 Apr 2013 20:49:11 +0000 (22:49 +0200)]
Make session cookies more secure.
1. Our session cookies only need to be available to http, so
mark them appropiately.
2. Send the cookie to the subpath for mediagoblin.
And instantiate a session manager on the app, once.
Elrond [Tue, 9 Apr 2013 20:39:04 +0000 (22:39 +0200)]
Remove the last traces of beaker.
There were still some traces of beaker around:
- docs: replaced by reference to itsdangerous.
- paste configs: Wiped away.
- config_spec.ini: wiped.
- test_mgoblin_app.ini: also wiped.
Elrond [Tue, 9 Apr 2013 20:37:10 +0000 (22:37 +0200)]
Fix left over from variable renaming.
Elrond [Tue, 9 Apr 2013 17:40:54 +0000 (19:40 +0200)]
Merge remote-tracking branch 'brett/itsdangerous'
* brett/itsdangerous:
Call is_updated instead of testing it boolean.
Harden It's Dangerous key management.
First tests for the Session class.
Set a starting value for session.send_new_cookie.
Remove beaker stuff from the code.
Delete the session cookie on an empty session.
Back sessions with It's Dangerous.
Improve fs security for itsdangerous secret.
Docs for get_timed_signer_url.
Basic itsdangerous infrastructure.
Conflicts:
mediagoblin/tests/test_cache.py
Christopher Allan Webber [Tue, 9 Apr 2013 16:21:31 +0000 (11:21 -0500)]
tests for new pluginapi methods that can't possibly pass yet :)
Elrond [Sat, 9 Mar 2013 11:24:15 +0000 (12:24 +0100)]
Use cascade for comment deletion.
Also use the relationship for getting the comments on a
MediaEntry.
Elrond [Mon, 8 Apr 2013 13:06:03 +0000 (15:06 +0200)]
Testing: Remove some left over files/dirs.
When using tempfile.* in testing, those files get created
in the system tempdir. The docs say, we should try to
remove them.
Yes, the next reboot will clean them up also.
And in the workbench case, check after each test, that the
global workbench dir is empty (so the sub-workbcnhes have
been destroyed).
Elrond [Mon, 8 Apr 2013 14:12:32 +0000 (16:12 +0200)]
Implement queue dir delete for proc_state.delete_queue_file
Implement queue dir deleting in the
proc_state.delete_queue_file helper function.
Elrond [Mon, 8 Apr 2013 13:57:06 +0000 (15:57 +0200)]
Merge remote-tracking branch 'cwebber/254_delete_queue_directories'
* cwebber/254_delete_queue_directories:
Removing docstring bit about delete_file possibly deleting directories in the future
Convert media processing backends to delete the queue directory (#254)
Implement delete_dir in the FileStorage
Conflicts:
mediagoblin/media_types/image/processing.py
mediagoblin/media_types/video/processing.py
Conflicts, because those media_types already use the newer
proc_state.delete_queue_file() method (which needs
updating.
Christopher Allan Webber [Sun, 7 Apr 2013 22:46:11 +0000 (17:46 -0500)]
Convenience functions for callable hooks
Elrond [Sat, 6 Apr 2013 20:56:40 +0000 (22:56 +0200)]
Teach runtests.sh the -n arg.
If you give "-n 8" to runtests, it thinks, it got
"-n" -- a nice option, ignored.
"8" -- Oh! a single test named "8" to run, so no need to
run all the GMG tests.
Well, that's not what we want. So runtests now knows about
-n taking an arg.
Joar Wandborg [Sun, 10 Mar 2013 21:52:07 +0000 (22:52 +0100)]
OAuth: Support refresh tokens, etc
Initially I was going to write a failing test for refresh tokens. Thus
this fix includes an orphaned 'expect_failure' method in test utils.
I ended up writing support for OAuth refresh tokens, as well as a lot of
cleanup (hopefully) in the OAuth plugin code.
**Rebase**: While waiting for this stuff to be merged, the testing
framework changed, it comes with batteries included regarding fails.
Removed legacy nosetest helper.
Also added a lot of backref=backref([...], cascade='all, delete-orphan')
Christopher Allan Webber [Sat, 6 Apr 2013 15:07:47 +0000 (10:07 -0500)]
Really removing nosetests things now! all assert_whatever removed
Elrond [Fri, 25 Jan 2013 23:10:30 +0000 (00:10 +0100)]
Better docs for GenerateSlugMixin.
Elrond [Fri, 25 Jan 2013 21:41:28 +0000 (22:41 +0100)]
Use GenerateSlugMixin for collections.
Use the new way of generating slugs also for collections.
Also drop the dummy_db arg to check_collection_slug_used.
Elrond [Fri, 25 Jan 2013 20:53:28 +0000 (21:53 +0100)]
Refactor generate_slug into a mixin.
Refactor the new generate_slug into a mixin to
allow it to be used for collections also.
Christopher Allan Webber [Fri, 5 Apr 2013 00:44:36 +0000 (19:44 -0500)]
Merge branch '614_multi_test_config'
Christopher Allan Webber [Fri, 5 Apr 2013 00:23:04 +0000 (19:23 -0500)]
Switch test_app generation over to use py.test fixtures.
By doing this, we can take advantage of py.test's ability to create
temporary directories that are then cleaned up later during testing.
This helps for sandboxing things.
This also involves a ton of changes:
- Changing the get_app stuff appropriately, getting rid of the
setup_fresh_app decorator
- Making said fixture
- Switching over a billion tests to use it
Christopher Allan Webber [Thu, 4 Apr 2013 16:13:47 +0000 (11:13 -0500)]
Oops, forgot to assign dump_old_app to self, heh.
Christopher Allan Webber [Thu, 4 Apr 2013 16:08:50 +0000 (11:08 -0500)]
Turning setup_fresh_app into SetupFreshApp, a decorator with options!
This way people can pass in particular paste/mediagoblin configs that they want to use.
Christopher Allan Webber [Thu, 4 Apr 2013 15:37:32 +0000 (10:37 -0500)]
Updating get_app to allow for passing in particular app configs
Christopher Allan Webber [Wed, 3 Apr 2013 21:31:42 +0000 (16:31 -0500)]
Also require pytest-xdist!
Christopher Allan Webber [Wed, 3 Apr 2013 20:21:40 +0000 (15:21 -0500)]
Use py.test --boxed for unit tests from now on!
Christopher Allan Webber [Wed, 3 Apr 2013 19:32:35 +0000 (14:32 -0500)]
These tests need to have a MediaGoblin app setup so they can connect to the db!
Thanks to py.test --boxed for helping discover that ;)
Christopher Allan Webber [Wed, 3 Apr 2013 19:05:42 +0000 (14:05 -0500)]
All mediagoblin tests now pass with py.test (switched setUp to setup)
Elrond [Wed, 3 Apr 2013 16:52:17 +0000 (18:52 +0200)]
Create ProcessingState.store_public.
The ideas is by Alon Levy.
Use it in ProcessingState.copy_original for now.
Elrond [Wed, 3 Apr 2013 16:49:46 +0000 (18:49 +0200)]
Little refactoring for images: media_files.
Set the media_files directly at the relvant places.
Elrond [Tue, 26 Mar 2013 13:16:17 +0000 (14:16 +0100)]
A bit of pep8: Remove useless whitespace.
Elrond [Sat, 30 Mar 2013 13:42:45 +0000 (14:42 +0100)]
Merge remote-tracking branch 'JDShu/649_use_form_data_field'
* JDShu/649_use_form_data_field:
Use WTForms data field in user_pages/views.py
Use WTForms data field in auth/views.py
auth: whitespace cleanup in views.py
Use WTForms data field in plugins/oauth/views.py
Use WTForms data field in submit/views.py
Use WTForms data field in edit/views.py
Christopher Allan Webber [Fri, 29 Mar 2013 13:09:36 +0000 (08:09 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Fri, 29 Mar 2013 13:09:26 +0000 (08:09 -0500)]
Warning that raven plugin is somewhat experimental!
Elrond [Fri, 22 Mar 2013 14:45:21 +0000 (15:45 +0100)]
Refactor file field checking.
When uploading, the file field needs some checks, it seems.
So refactor them into check_file_field and use around.
Hans Lo [Thu, 28 Mar 2013 08:15:53 +0000 (04:15 -0400)]
Use WTForms data field in user_pages/views.py
Missed case in a previous commit.
Hans Lo [Thu, 28 Mar 2013 08:13:23 +0000 (04:13 -0400)]
Use WTForms data field in auth/views.py
Hans Lo [Thu, 28 Mar 2013 04:52:24 +0000 (00:52 -0400)]
auth: whitespace cleanup in views.py
Hans Lo [Thu, 28 Mar 2013 04:08:18 +0000 (00:08 -0400)]
Use WTForms data field in plugins/oauth/views.py
Hans Lo [Thu, 28 Mar 2013 03:56:33 +0000 (23:56 -0400)]
Use WTForms data field in submit/views.py
Hans Lo [Thu, 28 Mar 2013 03:56:20 +0000 (23:56 -0400)]
Use WTForms data field in edit/views.py
Elrond [Sun, 24 Mar 2013 15:09:40 +0000 (16:09 +0100)]
piwigo: Fix pwg_getversion
This one needs to return just "2.5.0 (Mediagoblin)" instead
of "Piwigo 2...".
Elrond [Tue, 26 Mar 2013 18:19:32 +0000 (19:19 +0100)]
piwigo: Start at pwg.images.addSimple.
Without a session and a logged in user, this can't go much
further.
Misses check for the file upload field.
Need refactored test tool for this.