decolmor 1.1.1 → 1.1.2

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: 73c5b6a307982579fd26496c5398ce26bfe4ca900ce1ea64500249d0cfe2ca60
4
- data.tar.gz: bb00a9c25c480ad47152e2f463cc216c317f3706fbe1a3f313a7aa35b0825577
3
+ metadata.gz: 391babdff79d7e079f2282aa45ad285323c2b58b87e518bb2d26ad8e1192a4e3
4
+ data.tar.gz: 14aa6f29f76b05ab2e853e438e60b4e6705fb147a4ecebaccf1375778e88ad12
5
5
  SHA512:
6
- metadata.gz: f28a363a685048fc28d39cca59c63fafde302b17b1ae8c1c3dbe615842a54bbd4c8228ca59c21afa0a0b14e8ee694c8b50d307bd66aff0780214e7363aac4a30
7
- data.tar.gz: c8651a6e4151162cea6c55d6f61f9c45ee171f0f6bd0384ba059dede341562ea1086c2e70ce953fef9c2ef2c67c7f19e8a7bb6e8d1fecd9a1bf01275e4e8ed1b
6
+ metadata.gz: ce61c17d0dbc5da49013777f8abc332354c681f566a03ee37ab959faa062176f48daa7e4495695580efa74d9b9383f4569be7b0f8fec63922a80730388bd267a
7
+ data.tar.gz: 6fdd75e6224a79e587dacb66de5d74444196dfc3b4ebb3f592ab689df8435d67150d7bc0751f81289d253c9f1884468b14a94f59bb7f6a972e625d29809f540a
data/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## 1.0.0 (September 13, 2021)
3
+ ## 1.1.2 (September 16, 2021)
4
4
 
5
- * Initial release
5
+ * Migrate: Travis CI => Github Actions Workflow
6
+ * Fix: returned helper methods to private
7
+ * Now the main code is in one file: lib/decolmor/main.rb
8
+ You can just `include` it in and use it (separately from the gem)
9
+
10
+ ## 1.1.1 (September 16, 2021)
11
+
12
+ * Now you can `include` the module into your class
13
+ * gem methods will be available as class methods
14
+ * Fixed default branch in .gemspec metadata paths
6
15
 
7
16
  ## 1.1.0 (September 14, 2021)
8
17
 
@@ -14,8 +23,6 @@
14
23
  * support short version of HEX
15
24
  e.g: `#CF3`, `0F9`, `#0F9F`
16
25
 
17
- ## 1.1.1 (September 16, 2021)
26
+ ## 1.0.0 (September 13, 2021)
18
27
 
19
- * Now you can `include` the module into your class
20
- * gem methods will be available as class methods
21
- * Fixed default branch in .gemspec metadata paths
28
+ * Initial release
data/NEWS.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # News
2
2
 
3
- ## 1.0.0 (September 13, 2021)
3
+ ## 1.1.2 (September 16, 2021)
4
4
 
5
- * First version
5
+ * Migrate: Travis CI => Github Actions Workflow
6
+
7
+ ## 1.1.1 (September 16, 2021)
8
+
9
+ * Now you can `include` the module into your class
10
+ * gem methods will be available as class methods
6
11
 
7
12
  ## 1.1.0 (September 14, 2021)
8
13
 
9
14
  * `::hex_to_rgb` Now supports short version of HEX and rounding for the alpha channel
10
15
 
11
- ## 1.1.1 (September 16, 2021)
16
+ ## 1.0.0 (September 13, 2021)
12
17
 
13
- * Now you can `include` the module into your class
14
- * gem methods will be available as class methods
18
+ * First version
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Decolmor
2
- [![Gem Version](https://badge.fury.io/rb/decolmor.svg)](https://badge.fury.io/rb/decolmor)
3
- [![Build Status](https://app.travis-ci.com/ChildrenofkoRn/decolmor.svg?token=ssJ5zvqjK7iZ4F1TaeQn&branch=main)](https://app.travis-ci.com/ChildrenofkoRn/decolmor)
4
- [![codecov](https://codecov.io/gh/ChildrenofkoRn/decolmor/branch/main/graph/badge.svg?token=5P4OQUXC3N)](https://codecov.io/gh/ChildrenofkoRn/decolmor)
2
+ [![badge-gem][badge-gem]][gem]
3
+ [![badge-build][badge-build]][github-workflow]
4
+ [![badge-codecov][badge-codecov]][codecov]
5
+ [![badge-license][badge-license]][license]
5
6
 
6
7
  Gem for converting color spaces from/to: HEX/RGB/HSL/HSV/HSB/CMYK
7
8
  The Alpha channel (transparency) is supported.
@@ -153,3 +154,14 @@ The results when rounded to an integer will be the same as when using graphics e
153
154
  MIT License
154
155
  Copyright (c) 2021 ChildrenofkoRn
155
156
  [LICENSE](https://github.com/ChildrenofkoRn/decolmor/blob/master/LICENSE)
157
+
158
+
159
+
160
+ [gem]: https://badge.fury.io/rb/decolmor "gem version"
161
+ [badge-gem]: https://badge.fury.io/rb/decolmor.svg "gem version"
162
+ [codecov]: https://codecov.io/gh/ChildrenofkoRn/decolmor "codecov"
163
+ [badge-codecov]: https://codecov.io/gh/ChildrenofkoRn/decolmor/branch/main/graph/badge.svg?token=5P4OQUXC3N "codecov"
164
+ [github-workflow]: https://github.com/ChildrenofkoRn/decolmor/actions/workflows/build.yml "build"
165
+ [badge-build]: https://github.com/ChildrenofkoRn/decolmor/actions/workflows/build.yml/badge.svg "build status"
166
+ [license]: https://github.com/ChildrenofkoRn/decolmor/blob/main/LICENSE "MIT"
167
+ [badge-license]: https://img.shields.io/github/license/ChildrenofkoRn/decolmor?color=%23239393 "license"
data/lib/decolmor/main.rb CHANGED
@@ -4,6 +4,13 @@ module Decolmor
4
4
  base.extend ClassMethods
5
5
  end
6
6
 
7
+ #========= Set default rounding for HSL/HSV/HSB/CMYK conversion ========
8
+
9
+ # round 1 enough for lossless conversion RGB -> HSL/HSV/HSB -> RGB
10
+ # for lossless conversion HSL <==> HSV (HSB) better to use round 2
11
+ #
12
+ HSX_ROUND = 1
13
+
7
14
  module ClassMethods
8
15
 
9
16
  attr_writer :hsx_round
@@ -256,6 +263,8 @@ module Decolmor
256
263
  cmyk_arr.size == 5 ? rgb + [cmyk_arr.last] : rgb
257
264
  end
258
265
 
266
+ private
267
+
259
268
  #========= helper methods for RGB to HSL/HSB/HSV =======================
260
269
 
261
270
  # find greatest and smallest channel values and chroma from RGB
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Decolmor
4
- VERSION = '1.1.1'
4
+ VERSION = '1.1.2'
5
5
  end
data/lib/decolmor.rb CHANGED
@@ -2,10 +2,4 @@ require 'decolmor/main'
2
2
  require 'decolmor/version'
3
3
 
4
4
  module Decolmor
5
- #========= Set default rounding for HSL/HSV/HSB/CMYK conversion ========
6
-
7
- # round 1 enough for lossless conversion RGB -> HSL/HSV/HSB -> RGB
8
- # for lossless conversion HSL <==> HSV (HSB) better to use round 2
9
- #
10
- HSX_ROUND = 1
11
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decolmor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChildrenofkoRn