rainbow 1.99.2 → 2.0.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
  SHA1:
3
- metadata.gz: cb3910912fab41b3d9e26d64011f8a66832ed388
4
- data.tar.gz: b64ec3a33953e13ce1215a5bdda8750a013fb2de
3
+ metadata.gz: 372e902e66070b47cdb7c31a2261929f57086e59
4
+ data.tar.gz: 57e6af68cbd87bf8c79298b9d6d77e0a46719dc5
5
5
  SHA512:
6
- metadata.gz: a681a15d3f2ecbb3b3d7758961b5ba0b39fefdc6a8b4e7ada9627567c2ea2793edbdb3dd8120ae33b5e94ea39648d0fa84d3b01973dc944e267945834541d566
7
- data.tar.gz: 7caeccfe18b3229c1e4da06ec4d1a606a48ebb1125020e04239ad3dad4f62e039192ee41da1a9eee0158e88759f1e70ceec4d24ea8d2665ea819f1be39555b7f
6
+ metadata.gz: 37394c88313337fb8fc04dc6d1f649eaea0c257d25a4e44e4cd1f54d07a87fb3cfce3673c86a33079468440fd040d21bf4c57d53fd4ef9d8a8a01169465236fc
7
+ data.tar.gz: a0a235ea3d51152d2a107435229730daa19f8d4a1f838803af6af87707a2e17fc2f48fb6195d78fab26acce0673aca33535a499c9ebc4feb5b64d6696edf63f2
@@ -1,6 +1,5 @@
1
1
  bundler_args: --without guard
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.2
5
4
  - 1.9.3
6
5
  - 2.0.0
@@ -61,3 +61,7 @@
61
61
  ## 1.99.2 (2014-01-24)
62
62
 
63
63
  * bring back ruby 1.8 support
64
+
65
+ ## 2.0.0 (2014-01-24)
66
+
67
+ * disable string mixin by default
data/Gemfile CHANGED
@@ -3,8 +3,8 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in rainbow.gemspec
4
4
  gemspec
5
5
 
6
- gem 'coveralls', :require => false
7
- gem 'mime-types', '< 2.0.0', :platforms => [:ruby_18]
6
+ gem 'coveralls', require: false
7
+ gem 'mime-types', '< 2.0.0', platforms: [:ruby_18]
8
8
 
9
9
  group :guard do
10
10
  gem 'guard'
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Guardfile
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
- guard :rspec, :cmd => 'rspec --color' do
4
+ guard :rspec, cmd: 'rspec --color' do
5
5
  watch(%r{^spec/.+_spec\.rb$})
6
6
  watch(%r{^lib/(.+)\.rb$}) { "spec" }
7
7
  watch('spec/spec_helper.rb') { "spec" }
@@ -76,9 +76,10 @@ public interface with methods that are presentation specific.
76
76
  NOTE: the mixing doesn't include shortcut methods for changing text color, you
77
77
  should use "string".color(:blue) instead of "string".blue
78
78
 
79
- NOTE: the mixin is included in String by default in rainbow versions up to (and
80
- including) 1.99.x to not break backwards compatibility. It won't be included by
81
- default in rainbow 2.0.
79
+ NOTE: the mixin is included in String by default in rainbow 1.x versions.
80
+ In rainbow 2.x the behavior was changed - if you're upgrading from 1.x to 2.x
81
+ and you used direct String methods then you can either require the string
82
+ extension as shown above or update your code to use the new presenter API.
82
83
 
83
84
  ### Color specification
84
85
 
@@ -1,6 +1,5 @@
1
1
  require 'rainbow/global'
2
2
  require 'rainbow/legacy'
3
- require 'rainbow/ext/string'
4
3
 
5
4
  module Rainbow
6
5
 
@@ -52,15 +52,15 @@ module Rainbow
52
52
  class Named < Indexed
53
53
 
54
54
  NAMES = {
55
- :black => 0,
56
- :red => 1,
57
- :green => 2,
58
- :yellow => 3,
59
- :blue => 4,
60
- :magenta => 5,
61
- :cyan => 6,
62
- :white => 7,
63
- :default => 9,
55
+ black: 0,
56
+ red: 1,
57
+ green: 2,
58
+ yellow: 3,
59
+ blue: 4,
60
+ magenta: 5,
61
+ cyan: 6,
62
+ white: 7,
63
+ default: 9,
64
64
  }
65
65
 
66
66
  def initialize(ground, name)
@@ -6,13 +6,13 @@ module Rainbow
6
6
  class Presenter < ::String
7
7
 
8
8
  TERM_EFFECTS = {
9
- :reset => 0,
10
- :bright => 1,
11
- :italic => 3,
12
- :underline => 4,
13
- :blink => 5,
14
- :inverse => 7,
15
- :hide => 8,
9
+ reset: 0,
10
+ bright: 1,
11
+ italic: 3,
12
+ underline: 4,
13
+ blink: 5,
14
+ inverse: 7,
15
+ hide: 8,
16
16
  }
17
17
 
18
18
  # Sets color of this text.
@@ -1,3 +1,3 @@
1
1
  module Rainbow
2
- VERSION = "1.99.2".freeze
2
+ VERSION = "2.0.0".freeze
3
3
  end
@@ -4,14 +4,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'rainbow/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "rainbow"
8
- spec.version = Rainbow::VERSION
9
- spec.authors = ["Marcin Kulik"]
10
- spec.email = ["m@ku1ik.com"]
11
- spec.description = %q{Colorize printed text on ANSI terminals}
12
- spec.summary = %q{Colorize printed text on ANSI terminals}
13
- spec.homepage = "https://github.com/sickill/rainbow"
14
- spec.license = "MIT"
7
+ spec.name = "rainbow"
8
+ spec.version = Rainbow::VERSION
9
+ spec.authors = ["Marcin Kulik"]
10
+ spec.email = ["m@ku1ik.com"]
11
+ spec.description = %q{Colorize printed text on ANSI terminals}
12
+ spec.summary = %q{Colorize printed text on ANSI terminals}
13
+ spec.homepage = "https://github.com/sickill/rainbow"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = '>= 1.9.2'
15
16
 
16
17
  spec.files = `git ls-files`.split($/)
17
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -1,7 +1,7 @@
1
1
  shared_examples_for "presenter with shortcut color methods" do
2
2
  [:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white].each do |name|
3
3
  describe "##{name}" do
4
- subject { presenter.send(name) }
4
+ subject { presenter.public_send(name) }
5
5
 
6
6
  it { should eq(presenter.color(name)) }
7
7
  end
@@ -17,7 +17,7 @@ module Rainbow
17
17
  end
18
18
 
19
19
  shared_examples_for "text color method" do
20
- let(:color) { double('color', :codes => [1, 2]) }
20
+ let(:color) { double('color', codes: [1, 2]) }
21
21
 
22
22
  before do
23
23
  allow(Color).to receive(:build).
@@ -34,7 +34,7 @@ module Rainbow
34
34
  end
35
35
 
36
36
  shared_examples_for "text background method" do
37
- let(:color) { double('color', :codes => [1, 2]) }
37
+ let(:color) { double('color', codes: [1, 2]) }
38
38
 
39
39
  before do
40
40
  allow(Color).to receive(:build).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rainbow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Kulik
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '>='
104
104
  - !ruby/object:Gem::Version
105
- version: '0'
105
+ version: 1.9.2
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '>='