pastel 0.2.0 → 0.2.1

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: eab704ae6d2747d9d0fc40eb19843f91c7dfb331
4
- data.tar.gz: f51ab97939b6375f973c16d0215398dd6ad9c97f
3
+ metadata.gz: c4843971da301b5bca7d4d9a6c69702859a3e9f9
4
+ data.tar.gz: d176a98f33737965a8ae4a710b19c27ad31fe021
5
5
  SHA512:
6
- metadata.gz: c26988ce864c70a9bb5e23de8d85895e69d2449dbf09a8f5d611e92187b7f64ca02fb1ada0f29a9c0fbf1576e44248be5fff5d06dcd775fb36262a4bb98aa8d1
7
- data.tar.gz: 29401a138ed3646c77d3b85f49a772266c4acc1662c57d3cd1ae91d8149c1b783e33c262cc5465e73d1b422bb36ded104720d8b13604e580ee9c1ab6d1e7769c
6
+ metadata.gz: 6c61ddb8e9be7aa678dde278f6229871f67ce53d60929367417fae521b35548e8cb7392bb029eb94bcceb141eca2705cb3fe214bcbc333162de591b4174b63f8
7
+ data.tar.gz: acea298f36654c11b706bf72574e3b08980212188e6e432a95dd4fb10ae169e3026e344c28b9858dc1c0daed53c05aa059281e9bfc6044f35a3bb9ccf5f3a0bc
@@ -1,3 +1,7 @@
1
+ 0.2.1 (October 13, 2014)
2
+
3
+ * Fix issue #1 with unitialize dependency
4
+
1
5
  0.2.0 (October 12, 2014)
2
6
 
3
7
  * Change gemspec to include equatable as dependency
@@ -1,6 +1,8 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'forwardable'
3
4
  require 'equatable'
5
+
4
6
  require 'pastel/ansi'
5
7
  require 'pastel/color'
6
8
  require 'pastel/color_resolver'
@@ -9,8 +9,18 @@ module Pastel
9
9
  extend Forwardable
10
10
  include Equatable
11
11
 
12
- def_delegators '@resolver.color', :valid?, :styles, :strip, :decorate, :enabled?
13
-
12
+ def_delegators '@resolver.color', :valid?, :styles, :strip, :decorate,
13
+ :enabled?
14
+
15
+ # Create Delegator
16
+ #
17
+ # Used internally by {Pastel}
18
+ #
19
+ # @param [ColorResolver] resolver
20
+ #
21
+ # @param [DecoratorChain] base
22
+ #
23
+ # @api private
14
24
  def initialize(resolver, base)
15
25
  @resolver = resolver
16
26
  @base = base
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Pastel
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -43,6 +43,12 @@ RSpec.describe Pastel do
43
43
  expect(pastel.red('r', pastel.green('g'), 'r')).
44
44
  to eq("\e[31mr\e[32mg\e[31mr\e[0m")
45
45
  end
46
+
47
+ it "raises error when doesn't recognize color" do
48
+ expect {
49
+ pastel.uknown('unicorn')
50
+ }.to raise_error(Pastel::InvalidAttributeNameError)
51
+ end
46
52
  end
47
53
 
48
54
  describe '.valid?' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-12 00:00:00.000000000 Z
11
+ date: 2014-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equatable