rainbow 2.2.2 → 3.0.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 +4 -4
- data/.rubocop.yml +9 -3
- data/.rubocop_todo.yml +29 -0
- data/.travis.yml +13 -11
- data/Changelog.md +52 -46
- data/Gemfile +9 -4
- data/Guardfile +0 -1
- data/README.markdown +33 -26
- data/Rakefile +5 -2
- data/appveyor.yml +40 -0
- data/lib/rainbow.rb +0 -13
- data/lib/rainbow/color.rb +22 -23
- data/lib/rainbow/ext/string.rb +2 -4
- data/lib/rainbow/global.rb +3 -1
- data/lib/rainbow/null_presenter.rb +81 -29
- data/lib/rainbow/presenter.rb +13 -13
- data/lib/rainbow/refinement.rb +12 -0
- data/lib/rainbow/string_utils.rb +5 -4
- data/lib/rainbow/version.rb +1 -1
- data/lib/rainbow/wrapper.rb +0 -2
- data/lib/rainbow/x11_color_names.rb +3 -4
- data/rainbow.gemspec +4 -8
- data/spec/integration/instance_spec.rb +1 -3
- data/spec/integration/rainbow_spec.rb +27 -30
- data/spec/integration/refinement_spec.rb +36 -0
- data/spec/integration/string_spec.rb +11 -14
- data/spec/integration/uncolor_spec.rb +14 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/support/presenter_shared_examples.rb +2 -2
- data/spec/unit/color_spec.rb +5 -10
- data/spec/unit/null_presenter_spec.rb +1 -2
- data/spec/unit/presenter_spec.rb +11 -13
- data/spec/unit/string_utils_spec.rb +34 -2
- data/spec/unit/wrapper_spec.rb +1 -3
- metadata +20 -31
- data/ext/mkrf_conf.rb +0 -22
- data/lib/rainbow/legacy.rb +0 -15
- data/spec/unit/namespace_spec.rb +0 -31
data/ext/mkrf_conf.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/command'
|
3
|
-
require 'rubygems/dependency_installer'
|
4
|
-
|
5
|
-
begin
|
6
|
-
Gem::Command.build_args = ARGV
|
7
|
-
rescue NoMethodError
|
8
|
-
exit 1
|
9
|
-
end
|
10
|
-
|
11
|
-
installer = Gem::DependencyInstaller.new
|
12
|
-
|
13
|
-
begin
|
14
|
-
if RUBY_PLATFORM =~ /mswin|cygwin|mingw/ && RUBY_VERSION.to_i < 2
|
15
|
-
installer.install('windows-pr')
|
16
|
-
installer.install('win32console')
|
17
|
-
end
|
18
|
-
rescue
|
19
|
-
exit 1
|
20
|
-
end
|
21
|
-
|
22
|
-
File.write(File.join(File.dirname(__FILE__), 'Rakefile'), "task :default\n")
|
data/lib/rainbow/legacy.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module Sickill
|
2
|
-
module Rainbow
|
3
|
-
|
4
|
-
def self.enabled=(value)
|
5
|
-
STDERR.puts("Rainbow gem notice: Sickill::Rainbow.enabled= is " \
|
6
|
-
"deprecated, use Rainbow.enabled= instead.")
|
7
|
-
::Rainbow.enabled = value
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.enabled
|
11
|
-
::Rainbow.enabled
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
data/spec/unit/namespace_spec.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'rainbow'
|
3
|
-
|
4
|
-
describe Sickill::Rainbow do
|
5
|
-
|
6
|
-
describe '.enabled' do
|
7
|
-
before do
|
8
|
-
::Rainbow.enabled = :nope
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'returns ::Rainbow.enabled' do
|
12
|
-
expect(Sickill::Rainbow.enabled).to eq(:nope)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe '.enabled=' do
|
17
|
-
before do
|
18
|
-
allow(STDERR).to receive(:puts)
|
19
|
-
Sickill::Rainbow.enabled = :yep
|
20
|
-
end
|
21
|
-
|
22
|
-
it 'sets ::Rainbow.enabled=' do
|
23
|
-
expect(::Rainbow.enabled).to eq(:yep)
|
24
|
-
end
|
25
|
-
|
26
|
-
it 'prints the deprecation notice' do
|
27
|
-
expect(STDERR).to have_received(:puts)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|