skittlize 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/Rakefile +8 -0
- data/lib/skittlize.rb +5 -2
- data/lib/skittlize/version.rb +1 -1
- data/skittlize.gemspec +2 -1
- metadata +23 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e72f8f154da84b12bf2e24cb111f1be912257e2095cf5776b6513f2270a02827
|
4
|
+
data.tar.gz: 65147f1a676edafd5051a62569909cc6d2472f1368042dbc83178fe2a885372a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16a29a1731024b33f57ba4b2656630dbe2e35704686cda32d23a7aae893e46a70e5b93f351ffc2d184bd576a69d00b82488039e7662e5bee45a2f8b4363da924
|
7
|
+
data.tar.gz: 1bfa3f208d1afc66017894cdfe2b3ed2b0ea68661a63b6f3d35959cd967d5b7eb26f691e1342b8e7c99716a59473200f29d442de35a17144b63b562ac78d515f
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [1.1.0](https://github.com/smortex/skittlize/tree/1.1.0) (2021-01-03)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/smortex/skittlize/compare/v1.0.0...1.1.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Add support for \#skittle\_color [\#1](https://github.com/smortex/skittlize/pull/1) ([smortex](https://github.com/smortex))
|
10
|
+
|
11
|
+
## [v1.0.0](https://github.com/smortex/skittlize/tree/v1.0.0) (2019-12-10)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/smortex/skittlize/compare/c6e6d4cb7e5be38e2a47c454b37a1af666342976...v1.0.0)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.com/smortex/skittlize.svg?branch=master)](https://travis-ci.com/smortex/skittlize)
|
4
4
|
|
5
|
-
Humans are bad at spotting differences in similar text strings. Help them with colors! Each
|
5
|
+
Humans are bad at spotting differences in similar text strings. Help them with colors! Each skittlized String is colored base on the content of the text itself, making it easier to spot recurring words in a bunch of data. This is particullary useful when processing reports formatted as tables in text.
|
6
6
|
|
7
7
|
![RAW data without color](raw.png) ![Skittlized data](skittlized.png)
|
8
8
|
|
data/Rakefile
CHANGED
@@ -3,4 +3,12 @@ require 'rspec/core/rake_task'
|
|
3
3
|
|
4
4
|
RSpec::Core::RakeTask.new(:spec)
|
5
5
|
|
6
|
+
require 'github_changelog_generator/task'
|
7
|
+
|
8
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
9
|
+
config.user = 'smortex'
|
10
|
+
config.project = 'skittlize'
|
11
|
+
config.future_release = Skittlize::VERSION
|
12
|
+
end
|
13
|
+
|
6
14
|
task default: :spec
|
data/lib/skittlize.rb
CHANGED
@@ -20,12 +20,15 @@ class Array
|
|
20
20
|
end
|
21
21
|
|
22
22
|
class String
|
23
|
-
def
|
23
|
+
def skittle_color
|
24
24
|
n = Integer(Digest::MD5.hexdigest("#{self}\n")[-2..-1], 16)
|
25
25
|
n %= 231
|
26
26
|
n += 17 if [0, 15, 16].include?(n)
|
27
|
+
n
|
28
|
+
end
|
27
29
|
|
28
|
-
|
30
|
+
def skittlize
|
31
|
+
"\033[38;5;#{skittle_color}m#{self}\033[0m"
|
29
32
|
end
|
30
33
|
|
31
34
|
def skittlize!
|
data/lib/skittlize/version.rb
CHANGED
data/skittlize.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Romain Tartière']
|
9
9
|
spec.email = ['romain@blogreen.org']
|
10
10
|
|
11
|
-
spec.summary = 'A library for coloring .'
|
11
|
+
spec.summary = 'A library for coloring strings.'
|
12
12
|
spec.homepage = 'https://github.com/smortex/skittlize'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
32
32
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
|
+
spec.add_development_dependency 'github_changelog_generator'
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skittlize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Tartière
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,21 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: github_changelog_generator
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
56
70
|
email:
|
57
71
|
- romain@blogreen.org
|
58
72
|
executables: []
|
@@ -62,6 +76,7 @@ files:
|
|
62
76
|
- ".gitignore"
|
63
77
|
- ".rspec"
|
64
78
|
- ".travis.yml"
|
79
|
+
- CHANGELOG.md
|
65
80
|
- CODE_OF_CONDUCT.md
|
66
81
|
- Gemfile
|
67
82
|
- LICENSE.txt
|
@@ -82,7 +97,7 @@ metadata:
|
|
82
97
|
homepage_uri: https://github.com/smortex/skittlize
|
83
98
|
source_code_uri: https://github.com/smortex/skittlize
|
84
99
|
changelog_uri: https://github.com/smortex/skittlize
|
85
|
-
post_install_message:
|
100
|
+
post_install_message:
|
86
101
|
rdoc_options: []
|
87
102
|
require_paths:
|
88
103
|
- lib
|
@@ -97,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
112
|
- !ruby/object:Gem::Version
|
98
113
|
version: '0'
|
99
114
|
requirements: []
|
100
|
-
rubygems_version: 3.0.
|
101
|
-
signing_key:
|
115
|
+
rubygems_version: 3.0.8
|
116
|
+
signing_key:
|
102
117
|
specification_version: 4
|
103
|
-
summary: A library for coloring .
|
118
|
+
summary: A library for coloring strings.
|
104
119
|
test_files: []
|