urban 1.0.0 → 2.0.0

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.
@@ -1,57 +0,0 @@
1
- class MiniTest::StopLight
2
- ESC = "\e["
3
- NND = "#{ESC}0m"
4
-
5
- attr_reader :io
6
-
7
- def initialize io
8
- @io = io
9
- end
10
-
11
- def red str
12
- normal_color(31, str)
13
- end
14
-
15
- def yellow str
16
- normal_color(33, str)
17
- end
18
-
19
- def green str
20
- normal_color(32, str)
21
- end
22
-
23
- def normal_color(color_code, str)
24
- "#{ESC}#{color_code}m#{str}#{NND}"
25
- end
26
-
27
- def print(o)
28
- case o
29
- when '.'; io.print green(o)
30
- when 'E', 'F'; io.print red(o)
31
- when 'S'; io.print yellow(o)
32
- else; io.print o
33
- end
34
- end
35
-
36
- def puts(*o)
37
- o.map! do |str|
38
- case str
39
- when /Failure:/, /Error:/, /[1-9]+ failures/, /[1-9]+ errors/;
40
- red(str)
41
- when /Skipped:/
42
- yellow(str)
43
- when /0 failures, 0 errors/;
44
- green(str).gsub(/([1-9]+ skips)/, yellow('\1'))
45
- else;
46
- str.gsub(/([1-9]+ skips)/, yellow('\1'))
47
- end
48
- end
49
- super
50
- end
51
-
52
- def method_missing(msg, *args)
53
- io.send(msg, *args)
54
- end
55
- end
56
-
57
- MiniTest::Unit.output = MiniTest::StopLight.new(MiniTest::Unit.output)
data/urban.gemspec DELETED
@@ -1,25 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
3
- require 'urban/version'
4
-
5
- Gem::Specification.new do |s|
6
- s.name = 'urban'
7
- s.version = Urban::VERSION
8
- s.authors = ['Thomas Miller']
9
- s.email = ['jackerran@gmail.com']
10
- s.licenses = ['MIT']
11
- s.homepage = 'https://github.com/tmiller/urban'
12
- s.summary = %q{A command line tool that interfaces with Urban Dictionary.}
13
- s.description = %q{Urban is a command line tool that allows you to look up definitions or pull a random definition from Urban Dictionary.}
14
-
15
- s.rubyforge_project = 'urban'
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ['lib']
21
-
22
- s.add_dependency 'nokogiri', '~> 1.5.0'
23
- s.add_development_dependency 'rake', '~> 0.8'
24
- s.add_development_dependency 'minitest', '~> 2.0'
25
- end