gman 5.0.3 → 5.0.4

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: d5f81c5dc5d03e961dc8830f91d8f17a04cc7eff
4
- data.tar.gz: 1c4c914aca60114856034e3cfd1254c555552d49
3
+ metadata.gz: 8f5bf31b29d1ad09a185c554f91b504d9abdc329
4
+ data.tar.gz: 662275ebb3f4f7f8231839b6190fd69af400ffb8
5
5
  SHA512:
6
- metadata.gz: e463cf1a41e87be42a1bae6b82e9b5961a210ea4374750ee9e111406589199adaf0e15be60b31dd65f4cee1e49b510a1e6eacc3f3a7c75c7e4c05fb70313bf8c
7
- data.tar.gz: be4371cf714f72cf0b0d0bafdc3de1e26c8b549849f70cce3779bb334bbecad5668f4bc65b5356a5e163d8782b270e8cae3b219ffd0cbc58e8f0a83162809c8a
6
+ metadata.gz: e7f58e1e0277b1a71e8fb9d4f97f8306f23cd0531719168b0c0b0d1924df2a3b7c87bd01dd61fba9aada68b175181fba66439141aa25412bc6a7ae4463f4224c
7
+ data.tar.gz: bad7873149cc07a5173f1a8cbd62d81d5ed027cfe633679845722398929f0dc15705ea00fb288c753c9ec4c404330f1e3b192bf1109512492f94aed4dfae37b7
data/bin/gman CHANGED
@@ -1,7 +1,6 @@
1
1
  #! /usr/bin/env ruby
2
2
  # Given a domain-link string, returns information about the domain
3
3
 
4
- require 'colorize'
5
4
  require_relative "../lib/gman"
6
5
 
7
6
  # Convenience method to simplify the command-line logic
@@ -14,7 +13,19 @@ class IsoCountryCodes
14
13
  end
15
14
 
16
15
  domain = ARGV[0]
17
- String.disable_colorization = true if ARGV.last == "--no-color"
16
+
17
+ if ARGV.last == "--no-color"
18
+ class String
19
+ def red
20
+ self
21
+ end
22
+ def green
23
+ self
24
+ end
25
+ end
26
+ else
27
+ require 'colored'
28
+ end
18
29
 
19
30
  if domain.to_s.empty? || domain == "--no-color"
20
31
  puts "USAGE: gman <domain or email address> [--no-color]".red
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency( "swot", '~> 1.0' )
22
22
  s.add_dependency( "iso_country_codes", "~> 0.6" )
23
23
  s.add_dependency( "naughty_or_nice", "~> 2.0" )
24
- s.add_dependency( "colorize", "~> 0.7" )
24
+ s.add_dependency( "colored", "~> 1.2" )
25
25
 
26
26
  s.add_development_dependency( "rake" )
27
27
  s.add_development_dependency( "shoulda" )
@@ -1,3 +1,3 @@
1
1
  class Gman
2
- VERSION = '5.0.3'
2
+ VERSION = '5.0.4'
3
3
  end
@@ -56,11 +56,11 @@ class TestGmanBin < Minitest::Test
56
56
 
57
57
  should "allow you to disable colorization" do
58
58
  output, status = test_bin("whitehouse.gov", "--no-color")
59
- refute_match /\[0;32;49m/, output
59
+ refute_match /\e\[32m/, output
60
60
  end
61
61
 
62
62
  should "color by default" do
63
- assert_match /\[0;32;49m/, @output
63
+ assert_match /\e\[32m/, @output
64
64
  end
65
65
 
66
66
  should "show help text" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gman
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: swot
@@ -53,19 +53,19 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: colorize
56
+ name: colored
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ version: '1.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.7'
68
+ version: '1.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement