dye 0.1.2 → 0.1.3
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.
- data/VERSION +1 -1
- data/lib/dye.rb +5 -1
- metadata +2 -2
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.1. | 
| 1 | 
            +
            0.1.3
         | 
    
        data/lib/dye.rb
    CHANGED
    
    | @@ -70,6 +70,10 @@ module Dye | |
| 70 70 | 
             
                strict_ansi? ? "\e[#{codes.join(';')}m" : codes.map{|c| "\e[#{c}m" }.join
         | 
| 71 71 | 
             
              end
         | 
| 72 72 |  | 
| 73 | 
            +
              def print_reset_colors
         | 
| 74 | 
            +
                print sgr(:clear) if color?
         | 
| 75 | 
            +
              end
         | 
| 76 | 
            +
             | 
| 73 77 | 
             
              private
         | 
| 74 78 |  | 
| 75 79 | 
             
              def apply_styles(custom_styles, *args)
         | 
| @@ -101,7 +105,7 @@ module Dye | |
| 101 105 |  | 
| 102 106 | 
             
              def sgr_to_code(name)
         | 
| 103 107 | 
             
                code = name.is_a?(Symbol) ? BASIC_SGR[name] : name
         | 
| 104 | 
            -
                raise UnknownSgrCode.new( | 
| 108 | 
            +
                raise UnknownSgrCode.new(code) unless code.is_a?(Integer) && (0..109).include?(code)
         | 
| 105 109 | 
             
                code
         | 
| 106 110 | 
             
              end
         | 
| 107 111 |  | 
    
        metadata
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 | 
             
            name: dye
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 4 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.1. | 
| 5 | 
            +
              version: 0.1.3
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors: 
         | 
| 8 8 | 
             
            - Domizio Demichelis
         | 
| @@ -10,7 +10,7 @@ autorequire: | |
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 12 |  | 
| 13 | 
            -
            date: 2011-02- | 
| 13 | 
            +
            date: 2011-02-17 00:00:00 -04:00
         | 
| 14 14 | 
             
            default_executable: 
         | 
| 15 15 | 
             
            dependencies: 
         | 
| 16 16 | 
             
            - !ruby/object:Gem::Dependency 
         |