Skip to content

Replace broken via.placeholder.com with placehold.co#3278

Open
sawirricardo wants to merge 1 commit into
faker-ruby:mainfrom
sawirricardo:fix/placeholdit-broken-links
Open

Replace broken via.placeholder.com with placehold.co#3278
sawirricardo wants to merge 1 commit into
faker-ruby:mainfrom
sawirricardo:fix/placeholdit-broken-links

Conversation

@sawirricardo

Copy link
Copy Markdown

Summary

The via.placeholder.com domain is no longer resolving, causing Faker::Placeholdit to generate broken image URLs.

This PR replaces it with placehold.co, a working placeholder image service with a similar API.

Fixes #3055

Changes

  • lib/faker/default/placeholdit.rb: Updated URL generation to use placehold.co with its URL format (/{size}/{bg}/{text}.{format} instead of /{size}.{format}/{bg}/{text})
  • test/faker/default/test_placeholdit.rb: Updated all regex assertions to match the new URL structure
  • doc/default/placeholdit.md: Updated example output URLs
  • doc/default/omniauth.md: Updated placeholder image URLs in OmniAuth examples

URL Format Comparison

Scenario Old (via.placeholder.com) New (placehold.co)
Basic /{size}.{format} /{size}.{format}
With bg color /{size}.{format}/{bg} /{size}/{bg}.{format}
With bg + text color /{size}.{format}/{bg}/{text} /{size}/{bg}/{text}.{format}
With custom text ...?text=hello ...?text=hello

Testing

All 19 existing tests pass with updated assertions.

via.placeholder.com domain is no longer resolving. Replace with
placehold.co which provides the same placeholder image service.

URL format updated to match placehold.co's structure:
- Without colors: placehold.co/{size}.{format}
- With background: placehold.co/{size}/{bg}.{format}
- With bg + text color: placehold.co/{size}/{bg}/{text}.{format}

Closes faker-ruby#3055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

broken links for placeholdit

1 participant