colordom 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30e3d2955aeca515a0954b711f27a28a5f56f8209d691cd0a0d62342233a3a4c
4
- data.tar.gz: ab16a833484169dbbfca29b97fe45a37eae9059d594a134adaa94b45d45787c1
3
+ metadata.gz: d5c8de04d1de01b313514ca8971f57b4050125165d3966c1c9bd5e3e26c978ec
4
+ data.tar.gz: b0c2eb60501eeaf6b232dd2401961a006bad283dabf669ab6954230dc0aebefb
5
5
  SHA512:
6
- metadata.gz: 1f007efa2d93083c74aec5f37dca696d6e8d7a0dfe6aaf025e905acb0ef3e68ca7040fc9782e804cb69a6134b90fd3e3652f4b4ecfda7738ae83378e55500ae2
7
- data.tar.gz: 7045debdfbcb5bf5e24d012f1bb32124b59345d44a54e171917f849c10d766c0db29f7f85f3a5bf45d21ce932e027595da2f3c15fab42c03d3e685b71f1783c6
6
+ metadata.gz: c2e2e2465599fc75642c82a1fa568cd757b17ef63a8057dbe1a26d67732e04dc65ea58a190e763e168a97d1aaee570eb46536590341c5bca2c1bca50bfd432d9
7
+ data.tar.gz: 05e690df2658a015342ce12446bee56c028133d94afdf67469e08ff5349958f00852fb32541fc01beac4ef2316c751dd1027c94c66110c85d3015796088179bb
@@ -18,6 +18,12 @@ fn colordom_error() -> ExceptionClass {
18
18
  })
19
19
  }
20
20
 
21
+ macro_rules! error {
22
+ ($ex:ident) => {
23
+ Error::new(colordom_error(), $ex.to_string())
24
+ };
25
+ }
26
+
21
27
  #[derive(Clone)]
22
28
  #[magnus::wrap(class = "Colordom::Color", free_immediately, size)]
23
29
  struct Color {
@@ -58,7 +64,7 @@ impl Image {
58
64
  fn new(path: PathBuf) -> Result<Self, Error> {
59
65
  match image::open(&path) {
60
66
  Ok(img) => Ok(Self { img }),
61
- Err(ex) => Err(Error::new(colordom_error(), ex.to_string()))
67
+ Err(ex) => Err(error!(ex))
62
68
  }
63
69
  }
64
70
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Colordom
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colordom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonian Guveli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-18 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.4.19
108
+ rubygems_version: 3.5.3
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Extract dominant colors from images