exemplor 2000.2.0 → 2010.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.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
+ exemplor.gemspec
1
2
  pkg
data/TODO CHANGED
@@ -1,9 +1,7 @@
1
+ * add symbol to_proc and tap
1
2
  * exemplor executable that can run multiple example files
2
- * #teardown
3
- * Use fancy unicode characters for tests status:
4
3
  * TextMate bundle that does nice cmd+r output
5
- # (i) =
6
- # (I) = •
7
- # (s) = ✓
8
- # (f) =
9
- # (e) = ☠
4
+ * smarter macros for examples.rb - this could be clearer
5
+ * discuss example grouping in doc (philosophy)
6
+
7
+ * test requiring exemplor does *not* trigger at exit
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2000.2.0
1
+ 2010.0.0
data/examples.rb CHANGED
@@ -30,11 +30,11 @@ eg "version matches file" do
30
30
  end
31
31
 
32
32
  eg "errors are caught and nicely displayed" do
33
- actual_yaml = YAML.load run_example(:an_error)
34
- error_hash = actual_yaml[actual_yaml.keys.first]
35
- # the rest of the bactrace is platform & exemplor version specific
36
- error_hash['backtrace'] = error_hash['backtrace'][0...1]
37
- Check(actual_yaml).is(YAML.load(extract_expected(:an_error)))
33
+ result = YAML.load(run_example(:an_error))[0]
34
+ Check(result['status']).is('error')
35
+ Check(result['result']['class']).is('RuntimeError')
36
+ Check(result['result']['message']).is('boom!')
37
+ Check(result['result']['backtrace'][0]).is('examples/an_error.rb:4')
38
38
  end
39
39
 
40
40
  eg { check_output_matches_expected_for :no_checks }
data/examples/an_error.rb CHANGED
@@ -2,13 +2,4 @@ require 'exemplor'
2
2
 
3
3
  eg 'Raising an error' do
4
4
  raise "boom!"
5
- end
6
-
7
- __END__
8
-
9
- (e) Raising an error:
10
- class: RuntimeError
11
- message: boom!
12
- backtrace:
13
- - examples/an_error.rb:4
14
- # ... more backtrace lines
5
+ end
@@ -7,7 +7,10 @@ end
7
7
 
8
8
  __END__
9
9
 
10
- (f) Assertion failure:
11
- (f) list.first:
10
+ - name: Assertion failure
11
+ status: failure
12
+ result:
13
+ - name: list.first
14
+ status: failure
12
15
  expected: 2
13
16
  actual: 1
@@ -7,5 +7,9 @@ end
7
7
 
8
8
  __END__
9
9
 
10
- (s) Asserting first is first:
11
- (s) list.first: 1
10
+ - name: Asserting first is first
11
+ status: success
12
+ result:
13
+ - name: list.first
14
+ status: success
15
+ result: 1
@@ -10,9 +10,16 @@ end
10
10
 
11
11
  __END__
12
12
 
13
- (f) Some successes, then a fail:
14
- (s) list.first: 1
15
- (s) list[1]: 2
16
- (f) list.last:
13
+ - name: Some successes, then a fail
14
+ status: failure
15
+ result:
16
+ - name: list.first
17
+ status: success
18
+ result: 1
19
+ - name: list[1]
20
+ status: success
21
+ result: 2
22
+ - name: list.last
23
+ status: failure
17
24
  expected: 1
18
25
  actual: 3
@@ -30,15 +30,39 @@ end
30
30
 
31
31
  __END__
32
32
 
33
- (I) plain call:
34
- (i) foo: bar
35
- (I) whitespace after the call (seriously):
36
- (i) foo: bar
37
- (I) comment after the call:
38
- (i) foo: bar
39
- (I) with brackets:
40
- (i) String.new('test'): test
41
- (s) with brackets and is:
42
- (s) String.new('test'): test
43
- (s) with disambiguation:
44
- (s) foo bar: bar
33
+ - name: plain call
34
+ status: info (with checks)
35
+ result:
36
+ - name: foo
37
+ status: info
38
+ result: bar
39
+ - name: whitespace after the call (seriously)
40
+ status: info (with checks)
41
+ result:
42
+ - name: foo
43
+ status: info
44
+ result: bar
45
+ - name: comment after the call
46
+ status: info (with checks)
47
+ result:
48
+ - name: foo
49
+ status: info
50
+ result: bar
51
+ - name: with brackets
52
+ status: info (with checks)
53
+ result:
54
+ - name: String.new('test')
55
+ status: info
56
+ result: test
57
+ - name: with brackets and is
58
+ status: success
59
+ result:
60
+ - name: String.new('test')
61
+ status: success
62
+ result: test
63
+ - name: with disambiguation
64
+ status: success
65
+ result:
66
+ - name: foo bar
67
+ status: success
68
+ result: bar
@@ -9,6 +9,12 @@ end
9
9
 
10
10
  __END__
11
11
 
12
- (I) Array appending:
13
- (i) list.last before append: 42
14
- (i) list.last after append: 2
12
+ - name: Array appending
13
+ status: info (with checks)
14
+ result:
15
+ - name: list.last before append
16
+ status: info
17
+ result: 42
18
+ - name: list.last after append
19
+ status: info
20
+ result: 2
@@ -10,7 +10,15 @@ end
10
10
 
11
11
  __END__
12
12
 
13
- (I) checking nil works correctly:
14
- (i) nil:
15
- (s) asserting for nil works correctly:
16
- (s) nil:
13
+ - name: checking nil works correctly
14
+ status: info (with checks)
15
+ result:
16
+ - name: nil
17
+ status: info
18
+ result:
19
+ - name: asserting for nil works correctly
20
+ status: success
21
+ result:
22
+ - name: nil
23
+ status: success
24
+ result:
@@ -10,6 +10,12 @@ end
10
10
 
11
11
  __END__
12
12
 
13
- (i) class name is printed when example returns a class: Object
14
- (I) class name is printed when check is given a class:
15
- (i) Object: Object
13
+ - name: class name is printed when example returns a class
14
+ status: info (no checks)
15
+ result: Object
16
+ - name: class name is printed when check is given a class
17
+ status: info (with checks)
18
+ result:
19
+ - name: Object
20
+ status: info
21
+ result: Object
data/examples/helpers.rb CHANGED
@@ -14,4 +14,6 @@ end
14
14
 
15
15
  __END__
16
16
 
17
- (i) Example calling helper: foo
17
+ - name: Example calling helper
18
+ status: info (no checks)
19
+ result: foo
@@ -6,4 +6,6 @@ end
6
6
 
7
7
  __END__
8
8
 
9
- (i) An example block without any checks prints the value of the block: foo
9
+ - name: An example block without any checks prints the value of the block
10
+ status: info (no checks)
11
+ result: foo
@@ -12,5 +12,7 @@ end
12
12
 
13
13
  __END__
14
14
 
15
- (i) Non-string return values get converted to yaml: !ruby/object:MyClass
16
- foo: bar
15
+ - name: Non-string return values get converted to yaml
16
+ status: info (no checks)
17
+ result: !ruby/object:MyClass
18
+ foo: bar
data/examples/oneliner.rb CHANGED
@@ -4,4 +4,6 @@ eg { 1+2 }
4
4
 
5
5
  __END__
6
6
 
7
- (i) 1+2: 3
7
+ - name: 1+2
8
+ status: info (no checks)
9
+ result: 3
@@ -9,7 +9,15 @@ end
9
9
 
10
10
  __END__
11
11
 
12
- (I) Accessing different parts of an array:
13
- (i) list.first: 1
14
- (i) list[1]: 2
15
- (i) list.last: 3
12
+ - name: Accessing different parts of an array
13
+ status: info (with checks)
14
+ result:
15
+ - name: list.first
16
+ status: info
17
+ result: 1
18
+ - name: list[1]
19
+ status: info
20
+ result: 2
21
+ - name: list.last
22
+ status: info
23
+ result: 3
@@ -13,7 +13,15 @@ end
13
13
 
14
14
  __END__
15
15
 
16
- (s) Modified env:
17
- (s) @str: foo bar
18
- (s) Unmodified env:
19
- (s) @str: foo
16
+ - name: Modified env
17
+ status: success
18
+ result:
19
+ - name: "@str"
20
+ status: success
21
+ result: foo bar
22
+ - name: Unmodified env
23
+ status: success
24
+ result:
25
+ - name: "@str"
26
+ status: success
27
+ result: foo
data/lib/exemplor.rb CHANGED
@@ -1,12 +1,28 @@
1
1
  require 'orderedhash'
2
2
  require 'yaml'
3
3
 
4
+ def OrderedHash(&blk)
5
+ ohsh = OrderedHash.new
6
+ blk.call(ohsh)
7
+ ohsh
8
+ end
9
+
10
+ def YAML.without_header(obj)
11
+ obj.to_yaml.match(/^--- \n?/).post_match
12
+ end
13
+
14
+ class String
15
+ def indent
16
+ self.split("\n").map { |line| ' ' + line }.join("\n")
17
+ end
18
+ end
19
+
4
20
  module Exemplor
5
21
 
6
22
  def self.version() File.read(__FILE__.sub('lib/exemplor.rb','VERSION')) end
7
23
 
8
24
  class ExampleDefinitionError < StandardError ; end
9
-
25
+
10
26
  class Check
11
27
 
12
28
  attr_reader :expectation, :value
@@ -48,7 +64,72 @@ module Exemplor
48
64
 
49
65
  end
50
66
 
51
- class Example
67
+ class ResultPrinter
68
+
69
+ attr_reader :name,:status,:result,:stderr
70
+
71
+ def initialize(name,status,result,stderr)
72
+ @name,@status,@result,@stderr = name,status,result,stderr
73
+ end
74
+
75
+ def failure?
76
+ [:error,:failure].include?(self.status)
77
+ end
78
+
79
+ def yaml
80
+ hsh = OrderedHash do |o|
81
+ o['name'] = self.name
82
+ o['status'] = case status = self.status
83
+ when :info : 'info (no checks)'
84
+ when :infos : 'info (with checks)'
85
+ else ; status.to_s
86
+ end
87
+ o['result'] = self.result
88
+ end
89
+ YAML.without_header([hsh])# prints an array
90
+ end
91
+
92
+ def fancy
93
+ # •∙ are inverted in my terminal font (Incosolata) so I'm swapping them
94
+ require 'term/ansicolor'
95
+ case status
96
+ when :info : blue format_info("• #{name}", result)
97
+ when :infos
98
+ formatted_result = result.map do |r|
99
+ format_info("• #{r['name']}", r['result']).rstrip
100
+ end.join("\n")
101
+ blue("∙ #{name}\n#{formatted_result.indent}")
102
+ when :success
103
+ green("✓ #{name}")
104
+ when :failure
105
+ # sooo hacky
106
+ failure = result.find { |r| r['status'] == 'failure' }
107
+ out = failure.dup
108
+ out.delete('status')
109
+ out.delete('name')
110
+ color(:red, "✗ #{name} - #{failure['name']}\n#{YAML.without_header(out).indent}")
111
+ when :error
112
+ class_and_message = "#{result['class']} - #{result['message']}"
113
+ backtrace = result['backtrace'].join("\n")
114
+ color(:red, "☠ #{name}\n#{class_and_message.indent}\n#{backtrace.indent}")
115
+ end
116
+ end
117
+
118
+ def blue(str) color(:blue,str) end
119
+ def green(str) color(:green,str) end
120
+
121
+ def color(color, str)
122
+ [Term::ANSIColor.send(color), str, Term::ANSIColor.reset].join
123
+ end
124
+
125
+ # whatahack
126
+ def format_info(str, result)
127
+ YAML.without_header({'FANCY' => result}).sub('FANCY', str)
128
+ end
129
+
130
+ end
131
+
132
+ class ExampleEnv
52
133
 
53
134
  class << self
54
135
 
@@ -57,6 +138,66 @@ module Exemplor
57
138
 
58
139
  def setup(&blk) self.setup_block = blk end
59
140
 
141
+ # runs the block in the example environment, returns triple:
142
+ # [status, result, stderr]
143
+ def run(&code)
144
+ env = self.new
145
+ stderr = StringIO.new
146
+ status, result = begin
147
+ real_stderr = $stderr ; $stderr = stderr # swap stderr
148
+
149
+ env.instance_eval(&self.setup_block) if self.setup_block
150
+ value = env.instance_eval(&code)
151
+ result = env._status == :info ?
152
+ render_value(value) : render_checks(env._checks)
153
+ [env._status, result]
154
+
155
+ rescue Object => error
156
+ [:error, render_error(error)]
157
+ ensure
158
+ $stderr = real_stderr # swap stderr back
159
+ end
160
+ [status, result, stderr.rewind && stderr.read]
161
+ end
162
+
163
+ # -- these "render" methods could probably be factored away
164
+
165
+ # yaml doesn't want to print a class
166
+ def render_value(value)
167
+ value.kind_of?(Class) ? value.inspect : value
168
+ end
169
+
170
+ def render_checks(checks)
171
+ failure = nil
172
+ out = []
173
+ checks.each do |check|
174
+ failure = check if check.failure?
175
+ break if failure
176
+ out << OrderedHash do |o|
177
+ o['name'] = check.name
178
+ o['status'] = check.status.to_s
179
+ o['result'] = render_value check.value
180
+ end
181
+ end
182
+ if failure
183
+ out << OrderedHash do |o|
184
+ o['name'] = failure.name
185
+ o['status'] = failure.status.to_s
186
+ o['expected'] = failure.expectation
187
+ o['actual'] = render_value failure.value
188
+ end
189
+ end
190
+ out
191
+ end
192
+
193
+ def render_error(error)
194
+ OrderedHash do |o|
195
+ o['class'] = error.class.name
196
+ o['message'] = error.message
197
+ o['backtrace'] = error.backtrace
198
+ end
199
+ end
200
+
60
201
  end
61
202
 
62
203
  attr_accessor :_checks
@@ -74,12 +215,17 @@ module Exemplor
74
215
  check
75
216
  end
76
217
 
218
+ def _status
219
+ (:info if _checks.empty?) ||
220
+ (:infos if _checks.all? { |c| c.info? }) ||
221
+ (:success if _checks.all? { |c| c.success? }) ||
222
+ (:failure if _checks.any? { |c| c.failure? })
223
+ end
224
+
77
225
  end
78
226
 
79
227
  class Examples
80
228
 
81
- attr_writer :setup_block
82
-
83
229
  def initialize
84
230
  @examples = OrderedHash.new
85
231
  end
@@ -94,11 +240,10 @@ module Exemplor
94
240
  patterns = Regexp.new(patterns.join('|'))
95
241
  examples_to_run = @examples.select { |name,_| name =~ patterns }
96
242
  return 0 if examples_to_run.empty?
97
- examples_to_run.each do |name, body|
98
- status, out, stderr = run_example(body)
99
- print_yaml("#{status_icon(status)} #{name}" => out)
100
- print_stderr stderr
101
- fails +=1 if [:error,:failure].include?(status)
243
+ examples_to_run.each do |name, code|
244
+ result = ResultPrinter.new(name, *ExampleEnv.run(&code))
245
+ fails +=1 if result.failure?
246
+ puts($stdout.tty? ? result.fancy : result.yaml)
102
247
  end
103
248
  (fails.to_f/examples_to_run.size)*100
104
249
  end
@@ -106,103 +251,7 @@ module Exemplor
106
251
  def list(patterns)
107
252
  patterns = Regexp.new(patterns.join('|'))
108
253
  list = @examples.keys.select { |name| name =~ patterns }
109
- print_yaml list
110
- end
111
-
112
- def print_yaml(obj)
113
- out = obj.to_yaml.match(/^--- \n/).post_match
114
- out = colorize out if $stdout.tty?
115
- print(out)
116
- end
117
-
118
- def print_stderr(stderr)
119
- unless stderr.empty?
120
- $stdout.tty? ? $stdout.puts("#{Term::ANSIColor.reset}(STDERR):\n#{stderr}") : $stderr.puts(stderr)
121
- end
122
- end
123
-
124
- # hacky
125
- def colorize(out)
126
- require 'term/ansicolor'
127
- out.split("\n").map do |line|
128
- case line
129
- when /^(?:\s{2})?(\(s\))/
130
- start_color(line, :green)
131
- when /^(?:\s{2})?(\(f\))/
132
- start_color(line, :red)
133
- when /^(?:\s{2})?(\(e\))/
134
- start_color(line, :red)
135
- when /^(?:\s{2})?(\(i\))/i
136
- start_color(line, :blue)
137
- else
138
- line
139
- end
140
- end.join("\n") + "\n#{Term::ANSIColor.reset}"
141
- end
142
-
143
- def start_color(line, color)
144
- "#{Term::ANSIColor.reset}#{Term::ANSIColor.send(color)}#{line}"
145
- end
146
-
147
- def run_example(code)
148
- status = :info
149
- env = Example.new
150
- stderr = StringIO.new
151
- out = begin
152
- real_stderr = $stderr
153
- $stderr = stderr
154
-
155
- env.instance_eval(&Example.setup_block) if Example.setup_block
156
- value = env.instance_eval(&code)
157
- if env._checks.empty?
158
- render_value value
159
- else
160
- status = :infos if env._checks.all? { |check| check.info? }
161
- status = :success if env._checks.all? { |check| check.success? }
162
- status = :failure if env._checks.any? { |check| check.failure? }
163
- render_checks(env._checks)
164
- end
165
- rescue Object => error
166
- status = :error
167
- render_error(error)
168
- ensure
169
- $stderr = real_stderr
170
- end
171
- [status, out, stderr.rewind && stderr.read]
172
- end
173
-
174
- def render_checks(checks)
175
- failure = nil
176
- out = OrderedHash.new
177
- checks.each do |check|
178
- failure = check if check.failure?
179
- break if failure
180
-
181
- out["#{status_icon(check.status)} #{check.name}"] = render_value check.value
182
- end
183
- if failure
184
- fail_out = out["#{status_icon(failure.status)} #{failure.name}"] = OrderedHash.new
185
- fail_out['expected'] = failure.expectation
186
- fail_out['actual'] = render_value failure.value
187
- end
188
- out
189
- end
190
-
191
- def render_error(error)
192
- out = OrderedHash.new
193
- out['class'] = error.class.name
194
- out['message'] = error.message
195
- out['backtrace'] = error.backtrace
196
- out
197
- end
198
-
199
- def status_icon(status)
200
- icon = status == :infos ? '(I)' : "(#{status.to_s.slice(0,1)})"
201
- end
202
-
203
- # yaml doesn't want to print a class
204
- def render_value(value)
205
- value.kind_of?(Class) ? value.inspect : value
254
+ print YAML.without_header(list)
206
255
  end
207
256
 
208
257
  end
@@ -213,12 +262,26 @@ module Exemplor
213
262
  @examples ||= Examples.new
214
263
  end
215
264
 
265
+ def extract_example_file(caller_trace)
266
+ @example_file ||= caller_trace.first.split(":").first
267
+ end
268
+
269
+ # attr_reader :example_file
270
+
271
+ def run_directly?
272
+ @example_file == $0
273
+ end
274
+
216
275
  end
217
276
 
218
277
  end
219
278
 
279
+ # Defines an example. After definition, an example is an entry in the
280
+ # Examples.examples ordered hash, the key is the name, the body is the example
281
+ # code
220
282
  def eg(name = nil, &example)
221
- return Exemplor::Example if name.nil? && example.nil?
283
+ Exemplor.extract_example_file caller # only runs once
284
+ return Exemplor::ExampleEnv if name.nil? && example.nil?
222
285
  if name.nil?
223
286
  file, line_number = caller.first.match(/^(.+):(\d+)/).captures
224
287
  line = File.readlines(file)[line_number.to_i - 1].strip
@@ -228,11 +291,14 @@ def eg(name = nil, &example)
228
291
  Exemplor.examples.add(name, &example)
229
292
  end
230
293
 
294
+ # Parses the command line args and either runs or lists the examples.
231
295
  at_exit do
232
- args = ARGV.dup
233
- if args.delete('--list') || args.delete('-l')
234
- Exemplor.examples.list(args)
235
- else
236
- exit Exemplor.examples.run(args)
296
+ if Exemplor.run_directly?
297
+ args = ARGV.dup
298
+ if args.delete('--list') || args.delete('-l')
299
+ Exemplor.examples.list(args)
300
+ else
301
+ exit Exemplor.examples.run(args)
302
+ end
237
303
  end
238
- end
304
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exemplor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2000.2.0
4
+ version: 2010.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myles Byrne
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-03 00:00:00 +11:00
12
+ date: 2009-11-25 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -62,7 +62,6 @@ files:
62
62
  - examples/ten_percent_failures.rb
63
63
  - examples/with_checks.rb
64
64
  - examples/with_setup.rb
65
- - exemplor.gemspec
66
65
  - lib/exemplor.rb
67
66
  has_rdoc: true
68
67
  homepage: http://github.com/quackingduck/exemplor
data/exemplor.gemspec DELETED
@@ -1,80 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{exemplor}
8
- s.version = "2000.2.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Myles Byrne"]
12
- s.date = %q{2009-11-03}
13
- s.email = %q{myles@myles.id.au}
14
- s.extra_rdoc_files = [
15
- "README"
16
- ]
17
- s.files = [
18
- ".gitignore",
19
- "README",
20
- "Rakefile",
21
- "TODO",
22
- "VERSION",
23
- "examples.rb",
24
- "examples/an_error.rb",
25
- "examples/assertion_failure.rb",
26
- "examples/assertion_success.rb",
27
- "examples/assertion_success_and_failure.rb",
28
- "examples/check_parsing.rb",
29
- "examples/check_with_disambiguation.rb",
30
- "examples/checking_nil.rb",
31
- "examples/dumping_classes.rb",
32
- "examples/helpers.rb",
33
- "examples/no_checks.rb",
34
- "examples/no_checks_non_string.rb",
35
- "examples/oneliner.rb",
36
- "examples/ten_percent_failures.rb",
37
- "examples/with_checks.rb",
38
- "examples/with_setup.rb",
39
- "exemplor.gemspec",
40
- "lib/exemplor.rb"
41
- ]
42
- s.homepage = %q{http://github.com/quackingduck/exemplor}
43
- s.rdoc_options = ["--charset=UTF-8"]
44
- s.require_paths = ["lib"]
45
- s.rubygems_version = %q{1.3.5}
46
- s.summary = %q{A light-weight, low-fi way to provide executable usage examples of your code.}
47
- s.test_files = [
48
- "examples/an_error.rb",
49
- "examples/assertion_failure.rb",
50
- "examples/assertion_success.rb",
51
- "examples/assertion_success_and_failure.rb",
52
- "examples/check_parsing.rb",
53
- "examples/check_with_disambiguation.rb",
54
- "examples/checking_nil.rb",
55
- "examples/dumping_classes.rb",
56
- "examples/helpers.rb",
57
- "examples/no_checks.rb",
58
- "examples/no_checks_non_string.rb",
59
- "examples/oneliner.rb",
60
- "examples/ten_percent_failures.rb",
61
- "examples/with_checks.rb",
62
- "examples/with_setup.rb"
63
- ]
64
-
65
- if s.respond_to? :specification_version then
66
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
67
- s.specification_version = 3
68
-
69
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
70
- s.add_runtime_dependency(%q<orderedhash>, [">= 0.0.6"])
71
- s.add_runtime_dependency(%q<term-ansicolor>, [">= 1.0.3"])
72
- else
73
- s.add_dependency(%q<orderedhash>, [">= 0.0.6"])
74
- s.add_dependency(%q<term-ansicolor>, [">= 1.0.3"])
75
- end
76
- else
77
- s.add_dependency(%q<orderedhash>, [">= 0.0.6"])
78
- s.add_dependency(%q<term-ansicolor>, [">= 1.0.3"])
79
- end
80
- end