<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/mspec/commands/mkspec_command.rb</filename>
    </added>
    <added>
      <filename>lib/mspec/commands/mspec-ci_command.rb</filename>
    </added>
    <added>
      <filename>lib/mspec/commands/mspec-run_command.rb</filename>
    </added>
    <added>
      <filename>lib/mspec/commands/mspec-tag_command.rb</filename>
    </added>
    <added>
      <filename>lib/mspec/commands/mspec_command.rb</filename>
    </added>
    <added>
      <filename>mspec-1.0.0.gemspec</filename>
    </added>
    <added>
      <filename>spec/commands/mkspec_spec.rb</filename>
    </added>
    <added>
      <filename>spec/commands/mspec_ci_spec.rb</filename>
    </added>
    <added>
      <filename>spec/commands/mspec_run_spec.rb</filename>
    </added>
    <added>
      <filename>spec/commands/mspec_spec.rb</filename>
    </added>
    <added>
      <filename>spec/commands/mspec_tag_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,4 @@
+pkg/*
 *.rbc
 *.iml
 *.iws</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,44 @@
 require 'rubygems'
 require 'spec/rake/spectask'
+require 'rake/gempackagetask'
 
 Spec::Rake::SpecTask.new
 
 task :default =&gt; :spec
+
+
+spec = Gem::Specification.new do |s|
+  s.name                      = %q{mspec}
+  s.version                   = &quot;1.0.0&quot;
+
+  s.specification_version     = 2 if s.respond_to? :specification_version=
+
+  s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
+  s.authors                   = [&quot;Brian Ford&quot;]
+  s.date                      = %q{2008-05-21}
+  s.email                     = %q{bford@engineyard.com}
+  s.has_rdoc                  = true
+  s.extra_rdoc_files          = %w[ README LICENSE ]
+  s.executables               = [&quot;mkspec&quot;, &quot;mspec&quot;, &quot;mspec-ci&quot;, &quot;mspec-run&quot;, &quot;mspec-tag&quot;]
+  s.files                     = FileList[ '{bin,lib,spec}/**/*.{yaml,txt,rb}', 'Rakefile', *s.extra_rdoc_files ]
+  s.homepage                  = %q{http://rubyspec.org}
+  s.rubyforge_project         = 'http://rubyforge.org/projects/mspec'
+  s.require_paths             = [&quot;lib&quot;]
+  s.rubygems_version          = %q{1.1.1}
+  s.summary                   = &lt;&lt;EOS 
+MSpec is a specialized framework that is syntax-compatible 
+with RSpec for basic things like describe, it blocks and 
+before, after actions.
+
+MSpec contains additional features that assist in writing 
+the RubySpecs used by multiple Ruby implementations. Also, 
+MSpec attempts to use the simplest Ruby language features 
+so that beginning Ruby implementations can run it.
+EOS
+  
+  s.rdoc_options &lt;&lt; '--title' &lt;&lt; 'MSpec Gem' &lt;&lt;
+                   '--main' &lt;&lt; 'README' &lt;&lt;
+                   '--line-numbers'
+end
+
+Rake::GemPackageTask.new(spec){ |pkg| pkg.gem_spec = spec }
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,134 +2,6 @@
 
 $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
 
-require 'fileutils'
-require 'optparse'
-require 'mspec/version'
-require 'mspec/utils/name_map'
+require 'mspec/commands/mkspec_command'
 
-
-class MkSpec
-  attr_reader :config
-
-  def initialize
-    @config = {
-      :constants =&gt; [],
-      :requires  =&gt; [],
-      :base      =&gt; &quot;spec/ruby/1.8/core&quot;
-    }
-    @map = NameMap.new
-  end
-
-  def options(argv=ARGV)
-    options = OptionParser.new
-    options.version = MSpec::VERSION
-    options.banner = &quot;mkspec [options]&quot;
-    options.separator &quot;&quot;
-
-    options.on(&quot;-c&quot;, &quot;--constant CONSTANT&quot;, String,
-               &quot;Class or Module to generate spec stubs for&quot;) do |name|
-      config[:constants] &lt;&lt; name
-    end
-    options.on(&quot;-b&quot;, &quot;--base DIR&quot;, String,
-               &quot;Directory to generate specs into&quot;) do |directory|
-      config[:base] = File.expand_path directory
-    end
-    options.on(&quot;-r&quot;, &quot;--require LIBRARY&quot;, String,
-               &quot;A library to require&quot;) do |file|
-      config[:requires] &lt;&lt; file
-    end
-
-    options.separator &quot;\n How might this work in the real world?\n&quot;
-    options.separator &quot;   1. To create spec stubs for every class or module in Object\n&quot;
-    options.separator &quot;     $ mkspec\n&quot;
-    options.separator &quot;   2. To create spec stubs for Fixnum\n&quot;
-    options.separator &quot;     $ mkspec -c Fixnum\n&quot;
-    options.separator &quot;   3. To create spec stubs for Complex in 'superspec/complex'\n&quot;
-    options.separator &quot;     $ mkspec -c Complex -rcomplex -b superspec&quot;
-    options.separator &quot;&quot;
-
-    options.parse argv
-  rescue OptionParser::ParseError =&gt; e
-    puts options
-    puts
-    puts e
-    exit 1
-  end
-
-  def create_directory(mod)
-    subdir = @map.dir_name mod, config[:base]
-
-    if File.exist? subdir
-      unless File.directory? subdir
-        puts &quot;#{subdir} already exists and is not a directory.&quot;
-        return nil
-      end
-    else
-      FileUtils.mkdir_p subdir
-    end
-
-    subdir
-  end
-
-  def write_requires(dir, file)
-    /\A#{Regexp.escape config[:base]}\/?(.*)/ =~ dir
-    parents = '../' * ($1.split('/').length + 1)
-
-    File.open file, 'w' do |f|
-      f.puts &quot;require File.dirname(__FILE__) + '/#{parents}spec_helper'&quot;
-      config[:requires].each do |lib|
-        f.puts &quot;require '#{lib}'&quot;
-      end
-    end
-  end
-
-  def write_spec(file, meth, exists)
-    if exists
-      out = `mspec/bin/mspec-run --dry-run -fs -e '#{meth}' #{file}`
-      return if out =~ /#{Regexp.escape meth}/
-    end
-
-    File.open file, 'a' do |f|
-      f.puts &lt;&lt;-EOS
-
-describe &quot;#{meth}&quot; do
-  it &quot;needs to be reviewed for spec completeness&quot; do
-  end
-end
-EOS
-    end
-
-    puts file
-  end
-
-  def create_file(dir, mod, meth, name)
-    file = File.join dir, @map.file_name(meth, mod)
-    exists = File.exist? file
-
-    write_requires dir, file unless exists
-    write_spec file, name, exists
-  end
-
-  def run
-    config[:requires].each { |lib| require lib }
-    constants = config[:constants]
-    constants = @map.filter(Object.constants) if constants.empty?
-
-    @map.map({}, constants).each do |mod, methods|
-      name = mod.chop
-      next unless dir = create_directory(name)
-
-      methods.each { |method| create_file dir, name, method, mod + method }
-    end
-  end
-
-  def self.main
-    ENV['MSPEC_RUNNER'] = '1'
-
-    script = new
-    script.options
-    script.run
-  end
-end
-
-MkSpec.main if __FILE__ == $0
+MkSpec.main</diff>
      <filename>bin/mkspec</filename>
    </modified>
    <modified>
      <diff>@@ -1,145 +1,6 @@
 #!/usr/bin/env ruby
 
-MSPEC_HOME = File.expand_path(File.dirname(__FILE__) + '/..')
-$:.unshift &quot;#{MSPEC_HOME}/lib&quot;
+$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
+require 'mspec/commands/mspec_command'
 
-require 'optparse'
-require 'mspec/utils/options'
-require 'mspec/utils/script'
-require 'mspec/helpers/tmp'
-require 'mspec/runner/actions/timer'
-
-
-class MSpecMain &lt; MSpecScript
-  def initialize
-    config[:includes] = []
-    config[:requires] = []
-    config[:target]   = ENV['RUBY'] || 'ruby'
-    config[:flags]    = []
-    config[:command]  = nil
-    config[:options]  = []
-  end
-
-  def options(argv=ARGV)
-    if [&quot;ci&quot;, &quot;run&quot;, &quot;tag&quot;].include? argv[0]
-      config[:command] = argv.shift
-      config[:options] &lt;&lt; &quot;-h&quot; if argv.delete(&quot;-h&quot;) || argv.delete(&quot;--help&quot;)
-      config[:options] &lt;&lt; &quot;-v&quot; if argv.delete(&quot;-v&quot;) || argv.delete(&quot;--version&quot;)
-    end
-
-    options = MSpecOptions.new config, &quot;[COMMAND]&quot;, &quot;&quot;, 28, &quot;   &quot;
-
-    options.separator &quot;&quot;
-    options.separator &quot;  The mspec command sets up and invokes the sub-commands&quot;
-    options.separator &quot;  (see below) to enable, for instance, running the specs&quot;
-    options.separator &quot;  with different implementations like ruby, jruby, rbx, etc.\n&quot;
-
-    options.add_config do |f|
-      config[:options] &lt;&lt; '-B' &lt;&lt; f
-    end
-
-    options.add_targets
-
-    options.on(&quot;-D&quot;, &quot;--gdb&quot;, &quot;Run under gdb&quot;) do
-      config[:flags] &lt;&lt; '--gdb'
-    end
-    options.on(&quot;-A&quot;, &quot;--valgrind&quot;, &quot;Run under valgrind&quot;) do
-      config[:flags] &lt;&lt; '--valgrind'
-    end
-    options.on(&quot;--warnings&quot;, &quot;Don't supress warnings&quot;) do
-      config[:flags] &lt;&lt; '-w'
-      ENV['OUTPUT_WARNINGS'] = '1'
-    end
-    options.on(&quot;-j&quot;, &quot;--multi&quot;, &quot;Run multiple (possibly parallel) subprocesses&quot;) do
-      config[:multi] = true
-      config[:options] &lt;&lt; &quot;-fy&quot;
-    end
-    options.add_version
-    options.on(&quot;-h&quot;, &quot;--help&quot;, &quot;Show this message&quot;) do
-      puts options.parser
-      exit
-    end
-
-    # The rest of the help output
-    options.separator &quot;\n  where COMMAND is one of:\n&quot;
-    options.separator &quot;    run - Run the specified specs (default)&quot;
-    options.separator &quot;    ci  - Run the known good specs&quot;
-    options.separator &quot;    tag - Add or remove tags\n&quot;
-    options.separator &quot;  mspec COMMAND -h for more options\n&quot;
-
-    config[:options] += options.parser.filter! argv
-    options.parse argv
-  end
-
-  def register; end
-
-  def parallel
-    @parallel ||= !(Object.const_defined?(:JRUBY_VERSION) ||
-                  /(mswin|mingw)/ =~ RUBY_PLATFORM)
-  end
-
-  def fork(&amp;block)
-    parallel ? Kernel.fork(&amp;block) : block.call
-  end
-
-  def report(files, timer)
-    require 'yaml'
-
-    exceptions = []
-    tally = Tally.new
-
-    files.each do |file|
-      d = File.open(file, &quot;r&quot;) { |f| YAML.load f }
-      File.delete file
-
-      exceptions += Array(d['exceptions'])
-      tally.files!        d['files']
-      tally.examples!     d['examples']
-      tally.expectations! d['expectations']
-      tally.errors!       d['errors']
-      tally.failures!     d['failures']
-    end
-
-    print &quot;\n&quot;
-    exceptions.each_with_index do |exc, index|
-      print &quot;\n#{index+1})\n&quot;, exc, &quot;\n&quot;
-    end
-    print &quot;\n#{timer.format}\n\n#{tally.format}\n&quot;
-  end
-
-  def multi_exec(argv)
-    timer = TimerAction.new
-    timer.start
-
-    files = config[:ci_files].inject([]) do |list, item|
-      name = tmp &quot;mspec-ci-multi-#{list.size}&quot;
-
-      rest = argv + [&quot;-o&quot;, name, item]
-      fork { system [config[:target], *rest].join(&quot; &quot;) }
-
-      list &lt;&lt; name
-    end
-
-    Process.waitall
-    timer.finish
-    report files, timer
-  end
-
-  def run
-    ENV['MSPEC_RUNNER'] = '1'
-
-    argv = config[:flags]
-    argv.concat config[:includes]
-    argv.concat config[:requires]
-    argv &lt;&lt; &quot;#{MSPEC_HOME}/bin/mspec-#{ config[:command] || &quot;run&quot; }&quot;
-    argv.concat config[:options]
-
-    if config[:multi] and config[:command] == &quot;ci&quot;
-      multi_exec argv
-    else
-      exec config[:target], *argv
-    end
-  end
-end
-
-MSpecMain.main if __FILE__ == $0
+MSpecMain.main</diff>
      <filename>bin/mspec</filename>
    </modified>
    <modified>
      <diff>@@ -2,75 +2,7 @@
 
 $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
 
-require 'optparse'
-require 'mspec/utils/options'
-require 'mspec/utils/script'
+require 'mspec/commands/mspec-ci_command'
+require 'mspec'
 
-
-class MSpecCI &lt; MSpecScript
-  def options(argv=ARGV)
-    options = MSpecOptions.new config, &quot;ci&quot;, &quot;&quot;, 28, &quot;   &quot;
-
-    options.separator &quot; Ask yourself:&quot;
-    options.separator &quot;  1. How to run the specs?&quot;
-    options.separator &quot;  2. How to display the output?&quot;
-    options.separator &quot;  3. What action to perform?&quot;
-    options.separator &quot;  4. When to perform it?&quot;
-
-    options.separator &quot;\n How to run the specs&quot;
-    options.add_config { |f| load f }
-    options.add_name
-    options.add_tags_dir
-    options.add_pretend
-    options.add_interrupt
-
-    options.separator &quot;\n How to display their output&quot;
-    options.add_formatters
-    options.add_verbose
-
-    options.separator &quot;\n What action to perform&quot;
-    options.add_actions
-
-    options.separator &quot;\n When to perform it&quot;
-    options.add_action_filters
-
-    options.separator &quot;\n Help!&quot;
-    options.add_version
-    options.add_help
-
-    options.separator &quot;\n How might this work in the real world?&quot;
-    options.separator &quot;\n   1. To simply run the known good specs&quot;
-    options.separator &quot;\n     $ mspec ci&quot;
-    options.separator &quot;\n   2. To run a subset of the known good specs&quot;
-    options.separator &quot;\n     $ mspec ci path/to/specs&quot;
-    options.separator &quot;\n   3. To start the debugger before the spec matching 'this crashes'&quot;
-    options.separator &quot;\n     $ mspec ci --spec-debug -S 'this crashes'&quot;
-    options.separator &quot;&quot;
-
-    @patterns = options.parse argv
-    @patterns = config[:ci_files] if @patterns.empty?
-  end
-
-  def run
-    files = []
-    @patterns.each do |item|
-      stat = File.stat(File.expand_path(item))
-      files &lt;&lt; item if stat.file?
-      files.concat(Dir[item+&quot;/**/*_spec.rb&quot;].sort) if stat.directory?
-    end
-
-    MSpec.register_tags_path config[:tags_dir]
-    MSpec.register_files files
-    TagFilter.new(:exclude, &quot;fails&quot;).register
-    TagFilter.new(:exclude, &quot;unstable&quot;).register
-    TagFilter.new(:exclude, &quot;incomplete&quot;).register
-
-    MSpec.process
-    exit MSpec.exit_code
-  end
-end
-
-if __FILE__ == $0
-  require 'mspec'
-  MSpecCI.main
-end
\ No newline at end of file
+MSpecCI.main</diff>
      <filename>bin/mspec-ci</filename>
    </modified>
    <modified>
      <diff>@@ -2,83 +2,7 @@
 
 $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
 
-require 'optparse'
-require 'mspec/utils/options'
-require 'mspec/utils/script'
+require 'mspec/commands/mspec-run_command'
+require 'mspec'
 
-
-class MSpecRun &lt; MSpecScript
-  def options(argv=ARGV)
-    options = MSpecOptions.new config, &quot;run&quot;, &quot;&quot;, 28, &quot;   &quot;
-
-    options.separator &quot; Ask yourself:&quot;
-    options.separator &quot;  1. What specs to run?&quot;
-    options.separator &quot;  2. How to modify the execution?&quot;
-    options.separator &quot;  3. How to display the output?&quot;
-    options.separator &quot;  4. What action to perform?&quot;
-    options.separator &quot;  5. When to perform it?&quot;
-
-    options.separator &quot;\n What specs to run&quot;
-    options.add_filters
-
-    options.separator &quot;\n How to modify the execution&quot;
-    options.add_config { |f| load f }
-    options.add_name
-    options.add_tags_dir
-    options.add_randomize
-    options.add_pretend
-    options.add_interrupt
-
-    options.separator &quot;\n How to display their output&quot;
-    options.add_formatters
-    options.add_verbose
-
-    options.separator &quot;\n What action to perform&quot;
-    options.add_actions
-    options.add_verify
-
-    options.separator &quot;\n When to perform it&quot;
-    options.add_action_filters
-
-    options.separator &quot;\n Help!&quot;
-    options.add_version
-    options.add_help
-
-    options.separator &quot;\n How might this work in the real world?&quot;
-    options.separator &quot;\n   1. To simply run some specs&quot;
-    options.separator &quot;\n     $ mspec path/to/the/specs&quot;
-    options.separator &quot;     mspec path/to/the_file_spec.rb&quot;
-    options.separator &quot;\n   2. To run specs tagged with 'fails'&quot;
-    options.separator &quot;\n     $ mspec -g fails path/to/the_file_spec.rb&quot;
-    options.separator &quot;\n   3. To start the debugger before the spec matching 'this crashes'&quot;
-    options.separator &quot;\n     $ mspec --spec-debug -S 'this crashes' path/to/the_file_spec.rb&quot;
-    options.separator &quot;&quot;
-
-    @patterns = options.parse argv
-    if @patterns.empty?
-      puts options.parser
-      puts &quot;No files specified.&quot;
-      exit 1
-    end
-  end
-
-  def run
-    files = []
-    @patterns.each do |item|
-      stat = File.stat(File.expand_path(item))
-      files &lt;&lt; item if stat.file?
-      files.concat(Dir[item+&quot;/**/*_spec.rb&quot;].sort) if stat.directory?
-    end
-
-    MSpec.register_tags_path config[:tags_dir]
-    MSpec.register_files files
-
-    MSpec.process
-    exit MSpec.exit_code
-  end
-end
-
-if __FILE__ == $0
-  require 'mspec'
-  MSpecRun.main
-end
+MSpecRun.main</diff>
      <filename>bin/mspec-run</filename>
    </modified>
    <modified>
      <diff>@@ -2,92 +2,7 @@
 
 $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
 
-require 'optparse'
-require 'mspec/utils/options'
-require 'mspec/utils/script'
+require 'mspec/commands/mspec-tag_command'
+require 'mspec'
 
-
-class MSpecTag &lt; MSpecScript
-  def initialize
-    super
-
-    config[:tagger]  = :add
-    config[:tag]     = 'fails:'
-    config[:outcome] = :fail
-  end
-
-  def options(argv=ARGV)
-    options = MSpecOptions.new config, &quot;tag&quot;, &quot;&quot;, 28, &quot;   &quot;
-
-    options.separator &quot; Ask yourself:&quot;
-    options.separator &quot;  1. What specs to run?&quot;
-    options.separator &quot;  2. How to modify the execution?&quot;
-    options.separator &quot;  3. How to display the output?&quot;
-    options.separator &quot;  4. What tag action to perform?&quot;
-    options.separator &quot;  5. When to perform it?&quot;
-
-    options.separator &quot;\n What specs to run&quot;
-    options.add_filters
-
-    options.separator &quot;\n How to modify the execution&quot;
-    options.add_config { |f| load f }
-    options.add_name
-    options.add_tags_dir
-    options.add_pretend
-    options.add_interrupt
-
-    options.separator &quot;\n How to display their output&quot;
-    options.add_formatters
-    options.add_verbose
-
-    options.separator &quot;\n What action to perform and when to perform it&quot;
-    options.add_tagging
-
-    options.separator &quot;\n Help!&quot;
-    options.add_version
-    options.add_help
-
-    options.separator &quot;\n How might this work in the real world?&quot;
-    options.separator &quot;\n   1. To add the 'fails' tag to failing specs&quot;
-    options.separator &quot;\n     $ mspec tag path/to/the_file_spec.rb&quot;
-    options.separator &quot;\n   2. To remove the 'fails' tag from passing specs&quot;
-    options.separator &quot;\n     $ mspec tag --del fails path/to/the_file_spec.rb&quot;
-    options.separator &quot;&quot;
-
-    @patterns = options.parse argv
-    if @patterns.empty?
-      puts options.parser
-      puts &quot;No files specified.&quot;
-      exit 1
-    end
-  end
-
-  def register
-    super
-
-    tag = SpecTag.new config[:tag]
-    tagger = TagAction.new(config[:tagger], config[:outcome], tag.tag, tag.comment,
-                           config[:atags], config[:astrings])
-    tagger.register
-  end
-
-  def run
-    files = []
-    @patterns.each do |item|
-      stat = File.stat(File.expand_path(item))
-      files &lt;&lt; item if stat.file?
-      files.concat(Dir[item+&quot;/**/*_spec.rb&quot;].sort) if stat.directory?
-    end
-
-    MSpec.register_tags_path config[:tags_dir]
-    MSpec.register_files files
-
-    MSpec.process
-    exit MSpec.exit_code
-  end
-end
-
-if __FILE__ == $0
-  require 'mspec'
-  MSpecTag.main
-end
+MSpecTag.main</diff>
      <filename>bin/mspec-tag</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+
 require 'mspec/runner/state'
 require 'mspec/runner/tag'
 require 'fileutils'</diff>
      <filename>lib/mspec/runner/mspec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>spec/bin/mkspec_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/bin/mspec_ci_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/bin/mspec_run_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/bin/mspec_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/bin/mspec_tag_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>477df68a6fd8515bf2ee28db69378bcf5105117f</id>
    </parent>
  </parents>
  <author>
    <name>Gordon Thiesfeld</name>
    <email>gthiesfeld@gmail.com</email>
  </author>
  <url>http://github.com/brixen/mspec/commit/820a70bca8bbd61e2941ee4e9aa66d114104b980</url>
  <id>820a70bca8bbd61e2941ee4e9aa66d114104b980</id>
  <committed-date>2008-05-31T15:46:06-07:00</committed-date>
  <authored-date>2008-05-31T15:46:06-07:00</authored-date>
  <message>Gemified MSpec.

Signed-off-by: Brian Ford &lt;bford@engineyard.com&gt;</message>
  <tree>f972d8eb0001799e3a7ab7e3f093a61a5ea0ade5</tree>
  <committer>
    <name>Brian Ford</name>
    <email>bford@engineyard.com</email>
  </committer>
</commit>
