pastel 0.7.0 → 0.7.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: e0dff6fb46a4686e16dadf14dbc302c03bec710a
4
- data.tar.gz: b3bb1f08fa7a1eb0c6a5529f32d1405419bcc024
3
+ metadata.gz: aaa5adc3e15580e13bb1a6e6408c4ae861291eae
4
+ data.tar.gz: 29d6776a836796d28f8512c90fa2dfcd3e4d5483
5
5
  SHA512:
6
- metadata.gz: 9aad90942603ae1740ee11c2e213b8e4a1058fb7fdffc52ee42bb3764d7e20b74bdd1759421b5a84513b7e140f3d7d72c6605f23b874d22f8d3654a44ba8233c
7
- data.tar.gz: c021e7b94a64d5d3d63288fac62346064c99beb3fbec2f0f9a7c162e6d39d440d72a1f03960b2d5fe0f229ec397c53d2ccac197c13d5f3f7286b190406aeef56
6
+ metadata.gz: f778303c03d07dfedabdb2f7b8d79c8b8e3aca7cd03d9c25a27af616794267305648079841deea03390f56e84867e868edc1146452f247ca89f2d721bd27691a
7
+ data.tar.gz: a20b24d879adb603257444a760dbe8a23c797be93e2c483634ccd49df4a9d0c7d718e470cb705ab21bd7c114ee81e9e5be318961f0988d70f3213467211b2ad2
@@ -1,5 +1,12 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.7.1] - 2017-01-09
4
+
5
+ ### Changed
6
+ * Change to load specfic files when needed
7
+ * Change to freeze ANSI attributes
8
+ * Change to directly assign enabled attribute
9
+
3
10
  ## [v0.7.0] - 2016-12-27
4
11
 
5
12
  ### Changed
@@ -95,6 +102,7 @@
95
102
  * Change gemspec to include equatable as dependency
96
103
  * Change Delegator to stop creating instances and improve performance
97
104
 
105
+ [v0.7.1]: https://github.com/peter-murach/pastel/compare/v0.7.0...v0.7.1
98
106
  [v0.7.0]: https://github.com/peter-murach/pastel/compare/v0.6.1...v0.7.0
99
107
  [v0.6.1]: https://github.com/peter-murach/pastel/compare/v0.6.0...v0.6.1
100
108
  [v0.6.0]: https://github.com/peter-murach/pastel/compare/v0.5.3...v0.6.0
@@ -1,16 +1,11 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'forwardable'
4
- require 'equatable'
5
3
  require 'tty-color'
6
4
 
7
- require 'pastel/ansi'
8
5
  require 'pastel/alias_importer'
9
6
  require 'pastel/color'
10
- require 'pastel/color_parser'
11
7
  require 'pastel/color_resolver'
12
8
  require 'pastel/delegator'
13
- require 'pastel/detached'
14
9
  require 'pastel/decorator_chain'
15
10
  require 'pastel/version'
16
11
 
@@ -31,7 +26,7 @@ module Pastel
31
26
  # @api public
32
27
  def new(options = {})
33
28
  unless options.key?(:enabled)
34
- options.merge!(enabled: TTY::Color.windows? || TTY::Color.color?)
29
+ options[:enabled] = (TTY::Color.windows? || TTY::Color.color?)
35
30
  end
36
31
  color = Color.new(options)
37
32
  importer = AliasImporter.new(color, ENV)
@@ -51,7 +51,7 @@ module Pastel
51
51
  on_bright_magenta: 105,
52
52
  on_bright_cyan: 106,
53
53
  on_bright_white: 107
54
- }
54
+ }.freeze
55
55
 
56
56
  module_function
57
57
 
@@ -1,5 +1,8 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'equatable'
4
+ require 'pastel/ansi'
5
+
3
6
  module Pastel
4
7
  # A class responsible for coloring strings.
5
8
  class Color
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'pastel/ansi'
4
+
3
5
  module Pastel
4
6
  # Responsible for parsing color symbols out of text with color escapes
5
7
  #
@@ -1,5 +1,7 @@
1
1
  # coding: utf-8
2
2
 
3
+ require 'pastel/detached'
4
+
3
5
  module Pastel
4
6
  # Contains logic for resolving styles applied to component
5
7
  #
@@ -1,5 +1,7 @@
1
1
  # coding: utf-8
2
2
 
3
+ require 'equatable'
4
+
3
5
  module Pastel
4
6
  # Collects a list of decorators for styling a string
5
7
  #
@@ -1,5 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
+ require 'equatable'
4
+ require 'forwardable'
5
+
6
+ require 'pastel/color_parser'
7
+ require 'pastel/decorator_chain'
8
+
3
9
  module Pastel
4
10
  # Wrapes the {DecoratorChain} to allow for easy resolution
5
11
  # of string coloring.
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'equatable'
4
+
3
5
  module Pastel
4
6
  # A class representing detached color
5
7
  class Detached
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Pastel
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
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.7.0
4
+ version: 0.7.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: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equatable