color_hash 1.0.0 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0492acdb34c326758582df5926c316d5610cfd5a16dc52902f550610866849cf'
4
- data.tar.gz: 003edf282db34a6849d14baf805347d9a42dfd964ddddd56c79c06481ac46893
3
+ metadata.gz: 991fcc092d86bb579bee621cd5ba535c57ad27e8354776b795a41b7f0a83e375
4
+ data.tar.gz: c02de322dcaad3e352da21f25cc5a255a3e86f8d3645341b793124a33838b03d
5
5
  SHA512:
6
- metadata.gz: c73c3b8c22e7e5bdf5ad7847e408f4daa334cec0c8422a0f92a556ac0320e6353a3013cce7cee68816ddb241cc4864407159f3ced02839bf46d592510770de15
7
- data.tar.gz: a28eb8a2e47f5d98a5221740f154bc768557e52738481945e6c623e4f60e18c712c7b3becbb0fcb54cc43db6b616ce9cd19395eb204fbd05dd49df9106c51169
6
+ metadata.gz: 251b9fa0a2cb9665d2b8d6f6dc4db0dbb1fa6f981a9344963e436981bd64b254a062bd488743db863d769aa527110c542cf06a68df1a2f6f58a1dfdbd369afdd
7
+ data.tar.gz: 9d73895360159af4fc9a3747b6e0d0c6380888489bf84be5f84c0bf86662461619e6f427ecf40022c1191d4f2f0d2c1584877944aa3d42dc4b07e1643ab7d953
data/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
- ## [Unreleased]
1
+ ## [1.0.2] - 2026-11-05
2
+
3
+ - Add the MIT license
4
+ - Fix the gem's `source_code_uri` metadata
5
+ - `make test` now runs the Trivy and bundle-audit scans, replacing `make security`
6
+ - Trivy now fails on MEDIUM findings and above, and reports anything lower
7
+ - `make release` is now the only release path: it checks for a clean, pushed, untagged commit, and tags the version after publishing. `rake release` is gone
8
+
9
+ ## [1.0.1] - 2026-11-04
10
+
11
+ - Fix `NameError` when using the `:sha256` hash option
12
+ - Replace RSpec with Minitest
13
+ - Ship only `lib`, `sig`, the README and the CHANGELOG in the published gem
14
+ - Replace `make deploy` with `make release`, which runs the tests and security scans first
15
+ - Add `make security` (Trivy and bundle-audit) and `make test-rubies` targets
16
+ - Add `.ruby-version` and `trivy.yaml`
17
+ - Update dependencies
2
18
 
3
19
  ## [1.0.0] - 2026-07-15
4
20
 
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 KUY.io Inc.
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.
data/README.md CHANGED
@@ -34,9 +34,9 @@ rgb = color_hash.rgb("Hello World!")
34
34
  The resulting values are going to be:
35
35
 
36
36
  ```ruby
37
- hex = "#d2797c"
38
- hsl = [358, 0.5, 0.65]
39
- rgb = [210, 121, 124]
37
+ hex = "#79d2b3"
38
+ hsl = [159, 0.5, 0.65]
39
+ rgb = [121, 210, 179]
40
40
  ```
41
41
 
42
42
  You can customize the desired `hue` range(s), `saturation` and `lightness` values by passing the corresponding arguments to the constructor. For example, to generate colors in the blue spectrum:
@@ -54,9 +54,11 @@ color = "#79acd2"
54
54
 
55
55
  ## Development
56
56
 
57
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
57
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `make test` to run the linter and the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
58
58
 
59
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
59
+ `make test` also scans for vulnerabilities. It requires [Trivy](https://trivy.dev) to be installed, and network access to update the advisory databases.
60
+
61
+ To install this gem onto your local machine, run `make build`, then `gem install` the `.gem` file it creates. To release a new version, update the version number in `version.rb` and the `CHANGELOG.md`, commit and push them, then run `make release`. It runs the tests, builds the gem, pushes it to [rubygems.org](https://rubygems.org), then tags the version and pushes the tag.
60
62
 
61
63
  ## Contributing
62
64
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "digest"
4
+
3
5
  module ColorHash
4
6
  # A ColorHash::Generator can be used to calculate the color value for a given String.
5
7
  # You can specify the desired hue, lightness and saturation (HSL) ranges
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ColorHash
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: color_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Bettenburg
8
- bindir: exe
8
+ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
@@ -16,25 +16,21 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
- - ".rspec"
20
- - ".rubocop.yml"
21
19
  - CHANGELOG.md
22
- - Gemfile
23
- - Gemfile.lock
24
- - Makefile
20
+ - LICENSE
25
21
  - README.md
26
- - Rakefile
27
22
  - lib/color_hash.rb
28
23
  - lib/color_hash/generator.rb
29
24
  - lib/color_hash/version.rb
30
25
  - sig/color_hash.rbs
31
26
  homepage: https://github.com/kuyio/color_hash
32
- licenses: []
27
+ licenses:
28
+ - MIT
33
29
  metadata:
34
30
  allowed_push_host: https://rubygems.org
35
31
  homepage_uri: https://github.com/kuyio/color_hash
36
- source_code_uri: https://github.com/kuyio/color_hash
37
- changelog_uri: https://github.com/kuyio/color_hash/CHANGELOG.md
32
+ source_code_uri: https://github.com/kuyio/color_hash/tree/main
33
+ changelog_uri: https://github.com/kuyio/color_hash/blob/main/CHANGELOG.md
38
34
  rubygems_mfa_required: 'true'
39
35
  rdoc_options: []
40
36
  require_paths:
@@ -43,14 +39,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
39
  requirements:
44
40
  - - ">="
45
41
  - !ruby/object:Gem::Version
46
- version: 3.4.0
42
+ version: '3.4'
47
43
  required_rubygems_version: !ruby/object:Gem::Requirement
48
44
  requirements:
49
45
  - - ">="
50
46
  - !ruby/object:Gem::Version
51
47
  version: '0'
52
48
  requirements: []
53
- rubygems_version: 4.0.6
49
+ rubygems_version: 4.0.23
54
50
  specification_version: 4
55
51
  summary: Generate a color based on the given string.
56
52
  test_files: []
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,4 +0,0 @@
1
- inherit_gem: { kuyio-rubocop: rubocop-default.yml }
2
- inherit_mode:
3
- merge:
4
- - Exclude
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in color_hash.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "rspec", "~> 3.0"
11
-
12
- gem "kuyio-rubocop", github: "kuyio/kuyio-rubocop"
data/Gemfile.lock DELETED
@@ -1,129 +0,0 @@
1
- GIT
2
- remote: https://github.com/kuyio/kuyio-rubocop.git
3
- revision: f7774235c8fddd1855cda03ea0415b5dad005621
4
- specs:
5
- kuyio-rubocop (0.4.1)
6
- rubocop (~> 1.85.0)
7
- rubocop-performance (~> 1.26.0)
8
- rubocop-rails (~> 2.34.0)
9
- rubocop-rspec (~> 3.9.0)
10
-
11
- PATH
12
- remote: .
13
- specs:
14
- color_hash (0.1.0)
15
-
16
- GEM
17
- remote: https://rubygems.org/
18
- specs:
19
- activesupport (8.1.3)
20
- base64
21
- bigdecimal
22
- concurrent-ruby (~> 1.0, >= 1.3.1)
23
- connection_pool (>= 2.2.5)
24
- drb
25
- i18n (>= 1.6, < 2)
26
- json
27
- logger (>= 1.4.2)
28
- minitest (>= 5.1)
29
- securerandom (>= 0.3)
30
- tzinfo (~> 2.0, >= 2.0.5)
31
- uri (>= 0.13.1)
32
- ast (2.4.3)
33
- base64 (0.3.0)
34
- bigdecimal (4.1.2)
35
- concurrent-ruby (1.3.7)
36
- connection_pool (3.0.2)
37
- diff-lcs (1.6.2)
38
- drb (2.2.3)
39
- hana (1.3.7)
40
- i18n (1.15.2)
41
- concurrent-ruby (~> 1.0)
42
- json (2.21.1)
43
- json_schemer (2.5.0)
44
- bigdecimal
45
- hana (~> 1.3)
46
- regexp_parser (~> 2.0)
47
- simpleidn (~> 0.2)
48
- language_server-protocol (3.17.0.6)
49
- lint_roller (1.1.0)
50
- logger (1.7.0)
51
- mcp (0.24.0)
52
- json_schemer (>= 2.4)
53
- minitest (6.0.6)
54
- drb (~> 2.0)
55
- prism (~> 1.5)
56
- parallel (1.28.0)
57
- parser (3.3.11.1)
58
- ast (~> 2.4.1)
59
- racc
60
- prism (1.9.0)
61
- racc (1.8.1)
62
- rack (3.2.6)
63
- rainbow (3.1.1)
64
- rake (13.4.2)
65
- regexp_parser (2.12.0)
66
- rspec (3.13.2)
67
- rspec-core (~> 3.13.0)
68
- rspec-expectations (~> 3.13.0)
69
- rspec-mocks (~> 3.13.0)
70
- rspec-core (3.13.6)
71
- rspec-support (~> 3.13.0)
72
- rspec-expectations (3.13.5)
73
- diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.13.0)
75
- rspec-mocks (3.13.8)
76
- diff-lcs (>= 1.2.0, < 2.0)
77
- rspec-support (~> 3.13.0)
78
- rspec-support (3.13.7)
79
- rubocop (1.85.1)
80
- json (~> 2.3)
81
- language_server-protocol (~> 3.17.0.2)
82
- lint_roller (~> 1.1.0)
83
- mcp (~> 0.6)
84
- parallel (~> 1.10)
85
- parser (>= 3.3.0.2)
86
- rainbow (>= 2.2.2, < 4.0)
87
- regexp_parser (>= 2.9.3, < 3.0)
88
- rubocop-ast (>= 1.49.0, < 2.0)
89
- ruby-progressbar (~> 1.7)
90
- unicode-display_width (>= 2.4.0, < 4.0)
91
- rubocop-ast (1.50.0)
92
- parser (>= 3.3.7.2)
93
- prism (~> 1.7)
94
- rubocop-performance (1.26.1)
95
- lint_roller (~> 1.1)
96
- rubocop (>= 1.75.0, < 2.0)
97
- rubocop-ast (>= 1.47.1, < 2.0)
98
- rubocop-rails (2.34.3)
99
- activesupport (>= 4.2.0)
100
- lint_roller (~> 1.1)
101
- rack (>= 1.1)
102
- rubocop (>= 1.75.0, < 2.0)
103
- rubocop-ast (>= 1.44.0, < 2.0)
104
- rubocop-rspec (3.9.0)
105
- lint_roller (~> 1.1)
106
- rubocop (~> 1.81)
107
- ruby-progressbar (1.13.0)
108
- securerandom (0.4.1)
109
- simpleidn (0.2.3)
110
- tzinfo (2.0.6)
111
- concurrent-ruby (~> 1.0)
112
- unicode-display_width (3.2.0)
113
- unicode-emoji (~> 4.1)
114
- unicode-emoji (4.2.0)
115
- uri (1.1.1)
116
-
117
- PLATFORMS
118
- arm64-darwin-21
119
- arm64-darwin-24
120
- x86_64-linux
121
-
122
- DEPENDENCIES
123
- color_hash!
124
- kuyio-rubocop!
125
- rake (~> 13.0)
126
- rspec (~> 3.0)
127
-
128
- BUNDLED WITH
129
- 4.0.6
data/Makefile DELETED
@@ -1,21 +0,0 @@
1
- .PHONY: build test clean deploy lint rubocop spec
2
-
3
- build: clean
4
- gem build color_hash.gemspec
5
-
6
- test: lint spec
7
-
8
- lint: rubocop
9
-
10
- rubocop:
11
- bundle exec rubocop
12
-
13
- spec:
14
- bundle exec rspec
15
-
16
- clean:
17
- rm -f color_hash-*.gem
18
- rm -rf pkg
19
-
20
- deploy: build
21
- gem push color_hash-*.gem
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[spec rubocop]