
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
The Release Image gem is a powerful tool designed specifically for creating captivating cover images for release posts or notices in your application. It streamlines the process of generating visually appealing images by seamlessly incorporating your app's logo, version, and release date. Additionally, it provides the ability to fetch random images from the extensive collection available on the Unsplash service.
Enjoy creating eye-catching and unique cover images for your release posts with the Release Image gem!
Add this line to your application's Gemfile:
gem "release_image", require: false, group: :development
Example bin/release_image
script:
#!/usr/bin/env ruby
require "dotenv/load"
require "optparse"
require "colorize"
require "release_image"
APP_ROOT = File.expand_path("..", __dir__)
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: bin/release_image version [date] [options]"
opts.on("--skip-download", "Skip downloading a random image and use a previously downloaded image instead.") do
options[:skip_download] = true
end
opts.on("-h", "--help", "Prints this help") do
puts opts
exit
end
end.parse!
# Get api key at:
# https://unsplash.com/oauth/applications
#
# keywords - An array of keywords that can be used to filter the random image
# folder_path - The destination folder where the generated images will be saved
# logo_path - The path to your app's logo image
# seasons - Generate images based on the current season of the year
ReleaseImage.config.api_key = ENV.fetch("UNSPLASH_API_KEY")
ReleaseImage.config.keywords = %w[nature wallpaper]
ReleaseImage.config.folder_path = File.join(APP_ROOT, "tmp/release_image")
ReleaseImage.config.logo_path = File.join(APP_ROOT, "app/assets/images/logo/release_logo.png")
ReleaseImage.config.seasons = true
version = ARGV[0]
date = ARGV[1]
abort("Please provide a release version".red) unless version
puts ReleaseImage.generate(version: version, date: date, skip_download: options[:skip_download]).green
Sometimes you may want to skip downloading a random image and use a previously downloaded image instead. This can be
achieved by setting the skip_download
option to true
. Image is downloaded by default and saved to the folder_path
directory as image.jpg
.
ReleaseImage.generate(version: version, date: date, skip_download: true)
After checking out the repo, run bin/setup
to install dependencies. Then, run bundle exec rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/EffectivaStudio/release_image. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Release Image project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that release_image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.