ruby_spriter 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/CHANGELOG.md +217 -0
- data/Gemfile +17 -0
- data/LICENSE +21 -0
- data/README.md +561 -0
- data/bin/ruby_spriter +20 -0
- data/lib/ruby_spriter/cli.rb +249 -0
- data/lib/ruby_spriter/consolidator.rb +146 -0
- data/lib/ruby_spriter/dependency_checker.rb +174 -0
- data/lib/ruby_spriter/gimp_processor.rb +664 -0
- data/lib/ruby_spriter/metadata_manager.rb +116 -0
- data/lib/ruby_spriter/platform.rb +82 -0
- data/lib/ruby_spriter/processor.rb +251 -0
- data/lib/ruby_spriter/utils/file_helper.rb +57 -0
- data/lib/ruby_spriter/utils/output_formatter.rb +65 -0
- data/lib/ruby_spriter/utils/path_helper.rb +59 -0
- data/lib/ruby_spriter/version.rb +7 -0
- data/lib/ruby_spriter/video_processor.rb +139 -0
- data/lib/ruby_spriter.rb +31 -0
- data/ruby_spriter.gemspec +42 -0
- data/spec/fixtures/image_without_metadata.png +0 -0
- data/spec/fixtures/spritesheet_4x2.png +0 -0
- data/spec/fixtures/spritesheet_4x4.png +0 -0
- data/spec/fixtures/spritesheet_6x2.png +0 -0
- data/spec/fixtures/spritesheet_with_metadata.png +0 -0
- data/spec/fixtures/test_video.mp4 +0 -0
- data/spec/ruby_spriter/cli_spec.rb +1142 -0
- data/spec/ruby_spriter/consolidator_spec.rb +375 -0
- data/spec/ruby_spriter/dependency_checker_spec.rb +0 -0
- data/spec/ruby_spriter/gimp_processor_spec.rb +425 -0
- data/spec/ruby_spriter/metadata_manager_spec.rb +0 -0
- data/spec/ruby_spriter/platform_spec.rb +82 -0
- data/spec/ruby_spriter/processor_spec.rb +0 -0
- data/spec/ruby_spriter/utils/file_helper_spec.rb +71 -0
- data/spec/ruby_spriter/utils/output_formatter_spec.rb +0 -0
- data/spec/ruby_spriter/utils/path_helper_spec.rb +78 -0
- data/spec/ruby_spriter/video_processor_spec.rb +0 -0
- data/spec/spec_helper.rb +41 -0
- metadata +88 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f794b569ca3be84a3e33923a645ee3f98a8771d12d1e9befc5bc9f63241d079d
|
|
4
|
+
data.tar.gz: b8e2078fa01d7095ec071c83e6d0e17683f86b2653a8f610b50925084e9d4984
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 7fea2f1769c71ae55b040b41c6f1dd29f8d1c384eda0606464fee0c26892d48463586f541a484395c3368170484028488bc3bc6b7f1820f20132ec004fc5ae81
|
|
7
|
+
data.tar.gz: a751cdce97247fc81627bb3a0d4628c5c560885ce4df8eed744c9923bdd8cb86842c07363e02cc66ff94f2792ff8a50504b980ba7035e559014e1bc24f692985
|
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
### **CHANGELOG.md**
|
|
5
|
+
```markdown
|
|
6
|
+
# Changelog
|
|
7
|
+
|
|
8
|
+
All notable changes to Ruby Spriter will be documented in this file.
|
|
9
|
+
|
|
10
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
11
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## [0.6.5] - 2025-10-23
|
|
16
|
+
|
|
17
|
+
### 📦 Distribution & Packaging Release
|
|
18
|
+
|
|
19
|
+
**Note**: Version 0.6.5 is functionally identical to 0.6.4, which was yanked from RubyGems due to RubyGems policy preventing re-publication of yanked versions.
|
|
20
|
+
|
|
21
|
+
#### Added
|
|
22
|
+
- **GitHub Actions CI/CD Pipeline**: Automated testing across Ruby 2.7-3.3 on Ubuntu, macOS, and Windows
|
|
23
|
+
- **Automated RubyGems Publishing**: Auto-publish gem to RubyGems.org on version tag push
|
|
24
|
+
- **Release Automation Workflow**: Multi-platform gem builds with artifact uploads to GitHub Releases
|
|
25
|
+
- **Code Coverage Reporting**: SimpleCov integration in CI with PR summaries
|
|
26
|
+
|
|
27
|
+
#### Changed
|
|
28
|
+
- **Installation Options**: Two installation methods (RubyGems for all platforms, from source)
|
|
29
|
+
- **README Structure**: Simplified installation section focusing on gem distribution
|
|
30
|
+
- **Gemspec Author Info**: Updated from placeholders to actual author details
|
|
31
|
+
|
|
32
|
+
#### Distribution
|
|
33
|
+
- **RubyGems**: Published gem with all runtime files (works on Windows, macOS, Linux)
|
|
34
|
+
- **Source Install**: Git clone with local gem build option
|
|
35
|
+
|
|
36
|
+
#### Deferred
|
|
37
|
+
- **Windows Standalone Executable**: Deferred due to OCRA incompatibility with Ruby 3.x
|
|
38
|
+
- OCRA 1.3.11 (last version, 2019) fails with Ruby 3.2+ due to internal fiber changes
|
|
39
|
+
- Windows users can use `gem install ruby_spriter` after installing Ruby
|
|
40
|
+
- Will revisit when better Windows packaging tools become available
|
|
41
|
+
|
|
42
|
+
Closes #18
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [0.6.4] - 2025-10-23 [YANKED]
|
|
47
|
+
|
|
48
|
+
Version yanked from RubyGems. Use 0.6.5 instead.
|
|
49
|
+
|
|
50
|
+
### 📦 Distribution & Packaging Release
|
|
51
|
+
|
|
52
|
+
#### Added
|
|
53
|
+
- **GitHub Actions CI/CD Pipeline**: Automated testing across Ruby 2.7-3.3 on Ubuntu, macOS, and Windows
|
|
54
|
+
- **Automated RubyGems Publishing**: Auto-publish gem to RubyGems.org on version tag push
|
|
55
|
+
- **Release Automation Workflow**: Multi-platform gem builds with artifact uploads to GitHub Releases
|
|
56
|
+
- **Code Coverage Reporting**: SimpleCov integration in CI with PR summaries
|
|
57
|
+
|
|
58
|
+
#### Changed
|
|
59
|
+
- **Installation Options**: Two installation methods (RubyGems for all platforms, from source)
|
|
60
|
+
- **README Structure**: Simplified installation section focusing on gem distribution
|
|
61
|
+
- **Gemspec Author Info**: Updated from placeholders to actual author details
|
|
62
|
+
|
|
63
|
+
#### Distribution
|
|
64
|
+
- **RubyGems**: Published gem with all runtime files (works on Windows, macOS, Linux)
|
|
65
|
+
- **Source Install**: Git clone with local gem build option
|
|
66
|
+
|
|
67
|
+
#### Deferred
|
|
68
|
+
- **Windows Standalone Executable**: Deferred due to OCRA incompatibility with Ruby 3.x
|
|
69
|
+
- OCRA 1.3.11 (last version, 2019) fails with Ruby 3.2+ due to internal fiber changes
|
|
70
|
+
- Windows users can use `gem install ruby_spriter` after installing Ruby
|
|
71
|
+
- Will revisit when better Windows packaging tools become available
|
|
72
|
+
|
|
73
|
+
Closes #18
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## [0.6.3] - 2025-10-23
|
|
78
|
+
|
|
79
|
+
### 🧪 Testing & Quality Assurance Release
|
|
80
|
+
|
|
81
|
+
#### Added
|
|
82
|
+
- **155 New RSpec Tests**: Comprehensive test coverage for CLI, GimpProcessor, Consolidator, PathHelper
|
|
83
|
+
- **Test Fixtures**: Real spritesheet fixtures (4x2, 6x2, 4x4), PNG images, MP4 video
|
|
84
|
+
- **Code Coverage Reporting**: SimpleCov tracking showing 57.09% coverage
|
|
85
|
+
|
|
86
|
+
#### Fixed
|
|
87
|
+
- **CLI Preset Bug**: Fixed OptionParser limitation preventing all 4 presets from working
|
|
88
|
+
- **PathHelper Quote Escaping**: Fixed single quote escaping in Unix paths (needed 4 backslashes)
|
|
89
|
+
- **Spec Helper Bug**: Changed instance variable to global variable for cross-context access
|
|
90
|
+
- **PathHelper Tests**: Made drive letter detection flexible for E: drive compatibility
|
|
91
|
+
|
|
92
|
+
#### Testing
|
|
93
|
+
- **CLI Tests (97)**: --help, --version, --check-dependencies, --image, --video, --consolidate, --verify
|
|
94
|
+
- **GimpProcessor Tests (48)**: Initialization, operations, interpolation, output filtering, script generation
|
|
95
|
+
- **Consolidator Tests (33)**: File validation, metadata, column validation, consolidation logic
|
|
96
|
+
- **PathHelper Tests (7)**: Quote paths, normalize for Python, native format conversion
|
|
97
|
+
- **Coverage**: Increased from 22.52% to 57.09% (+34.57 percentage points)
|
|
98
|
+
|
|
99
|
+
Closes #5
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## [0.6.2] - 2025-10-22
|
|
104
|
+
|
|
105
|
+
### ✨ Quality Enhancement & Tooling Release
|
|
106
|
+
|
|
107
|
+
#### Added
|
|
108
|
+
- **Interpolation Options**: 5 interpolation methods for scaling (none, linear, cubic, nohalo, lohalo)
|
|
109
|
+
- **Sharpening Support**: Unsharp mask with configurable radius, gain, and threshold
|
|
110
|
+
- **`--version` Flag**: Display version, platform, and date information
|
|
111
|
+
- **`--check-dependencies` Flag**: Verify all external tools are installed with platform-specific guidance
|
|
112
|
+
- **File Extension Validation**: Runtime validation for MP4 (video) and PNG (images)
|
|
113
|
+
- **GIMP Investigation Documentation**: Comprehensive documentation of GIMP sharpen attempts and solutions
|
|
114
|
+
|
|
115
|
+
#### Changed
|
|
116
|
+
- **Automatic Operation Order**: Auto-optimize to remove background before scaling for better quality
|
|
117
|
+
- **Sharpening via ImageMagick**: Use ImageMagick instead of GIMP for reliable cross-platform sharpening
|
|
118
|
+
- **Alpha Channel Preservation**: Use merge instead of flatten to preserve transparency
|
|
119
|
+
- **Conservative Sharpen Defaults**: radius: 2.0, gain: 0.5, threshold: 0.03 to minimize halo artifacts
|
|
120
|
+
- **Parameter Terminology**: Changed "amount" to "gain" to match ImageMagick documentation
|
|
121
|
+
|
|
122
|
+
#### Fixed
|
|
123
|
+
- **Gem Build Error**: Removed .rb extension from `bin/ruby_spriter` executable
|
|
124
|
+
- **Clear Error Messages**: File extension validation provides helpful feedback
|
|
125
|
+
|
|
126
|
+
#### Documentation
|
|
127
|
+
- **README.md**: Added interpolation and sharpening documentation, file format requirements
|
|
128
|
+
- **CLAUDE.md**: Updated with new features and validation details
|
|
129
|
+
- **GIMP_SHARPEN_INVESTIGATION.md**: Documents 8 failed GIMP attempts and architectural decisions
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## [0.6.1] - 2025-10-22
|
|
134
|
+
|
|
135
|
+
### 🎉 Major Refactoring Release
|
|
136
|
+
|
|
137
|
+
#### Added
|
|
138
|
+
- **Modular Architecture**: Split monolithic script into organized modules
|
|
139
|
+
- **RSpec Testing Framework**: Comprehensive unit test coverage
|
|
140
|
+
- **Dependency Checking**: Automatic validation of external tools
|
|
141
|
+
- **Better Error Handling**: Custom exception classes
|
|
142
|
+
- **Code Documentation**: Inline comments and YARD-compatible docs
|
|
143
|
+
- **SimpleCov Integration**: Code coverage reporting
|
|
144
|
+
- **RuboCop Support**: Code style enforcement
|
|
145
|
+
|
|
146
|
+
#### Changed
|
|
147
|
+
- **Project Structure**: Reorganized into `lib/`, `spec/`, and `bin/` directories
|
|
148
|
+
- **Class Organization**:
|
|
149
|
+
- `Platform` - Platform detection and configuration
|
|
150
|
+
- `DependencyChecker` - External tool validation
|
|
151
|
+
- `VideoProcessor` - FFmpeg operations
|
|
152
|
+
- `GimpProcessor` - GIMP operations
|
|
153
|
+
- `MetadataManager` - PNG metadata handling
|
|
154
|
+
- `Consolidator` - Spritesheet consolidation
|
|
155
|
+
- `Processor` - Main orchestration
|
|
156
|
+
- `CLI` - Command-line interface
|
|
157
|
+
- Utilities: `PathHelper`, `FileHelper`, `OutputFormatter`
|
|
158
|
+
|
|
159
|
+
#### Fixed
|
|
160
|
+
- Path handling edge cases on Windows
|
|
161
|
+
- Improved error messages with actionable guidance
|
|
162
|
+
- Better temp file cleanup
|
|
163
|
+
|
|
164
|
+
#### Developer Experience
|
|
165
|
+
- Gemfile for dependency management
|
|
166
|
+
- RSpec test suite with fixtures
|
|
167
|
+
- Comprehensive README with examples
|
|
168
|
+
- Troubleshooting guide
|
|
169
|
+
- Contributing guidelines
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## [0.6.0] - 2024-XX-XX
|
|
174
|
+
|
|
175
|
+
### Added
|
|
176
|
+
- Metadata embedding in PNG files
|
|
177
|
+
- Spritesheet consolidation feature
|
|
178
|
+
- Metadata verification command (`--verify`)
|
|
179
|
+
- Debug mode for troubleshooting
|
|
180
|
+
|
|
181
|
+
### Changed
|
|
182
|
+
- Improved GIMP script generation
|
|
183
|
+
- Better cross-platform path handling
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## [0.5.0] - 2024-XX-XX
|
|
188
|
+
|
|
189
|
+
### Added
|
|
190
|
+
- Background removal with GIMP
|
|
191
|
+
- Fuzzy select and global color select options
|
|
192
|
+
- Image scaling support
|
|
193
|
+
- Configurable operation order
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## [0.4.0] - 2024-XX-XX
|
|
198
|
+
|
|
199
|
+
### Added
|
|
200
|
+
- Video to spritesheet conversion
|
|
201
|
+
- FFmpeg integration
|
|
202
|
+
- Customizable grid layouts
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## [0.1.0] - 2024-XX-XX
|
|
207
|
+
|
|
208
|
+
### Added
|
|
209
|
+
- Initial release
|
|
210
|
+
- Basic video processing
|
|
211
|
+
- Cross-platform support
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
[0.6.2]: https://github.com/scooter-indie/ruby-spriter/compare/v0.6.1...v0.6.2
|
|
216
|
+
[0.6.1]: https://github.com/scooter-indie/ruby-spriter/compare/v0.6.0...v0.6.1
|
|
217
|
+
[0.6.0]: https://github.com/scooter-indie/ruby-spriter/releases/tag/v0.6.0
|
data/Gemfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
|
+
|
|
5
|
+
gemspec
|
|
6
|
+
|
|
7
|
+
group :development, :test do
|
|
8
|
+
gem 'rspec', '~> 3.12'
|
|
9
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
10
|
+
gem 'rubocop', '~> 1.50', require: false
|
|
11
|
+
gem 'rubocop-rspec', '~> 2.20', require: false
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
group :development do
|
|
15
|
+
gem 'rake', '~> 13.0'
|
|
16
|
+
gem 'bundler', '~> 2.0'
|
|
17
|
+
end
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 scooter-indie
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|