tty-color 0.4.2 → 0.4.3

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
- SHA1:
3
- metadata.gz: ddd23cb1f08a561d67b7bb22fd2e83b8621febfc
4
- data.tar.gz: 761c1a2893c56f269f7c31b88c96d68cb1372477
2
+ SHA256:
3
+ metadata.gz: 64773204a9d6a5bb773df92a9ff890f9bc9e83ee3553fd75084676f42a5e421a
4
+ data.tar.gz: f70c529028b7b01adc89521c8935f7f9e9280c3c9a974efdcb8b4ccf9ee7c49a
5
5
  SHA512:
6
- metadata.gz: cc87ed4227b710475aeec4264a3fccb6a3f397cdc4d8d3401c0dd4bb27d5fc55709bc89693afcc6f5b2e01ab99df98ae283f36fb5746fe4b0f8b0a90ee132823
7
- data.tar.gz: 6e705c3da4f766ff6f23bdb2d84a02627ef4445ae845389a33138be075687b168c22fc570063eb0bc75c0320ea35934ca3beb4abae29981a4d5a560edffd51b0
6
+ metadata.gz: 9712ef7a8244e191667083ec9a23fb17bca5f17608f5d558f4008c1327c4bad933b3a8926e30764242ea7921f5c6e3bb58a0f40f67b273ec2d041272d38dc6e1
7
+ data.tar.gz: 5b66fb35bd7e8df728a1f06f5809c0fdfd196a969d0f351e5ac5999224fd637fb3dae8f6eacdfd6479447f404bebd37637dfe786a1a4b905c8eaa3cfcc328ec6
@@ -4,21 +4,19 @@ sudo: false
4
4
  cache: bundler
5
5
  script: "bundle exec rake ci"
6
6
  rvm:
7
- - 1.9.3
8
7
  - 2.0.0
9
8
  - 2.1.10
10
9
  - 2.2.6
11
10
  - 2.3.3
12
- - 2.4.0
11
+ - 2.4.4
12
+ - 2.5.1
13
13
  - ruby-head
14
- - jruby-9000
14
+ - jruby-9.1.5.0
15
15
  - jruby-head
16
- - rbx-3
17
16
  matrix:
18
17
  allow_failures:
19
18
  - rvm: ruby-head
20
19
  - rvm: jruby-head
21
- - rvm: rbx-3
22
20
  fast_finish: true
23
21
  branches:
24
22
  only: master
@@ -1,5 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.4.3] - 2018-07-11
4
+
5
+ ### Changed
6
+ * Change to use relative file paths
7
+ * Change to ensure immutable strings
8
+ * Change Color to use alias call
9
+
10
+ ### Fixed
11
+ * Fix to support iTerm 2.app for 256 color mode detection by Michael Lang(@mwlang)
12
+
3
13
  ## [v0.4.2] - 2017-02-06
4
14
 
5
15
  ### Fixed
@@ -43,6 +53,7 @@
43
53
 
44
54
  * Initial implementation and release
45
55
 
56
+ [v0.4.3]: https://github.com/peter-murach/tty-color/compare/v0.4.2...v0.4.3
46
57
  [v0.4.2]: https://github.com/peter-murach/tty-color/compare/v0.4.1...v0.4.2
47
58
  [v0.4.1]: https://github.com/peter-murach/tty-color/compare/v0.4.0...v0.4.1
48
59
  [v0.4.0]: https://github.com/peter-murach/tty-color/compare/v0.3.0...v0.4.0
data/Gemfile CHANGED
@@ -3,8 +3,6 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem 'rspec', '~> 3.5.0'
7
- gem 'yard', '~> 0.8.7'
8
6
  gem 'benchmark-ips', '~> 2.0.0'
9
7
  end
10
8
 
@@ -12,5 +10,4 @@ group :metrics do
12
10
  gem 'coveralls', '~> 0.8.2'
13
11
  gem 'simplecov', '~> 0.10.0'
14
12
  gem 'yardstick', '~> 0.9.9'
15
- gem 'term-ansicolor', '=1.3.2'
16
13
  end
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # TTY::Color [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
2
+
2
3
  [![Gem Version](https://badge.fury.io/rb/tty-color.svg)][gem]
3
4
  [![Build Status](https://secure.travis-ci.org/piotrmurach/tty-color.svg?branch=master)][travis]
4
5
  [![Build status](https://ci.appveyor.com/api/projects/status/j1nflklmnfrb2yrf?svg=true)][appveyor]
@@ -85,4 +86,4 @@ color -m
85
86
 
86
87
  ## Copyright
87
88
 
88
- Copyright (c) 2016-2017 Piotr Murach. See LICENSE for further details.
89
+ Copyright (c) 2016-2018 Piotr Murach. See LICENSE for further details.
@@ -9,7 +9,6 @@ test_script:
9
9
  - bundle exec rake ci
10
10
  environment:
11
11
  matrix:
12
- - ruby_version: "193"
13
12
  - ruby_version: "200"
14
13
  - ruby_version: "200-x64"
15
14
  - ruby_version: "21"
@@ -18,6 +17,7 @@ environment:
18
17
  - ruby_version: "22-x64"
19
18
  - ruby_version: "23"
20
19
  - ruby_version: "23-x64"
21
- matrix:
22
- allow_failures:
23
- - ruby_version: "193"
20
+ - ruby_version: "24"
21
+ - ruby_version: "24-x64"
22
+ - ruby_version: "25"
23
+ - ruby_version: "25-x64"
@@ -1,4 +1 @@
1
- # encoding: utf-8
2
-
3
1
  require 'tty/color'
4
- require "tty/color/version"
@@ -1,8 +1,8 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- require 'tty/color/support'
4
- require 'tty/color/mode'
5
- require 'tty/color/version'
3
+ require_relative 'color/support'
4
+ require_relative 'color/mode'
5
+ require_relative 'color/version'
6
6
 
7
7
  module TTY
8
8
  # Responsible for checking terminal color support
@@ -27,8 +27,8 @@ module TTY
27
27
  def supports?
28
28
  Support.new(ENV, verbose: verbose).supports?
29
29
  end
30
- alias_method :color?, :supports?
31
- alias_method :supports_color?, :supports?
30
+ alias color? supports?
31
+ alias supports_color? supports?
32
32
 
33
33
  # Check how many colors this terminal supports
34
34
  #
@@ -1,9 +1,9 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module TTY
4
4
  module Color
5
5
  class Mode
6
- TERM_256 = /iTerm.app/x
6
+ TERM_256 = /iTerm(\s\d+){0,1}.app/x
7
7
 
8
8
  TERM_64 = /^(hpterm-color|wy370|wy370-105k|wy370-EPC|wy370-nk|
9
9
  wy370-rv|wy370-tek|wy370-vb|wy370-w|wy370-wvb)$/x
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module TTY
4
4
  module Color
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  module Color
5
- VERSION = "0.4.2"
5
+ VERSION = "0.4.3"
6
6
  end # Color
7
7
  end # TTY
@@ -36,6 +36,11 @@ RSpec.describe TTY::Color::Mode, 'detecting mode' do
36
36
  expect(mode.from_term).to eq(256)
37
37
  end
38
38
 
39
+ it 'infers mode for iTerm 2.app' do
40
+ mode = described_class.new('TERM' => 'iTerm 2.app')
41
+ expect(mode.from_term).to eq(256)
42
+ end
43
+
39
44
  it 'infers mode from terminal environment' do
40
45
  mode = described_class.new('TERM' => 'amiga-8bit')
41
46
  expect(mode.from_term).to eq(256)
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'tty/color/version'
@@ -19,5 +18,6 @@ Gem::Specification.new do |spec|
19
18
  spec.require_paths = ["lib"]
20
19
 
21
20
  spec.add_development_dependency 'bundler', '>= 1.5.0', '< 2.0'
22
- spec.add_development_dependency 'rake', '~> 10.0'
21
+ spec.add_development_dependency 'rspec', '~> 3.1'
22
+ spec.add_development_dependency 'rake'
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-color
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -31,19 +31,33 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: rake
34
+ name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '10.0'
39
+ version: '3.1'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '10.0'
46
+ version: '3.1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
47
61
  description: Terminal color capabilities detection
48
62
  email:
49
63
  - ''
@@ -93,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
107
  version: '0'
94
108
  requirements: []
95
109
  rubyforge_project:
96
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.7.3
97
111
  signing_key:
98
112
  specification_version: 4
99
113
  summary: Terminal color capabilities detection
@@ -102,4 +116,3 @@ test_files:
102
116
  - spec/unit/color_spec.rb
103
117
  - spec/unit/mode_spec.rb
104
118
  - spec/unit/supports_spec.rb
105
- has_rdoc: