2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-17 15:25:50 +00:00
Commit Graph

354 Commits

Author SHA1 Message Date
Romain
73672ce4dd refactor(test): replace var with const in tests files when appropriate 2018-08-18 20:25:35 +02:00
Almir Kadric
e8a6d179f1 bumped fs-extra version to fix issue 2018-08-13 18:40:18 +02:00
Romain
59e9f61014 2.4.1 2018-07-25 22:44:03 +02:00
Romain
4c64251bf5 fix(build): Revert 3ec009e6 + Travis deployment condition + extract Travis script
Travis deploy steps have to be a script file (not a list of steps).

Revert 3ec009e6 because “npm install git+file” actually reads from the local master branch, which
- doesn’t work on Travis since Travis checks out a detached head
- doesn’t work as expected locally, since you might have local changes or might be working from a different branch

For the time being it’s easier to simplify the Docker script and release a known published version.
2018-07-25 22:35:02 +02:00
Oliver Dain
3ec009e6c8 chore(build): docker build uses the current git directory as the npm package
This means we can build and test local changes, not just the latest published version.

Fixes #114 and merges #118.
2018-07-24 08:35:22 +02:00
Romain
37ea6c6ba3 fix(themes): resolve built-in theme paths instead of hardcoding node_modules path
The previous method only worked locally inside the repo, but not once the package is published to npm.
Once published, built-in themes are flattened instead of nested.
2018-07-23 22:33:40 +02:00
Romain
ba72015124 chore(build): use a whitelist for the content of npm publish 2018-07-23 22:29:01 +02:00
Romain
d75815c536 fix(build): fix typo in docker tag on Travis CI 2018-07-23 22:28:44 +02:00
Romain
23b4016923 chore(build): automatically build and publish the Docker image with Travis CI
Fixes #114.
2018-07-21 01:07:54 +02:00
Romain
a51904255c fix(test): fix path to theme helpers in unit tests 2018-07-19 21:05:42 +02:00
Romain
ca8b4862c3 fix(build): handle theme dependencies which are not directly referenced 2018-07-19 21:05:09 +02:00
Romain
83831274ff refactor(themes): remove themes from core + use the new extracted modules 2018-07-14 00:56:12 +02:00
Romain
bf60ae4677 refactor(components): bring ListrWorkQueue into this repo to simplify the build process
- This component was not published to the rpm registry anyway
- We depended on the repo’s master branch which can break things for everyone
- Its repo was not getting much attention which meant
  * no tests, no coverage report
  * no linting
  * no package linting (e.g. had 2 dependencies that weren’t actually used)

It will be simpler to manage this way
2018-07-13 21:29:52 +02:00
Romain
90cb3994eb fix(log) Only show error summaries on stdout, and full errors in the log file 2018-07-04 23:41:57 +02:00
Romain
39591c70a1 feat(theme): support for themes published within a subfolder
If a theme has a build process, it will likely publish a subfolder (e.g. “dist”) to npm.
It can simply set “thumbsup.themeRoot” in its package.json so thumbsup looks in the right place.
2018-06-30 14:18:13 +02:00
Romain
00dac76983 test(exiftool): add tests for batch exiftool streaming 2018-06-18 23:31:11 +02:00
Romain
79dd36f77b test(core): add unit tests for the relationship/action mapping, e.g. “photo:large” 2018-06-18 00:31:33 +02:00
Romain
832673f322 refactor(tests): integration tests as part of the Mocha suite
Some benefits:
- no need to check-in a full website to compare against
- targeted asserts, instead of a “should be 100% the same”
- more robust against cosmetic theme changes
- allows for testing more edge cases in the future
- can’t forget to run the integration tests since they’re part of “npm test”
2018-06-16 18:28:58 +02:00
Romain
7dd714c957 refactor(tests): dynamically generate test folders to check more edge cases 2018-06-16 18:26:17 +02:00
Romain
fb4c4fb89f test(all): add unit tests for Album and Problem 2018-06-15 22:32:45 +02:00
Romain
cc7abdf0ac 2.4.0 2018-06-14 23:44:35 +02:00
Romain
6d94b6339f chore(tests): handle rejected promises during tests 2018-06-14 00:02:03 +02:00
Romain
3fd0ee9ba3 chore(tests): capture all logs during the tests so they don’t pollute the output + can be asserted on 2018-06-13 23:58:57 +02:00
Romain
3fa8867757 test(all): add unit tests for theme + cleanup logic 2018-06-13 23:30:14 +02:00
Romain
72a23807f1 chore(build): require all source files in the tests so the coverage report shows untested files 2018-06-13 23:27:40 +02:00
Felix Eckhofer
81a85004c2 Fix behavior for non-traversable directories (#108)
fix(index): Continue on errors during find

This ensures the gallery is created even when some files are
inaccessible (for example due to invalid names or file permissions).

Requires running the test in Docker as non-root to allow file access test
2018-06-12 22:58:45 +02:00
Romain
bd86ab6535 test(themes): add integration tests using a mock file system
This replaces the basic unit tests that used private methods
and didn’t have a very clear intent
2018-06-12 00:54:53 +02:00
Romain
deee049650 refactor(themes): extract the {{relative}} helper to be standalone + add some tests 2018-06-12 00:37:44 +02:00
Romain
be0ee25c64 test(index): don’t run the invalid filename test on macOS 2018-06-11 23:51:33 +02:00
Felix Eckhofer
383f77e0d4 fix(core): Use correct base for calculating the relative path
Fixes #109
2018-06-10 21:34:38 +02:00
Felix Eckhofer
124d1857b1 test(index): Add test for invalid filename behavior 2018-06-09 23:51:18 +02:00
Felix Eckhofer
7dc914f924 fix(index): skip non-existing files
This can happen when files have invalid names or they are being deleted
while thumbsup is running.

Fixes #106
2018-06-09 23:51:18 +02:00
Romain
899a89e516 test(mapper): fix unit test that relied on a folder called “tmp” to already exist 2018-06-09 23:46:21 +02:00
Romain
fc4432ba34 docs(readme): add documentation URL at the top of the README 2018-06-09 00:28:27 +02:00
Romain
e9beb830a2 feat(core): skip files that can’t be processed + show a summary at the end
Thumbsup used to stop at the first problem processing a file.
This was a problem on large galleries where you’d need to run it again and again, fixing files as you went.
This change:
- skips problematic files and shows a summary at the end
- logs all warnings/errors to <thumbsup.log> when running the default output

Also refactor and cleanup of the logging logic.
2018-06-09 00:20:29 +02:00
Romain
7208642d95 test(all): increase unit test coverage 2018-06-08 23:39:09 +02:00
Romain
8bbe1186c5 fix(core): custom album mappers using file:// can use a relative path 2018-06-08 23:28:11 +02:00
Romain
253a0b5fff fix(core): typo in the startup dependency check (gifsicle2) 2018-06-08 22:34:57 +02:00
Romain
0adef54dc8 feat(core): add support for static and animated GIFs
GraphicsMagick can’t process animated GIFs well unless all frames are coalesced, which creates very large files.
This means there is a new dependency on Gifsicle which is very good at working with animated GIFs.

- Thumbnails are still processed through GraphicsMagick (more options, e.g. centre-crop)
- Large previews of animated GIFs go through Gifsicle

The startup checks are updated to check for the Gifsicle binary.

Fixes #96.
2018-06-08 00:49:03 +02:00
Romain
e1517d2fbd feat(core): when building thumbnails, fallback to JPG if the source is not a browser-friendly format
If the source is browser-friendly (jpg, jpeg, png) then keep the exact original extension.
2018-06-08 00:27:44 +02:00
Romain
7edf3bbf15 refactor(cli): use package to render boxes in the console output
This avoids having to figure out the length of each line manually.
2018-06-08 00:20:29 +02:00
Romain
24790c075c chore(cleanup): remove old code and console.log() 2018-06-08 00:12:17 +02:00
Romain
468a55d434 fix(themes): Fix reference to caption / animation metadata in thumbnail.hbs
Fixes 102
2018-06-03 14:49:42 +02:00
Romain
9612ca0048 feat(core): load an external theme from a given path using --theme-path 2018-06-03 09:18:10 +02:00
Romain
03a9c9a319 refactor: themes are now standalone folders, to prepare for external loading
Every theme is made of { Handlebars + Less + Partials + Helpers + Public }
2018-06-01 23:49:53 +02:00
Romain
36d935a787 feat(core): new option to add watermarks to the gallery
Watermarks only apply to large images, not thumbnails.
2018-05-15 20:28:57 +02:00
Romain
b761353691
docs(readme): reference --log in the troubleshooting section 2018-05-15 08:29:07 +02:00
Romain
1ce19d4024
docs(readme): add Docker build badge + reorganise 2018-05-15 08:25:43 +02:00
Romain
55b059d077 chore(dependencies): update package-lock.json for Node version 8 2018-05-14 22:57:14 +02:00
Romain
9cef1dd532 2.3.1 2018-05-14 22:48:04 +02:00