markevans/dragonfly
67.4
Adequate · 6 November 2026
3k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
Added consistent signature generation for core types
Dragonfly now provides a \to\_dragonfly\_unique\_s\ method on \Object\, \Array\, and \Hash\ to generate consistent signatures. This allows these core Ruby types to be reliably converted into unique string representations, which is useful for caching or identifying content across different data structures.
_lib/dragonfly/core\ext · high confidence
New Rails generator for Dragonfly configuration
A new Rails generator has been added to scaffold the Dragonfly image processing setup. Running 'rails generate dragonfly' creates a new initializer file at config/initializers/dragonfly.rb. This generated configuration includes a secure, randomly generated secret key (using SecureRandom.hex) and protection against DoS attacks, ensuring the application is ready to serve images and other content out of the box.
lib/rails/generators/dragonfly · high confidence
New development environment for local testing and experimentation
A new \dev/\ directory has been added to provide tools for local testing and development of the library. This includes an \irbrc.rb\ configuration that sets up a Dragonfly app with ImageMagick and a sample Model for interactive testing, a \rails\_template.rb\ script to scaffold a Rails application with Dragonfly integration, and a \test.ru\ Rack application for quick image manipulation testing. A helper script \test\_rails\ automates the creation of a test Rails app using the template.
dev · high confidence
Removals
Removal of Imagetastic feature tests
The feature specification file (imagetastic.feature) and its corresponding step definitions (imagetastic\_steps.rb) have been deleted. This removes the associated test coverage for the 'imagetastic' functionality, indicating that this specific feature or its test suite is no longer part of the application.
features · high confidence
Removed Cucumber support environment file
The Cucumber feature test support file (env.rb) has been removed from the project. This file previously handled library loading and world object setup for Cucumber scenarios, indicating that Cucumber integration has been discontinued in favor of other testing approaches.
features/support · high confidence
Architecture
Refactored job steps into modular components
The job processing logic has been restructured by extracting individual operations into separate, dedicated files (Fetch, FetchFile, FetchUrl, Generate, Process) that inherit from a new Step base class. This change improves code organization and maintainability by isolating the responsibilities of fetching data from URLs or files, generating content, and processing assets, while the Step class provides a unified interface for job execution and argument handling.
lib/dragonfly/job · high confidence
Behavioural changes
8 commits (1 fix) modifying samples
A change to existing behaviour in samples — 8 commits (1 fix), 10 files: “deal with specific frames in convert processor”; “LOADS OF CHANGES! Changed how analyser/processor/encoder works, with better integration with configurable stuff”; “Added failing spec for e.g. jp2 files”; and 5 more.
samples · medium confidence · unverified
Dragonfly v1.0.2: Major API overhaul and security hardening
This release introduces a significant architectural shift for the Dragonfly image processing library, moving from a monolithic design to a modular, plugin-based system. The core API has been redesigned: configuration is now handled via a new \configure\ block with explicit \processor\, \analyser\, and \generator\ methods, replacing the previous implicit registration. A new \Job\ object model manages processing steps (fetch, process, generate) with lazy evaluation and serialization support (JSON Base64), replacing the older \TempObject\-centric workflow. Security is significantly improved by defaulting URL verification (\verify\_urls\) to true, requiring a secret for SHA signatures, and adding protection against malicious marshal deserialization. The library also drops support for Ruby versions older than 2.2, removes legacy URL formats by default, and introduces a \CookieMonster\ middleware for Rails to prevent cookie leakage in image responses.
lib/dragonfly · high confidence
ImageMagick plugin refactored with new analyzers and deprecated convert commands
The ImageMagick plugin has been restructured to improve security and usability. The previous 'convert' generator and processor are now deprecated and raise errors, encouraging users to use the new utility commands in Dragonfly::ImageMagick::Commands instead. A new 'image\_properties' analyzer has been added to extract format, width, and height, which powers new convenience analyzers for width, height, format, aspect\_ratio, portrait, landscape, and image detection. The plugin also introduces 'encode' and 'thumb' processors, and allows direct access to the ImageMagick 'identify' command via a new method.
_lib/dragonfly/image\magick · high confidence
Library renamed from Imagetastic to Dragonfly
The library has been renamed from Imagetastic to Dragonfly. The main entry point is now \lib/dragonfly.rb\, which replaces the deleted \lib/imagetastic.rb\. This change introduces the \Dragonfly\ module with methods for accessing app instances (\Dragonfly.app\, \Dragonfly\[\]\), detecting the Windows OS, and providing logging capabilities (\Dragonfly.logger\, \Dragonfly.debug\, etc.). It also registers default plugins (imagemagick) and datastores (file, memory) for configuration.
lib · high confidence
Project renamed to Dragonfly and build tooling modernized
The gem has been renamed from 'imagetastic' to 'Dragonfly', with the old README removed and a new one added. The build system has been modernized by replacing the Jeweler gem and manual RSpec/Cucumber Rake tasks with Bundler's gem tasks, and a new .rspec file enables colored output. CI is configured via .travis.yml to test against Ruby 2.2 through 3.0 and JRuby, and the .gitignore has been updated to exclude common build artifacts.
(repo-wide) · high confidence
Refactored ImageMagick generators to use a unified command-line interface
The ImageMagick generators (Plain, Plasma, and Text) have been rewritten to use a new \Commands.generate\ utility instead of the previous \convert\ generator. This change introduces stricter parameter validation for inputs like dimensions, colors, and font styles, and standardizes the URL attribute naming to \url\_attributes\. The Text generator now supports detailed CSS-style font properties (family, weight, style, stretch) and padding, while the Plain and Plasma generators provide simpler image generation with color and format options.
_lib/dragonfly/image\magick/generators · high confidence
Refactored ImageMagick processors with new Encode and Thumb implementations
The ImageMagick processing pipeline has been restructured to use dedicated processor classes for encoding and thumbnail generation. The new Encode processor handles image format conversion with whitelisted arguments (such as quality) and validates inputs. The Thumb processor now supports flexible geometry strings for resizing, cropping, and resized-cropping, including gravity-based alignment and frame selection. These changes replace previous ad-hoc configurations with a more robust, validated approach to image manipulation.
_lib/dragonfly/image\magick/processors · high confidence
Refactored model attachment handling and validation
The model layer has been restructured to use a dedicated \Attachment\ class that delegates operations to a \Job\, replacing the previous macro-based approach. This change introduces \xxx\_changed?\ and \xxx\_stored?\ methods for tracking attachment state, switches retained attribute serialization from Marshal to JSON base64 encoding, and replaces the deprecated \storage\_xxx\ configuration methods with a unified \storage\_options\ block. Additionally, validation errors during property analysis are now caught and logged as warnings rather than raising exceptions, and attachment destruction is handled via \after\_commit\ on destroy to ensure data consistency.
lib/dragonfly/model · high confidence
Removal of dragonfly/rails/images require path
Requiring 'dragonfly/rails/images' now raises a LoadError, directing users to use the 'rails generate dragonfly' command instead. This change removes the previous automatic configuration file in favor of a generator-based setup, ensuring a more explicit and customizable integration with Rails applications.
lib/dragonfly/rails · high confidence
Updated Rails generator initializer with new configuration and model integration
The Rails generator's initializer template has been updated to use the new \Dragonfly.app.configure\ block syntax, replacing previous methods. It now includes a generated secret for security, configures the ImageMagick plugin, sets up file-based data storage, and assigns the Rails logger. Additionally, it mounts the Dragonfly middleware and automatically extends ActiveRecord models with Dragonfly's model and validation functionality by default.
lib/rails/generators/dragonfly/templates · high confidence
Test coverage
Added functional tests for configuration, URL handling, and security; Added model integration tests for ActiveRecord and validations; Added shared datastore specification examples; Added test coverage for Dragonfly job steps; Added test coverage for ImageMagick encode and thumb processors; Added test coverage for ImageMagick generators; Added test fixtures for deprecated Marshal-based metadata; Added test support files and RSpec matchers; Added tests for Array and Hash to\_dragonfly\_unique\_s; Added tests for ImageMagick plugin commands, processors, and analyzers; Added tests for image property analysis and logging configuration; Initial test suite for Dragonfly core components.
Dependencies
Introduces Gemfile and updates gemspec for Ruby 4.0 compatibility
The project now includes a Gemfile to streamline development and testing setup, explicitly adding development dependencies like pry, rake, cgi, benchmark, and rdoc. The gemspec has been updated to declare runtime dependencies on rack (\>= 1.3), multi\_json (\~\> 1.0), addressable (\~\> 2.3), and ostruct (\~\> 0.6.1), while also adding development dependencies for rspec, webmock, and database adapters. These changes ensure compatibility with Ruby 4.0, where several standard library gems are no longer included by default.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 61 → 67 (+6.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 73 → 73 (-0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 52 → 60 (+7.3)
- Readiness 56 → 67 (+10.8)
- Security 87 → 86 (-1.2)
Resolved (2)
- Inconsistent accessor style for the datastore property. The API exposes both a method datastore() and a property datastore. In Ruby, this usually implies one is a reader and one might be a writer or a distinct method, but given the property exists, the method is likely redundant or confusing.
- Redundant accessors for retrieving an App instance by name. Both the top-level Dragonfly module and the App class expose two methods that appear to do the same thing: a bracket notation ([]) and a named method (app/instance).
New (3)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Workflow token permissions not restricted (.github/workflows/ci.yml)
Changes since last survey
- 5 commits — 4 feature/other, 1 fixes
By area
- (repo) — 2 commits
- (root) — 2 commits
- lib/dragonfly — 1 commit
Notable commits
- fix: relaxed ostruct version dependency - fixes https://github.com/markevans/dragonfly/issues/528
- change: Add CLAUDE.md and replace Travis with GitHub Actions
- change: Merge pull request #532 from aliismayilov/remove-circular-requires
- change: Merge pull request #533 from markevans/claude-md-and-github-actions
- change: Remove circular dependency
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
markevans/dragonfly was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a740a9d440da978162d4e5440246b3bdb429c257 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.