pastel 0.6.1 → 0.8.0
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 +5 -5
- data/CHANGELOG.md +66 -12
- data/README.md +38 -29
- data/lib/pastel/alias_importer.rb +9 -7
- data/lib/pastel/ansi.rb +2 -2
- data/lib/pastel/color.rb +64 -24
- data/lib/pastel/color_parser.rb +24 -18
- data/lib/pastel/color_resolver.rb +3 -1
- data/lib/pastel/decorator_chain.rb +52 -8
- data/lib/pastel/delegator.rb +57 -26
- data/lib/pastel/detached.rb +41 -5
- data/lib/pastel/version.rb +2 -2
- data/lib/pastel.rb +17 -19
- metadata +35 -104
- data/.gitignore +0 -22
- data/.rspec +0 -3
- data/.travis.yml +0 -25
- data/Gemfile +0 -15
- data/Rakefile +0 -8
- data/assets/pastel_logo.png +0 -0
- data/assets/screenshot.png +0 -0
- data/benchmarks/nesting_speed.rb +0 -41
- data/benchmarks/speed.rb +0 -45
- data/examples/palette.rb +0 -14
- data/pastel.gemspec +0 -26
- data/spec/spec_helper.rb +0 -45
- data/spec/unit/alias_color_spec.rb +0 -24
- data/spec/unit/alias_importer_spec.rb +0 -29
- data/spec/unit/color/alias_color_spec.rb +0 -40
- data/spec/unit/color/code_spec.rb +0 -24
- data/spec/unit/color/colored_spec.rb +0 -15
- data/spec/unit/color/decorate_spec.rb +0 -79
- data/spec/unit/color/equal_spec.rb +0 -22
- data/spec/unit/color/lookup_spec.rb +0 -17
- data/spec/unit/color/new_spec.rb +0 -10
- data/spec/unit/color/strip_spec.rb +0 -56
- data/spec/unit/color/styles_spec.rb +0 -10
- data/spec/unit/color/valid_spec.rb +0 -19
- data/spec/unit/color_parser_spec.rb +0 -67
- data/spec/unit/decorate_dsl_spec.rb +0 -94
- data/spec/unit/decorator_chain_spec.rb +0 -47
- data/spec/unit/delegator_spec.rb +0 -38
- data/spec/unit/detach_spec.rb +0 -48
- data/spec/unit/new_spec.rb +0 -52
- data/spec/unit/respond_to_spec.rb +0 -17
- data/spec/unit/undecorate_spec.rb +0 -12
- data/tasks/console.rake +0 -10
- data/tasks/coverage.rake +0 -11
- data/tasks/spec.rake +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Pastel
|
|
4
4
|
# Collects a list of decorators for styling a string
|
|
@@ -6,17 +6,34 @@ module Pastel
|
|
|
6
6
|
# @api private
|
|
7
7
|
class DecoratorChain
|
|
8
8
|
include Enumerable
|
|
9
|
-
include Equatable
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
# Create an empty decorator chain
|
|
11
|
+
#
|
|
12
|
+
# @return [DecoratorChain]
|
|
13
|
+
#
|
|
14
|
+
# @api public
|
|
15
|
+
def self.empty
|
|
16
|
+
@empty ||= self.new
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Create a decorator chain
|
|
20
|
+
#
|
|
21
|
+
# @api public
|
|
22
|
+
def initialize(decorators = [].freeze)
|
|
12
23
|
@decorators = decorators
|
|
13
24
|
end
|
|
14
25
|
|
|
15
26
|
# Add decorator
|
|
16
27
|
#
|
|
28
|
+
# @param [String] decorator
|
|
29
|
+
#
|
|
17
30
|
# @api public
|
|
18
31
|
def add(decorator)
|
|
19
|
-
|
|
32
|
+
if decorators.include?(decorator)
|
|
33
|
+
self.class.new(decorators)
|
|
34
|
+
else
|
|
35
|
+
self.class.new(decorators + [decorator])
|
|
36
|
+
end
|
|
20
37
|
end
|
|
21
38
|
|
|
22
39
|
# Iterate over list of decorators
|
|
@@ -26,13 +43,40 @@ module Pastel
|
|
|
26
43
|
decorators.each(&block)
|
|
27
44
|
end
|
|
28
45
|
|
|
29
|
-
#
|
|
46
|
+
# Compare colors for equality of attributes
|
|
30
47
|
#
|
|
31
|
-
# @return [
|
|
48
|
+
# @return [Boolean]
|
|
32
49
|
#
|
|
33
50
|
# @api public
|
|
34
|
-
def
|
|
35
|
-
|
|
51
|
+
def eql?(other)
|
|
52
|
+
instance_of?(other.class) && decorators.eql?(other.decorators)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Compare colors for equivalence of attributes
|
|
56
|
+
#
|
|
57
|
+
# @return [Boolean]
|
|
58
|
+
#
|
|
59
|
+
# @api public
|
|
60
|
+
def ==(other)
|
|
61
|
+
other.is_a?(self.class) && decorators == other.decorators
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Inspect this instance attributes
|
|
65
|
+
#
|
|
66
|
+
# @return [String]
|
|
67
|
+
#
|
|
68
|
+
# @api public
|
|
69
|
+
def inspect
|
|
70
|
+
"#<#{self.class.name} decorators=#{decorators.inspect}>"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Hash for this instance and its attributes
|
|
74
|
+
#
|
|
75
|
+
# @return [Numeric]
|
|
76
|
+
#
|
|
77
|
+
# @api public
|
|
78
|
+
def hash
|
|
79
|
+
[self.class, decorators].hash
|
|
36
80
|
end
|
|
37
81
|
|
|
38
82
|
protected
|
data/lib/pastel/delegator.rb
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "forwardable"
|
|
4
|
+
|
|
5
|
+
require_relative "color_parser"
|
|
6
|
+
require_relative "decorator_chain"
|
|
2
7
|
|
|
3
8
|
module Pastel
|
|
4
9
|
# Wrapes the {DecoratorChain} to allow for easy resolution
|
|
@@ -7,13 +12,19 @@ module Pastel
|
|
|
7
12
|
# @api private
|
|
8
13
|
class Delegator
|
|
9
14
|
extend Forwardable
|
|
10
|
-
include Equatable
|
|
11
15
|
|
|
12
|
-
def_delegators
|
|
16
|
+
def_delegators "@resolver.color", :valid?, :styles, :strip, :decorate,
|
|
13
17
|
:enabled?, :colored?, :alias_color, :lookup
|
|
14
18
|
|
|
15
19
|
def_delegators ColorParser, :parse
|
|
16
|
-
|
|
20
|
+
alias undecorate parse
|
|
21
|
+
|
|
22
|
+
# Wrap resolver and chain
|
|
23
|
+
#
|
|
24
|
+
# @api public
|
|
25
|
+
def self.wrap(resolver, chain = DecoratorChain.empty)
|
|
26
|
+
new(resolver, chain)
|
|
27
|
+
end
|
|
17
28
|
|
|
18
29
|
# Create Delegator
|
|
19
30
|
#
|
|
@@ -21,20 +32,31 @@ module Pastel
|
|
|
21
32
|
#
|
|
22
33
|
# @param [ColorResolver] resolver
|
|
23
34
|
#
|
|
24
|
-
# @param [DecoratorChain]
|
|
35
|
+
# @param [DecoratorChain] chain
|
|
25
36
|
#
|
|
26
37
|
# @api private
|
|
27
|
-
def initialize(resolver,
|
|
38
|
+
def initialize(resolver, chain)
|
|
28
39
|
@resolver = resolver
|
|
29
|
-
@
|
|
40
|
+
@chain = chain
|
|
30
41
|
end
|
|
31
42
|
|
|
43
|
+
# Compare delegated objects for equality of attributes
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean]
|
|
46
|
+
#
|
|
32
47
|
# @api public
|
|
33
|
-
def
|
|
34
|
-
|
|
48
|
+
def eql?(other)
|
|
49
|
+
instance_of?(other.class) && chain.eql?(other.chain)
|
|
35
50
|
end
|
|
36
51
|
|
|
37
|
-
|
|
52
|
+
# Compare delegated objects for equivalence of attributes
|
|
53
|
+
#
|
|
54
|
+
# @return [Boolean]
|
|
55
|
+
#
|
|
56
|
+
# @api public
|
|
57
|
+
def ==(other)
|
|
58
|
+
other.is_a?(self.class) && chain == other.chain
|
|
59
|
+
end
|
|
38
60
|
|
|
39
61
|
# Object string representation
|
|
40
62
|
#
|
|
@@ -42,44 +64,53 @@ module Pastel
|
|
|
42
64
|
#
|
|
43
65
|
# @api
|
|
44
66
|
def inspect
|
|
45
|
-
"#<Pastel
|
|
67
|
+
"#<Pastel styles=#{chain.map(&:to_s)}>"
|
|
68
|
+
end
|
|
69
|
+
alias to_s inspect
|
|
70
|
+
|
|
71
|
+
# Hash for this instance and its attributes
|
|
72
|
+
#
|
|
73
|
+
# @return [Numeric]
|
|
74
|
+
#
|
|
75
|
+
# @api public
|
|
76
|
+
def hash
|
|
77
|
+
[self.class, chain].hash
|
|
46
78
|
end
|
|
47
|
-
alias_method :to_s, :inspect
|
|
48
79
|
|
|
49
80
|
protected
|
|
50
81
|
|
|
51
|
-
attr_reader :
|
|
82
|
+
attr_reader :chain
|
|
52
83
|
|
|
53
84
|
attr_reader :resolver
|
|
54
85
|
|
|
55
|
-
#
|
|
86
|
+
# Handles color method calls
|
|
56
87
|
#
|
|
57
88
|
# @api private
|
|
58
|
-
def wrap(base)
|
|
59
|
-
self.class.new(resolver, base)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
89
|
def method_missing(method_name, *args, &block)
|
|
63
|
-
|
|
64
|
-
delegator = wrap(
|
|
65
|
-
if args.empty? &&
|
|
90
|
+
new_chain = chain.add(method_name)
|
|
91
|
+
delegator = self.class.wrap(resolver, new_chain)
|
|
92
|
+
if args.empty? && method_name.to_sym != :detach
|
|
66
93
|
delegator
|
|
67
94
|
else
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
resolver.resolve(
|
|
95
|
+
strings = args.dup
|
|
96
|
+
strings << evaluate_block(&block) if block_given?
|
|
97
|
+
resolver.resolve(new_chain, strings.join)
|
|
71
98
|
end
|
|
72
99
|
end
|
|
73
100
|
|
|
101
|
+
# Check if color is valid
|
|
102
|
+
#
|
|
103
|
+
# @api private
|
|
74
104
|
def respond_to_missing?(name, include_all = false)
|
|
75
|
-
resolver.color.respond_to?(name, include_all) ||
|
|
105
|
+
resolver.color.respond_to?(name, include_all) ||
|
|
106
|
+
resolver.color.valid?(name) || super
|
|
76
107
|
end
|
|
77
108
|
|
|
78
109
|
# Evaluate color block
|
|
79
110
|
#
|
|
80
111
|
# @api private
|
|
81
112
|
def evaluate_block(&block)
|
|
82
|
-
delegator = self.class.
|
|
113
|
+
delegator = self.class.wrap(resolver)
|
|
83
114
|
delegator.instance_eval(&block)
|
|
84
115
|
end
|
|
85
116
|
end # Delegator
|
data/lib/pastel/detached.rb
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Pastel
|
|
4
4
|
# A class representing detached color
|
|
5
5
|
class Detached
|
|
6
|
-
include Equatable
|
|
7
|
-
|
|
8
6
|
# Initialize a detached object
|
|
9
7
|
#
|
|
10
8
|
# @param [Pastel::Color] color
|
|
@@ -22,6 +20,8 @@ module Pastel
|
|
|
22
20
|
# Decorate the values corresponding to styles
|
|
23
21
|
#
|
|
24
22
|
# @example
|
|
23
|
+
# Detached(Color.new, :red, :bold).call("hello")
|
|
24
|
+
# # => "\e[31mhello\e[0m"
|
|
25
25
|
#
|
|
26
26
|
# @param [String] value
|
|
27
27
|
# the stirng to decorate with styles
|
|
@@ -33,14 +33,50 @@ module Pastel
|
|
|
33
33
|
value = args.join
|
|
34
34
|
@color.decorate(value, *styles)
|
|
35
35
|
end
|
|
36
|
-
|
|
36
|
+
alias [] call
|
|
37
37
|
|
|
38
38
|
# @api public
|
|
39
39
|
def to_proc
|
|
40
40
|
self
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
# Compare detached objects for equality of attributes
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean]
|
|
46
|
+
#
|
|
47
|
+
# @api public
|
|
48
|
+
def eql?(other)
|
|
49
|
+
instance_of?(other.class) && styles.eql?(other.styles)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Compare detached objects for equivalence of attributes
|
|
53
|
+
#
|
|
54
|
+
# @return [Boolean]
|
|
55
|
+
#
|
|
56
|
+
# @api public
|
|
57
|
+
def ==(other)
|
|
58
|
+
other.is_a?(self.class) && styles == other.styles
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Inspect this instance attributes
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
#
|
|
65
|
+
# @api public
|
|
66
|
+
def inspect
|
|
67
|
+
"#<#{self.class.name} styles=#{styles.inspect}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Hash for this instance and its attributes
|
|
71
|
+
#
|
|
72
|
+
# @return [Numeric]
|
|
73
|
+
#
|
|
74
|
+
# @api public
|
|
75
|
+
def hash
|
|
76
|
+
[self.class, styles].hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
protected
|
|
44
80
|
|
|
45
81
|
# @api private
|
|
46
82
|
attr_reader :styles
|
data/lib/pastel/version.rb
CHANGED
data/lib/pastel.rb
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require 'equatable'
|
|
5
|
-
require 'tty-color'
|
|
3
|
+
require "tty-color"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
require 'pastel/delegator'
|
|
13
|
-
require 'pastel/detached'
|
|
14
|
-
require 'pastel/decorator_chain'
|
|
15
|
-
require 'pastel/version'
|
|
5
|
+
require_relative "pastel/alias_importer"
|
|
6
|
+
require_relative "pastel/color"
|
|
7
|
+
require_relative "pastel/color_resolver"
|
|
8
|
+
require_relative "pastel/delegator"
|
|
9
|
+
require_relative "pastel/version"
|
|
16
10
|
|
|
17
11
|
module Pastel
|
|
18
12
|
# Raised when the style attribute is not supported
|
|
@@ -26,19 +20,23 @@ module Pastel
|
|
|
26
20
|
# @example
|
|
27
21
|
# pastel = Pastel.new enabled: true
|
|
28
22
|
#
|
|
23
|
+
# @param [Boolean] :enabled
|
|
24
|
+
# whether or not to disable coloring
|
|
25
|
+
# @param [Boolean] :eachline
|
|
26
|
+
# whether or not to wrap eachline with separate coloring
|
|
27
|
+
#
|
|
29
28
|
# @return [Delegator]
|
|
30
29
|
#
|
|
31
30
|
# @api public
|
|
32
|
-
def new(
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
def new(enabled: nil, eachline: false)
|
|
32
|
+
if enabled.nil?
|
|
33
|
+
enabled = (TTY::Color.windows? || TTY::Color.color?)
|
|
35
34
|
end
|
|
36
|
-
color = Color.new(
|
|
35
|
+
color = Color.new(enabled: enabled, eachline: eachline)
|
|
37
36
|
importer = AliasImporter.new(color, ENV)
|
|
38
37
|
importer.import
|
|
39
38
|
resolver = ColorResolver.new(color)
|
|
40
|
-
Delegator.
|
|
39
|
+
Delegator.wrap(resolver)
|
|
41
40
|
end
|
|
42
|
-
|
|
43
41
|
module_function :new
|
|
44
42
|
end # Pastel
|
metadata
CHANGED
|
@@ -1,97 +1,70 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pastel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Murach
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-07-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: equatable
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ~>
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.5.0
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ~>
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.5.0
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: tty-color
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
30
16
|
requirements:
|
|
31
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
32
18
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.
|
|
19
|
+
version: '0.5'
|
|
34
20
|
type: :runtime
|
|
35
21
|
prerelease: false
|
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
23
|
requirements:
|
|
38
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
39
25
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.
|
|
26
|
+
version: '0.5'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
28
|
+
name: rake
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
44
30
|
requirements:
|
|
45
|
-
- -
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.5.0
|
|
48
|
-
- - <
|
|
31
|
+
- - ">="
|
|
49
32
|
- !ruby/object:Gem::Version
|
|
50
|
-
version: '
|
|
33
|
+
version: '0'
|
|
51
34
|
type: :development
|
|
52
35
|
prerelease: false
|
|
53
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
54
37
|
requirements:
|
|
55
|
-
- -
|
|
56
|
-
- !ruby/object:Gem::Version
|
|
57
|
-
version: 1.5.0
|
|
58
|
-
- - <
|
|
38
|
+
- - ">="
|
|
59
39
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
40
|
+
version: '0'
|
|
61
41
|
- !ruby/object:Gem::Dependency
|
|
62
|
-
name:
|
|
42
|
+
name: rspec
|
|
63
43
|
requirement: !ruby/object:Gem::Requirement
|
|
64
44
|
requirements:
|
|
65
|
-
- -
|
|
45
|
+
- - ">="
|
|
66
46
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
47
|
+
version: '3.0'
|
|
68
48
|
type: :development
|
|
69
49
|
prerelease: false
|
|
70
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
51
|
requirements:
|
|
72
|
-
- -
|
|
52
|
+
- - ">="
|
|
73
53
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
54
|
+
version: '3.0'
|
|
75
55
|
description: Terminal strings styling with intuitive and clean API.
|
|
76
56
|
email:
|
|
77
|
-
-
|
|
57
|
+
- piotr@piotrmurach.com
|
|
78
58
|
executables: []
|
|
79
59
|
extensions: []
|
|
80
|
-
extra_rdoc_files:
|
|
60
|
+
extra_rdoc_files:
|
|
61
|
+
- README.md
|
|
62
|
+
- CHANGELOG.md
|
|
63
|
+
- LICENSE.txt
|
|
81
64
|
files:
|
|
82
|
-
- .gitignore
|
|
83
|
-
- .rspec
|
|
84
|
-
- .travis.yml
|
|
85
65
|
- CHANGELOG.md
|
|
86
|
-
- Gemfile
|
|
87
66
|
- LICENSE.txt
|
|
88
67
|
- README.md
|
|
89
|
-
- Rakefile
|
|
90
|
-
- assets/pastel_logo.png
|
|
91
|
-
- assets/screenshot.png
|
|
92
|
-
- benchmarks/nesting_speed.rb
|
|
93
|
-
- benchmarks/speed.rb
|
|
94
|
-
- examples/palette.rb
|
|
95
68
|
- lib/pastel.rb
|
|
96
69
|
- lib/pastel/alias_importer.rb
|
|
97
70
|
- lib/pastel/ansi.rb
|
|
@@ -102,75 +75,33 @@ files:
|
|
|
102
75
|
- lib/pastel/delegator.rb
|
|
103
76
|
- lib/pastel/detached.rb
|
|
104
77
|
- lib/pastel/version.rb
|
|
105
|
-
|
|
106
|
-
- spec/spec_helper.rb
|
|
107
|
-
- spec/unit/alias_color_spec.rb
|
|
108
|
-
- spec/unit/alias_importer_spec.rb
|
|
109
|
-
- spec/unit/color/alias_color_spec.rb
|
|
110
|
-
- spec/unit/color/code_spec.rb
|
|
111
|
-
- spec/unit/color/colored_spec.rb
|
|
112
|
-
- spec/unit/color/decorate_spec.rb
|
|
113
|
-
- spec/unit/color/equal_spec.rb
|
|
114
|
-
- spec/unit/color/lookup_spec.rb
|
|
115
|
-
- spec/unit/color/new_spec.rb
|
|
116
|
-
- spec/unit/color/strip_spec.rb
|
|
117
|
-
- spec/unit/color/styles_spec.rb
|
|
118
|
-
- spec/unit/color/valid_spec.rb
|
|
119
|
-
- spec/unit/color_parser_spec.rb
|
|
120
|
-
- spec/unit/decorate_dsl_spec.rb
|
|
121
|
-
- spec/unit/decorator_chain_spec.rb
|
|
122
|
-
- spec/unit/delegator_spec.rb
|
|
123
|
-
- spec/unit/detach_spec.rb
|
|
124
|
-
- spec/unit/new_spec.rb
|
|
125
|
-
- spec/unit/respond_to_spec.rb
|
|
126
|
-
- spec/unit/undecorate_spec.rb
|
|
127
|
-
- tasks/console.rake
|
|
128
|
-
- tasks/coverage.rake
|
|
129
|
-
- tasks/spec.rake
|
|
130
|
-
homepage: https://github.com/piotrmurach/pastel
|
|
78
|
+
homepage: https://ttytoolkit.org
|
|
131
79
|
licenses:
|
|
132
80
|
- MIT
|
|
133
|
-
metadata:
|
|
81
|
+
metadata:
|
|
82
|
+
allowed_push_host: https://rubygems.org
|
|
83
|
+
bug_tracker_uri: https://github.com/piotrmurach/pastel/issues
|
|
84
|
+
changelog_uri: https://github.com/piotrmurach/pastel/blob/master/CHANGELOG.md
|
|
85
|
+
documentation_uri: https://www.rubydoc.info/gems/pastel
|
|
86
|
+
homepage_uri: https://ttytoolkit.org
|
|
87
|
+
source_code_uri: https://github.com/piotrmurach/pastel
|
|
134
88
|
post_install_message:
|
|
135
89
|
rdoc_options: []
|
|
136
90
|
require_paths:
|
|
137
91
|
- lib
|
|
138
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
93
|
requirements:
|
|
140
|
-
- -
|
|
94
|
+
- - ">="
|
|
141
95
|
- !ruby/object:Gem::Version
|
|
142
|
-
version:
|
|
96
|
+
version: 2.0.0
|
|
143
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
98
|
requirements:
|
|
145
|
-
- -
|
|
99
|
+
- - ">="
|
|
146
100
|
- !ruby/object:Gem::Version
|
|
147
101
|
version: '0'
|
|
148
102
|
requirements: []
|
|
149
|
-
|
|
150
|
-
rubygems_version: 2.0.3
|
|
103
|
+
rubygems_version: 3.1.2
|
|
151
104
|
signing_key:
|
|
152
105
|
specification_version: 4
|
|
153
106
|
summary: Terminal strings styling with intuitive and clean API.
|
|
154
|
-
test_files:
|
|
155
|
-
- spec/spec_helper.rb
|
|
156
|
-
- spec/unit/alias_color_spec.rb
|
|
157
|
-
- spec/unit/alias_importer_spec.rb
|
|
158
|
-
- spec/unit/color/alias_color_spec.rb
|
|
159
|
-
- spec/unit/color/code_spec.rb
|
|
160
|
-
- spec/unit/color/colored_spec.rb
|
|
161
|
-
- spec/unit/color/decorate_spec.rb
|
|
162
|
-
- spec/unit/color/equal_spec.rb
|
|
163
|
-
- spec/unit/color/lookup_spec.rb
|
|
164
|
-
- spec/unit/color/new_spec.rb
|
|
165
|
-
- spec/unit/color/strip_spec.rb
|
|
166
|
-
- spec/unit/color/styles_spec.rb
|
|
167
|
-
- spec/unit/color/valid_spec.rb
|
|
168
|
-
- spec/unit/color_parser_spec.rb
|
|
169
|
-
- spec/unit/decorate_dsl_spec.rb
|
|
170
|
-
- spec/unit/decorator_chain_spec.rb
|
|
171
|
-
- spec/unit/delegator_spec.rb
|
|
172
|
-
- spec/unit/detach_spec.rb
|
|
173
|
-
- spec/unit/new_spec.rb
|
|
174
|
-
- spec/unit/respond_to_spec.rb
|
|
175
|
-
- spec/unit/undecorate_spec.rb
|
|
176
|
-
has_rdoc:
|
|
107
|
+
test_files: []
|
data/.gitignore
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
*.gem
|
|
2
|
-
*.rbc
|
|
3
|
-
.bundle
|
|
4
|
-
.config
|
|
5
|
-
.yardoc
|
|
6
|
-
Gemfile.lock
|
|
7
|
-
InstalledFiles
|
|
8
|
-
_yardoc
|
|
9
|
-
coverage
|
|
10
|
-
doc/
|
|
11
|
-
lib/bundler/man
|
|
12
|
-
pkg
|
|
13
|
-
rdoc
|
|
14
|
-
spec/reports
|
|
15
|
-
test/tmp
|
|
16
|
-
test/version_tmp
|
|
17
|
-
tmp
|
|
18
|
-
*.bundle
|
|
19
|
-
*.so
|
|
20
|
-
*.o
|
|
21
|
-
*.a
|
|
22
|
-
mkmf.log
|
data/.rspec
DELETED
data/.travis.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
language: ruby
|
|
3
|
-
sudo: false
|
|
4
|
-
cache: bundler
|
|
5
|
-
bundler_args: --without yard benchmarks
|
|
6
|
-
script: "bundle exec rake ci"
|
|
7
|
-
rvm:
|
|
8
|
-
- 1.9.3
|
|
9
|
-
- 2.0
|
|
10
|
-
- 2.1
|
|
11
|
-
- 2.2
|
|
12
|
-
- rbx-2
|
|
13
|
-
- jruby-19mode
|
|
14
|
-
- jruby
|
|
15
|
-
- jruby-head
|
|
16
|
-
- ruby-head
|
|
17
|
-
matrix:
|
|
18
|
-
allow_failures:
|
|
19
|
-
- rvm: ruby-head
|
|
20
|
-
- rvm: jruby-head
|
|
21
|
-
fast_finish: true
|
|
22
|
-
branches:
|
|
23
|
-
only: master
|
|
24
|
-
notifications:
|
|
25
|
-
email: false
|
data/Gemfile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
gemspec
|
|
4
|
-
|
|
5
|
-
group :development do
|
|
6
|
-
gem 'rspec', '~> 3.4.0'
|
|
7
|
-
gem 'yard', '~> 0.8.7'
|
|
8
|
-
gem 'benchmark-ips', '~> 2.0.0'
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
group :metrics do
|
|
12
|
-
gem 'coveralls', '~> 0.8.9'
|
|
13
|
-
gem 'simplecov', '~> 0.10.0'
|
|
14
|
-
gem 'yardstick', '~> 0.9.9'
|
|
15
|
-
end
|
data/Rakefile
DELETED
data/assets/pastel_logo.png
DELETED
|
Binary file
|
data/assets/screenshot.png
DELETED
|
Binary file
|