Commit Graph

41 Commits

Author SHA1 Message Date
Joseph Wynn a31c454ed1
Merge pull request #103 from salomvary/master
Add registers.site to context when rendering template
2021-02-24 12:29:45 +13:00
Joseph Wynn 6cc3a082a1
Automatically convert tabbed indentation to spaces 2021-01-25 17:10:00 +13:00
Márton Salomváry 25c6695da4 Add registers.site to context when rendering template
Fixes #101.
2021-01-01 14:07:03 +01:00
Joseph Wynn 91a540c266
Warn when image doesn't exist instead of throwing SyntaxError 2019-09-05 14:45:32 +12:00
Joseph Wynn c559bcced3
Usability: Don't raise an exception when config is missing or invalid 2018-06-30 19:39:58 -07:00
Christopher Peterson ac86fb2440 Add feature test for recursive glob in extra-image generation 2018-06-18 12:37:24 -04:00
Bert Driehuis cafec3c926 Add feature tests for EXIF strip 2018-01-19 02:13:21 +01:00
Joseph Wynn e334930825 Update tests to be more descriptive; reduce test cases
I've updated the `Scenario` for these to be more descriptive about what they're actually testing. I've also removed some redundant test cases (I think it's enough to test this with just one image) and used the Given-When-Then format to improve readability.
2017-06-21 19:34:18 +01:00
Jeric Bryle Sy Dy 2ad615952e added test to save_to_source 2017-06-20 17:22:40 +08:00
Joseph Wynn 893486fb45 Tidy up unused test cruft 2017-04-05 13:56:07 +01:00
Joseph Wynn 73bd82d547 Write tests for auto_rotate option 2017-03-12 14:14:53 +00:00
Joseph Wynn 00ded027ad Tidy up tests 2016-12-29 22:19:48 +13:00
Joseph Wynn 746205e726 Consolidate some tests to reduce the test:code ratio 2016-12-29 22:04:49 +13:00
Joseph Wynn ba3db6eba7 Use SimpleCov directly so that coverage can be inspected locally 2016-12-29 22:00:36 +13:00
Joseph Wynn 8fa0543494 Maintain source image interlace mode 2016-12-28 23:14:13 +13:00
Joseph Wynn 03356da52d Rename gem to jekyll-responsive-image
This PR also drops support for Ruby <2.0
2016-12-28 22:56:27 +13:00
Joseph Wynn 39ee353912 Remove some redundant test code 2016-10-18 22:11:06 +01:00
Joseph Wynn 0d3f099057 Fix for using a custom `source` directory
Paths are still passed around as relative. Code which needs to read files
(images, templates) and code which needs to manipulate paths
(Jekyll::ResponsiveImage::Utils#image_hash) has to be aware of the site source
path.

This got a bit messy in the end, but I couldn't find a better way without doing
a big refactor of the entire plugin.
2016-10-11 23:25:43 +01:00
Joseph Wynn 6d569710b9 More test improvements 2016-10-11 23:25:43 +01:00
Joseph Wynn b47f12a1db An actual failing test now 2016-10-11 23:25:43 +01:00
Joseph Wynn bd336070e1 Fix absolute path bug (#35)
* Fix file contents test

* Fix tests to catch the bug

* Fix bug where `original.path` was absolute
2016-09-25 21:37:10 +01:00
Joseph Wynn efeb87a032 Treat paths as relative to Jekyll `source` directory (#34)
* Move 'fixtures' to 'test-site' because, like, that's what it is

* Refactor to make reasoning about file paths easier

* Write a failing test

* Conventions, conventions

* Always treat paths as relative to the Jekyll site source
2016-09-25 20:23:06 +01:00
Joseph Wynn 7aded68117 UTF-8 support (#31)
* Create failing test case

* Force image filename encoding to UTF-8. Fixes #30
2016-09-02 08:53:29 +01:00
Joseph Wynn 08bdd3b1f6 Resize extra images (#23)
* Switch deprecated {File,Dir}#exists? for #exist?

* Implement extra_images configuration.

Closes #21.
2016-06-05 22:32:13 +01:00
Joseph Wynn f63b5002dd Trigger RenderCache#get by including an image twice (#22) 2016-06-05 22:30:45 +01:00
Joseph Wynn c523b100cc Modify `dirname` to be relative to `base_path` 2015-12-27 22:41:04 +00:00
Joseph Wynn 64f86bd6da Add `dirname` to image hashes. Closes #5. 2015-12-27 21:14:24 +00:00
Joseph Wynn 4a1e36f2d2 Add global variable test for block tag 2015-11-05 09:18:53 +00:00
Joseph Wynn 04eb007f18 Inject the Jekyll Site payload into the Liquid render attributes
This enables the use of `site` and `jekyll` variables.

Closes #1.
2015-11-05 09:03:44 +00:00
Joseph Wynn 1d9396dbd9 Properly handle nil image path 2014-12-07 22:33:14 +00:00
Joseph Wynn d0ee161aa2 Rename feature file for consistency 2014-12-07 22:02:53 +00:00
Joseph Wynn 93890f5ee0 Collapse feature steps for brevity 2014-12-07 13:14:40 +00:00
Joseph Wynn 6f9f13e62f Implement responsive_image_block tag 2014-12-07 13:06:28 +00:00
Joseph Wynn 2715d55520 Swap output_dir for more powerful output_path_format 2014-12-06 22:28:21 +00:00
Joseph Wynn 299927f1c3 Add the `original` object to template variables 2014-12-06 19:18:59 +00:00
Joseph Wynn 9a1fceaa29 Enable Coveralls 2014-12-06 16:03:10 +00:00
Joseph Wynn c78b568ecb Allow template to be overwritten on per-tag basis 2014-12-06 15:33:38 +00:00
Joseph Wynn 320e3955dd Add test case for custom attributes 2014-12-06 01:21:53 +00:00
Joseph Wynn 2d9aa73d18 Add Coveralls 2014-12-06 00:04:33 +00:00
Joseph Wynn fb6ef53a97 Add cukes 2014-12-05 23:55:10 +00:00
Joseph Wynn a09d47b60a Initial commit 2014-12-05 16:26:50 +00:00