tryouts 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,5 +1,11 @@
1
1
  TRYOUTS, CHANGES
2
2
 
3
+ #### 0.8.1 (2009-07-14) ###############################
4
+
5
+ * CHANGE: Fixed parentheses warning in tryouts.rb for Ruby 1.8
6
+ * CHANGE: rye is now loaded when running CLI tryouts.
7
+
8
+
3
9
  #### 0.8.0 (2009-07-01) ###############################
4
10
 
5
11
  NOTE: :cli drills are available again
data/README.rdoc CHANGED
@@ -13,7 +13,14 @@ A tryout is made up of one of more drills. The return value of the drill block i
13
13
 
14
14
  == Installation
15
15
 
16
+ Via Rubygems, one of:
17
+
16
18
  $ gem install tryouts
19
+ $ gem install delano-tryouts
20
+
21
+ or via download:
22
+ * tryouts-latest.tar.gz[http://github.com/delano/tryouts/tarball/latest]
23
+ * tryouts-latest.zip[http://github.com/delano/tryouts/zipball/latest]
17
24
 
18
25
 
19
26
  == Writing Tests
@@ -1,4 +1,5 @@
1
1
 
2
+
2
3
  class Tryouts
3
4
  class Tryout
4
5
 
@@ -20,6 +20,9 @@ class Tryouts::Drill
20
20
  ##return false unless reality.error.nil? && reality.trace.nil?
21
21
  return true if reality.output == true and dream.nil?
22
22
 
23
+ # Refactor like:
24
+ # http://github.com/why/hpricot/blob/master/lib/hpricot/elements.rb#L475
25
+
23
26
  begin
24
27
  case dream.format
25
28
  when :exception
@@ -17,6 +17,7 @@ class Tryouts; class Drill; module Sergeant
17
17
  attr_accessor :command
18
18
 
19
19
  def initialize(*args)
20
+ require 'rye' # Make sure rye is loaded
20
21
  @command = args.shift
21
22
  @rbox_args = args
22
23
  @rbox = Rye::Box.new
data/lib/tryouts.rb CHANGED
@@ -4,7 +4,10 @@ require 'sysinfo'
4
4
  require 'digest/sha1'
5
5
  require 'ostruct'
6
6
  require 'yaml'
7
- require 'rye'
7
+
8
+ ## NOTE: Don't require rye here so
9
+ ## we can still run tryouts on the
10
+ ## development version.
8
11
 
9
12
  begin; require 'json'; rescue LoadError; end # json may not be installed
10
13
 
@@ -42,7 +45,7 @@ class Tryouts
42
45
  end
43
46
  end
44
47
 
45
- VERSION = "0.8.0"
48
+ VERSION = "0.8.1"
46
49
 
47
50
  require 'tryouts/mixins'
48
51
  require 'tryouts/tryout'
@@ -120,8 +123,8 @@ class Tryouts
120
123
  # Add a shell command to Rye::Cmd and save the command name
121
124
  # in @@commands so it can be used as the default for drills
122
125
  def command(name=nil, path=nil)
123
- #raise "command testing is temporarily disabled"
124
126
  return @command if name.nil?
127
+ require 'rye'
125
128
  @command = name.to_sym
126
129
  @dtype = :cli
127
130
  Rye::Cmd.module_eval do
@@ -150,7 +153,7 @@ class Tryouts
150
153
  def library(name=nil, *path)
151
154
  return @library if name.nil?
152
155
  @library, @dtype = name.to_sym, :api
153
- path = File.expand_path(File.join *path)
156
+ path = File.expand_path(File.join(*path))
154
157
  $LOAD_PATH.unshift path unless path.nil?
155
158
  begin
156
159
  require @library.to_s
@@ -304,7 +307,6 @@ class Tryouts
304
307
  inst.tryouts.each_pair do |name,to|
305
308
  to.run
306
309
  to.report
307
- STDOUT.flush
308
310
  end
309
311
  end
310
312
  end
data/tryouts.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "tryouts"
3
3
  s.rubyforge_project = "tryouts"
4
- s.version = "0.8.0"
5
- s.summary = "Basketball tryouts for your Ruby codes and command line apps. Go for it!"
4
+ s.version = "0.8.1"
5
+ s.summary = "Tryouts is a high-level testing library (DSL) for your Ruby codes and command-line applications."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
8
8
  s.email = "tryouts@solutious.com"
@@ -75,14 +75,6 @@
75
75
  if s.respond_to? :specification_version then
76
76
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
77
77
  s.specification_version = 2
78
-
79
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
80
- #s.add_runtime_dependency(%q<RedCloth>, [">= 4.0.4"])
81
- else
82
- #s.add_dependency(%q<RedCloth>, [">= 4.0.4"])
83
- end
84
- else
85
- #s.add_dependency(%q<RedCloth>, [">= 4.0.4"])
86
78
  end
87
79
 
88
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tryouts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-01 00:00:00 -04:00
12
+ date: 2009-07-15 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,7 +42,7 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: "0"
44
44
  version:
45
- description: Basketball tryouts for your Ruby codes and command line apps. Go for it!
45
+ description: Tryouts is a high-level testing library (DSL) for your Ruby codes and command-line applications.
46
46
  email: tryouts@solutious.com
47
47
  executables:
48
48
  - sergeant
@@ -90,7 +90,7 @@ post_install_message:
90
90
  rdoc_options:
91
91
  - --line-numbers
92
92
  - --title
93
- - "Tryouts: Basketball tryouts for your Ruby codes and command line apps. Go for it!"
93
+ - "Tryouts: Tryouts is a high-level testing library (DSL) for your Ruby codes and command-line applications."
94
94
  - --main
95
95
  - README.rdoc
96
96
  require_paths:
@@ -113,6 +113,6 @@ rubyforge_project: tryouts
113
113
  rubygems_version: 1.3.2
114
114
  signing_key:
115
115
  specification_version: 2
116
- summary: Basketball tryouts for your Ruby codes and command line apps. Go for it!
116
+ summary: Tryouts is a high-level testing library (DSL) for your Ruby codes and command-line applications.
117
117
  test_files: []
118
118