Skip to content

Add lint tests for topic images#5

Merged
cheshire137 merged 7 commits into
add-testingfrom
add-image-testing
Oct 9, 2017
Merged

Add lint tests for topic images#5
cheshire137 merged 7 commits into
add-testingfrom
add-image-testing

Conversation

@cheshire137
Copy link
Copy Markdown
Member

This builds on #4 to address #3 by ensuring topic images are the expected width, height, and file size. I kept this a separate branch from add-testing in case it requires some fiddling on Travis CI to get ImageMagick set up.

@cheshire137 cheshire137 self-assigned this Sep 28, 2017
Comment thread README.md
run the tests using:
There are some lint tests in place to ensure each topic is formatted in the way we expect. Travis
CI will run the tests automatically. If you want to run the tests yourself locally, you will need
Ruby, Bundler, and ImageMagick installed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: add a Brewfile for imagemagick and follow the https://github.com/github/scripts-to-rule-them-all pattern to allow running tests with a single command.

@MikeMcQuaid MikeMcQuaid mentioned this pull request Oct 3, 2017
@cheshire137
Copy link
Copy Markdown
Member Author

cheshire137 commented Oct 3, 2017

@MikeMcQuaid we may need to go back to ImageMagick 6. I'm hitting an error bundling in this branch now with your brew changes merged in. See https://stackoverflow.com/a/41747901/38743.

Can't install RMagick 2.16.0. Can't find MagickWand.h.

rmagick/rmagick#256

@cheshire137
Copy link
Copy Markdown
Member Author

Is there a way to specify a version of imagemagick in Brewfile? The following let the rmagick gem install for me:

brew upgrade imagemagick@6
brew link --overwrite --force imagemagick@6
gem install rmagick -v '2.16.0'

@MikeMcQuaid
Copy link
Copy Markdown
Contributor

@MikeMcQuaid we may need to go back to ImageMagick 6. I'm hitting an error bundling in this branch now with your brew changes merged in. See https://stackoverflow.com/a/41747901/38743.

You could use imagemagick@6 in the Brewfile or try graphicsmagick (which has a similar if not identical API).

@MikeMcQuaid
Copy link
Copy Markdown
Contributor

That said, it may be worth trying to use an alternative to rmagick given that it's essentially unmaintained at this point 😭.

@MikeMcQuaid
Copy link
Copy Markdown
Contributor

https://github.com/sdsykes/fastimage looks like it could avoid the imagemagick dependency and get you the information you need.

@cheshire137
Copy link
Copy Markdown
Member Author

may be worth trying to use an alternative to rmagick given that it's essentially unmaintained at this point

What? Nooooooo! I didn't realize. 😢

@cheshire137
Copy link
Copy Markdown
Member Author

The switch to FastImage worked great! Thanks Mike.

@cheshire137 cheshire137 merged commit 77a094c into add-testing Oct 9, 2017
@cheshire137 cheshire137 deleted the add-image-testing branch October 9, 2017 16:52
@MikeMcQuaid
Copy link
Copy Markdown
Contributor

@cheshire137 My pleasure.

@cheshire137
Copy link
Copy Markdown
Member Author

Ah, I think I need to update the README now to not mention ImageMagick.

@cheshire137 cheshire137 mentioned this pull request Oct 11, 2017
@github github locked as spam and limited conversation to collaborators Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants