paint 2.1.1 → 2.2.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: 1bb231495a29211b0176150f329d87ac77db1d974828e8243af1477f434d2280
4
- data.tar.gz: fc8a2e350c0416e3900086006c2af736cb28ebc258a91cf1a5b908b717da0b94
3
+ metadata.gz: b19418972079839bcc3e55e11a4b3ab4798a3204d5464a5320561abc71d59473
4
+ data.tar.gz: 78b8850244aa21f9216c7619d2116d2b90777d5a197b46b4651fb7dcfc073726
5
5
  SHA512:
6
- metadata.gz: fc96a662c775f6a0f73138a56d30bfaa3c918b6c283b48957dc188230175ab93847365995d5844eb33d6f29675bda3a0ffd4f84dc09442833d6d78bda100f0ca
7
- data.tar.gz: 01c0e588f1e753185fcd3d73fa38787002ddefcf072a6d68273a061ec3e17b42f7a174eb4d7352994466cf4d8691bbec3f43ca0c9770aa335cf7c7a9a2c96053
6
+ metadata.gz: 305dd27df908223ad9d254f8d61529be6d3736d2b3f8ab7c363e6808c5e2601c374b7b4b6e67d09c5524583c1175bb9b458cafe6ffde9dd5d4304bb34a68c25d
7
+ data.tar.gz: 91c2a0f4d983da15e7e76fec94ecd6d48d86595cf3b4f3569f3de97b27ae89efce561e9be1757dba4849e1d43e9a1c874b734097679e459d740568177f9ddb13
@@ -2,22 +2,24 @@ sudo: false
2
2
  language: ruby
3
3
 
4
4
  rvm:
5
- - 2.6.0
6
- - 2.5.3
7
- - 2.4.5
8
- - 2.3.8
5
+ - 2.7
6
+ - 2.6
7
+ - 2.5
8
+ - 2.4
9
+ - 2.3
9
10
  - 2.2
10
11
  - 2.1
11
12
  - 2.0
12
13
  - 1.9.3
13
14
  - ruby-head
14
15
  - jruby-head
15
- - jruby-9.2.5.0
16
+ - jruby-9.2.9.0
16
17
  - truffleruby
17
18
 
18
19
  matrix:
19
20
  allow_failures:
20
21
  - rvm: jruby-head
22
+ - rvm: 2.3
21
23
  - rvm: 2.2
22
24
  - rvm: 2.1
23
25
  - rvm: 2.0
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### 2.2.0
4
+
5
+ * Support NO_COLOR environment variable, implements #26 (see no-color.org)
6
+
3
7
  ### 2.1.1
4
8
 
5
9
  * Blacklist True Color support for urxvt, fixes #25
@@ -1,6 +1,6 @@
1
1
  The MIT LICENSE
2
2
 
3
- Copyright (c) 2011-2018 Jan Lelis
3
+ Copyright (c) 2011-2020 Jan Lelis
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -6,7 +6,7 @@ Paint creates terminal colors and effects for you. It combines the strengths of
6
6
 
7
7
  * No string extensions (suitable for library development)
8
8
  * Simple API
9
- * Faster than other terminal color gems ([as of December 2018](https://gist.github.com/janlelis/91413b9295c81ee873dc))
9
+ * Faster than other terminal color gems ([as of January 2020](https://gist.github.com/janlelis/91413b9295c81ee873dc))
10
10
  * Supports *true color* or 256 colors (for capable terminals)
11
11
  * Allows you to set any terminal effects
12
12
  * `Paint.mode`: Fall-back modes for terminals with less colors, supported modes:
@@ -25,11 +25,11 @@ Starting with **Paint 2.0**, *true color* mode is the new default mode, since mo
25
25
 
26
26
  ## Supported Rubies
27
27
 
28
- * **2.6**, **2.5**, **2.4**, **2.3**
28
+ * **2.7**, **2.6**, **2.5**, **2.4**
29
29
 
30
30
  Unsupported, but might still work:
31
31
 
32
- * **2.2**, **2.1**, **2.0**, **1.9**
32
+ * **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
33
33
 
34
34
  ## Setup
35
35
 
@@ -95,6 +95,8 @@ Paint tries to automatically detect the proper value your terminal is capable of
95
95
 
96
96
  ## More Details About Terminal Colors and Effects
97
97
 
98
+ <img src="https://pbs.twimg.com/media/ENyLvgVXUAgeDTn.jpg" />
99
+
98
100
  Terminal colors/effects get created by [ANSI escape sequences](https://en.wikipedia.org/wiki/ANSI_escape_code). These are strings that look like this: `\e[X;X;X;X;X]m` where X are integers with some meaning. For example, `0` means *reset*, `31` means *red foreground* and `41` stands for red background. When you tell **Paint** to use one of the eight ANSI base colors as foreground color, it just inserts a number between `30` and `37` into the sequence. The following colors are available:
99
101
 
100
102
  * `:black`
@@ -188,7 +190,7 @@ There is an extension gem available which allows you to define custom color defi
188
190
 
189
191
  ## J-_-L
190
192
 
191
- Copyright (c) 2011-2018 Jan Lelis <https://janlelis.com>, released under the
193
+ Copyright (c) 2011-2020 Jan Lelis <https://janlelis.com>, released under the
192
194
  MIT license.
193
195
 
194
196
  Thank you to [rainbow](https://github.com/sickill/rainbow) and [term-ansicolor](https://github.com/flori/term-ansicolor) for ideas and inspiration. Also, a lot of thanks to all the [contributors](https://github.com/janlelis/paint/contributors)!
data/Rakefile CHANGED
@@ -35,7 +35,7 @@ desc "Install the gem locally"
35
35
  task :install => :gems do
36
36
  gemspecs.each{ |gemspec|
37
37
  spec = gemspec_spec_for(gemspec)
38
- sh %{gem install pkg/#{spec.name}-#{spec.version}.gem --no-rdoc --no-ri}
38
+ sh %{gem install pkg/#{spec.name}-#{spec.version}.gem --no-doc}
39
39
  }
40
40
  end
41
41
 
@@ -172,7 +172,9 @@ module Paint
172
172
  # Determine supported colors
173
173
  # Note: there's no reliable test for 24-bit color support
174
174
  def detect_mode
175
- if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ # windows
175
+ if ENV['NO_COLOR'] # see https://no-color.org/
176
+ 0
177
+ elsif RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ # windows
176
178
  if ENV['ANSICON']
177
179
  16
178
180
  elsif ENV['ConEmuANSI'] == 'ON'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paint
4
- VERSION = "2.1.1"
4
+ VERSION = "2.2.0"
5
5
  end
@@ -6,10 +6,10 @@ Gem::Specification.new do |s|
6
6
  s.name = "paint"
7
7
  s.version = Paint::VERSION
8
8
  s.authors = ["Jan Lelis"]
9
- s.email = "mail@janlelis.de"
9
+ s.email = ["hi@ruby.consulting"]
10
10
  s.homepage = "https://github.com/janlelis/paint"
11
11
  s.summary = "Terminal painter!"
12
- s.description = "Terminal painter: No string extensions / RGB and 256 color support / effect support. Usage: Paint['string', :red, :bright]"
12
+ s.description = "Terminal painter with RGB and 256 (fallback) color and terminal effects support. No string extensions! Usage: Paint['string', :red, :bright]"
13
13
  s.license = 'MIT'
14
14
 
15
15
  s.files = %w[
@@ -36,8 +36,8 @@ Gem::Specification.new do |s|
36
36
  s.add_development_dependency 'rake', '~> 12.3'
37
37
  s.add_development_dependency 'benchmark-ips', '~> 2.7'
38
38
  s.add_development_dependency 'rainbow', '~> 3.0'
39
- s.add_development_dependency 'term-ansicolor', '~> 1.4'
39
+ s.add_development_dependency 'term-ansicolor', '~> 1.7'
40
40
  s.add_development_dependency 'ansi', '~> 1.5'
41
41
  s.add_development_dependency 'hansi', '~> 0.2'
42
- s.add_development_dependency 'pastel', '~> 0.6'
42
+ s.add_development_dependency 'pastel', '~> 0.7'
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paint
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.4'
75
+ version: '1.7'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.4'
82
+ version: '1.7'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: ansi
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -114,17 +114,18 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.6'
117
+ version: '0.7'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.6'
125
- description: 'Terminal painter: No string extensions / RGB and 256 color support /
126
- effect support. Usage: Paint[''string'', :red, :bright]'
127
- email: mail@janlelis.de
124
+ version: '0.7'
125
+ description: 'Terminal painter with RGB and 256 (fallback) color and terminal effects
126
+ support. No string extensions! Usage: Paint[''string'', :red, :bright]'
127
+ email:
128
+ - hi@ruby.consulting
128
129
  executables: []
129
130
  extensions: []
130
131
  extra_rdoc_files:
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  - !ruby/object:Gem::Version
166
167
  version: '0'
167
168
  requirements: []
168
- rubygems_version: 3.0.3
169
+ rubygems_version: 3.0.6
169
170
  signing_key:
170
171
  specification_version: 4
171
172
  summary: Terminal painter!