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>
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.
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.
* 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
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).
* 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.
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.
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')
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