rainbow 1.99.0 → 1.99.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +14 -0
- data/.travis.yml +0 -1
- data/Changelog.md +59 -0
- data/Gemfile +2 -2
- data/Guardfile +1 -1
- data/README.markdown +91 -35
- data/lib/rainbow.rb +18 -19
- data/lib/rainbow/color.rb +28 -22
- data/lib/rainbow/ext/string.rb +52 -0
- data/lib/rainbow/global.rb +21 -0
- data/lib/rainbow/legacy.rb +2 -1
- data/lib/rainbow/null_presenter.rb +30 -0
- data/lib/rainbow/presenter.rb +113 -0
- data/lib/rainbow/version.rb +1 -1
- data/lib/rainbow/wrapper.rb +12 -66
- data/rainbow.gemspec +9 -9
- data/spec/integration/instance_spec.rb +35 -0
- data/spec/integration/rainbow_spec.rb +13 -6
- data/spec/integration/string_spec.rb +27 -1
- data/spec/spec_helper.rb +1 -5
- data/spec/support/presenter_shared_examples.rb +9 -0
- data/spec/unit/null_presenter_spec.rb +93 -0
- data/spec/unit/presenter_spec.rb +168 -0
- data/spec/unit/wrapper_spec.rb +11 -132
- metadata +17 -6
- data/Changelog +0 -3
- data/lib/rainbow/core.rb +0 -16
- data/lib/rainbow/string.rb +0 -50
data/Changelog
DELETED
data/lib/rainbow/core.rb
DELETED
data/lib/rainbow/string.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'rainbow'
|
2
|
-
|
3
|
-
module Rainbow
|
4
|
-
module String
|
5
|
-
module InstanceMethods
|
6
|
-
|
7
|
-
def foreground(*color)
|
8
|
-
Rainbow(self).foreground(*color)
|
9
|
-
end
|
10
|
-
|
11
|
-
alias_method :color, :foreground
|
12
|
-
alias_method :colour, :foreground
|
13
|
-
|
14
|
-
def background(*color)
|
15
|
-
Rainbow(self).background(*color)
|
16
|
-
end
|
17
|
-
|
18
|
-
def reset
|
19
|
-
Rainbow(self).reset
|
20
|
-
end
|
21
|
-
|
22
|
-
def bright
|
23
|
-
Rainbow(self).bright
|
24
|
-
end
|
25
|
-
|
26
|
-
def italic
|
27
|
-
Rainbow(self).italic
|
28
|
-
end
|
29
|
-
|
30
|
-
def underline
|
31
|
-
Rainbow(self).underline
|
32
|
-
end
|
33
|
-
|
34
|
-
def blink
|
35
|
-
Rainbow(self).blink
|
36
|
-
end
|
37
|
-
|
38
|
-
def inverse
|
39
|
-
Rainbow(self).inverse
|
40
|
-
end
|
41
|
-
|
42
|
-
def hide
|
43
|
-
Rainbow(self).hide
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
::String.send(:include, Rainbow::String::InstanceMethods)
|