claricle 0.1.0
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/.rubocop.yml +13 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Gemfile +13 -0
- data/README.adoc +291 -0
- data/Rakefile +12 -0
- data/claricle.gemspec +42 -0
- data/exe/claricle +6 -0
- data/lib/claricle/cli.rb +67 -0
- data/lib/claricle/version.rb +5 -0
- data/lib/claricle.rb +16 -0
- data/sig/claricle.rbs +4 -0
- metadata +81 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 817d379b186d43637928f0a12bdabb9d773320c458be04085d31c4eb1bbfaa7f
|
|
4
|
+
data.tar.gz: 75e2d671d3b02e716a44c4a56a7d6b1ecb54126f8592be6be497e445dcb77668
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 041c3ad2a73d507c2189fd4b62d12a317c377eef5b75c9e6a97b4dacde8f45c4cec0f2a7d356528510f4ec83ad8035879720b30f922d6edb5159269c8e881a1b
|
|
7
|
+
data.tar.gz: 292fc0f4beb01a074b98437c512e8f49f16511d0e6a24ec997b68d8a482d5e5bff87858034b8a798f66ef818cd5209754959ebb1785b1e95a007a991b31f8b71
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[INSERT CONTACT METHOD].
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/Gemfile
ADDED
data/README.adoc
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
= Claricle
|
|
2
|
+
|
|
3
|
+
image:https://img.shields.io/gem/v/claricle.svg[RubyGems Version]
|
|
4
|
+
image:https://img.shields.io/github/license/ribose/claricle.svg[License]
|
|
5
|
+
image:https://github.com/ribose/claricle/actions/workflows/test.yml/badge.svg["Build Status", link="https://github.com/ribose/claricle/actions/workflows/test.yml"]
|
|
6
|
+
|
|
7
|
+
== Purpose
|
|
8
|
+
|
|
9
|
+
Claricle is a comprehensive image utility gem that provides tools for image
|
|
10
|
+
validation, format conversion, compression, and vector graphics processing.
|
|
11
|
+
|
|
12
|
+
The gem integrates functionality from multiple specialized tools including
|
|
13
|
+
pngconform, svgconform, and vectory into a unified interface, making it easier
|
|
14
|
+
to work with various image formats in Ruby applications.
|
|
15
|
+
|
|
16
|
+
This library is particularly useful for applications that need to:
|
|
17
|
+
|
|
18
|
+
* Validate image files for conformance to standards
|
|
19
|
+
* Convert between different image formats
|
|
20
|
+
* Compress images while maintaining quality
|
|
21
|
+
* Process vector graphics programmatically
|
|
22
|
+
|
|
23
|
+
== Etymology & Symbolism
|
|
24
|
+
|
|
25
|
+
[cols="1,2,3",options="header"]
|
|
26
|
+
|===
|
|
27
|
+
|Part
|
|
28
|
+
|Root
|
|
29
|
+
|Meaning
|
|
30
|
+
|
|
31
|
+
|clari-
|
|
32
|
+
|Latin _clārus_
|
|
33
|
+
|"clear, bright, famous" -- root of clarity, clarify
|
|
34
|
+
|
|
35
|
+
|-cle
|
|
36
|
+
|Latin _cle_ (from _particula_)
|
|
37
|
+
|"small particle" -- like particle, fascicle
|
|
38
|
+
|===
|
|
39
|
+
|
|
40
|
+
*Combined:* "Clear particle" or "Bright essence"
|
|
41
|
+
|
|
42
|
+
Perfect metaphor:
|
|
43
|
+
|
|
44
|
+
* *Validation* → clarify every pixel/particle
|
|
45
|
+
* *Conversion* → preserve the clear essence
|
|
46
|
+
* *Compression* → bright clarity in every bit
|
|
47
|
+
* *Ruby* → gem-like, small but brilliant
|
|
48
|
+
|
|
49
|
+
== Features
|
|
50
|
+
|
|
51
|
+
[NOTE]
|
|
52
|
+
====
|
|
53
|
+
This is currently a minimal shim release to reserve the gem name.
|
|
54
|
+
Full functionality will be implemented in future versions.
|
|
55
|
+
====
|
|
56
|
+
|
|
57
|
+
Planned features:
|
|
58
|
+
|
|
59
|
+
* PNG validation and conformance checking (via pngconform)
|
|
60
|
+
* SVG validation and processing (via svgconform)
|
|
61
|
+
* Vector graphics manipulation (via vectory)
|
|
62
|
+
* Image format conversion utilities
|
|
63
|
+
* Image compression with quality preservation
|
|
64
|
+
* Command-line interface for all operations
|
|
65
|
+
* Ruby API for programmatic access
|
|
66
|
+
* Batch processing capabilities
|
|
67
|
+
* Comprehensive error reporting
|
|
68
|
+
|
|
69
|
+
== Installation
|
|
70
|
+
|
|
71
|
+
Add this line to your application's Gemfile:
|
|
72
|
+
|
|
73
|
+
[source,ruby]
|
|
74
|
+
----
|
|
75
|
+
gem 'claricle'
|
|
76
|
+
----
|
|
77
|
+
|
|
78
|
+
And then execute:
|
|
79
|
+
|
|
80
|
+
[source,sh]
|
|
81
|
+
----
|
|
82
|
+
$ bundle install
|
|
83
|
+
----
|
|
84
|
+
|
|
85
|
+
Or install it yourself as:
|
|
86
|
+
|
|
87
|
+
[source,sh]
|
|
88
|
+
----
|
|
89
|
+
$ gem install claricle
|
|
90
|
+
----
|
|
91
|
+
|
|
92
|
+
== Command Line Interface
|
|
93
|
+
|
|
94
|
+
The `claricle` command provides utilities for working with image files.
|
|
95
|
+
|
|
96
|
+
=== Available Commands
|
|
97
|
+
|
|
98
|
+
Get help on available commands:
|
|
99
|
+
|
|
100
|
+
[source,sh]
|
|
101
|
+
----
|
|
102
|
+
$ claricle help
|
|
103
|
+
Commands:
|
|
104
|
+
claricle compress FILE_PATTERN # Compress image files (placeholder)
|
|
105
|
+
claricle convert SOURCE DEST # Convert image formats (placeholder)
|
|
106
|
+
claricle help [COMMAND] # Describe available commands or one specific command
|
|
107
|
+
claricle validate FILE_PATTERN # Validate image files (placeholder)
|
|
108
|
+
claricle version # Display Claricle version
|
|
109
|
+
----
|
|
110
|
+
|
|
111
|
+
=== Version Information
|
|
112
|
+
|
|
113
|
+
Display the installed version:
|
|
114
|
+
|
|
115
|
+
[source,sh]
|
|
116
|
+
----
|
|
117
|
+
$ claricle version
|
|
118
|
+
Claricle version 0.1.0
|
|
119
|
+
----
|
|
120
|
+
|
|
121
|
+
=== Validation (Placeholder)
|
|
122
|
+
|
|
123
|
+
[NOTE]
|
|
124
|
+
====
|
|
125
|
+
This functionality is not yet implemented in this shim release.
|
|
126
|
+
====
|
|
127
|
+
|
|
128
|
+
Future usage:
|
|
129
|
+
|
|
130
|
+
[source,sh]
|
|
131
|
+
----
|
|
132
|
+
# Validate a single image file
|
|
133
|
+
$ claricle validate image.png
|
|
134
|
+
|
|
135
|
+
# Validate multiple files
|
|
136
|
+
$ claricle validate *.svg
|
|
137
|
+
|
|
138
|
+
# Validate files using patterns
|
|
139
|
+
$ claricle validate "images/*.png"
|
|
140
|
+
----
|
|
141
|
+
|
|
142
|
+
=== Conversion (Placeholder)
|
|
143
|
+
|
|
144
|
+
[NOTE]
|
|
145
|
+
====
|
|
146
|
+
This functionality is not yet implemented in this shim release.
|
|
147
|
+
====
|
|
148
|
+
|
|
149
|
+
Future usage:
|
|
150
|
+
|
|
151
|
+
[source,sh]
|
|
152
|
+
----
|
|
153
|
+
# Convert between formats
|
|
154
|
+
$ claricle convert image.png image.svg
|
|
155
|
+
$ claricle convert logo.svg logo.png
|
|
156
|
+
----
|
|
157
|
+
|
|
158
|
+
=== Compression (Placeholder)
|
|
159
|
+
|
|
160
|
+
[NOTE]
|
|
161
|
+
====
|
|
162
|
+
This functionality is not yet implemented in this shim release.
|
|
163
|
+
====
|
|
164
|
+
|
|
165
|
+
Future usage:
|
|
166
|
+
|
|
167
|
+
[source,sh]
|
|
168
|
+
----
|
|
169
|
+
# Compress image files
|
|
170
|
+
$ claricle compress image.png
|
|
171
|
+
$ claricle compress *.jpg
|
|
172
|
+
----
|
|
173
|
+
|
|
174
|
+
== Usage
|
|
175
|
+
|
|
176
|
+
=== Basic Example (Future)
|
|
177
|
+
|
|
178
|
+
[source,ruby]
|
|
179
|
+
----
|
|
180
|
+
require 'claricle'
|
|
181
|
+
|
|
182
|
+
# Validate an image
|
|
183
|
+
validator = Claricle::Validator.new
|
|
184
|
+
result = validator.validate('image.png')
|
|
185
|
+
|
|
186
|
+
if result.valid?
|
|
187
|
+
puts "Image is valid!"
|
|
188
|
+
else
|
|
189
|
+
puts "Validation errors:"
|
|
190
|
+
result.errors.each { |error| puts " - #{error}" }
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Convert image format
|
|
194
|
+
converter = Claricle::Converter.new
|
|
195
|
+
converter.convert('image.png', 'image.svg')
|
|
196
|
+
|
|
197
|
+
# Compress image
|
|
198
|
+
compressor = Claricle::Compressor.new
|
|
199
|
+
compressor.compress('image.png', quality: 85)
|
|
200
|
+
----
|
|
201
|
+
|
|
202
|
+
== Architecture
|
|
203
|
+
|
|
204
|
+
=== Current Structure
|
|
205
|
+
|
|
206
|
+
[source]
|
|
207
|
+
----
|
|
208
|
+
Claricle (Gem)
|
|
209
|
+
│
|
|
210
|
+
├── CLI (Thor-based command-line interface)
|
|
211
|
+
│ ├── validate command (placeholder)
|
|
212
|
+
│ ├── convert command (placeholder)
|
|
213
|
+
│ ├── compress command (placeholder)
|
|
214
|
+
│ └── version command (implemented)
|
|
215
|
+
│
|
|
216
|
+
└── Core Module (placeholder for future components)
|
|
217
|
+
├── Validator (future: PNG, SVG validation)
|
|
218
|
+
├── Converter (future: format conversion)
|
|
219
|
+
├── Compressor (future: image compression)
|
|
220
|
+
└── VectorProcessor (future: vector graphics)
|
|
221
|
+
----
|
|
222
|
+
|
|
223
|
+
=== Future Architecture
|
|
224
|
+
|
|
225
|
+
The planned architecture will integrate specialized tools:
|
|
226
|
+
|
|
227
|
+
[source]
|
|
228
|
+
----
|
|
229
|
+
┌─────────────────────────────────────────────────────────┐
|
|
230
|
+
│ Claricle Gem │
|
|
231
|
+
│ │
|
|
232
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
233
|
+
│ │ PNG Module │ │ SVG Module │ │Vector Module │ │
|
|
234
|
+
│ │ │ │ │ │ │ │
|
|
235
|
+
│ │ pngconform │ │ svgconform │ │ vectory │ │
|
|
236
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
237
|
+
│ │
|
|
238
|
+
│ ┌────────────────────────────────────────────────┐ │
|
|
239
|
+
│ │ Unified API & CLI Interface │ │
|
|
240
|
+
│ └────────────────────────────────────────────────┘ │
|
|
241
|
+
└─────────────────────────────────────────────────────────┘
|
|
242
|
+
----
|
|
243
|
+
|
|
244
|
+
== Development
|
|
245
|
+
|
|
246
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
247
|
+
Then, run `rake spec` to run the tests.
|
|
248
|
+
You can also run `bin/console` for an interactive prompt that will allow you
|
|
249
|
+
to experiment.
|
|
250
|
+
|
|
251
|
+
To install this gem onto your local machine, run:
|
|
252
|
+
|
|
253
|
+
[source,sh]
|
|
254
|
+
----
|
|
255
|
+
$ bundle exec rake install
|
|
256
|
+
----
|
|
257
|
+
|
|
258
|
+
To release a new version, update the version number in `version.rb`, and then
|
|
259
|
+
run:
|
|
260
|
+
|
|
261
|
+
[source,sh]
|
|
262
|
+
----
|
|
263
|
+
$ bundle exec rake release
|
|
264
|
+
----
|
|
265
|
+
|
|
266
|
+
This will create a git tag for the version, push git commits and the created
|
|
267
|
+
tag, and push the `.gem` file to https://rubygems.org[RubyGems.org].
|
|
268
|
+
|
|
269
|
+
== Contributing
|
|
270
|
+
|
|
271
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
272
|
+
https://github.com/ribose/claricle.
|
|
273
|
+
|
|
274
|
+
This project is intended to be a safe, welcoming space for collaboration, and
|
|
275
|
+
contributors are expected to adhere to the
|
|
276
|
+
https://github.com/ribose/claricle/blob/main/CODE_OF_CONDUCT.md[code of conduct].
|
|
277
|
+
|
|
278
|
+
== Copyright
|
|
279
|
+
|
|
280
|
+
Copyright https://www.ribose.com[Ribose Inc.]
|
|
281
|
+
|
|
282
|
+
== License
|
|
283
|
+
|
|
284
|
+
The gem is available as open source under the terms of the
|
|
285
|
+
https://opensource.org/licenses/BSD-2-Clause[BSD 2-Clause License].
|
|
286
|
+
|
|
287
|
+
== Code of Conduct
|
|
288
|
+
|
|
289
|
+
Everyone interacting in the Claricle project's codebases, issue trackers,
|
|
290
|
+
chat rooms and mailing lists is expected to follow the
|
|
291
|
+
https://github.com/ribose/claricle/blob/main/CODE_OF_CONDUCT.md[code of conduct].
|
data/Rakefile
ADDED
data/claricle.gemspec
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/claricle/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "claricle"
|
|
7
|
+
spec.version = Claricle::VERSION
|
|
8
|
+
spec.authors = ["Ribose Inc."]
|
|
9
|
+
spec.email = ["open.source@ribose.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Claricle is a comprehensive image utility gem for validation, conversion, and compression."
|
|
12
|
+
spec.description = <<~HEREDOC
|
|
13
|
+
Claricle provides a Ruby library for working with images, offering tools for
|
|
14
|
+
image validation (PNG, SVG), format conversion, compression, and vector
|
|
15
|
+
graphics processing. The name combines "clarity" and "particle", representing
|
|
16
|
+
the clear validation of every pixel. It is built to integrate functionality
|
|
17
|
+
from pngconform, svgconform, vectory, and other image processing tools into
|
|
18
|
+
a unified interface.
|
|
19
|
+
HEREDOC
|
|
20
|
+
|
|
21
|
+
spec.homepage = "https://github.com/ribose/claricle"
|
|
22
|
+
spec.license = "BSD-2-Clause"
|
|
23
|
+
spec.required_ruby_version = ">= 3.0.0"
|
|
24
|
+
|
|
25
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
26
|
+
spec.metadata["source_code_uri"] = "https://github.com/ribose/claricle"
|
|
27
|
+
spec.metadata["changelog_uri"] = "https://github.com/ribose/claricle"
|
|
28
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
29
|
+
|
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
32
|
+
spec.files = Dir.chdir(__dir__) do
|
|
33
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
34
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
spec.bindir = "exe"
|
|
38
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
39
|
+
spec.require_paths = ["lib"]
|
|
40
|
+
|
|
41
|
+
spec.add_dependency "thor", "~> 1.0"
|
|
42
|
+
end
|
data/exe/claricle
ADDED
data/lib/claricle/cli.rb
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Claricle
|
|
4
|
+
# Command-line interface for Claricle
|
|
5
|
+
class Cli < Thor
|
|
6
|
+
def self.exit_on_failure?
|
|
7
|
+
true
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
desc "version", "Display Claricle version"
|
|
11
|
+
def version
|
|
12
|
+
puts "Claricle version #{Claricle::VERSION}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc "validate FILE_PATTERN", "Validate image files (placeholder)"
|
|
16
|
+
long_desc <<~LONGDESC
|
|
17
|
+
Validate image files against their respective standards.
|
|
18
|
+
|
|
19
|
+
This command will validate PNG, SVG, and other image formats
|
|
20
|
+
for conformance and correctness.
|
|
21
|
+
|
|
22
|
+
Note: This is a placeholder command. Functionality will be
|
|
23
|
+
implemented in future versions.
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
claricle validate image.png
|
|
27
|
+
claricle validate *.svg
|
|
28
|
+
claricle validate "images/*.png"
|
|
29
|
+
LONGDESC
|
|
30
|
+
def validate(_pattern)
|
|
31
|
+
puts "Image validation functionality coming soon!"
|
|
32
|
+
puts "This gem is currently a placeholder to reserve the name."
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
desc "convert SOURCE DEST", "Convert image formats (placeholder)"
|
|
36
|
+
long_desc <<~LONGDESC
|
|
37
|
+
Convert images between different formats.
|
|
38
|
+
|
|
39
|
+
Note: This is a placeholder command. Functionality will be
|
|
40
|
+
implemented in future versions.
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
claricle convert image.png image.svg
|
|
44
|
+
claricle convert logo.svg logo.png
|
|
45
|
+
LONGDESC
|
|
46
|
+
def convert(_source, _dest)
|
|
47
|
+
puts "Image conversion functionality coming soon!"
|
|
48
|
+
puts "This gem is currently a placeholder to reserve the name."
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
desc "compress FILE_PATTERN", "Compress image files (placeholder)"
|
|
52
|
+
long_desc <<~LONGDESC
|
|
53
|
+
Compress image files while maintaining quality.
|
|
54
|
+
|
|
55
|
+
Note: This is a placeholder command. Functionality will be
|
|
56
|
+
implemented in future versions.
|
|
57
|
+
|
|
58
|
+
Examples:
|
|
59
|
+
claricle compress image.png
|
|
60
|
+
claricle compress *.jpg
|
|
61
|
+
LONGDESC
|
|
62
|
+
def compress(_pattern)
|
|
63
|
+
puts "Image compression functionality coming soon!"
|
|
64
|
+
puts "This gem is currently a placeholder to reserve the name."
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
data/lib/claricle.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "thor"
|
|
4
|
+
require_relative "claricle/version"
|
|
5
|
+
|
|
6
|
+
module Claricle
|
|
7
|
+
class Error < StandardError; end
|
|
8
|
+
|
|
9
|
+
# Future component loading will go here:
|
|
10
|
+
# require_relative "claricle/png_validator"
|
|
11
|
+
# require_relative "claricle/svg_processor"
|
|
12
|
+
# require_relative "claricle/vector_converter"
|
|
13
|
+
# require_relative "claricle/image_compressor"
|
|
14
|
+
|
|
15
|
+
require_relative "claricle/cli"
|
|
16
|
+
end
|
data/sig/claricle.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: claricle
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Ribose Inc.
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-10-27 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: thor
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.0'
|
|
27
|
+
description: |
|
|
28
|
+
Claricle provides a Ruby library for working with images, offering tools for
|
|
29
|
+
image validation (PNG, SVG), format conversion, compression, and vector
|
|
30
|
+
graphics processing. The name combines "clarity" and "particle", representing
|
|
31
|
+
the clear validation of every pixel. It is built to integrate functionality
|
|
32
|
+
from pngconform, svgconform, vectory, and other image processing tools into
|
|
33
|
+
a unified interface.
|
|
34
|
+
email:
|
|
35
|
+
- open.source@ribose.com
|
|
36
|
+
executables:
|
|
37
|
+
- claricle
|
|
38
|
+
extensions: []
|
|
39
|
+
extra_rdoc_files: []
|
|
40
|
+
files:
|
|
41
|
+
- ".rspec"
|
|
42
|
+
- ".rubocop.yml"
|
|
43
|
+
- CODE_OF_CONDUCT.md
|
|
44
|
+
- Gemfile
|
|
45
|
+
- README.adoc
|
|
46
|
+
- Rakefile
|
|
47
|
+
- claricle.gemspec
|
|
48
|
+
- exe/claricle
|
|
49
|
+
- lib/claricle.rb
|
|
50
|
+
- lib/claricle/cli.rb
|
|
51
|
+
- lib/claricle/version.rb
|
|
52
|
+
- sig/claricle.rbs
|
|
53
|
+
homepage: https://github.com/ribose/claricle
|
|
54
|
+
licenses:
|
|
55
|
+
- BSD-2-Clause
|
|
56
|
+
metadata:
|
|
57
|
+
homepage_uri: https://github.com/ribose/claricle
|
|
58
|
+
source_code_uri: https://github.com/ribose/claricle
|
|
59
|
+
changelog_uri: https://github.com/ribose/claricle
|
|
60
|
+
rubygems_mfa_required: 'true'
|
|
61
|
+
post_install_message:
|
|
62
|
+
rdoc_options: []
|
|
63
|
+
require_paths:
|
|
64
|
+
- lib
|
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - ">="
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: 3.0.0
|
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
requirements: []
|
|
76
|
+
rubygems_version: 3.5.22
|
|
77
|
+
signing_key:
|
|
78
|
+
specification_version: 4
|
|
79
|
+
summary: Claricle is a comprehensive image utility gem for validation, conversion,
|
|
80
|
+
and compression.
|
|
81
|
+
test_files: []
|