mofo 0.2.2 → 0.2.3

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.
Files changed (64) hide show
  1. data/CHANGELOG +6 -0
  2. data/Manifest.txt +55 -0
  3. data/Rakefile +32 -0
  4. data/init.rb +2 -0
  5. data/lib/microformat.rb +39 -6
  6. data/lib/mofo/hentry.rb +4 -0
  7. data/site/index.html +382 -0
  8. data/site/mofo-logo.png +0 -0
  9. data/site/mootools.v1.00.js +2 -0
  10. data/site/style.css +159 -0
  11. data/test/base_url_test.rb +22 -0
  12. data/test/fixtures/corkd.html +1 -1
  13. data/test/hatom_test.rb +1 -1
  14. data/test/hreview_test.rb +4 -3
  15. data/test/include_pattern_test.rb +1 -1
  16. data/test/test_helper.rb +17 -6
  17. metadata +63 -115
  18. data/test/format_test.rb +0 -230
  19. data/vendor/testspec-0.3.0/ChangeLog +0 -177
  20. data/vendor/testspec-0.3.0/README +0 -289
  21. data/vendor/testspec-0.3.0/ROADMAP +0 -1
  22. data/vendor/testspec-0.3.0/Rakefile +0 -151
  23. data/vendor/testspec-0.3.0/SPECS +0 -108
  24. data/vendor/testspec-0.3.0/TODO +0 -2
  25. data/vendor/testspec-0.3.0/bin/specrb +0 -104
  26. data/vendor/testspec-0.3.0/doc/classes/Kernel.html +0 -140
  27. data/vendor/testspec-0.3.0/doc/classes/Object.html +0 -155
  28. data/vendor/testspec-0.3.0/doc/classes/Test/Spec.html +0 -128
  29. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/CustomShould.html +0 -236
  30. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/DefinitionError.html +0 -111
  31. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/Should.html +0 -884
  32. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/ShouldNot.html +0 -487
  33. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/TestCase.html +0 -220
  34. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/TestCase/ClassMethods.html +0 -318
  35. data/vendor/testspec-0.3.0/doc/classes/Test/Spec/TestCase/InstanceMethods.html +0 -195
  36. data/vendor/testspec-0.3.0/doc/classes/Test/Unit/UI/RDox/TestRunner.html +0 -222
  37. data/vendor/testspec-0.3.0/doc/classes/Test/Unit/UI/SpecDox/TestRunner.html +0 -476
  38. data/vendor/testspec-0.3.0/doc/created.rid +0 -1
  39. data/vendor/testspec-0.3.0/doc/files/README.html +0 -516
  40. data/vendor/testspec-0.3.0/doc/files/ROADMAP.html +0 -109
  41. data/vendor/testspec-0.3.0/doc/files/SPECS.html +0 -386
  42. data/vendor/testspec-0.3.0/doc/files/lib/test/spec/dox_rb.html +0 -108
  43. data/vendor/testspec-0.3.0/doc/files/lib/test/spec/rdox_rb.html +0 -108
  44. data/vendor/testspec-0.3.0/doc/files/lib/test/spec/should-output_rb.html +0 -115
  45. data/vendor/testspec-0.3.0/doc/files/lib/test/spec_rb.html +0 -123
  46. data/vendor/testspec-0.3.0/doc/fr_class_index.html +0 -38
  47. data/vendor/testspec-0.3.0/doc/fr_file_index.html +0 -33
  48. data/vendor/testspec-0.3.0/doc/fr_method_index.html +0 -102
  49. data/vendor/testspec-0.3.0/doc/index.html +0 -24
  50. data/vendor/testspec-0.3.0/doc/rdoc-style.css +0 -208
  51. data/vendor/testspec-0.3.0/examples/stack.rb +0 -38
  52. data/vendor/testspec-0.3.0/examples/stack_spec.rb +0 -119
  53. data/vendor/testspec-0.3.0/lib/test/spec.rb +0 -490
  54. data/vendor/testspec-0.3.0/lib/test/spec/dox.rb +0 -122
  55. data/vendor/testspec-0.3.0/lib/test/spec/rdox.rb +0 -25
  56. data/vendor/testspec-0.3.0/lib/test/spec/should-output.rb +0 -49
  57. data/vendor/testspec-0.3.0/test/spec_dox.rb +0 -39
  58. data/vendor/testspec-0.3.0/test/spec_flexmock.rb +0 -210
  59. data/vendor/testspec-0.3.0/test/spec_mocha.rb +0 -118
  60. data/vendor/testspec-0.3.0/test/spec_nestedcontexts.rb +0 -26
  61. data/vendor/testspec-0.3.0/test/spec_should-output.rb +0 -26
  62. data/vendor/testspec-0.3.0/test/spec_testspec.rb +0 -522
  63. data/vendor/testspec-0.3.0/test/spec_testspec_order.rb +0 -26
  64. data/vendor/testspec-0.3.0/test/test_testunit.rb +0 -21
@@ -1 +0,0 @@
1
- Version 1.0 (February 2006):: first stable release.
@@ -1,151 +0,0 @@
1
- # Rakefile for testspec. -*-ruby-*-
2
- require 'rake/rdoctask'
3
- require 'rake/testtask'
4
-
5
-
6
- desc "Run all the tests"
7
- task :default => [:test]
8
-
9
- desc "Do predistribution stuff"
10
- task :predist => [:chmod, :changelog, :rdoc]
11
-
12
-
13
- desc "Make an archive as .tar.gz"
14
- task :dist => :test do
15
- system "export DARCS_REPO=#{File.expand_path "."}; " +
16
- "darcs dist -d test-spec#{get_darcs_tree_version}"
17
- end
18
-
19
- # Helper to retrieve the "revision number" of the darcs tree.
20
- def get_darcs_tree_version
21
- return "" unless File.directory? "_darcs"
22
-
23
- changes = `darcs changes`
24
- count = 0
25
- tag = "0.0"
26
-
27
- changes.each("\n\n") { |change|
28
- head, title, desc = change.split("\n", 3)
29
-
30
- if title =~ /^ \*/
31
- # Normal change.
32
- count += 1
33
- elsif title =~ /tagged (.*)/
34
- # Tag. We look for these.
35
- tag = $1
36
- break
37
- else
38
- warn "Unparsable change: #{change}"
39
- end
40
- }
41
-
42
- "-" + tag + "." + count.to_s
43
- end
44
-
45
- desc "Make binaries executable"
46
- task :chmod do
47
- Dir["bin/*"].each { |binary| File.chmod(0775, binary) }
48
- end
49
-
50
- desc "Generate a ChangeLog"
51
- task :changelog do
52
- system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
53
- end
54
-
55
-
56
- desc "Generate RDox"
57
- task "SPECS" do
58
- ruby "bin/specrb -Ilib:test -a --rdox >SPECS"
59
- end
60
-
61
-
62
- begin
63
- # To generate the gem, run "rake package"
64
-
65
- $" << "sources" if defined? FromSrc
66
- require 'rubygems'
67
-
68
- require 'rake'
69
- require 'rake/clean'
70
- require 'rake/packagetask'
71
- require 'rake/gempackagetask'
72
- require 'rake/contrib/rubyforgepublisher'
73
- require 'fileutils'
74
- require 'hoe'
75
- rescue LoadError
76
- # Too bad.
77
-
78
- desc "Run all the tests"
79
- task :test => :chmod do
80
- ruby "bin/specrb -Ilib:test -w #{ENV['TEST'] || '-a'} #{ENV['TESTOPTS']}"
81
- end
82
-
83
- else
84
-
85
- RDOC_OPTS = ['--title', "test/spec documentation",
86
- "--opname", "index.html",
87
- "--line-numbers",
88
- "--main", "README",
89
- "--inline-source"]
90
-
91
- # Generate all the Rake tasks
92
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
93
- hoe = Hoe.new("test-spec", get_darcs_tree_version[1..-1]) do |p|
94
- p.author = "Christian Neukirchen"
95
- p.description = "a Behaviour Driven Development interface for Test::Unit"
96
- p.email = "chneukirchen@gmail.com"
97
- p.summary = <<EOF
98
- test/spec layers an RSpec-inspired interface on top of Test::Unit, so
99
- you can mix TDD and BDD (Behavior-Driven Development).
100
-
101
- test/spec is a clean-room implementation that maps most kinds of
102
- Test::Unit assertions to a `should'-like syntax.
103
- EOF
104
- p.url = "http://test-spec.rubyforge.org"
105
- p.test_globs = ["test/**/{test,spec}_*.rb"]
106
- p.clean_globs = []
107
- p.extra_deps = ['flexmock','>= 0.4.1'],['mocha','>= 0.3.2']
108
- p.need_tar = false # we do that ourselves
109
- p.changes = File.read("README")[/^== History\n(.*?)^==/m, 1].
110
- split(/\n{2,}/).last
111
- end
112
-
113
- task :package => ["Manifest.txt", :dist]
114
-
115
- # Yes, this is ridiculous.
116
- hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
117
- Rake.application.instance_variable_get(:@tasks).delete :docs
118
- Rake.application.instance_variable_get(:@tasks).delete "doc/index.html"
119
- task :docs => :rdoc
120
- end
121
-
122
-
123
- desc "Generate RDoc documentation"
124
- Rake::RDocTask.new(:rdoc) do |rdoc|
125
- rdoc.options << '--line-numbers' << '--inline-source'
126
- rdoc.rdoc_dir = "doc"
127
- rdoc.rdoc_files.include 'README'
128
- rdoc.rdoc_files.include 'ROADMAP'
129
- rdoc.rdoc_files.include 'SPECS'
130
- rdoc.rdoc_files.include('lib/**/*.rb')
131
- end
132
- task :rdoc => "SPECS"
133
-
134
-
135
- desc "Generate Manifest.txt"
136
- task "Manifest.txt" do
137
- system "darcs query manifest | sed 's:^./::' >Manifest.txt"
138
- end
139
-
140
- begin
141
- require 'rcov/rcovtask'
142
-
143
- Rcov::RcovTask.new do |t|
144
- t.test_files = FileList['test/{spec,test}_*.rb'] + ['--', '-rs'] # evil
145
- t.verbose = true # uncomment to see the executed command
146
- t.rcov_opts = ["--text-report",
147
- "--include-file", "^lib,^test",
148
- "--exclude-only", "^/usr,^/home/.*/src"]
149
- end
150
- rescue LoadError
151
- end
@@ -1,108 +0,0 @@
1
-
2
- == TestUnit
3
- * still works on its own
4
- * supports should good enough
5
- * works inside test/spec
6
-
7
- == SpecDox
8
- * can unmangle Test::Unit names correctly
9
- * can unmangle Test::Spec names correctly
10
- * has sensible fallbacks
11
-
12
- == flexmock
13
- * should handle
14
- * should handle without a block
15
- * should handle with a block
16
- * should have a return value
17
- * should handle missing methods
18
- * should ignore missing methods
19
- * should count correctly
20
- * should raise on bad counts
21
- * should handle undetermined counts
22
- * should handle zero counts
23
- * should have file IO with use
24
- * should have use
25
- * should handle failures during use
26
- * should deal with sequential values
27
- * respond_to? should return false for non handled methods
28
- * respond_to? should return true for explicit methods
29
- * respond_to? should return true when ignoring_missing
30
- * respond_to? should return true for missing_methods when should_ignore_missing
31
- * should raise error on unknown method proc
32
- * should return callable proc on method
33
- * should return do nothing proc for missing methods
34
- * works with test/spec
35
-
36
- == mocha
37
- * works with test/spec
38
- * works with test/spec and Enterprise example
39
-
40
- == stubba
41
- * works with test/spec and instance method stubbing
42
- * works with test/spec and class method stubbing
43
- * works with test/spec and global instance method stubbing
44
-
45
- == Outer context
46
- === Inner context
47
- * is nested
48
- * has multiple empty specifications
49
- === Second Inner context
50
- * is indented properly
51
- * still runs in order of definition
52
- ==== Inmost context
53
- * works too!
54
- * whoo!
55
-
56
- == should.output
57
- * works for print
58
- * works for puts
59
- * works with readline
60
-
61
- == test/spec
62
- * has should.satisfy
63
- * has should.equal
64
- * has should.raise
65
- * should.raise should return the exception
66
- * has should.be.an.instance_of
67
- * has should.be.nil
68
- * has should.include
69
- * has should.be.a.kind_of
70
- * has should.match
71
- * has should.be
72
- * has should.not.raise
73
- * has should.not.satisfy
74
- * has should.not.be
75
- * has should.not.equal
76
- * has should.not.match
77
- * has should.throw
78
- * has should.not.throw
79
- * has should.respond_to
80
- * has should.be_close
81
- * multiple negation works
82
- * has should.<predicate>
83
- * has should <operator> (>, >=, <, <=, ===)
84
- * is robust against careless users
85
- * should detect warnings
86
- * should message/blame faults
87
- * should allow for custom shoulds
88
- * disabled specification (disabled)
89
- === more disabled
90
- * this is intentional (disabled)
91
-
92
- == setup/teardown
93
- * run in the right order
94
-
95
- == contexts
96
- * are defined in class scope
97
- * can include modules
98
-
99
- == Context First
100
- * runs before Second
101
-
102
- == Context Second
103
- * runs before Last
104
-
105
- == Context Last
106
- * runs last
107
-
108
- 76 specifications, 2 disabled (414 requirements), 0 failures
@@ -1,2 +0,0 @@
1
- - see ROADMAP
2
- - better handling of .should outside of specify(?)
@@ -1,104 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- require 'optparse'
5
-
6
- testrbargv = []
7
- automatic = false
8
-
9
- opts = OptionParser.new("", 24, ' ') { |opts|
10
- opts.banner = "Usage: specrb [options] [files | -a] [-- untouched arguments]"
11
-
12
- opts.separator ""
13
- opts.separator "Ruby options:"
14
-
15
- lineno = 1
16
- opts.on("-e", "--eval LINE", "evaluate a LINE of code") { |line|
17
- eval line, TOPLEVEL_BINDING, "-e", lineno
18
- lineno += 1
19
- }
20
-
21
- opts.on("-d", "--debug", "set debugging flags (set $DEBUG to true)") {
22
- $DEBUG = true
23
- }
24
- opts.on("-w", "--warn", "turn warnings on for your script") {
25
- $-w = true
26
- }
27
-
28
- opts.on("-I", "--include PATH",
29
- "specify $LOAD_PATH (may be used more than once)") { |path|
30
- $LOAD_PATH.unshift *path.split(":")
31
- }
32
-
33
- opts.on("-r", "--require LIBRARY",
34
- "require the library, before executing your script") { |library|
35
- require library
36
- }
37
-
38
- opts.separator ""
39
- opts.separator "test/spec options:"
40
-
41
- opts.on("-s", "--specdox", "do AgileDox-like output") {
42
- testrbargv << "--runner=specdox"
43
- }
44
- opts.on("--rdox", "do AgileDox-like output with RDoc formatting") {
45
- testrbargv << "--runner=rdox"
46
- }
47
-
48
- opts.on("-a", "--automatic", "gather tests from ./test/, include ./lib/") {
49
- $LOAD_PATH.unshift "lib" if File.directory? "lib"
50
- automatic = true
51
- }
52
-
53
- opts.separator ""
54
- opts.separator "test/unit options:"
55
-
56
- opts.on('-n', '--name NAME', String,
57
- "runs tests matching regexp NAME") { |n|
58
- testrbargv << "-n" << "/#{n}/"
59
- }
60
-
61
- opts.on('-t', '--testcase TESTCASE', String,
62
- "runs tests in TestCases matching regexp TESTCASE") { |t|
63
- testrbargv << "-t" << "/#{t}/"
64
- }
65
-
66
- opts.separator ""
67
- opts.separator "Common options:"
68
-
69
- opts.on_tail("-h", "--help", "Show this message") do
70
- puts opts
71
- exit
72
- end
73
-
74
- opts.on_tail("--version", "Show version") do
75
- require 'test/spec'
76
- puts "specrb #{Test::Spec::VERSION}"
77
- exit
78
- end
79
-
80
- opts.parse! ARGV
81
- }
82
-
83
- files = ARGV
84
-
85
- if automatic
86
- files.concat Dir["test/test_*.rb"]
87
- files.concat Dir["test/spec_*.rb"]
88
- files.concat Dir["spec/spec_*.rb"]
89
- end
90
-
91
- if files.empty?
92
- puts opts.banner
93
- exit 1
94
- end
95
-
96
- argv = testrbargv + ["--"] + files
97
-
98
- require 'test/spec'
99
-
100
- Test::Unit.run = false
101
- runner = Test::Unit::AutoRunner.new true
102
- runner.process_args(argv) ||
103
- abort("internal error calling Test::Unit, please report a bug")
104
- exit runner.run
@@ -1,140 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Kernel</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Kernel</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/test/spec_rb.html">
59
- lib/test/spec.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
- <div id="method-list">
80
- <h3 class="section-bar">Methods</h3>
81
-
82
- <div class="name-list">
83
- <a href="#M000002">context</a>&nbsp;&nbsp;
84
- </div>
85
- </div>
86
-
87
- </div>
88
-
89
-
90
- <!-- if includes -->
91
-
92
- <div id="section">
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
- <!-- if method_list -->
102
- <div id="methods">
103
- <h3 class="section-bar">Private Instance methods</h3>
104
-
105
- <div id="method-M000002" class="method-detail">
106
- <a name="M000002"></a>
107
-
108
- <div class="method-heading">
109
- <a href="#M000002" class="method-signature">
110
- <span class="method-name">context</span><span class="method-args">(name, &amp;block)</span>
111
- </a>
112
- </div>
113
-
114
- <div class="method-description">
115
- <p><a class="source-toggle" href="#"
116
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
117
- <div class="method-source-code" id="M000002-source">
118
- <pre>
119
- <span class="ruby-comment cmt"># File lib/test/spec.rb, line 485</span>
120
- 485: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">context</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-comment cmt"># :doc:</span>
121
- 486: (<span class="ruby-constant">Test</span><span class="ruby-operator">::</span><span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">CONTEXTS</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Test</span><span class="ruby-operator">::</span><span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">TestCase</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)).<span class="ruby-identifier">add</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
122
- 487: <span class="ruby-keyword kw">end</span>
123
- </pre>
124
- </div>
125
- </div>
126
- </div>
127
-
128
-
129
- </div>
130
-
131
-
132
- </div>
133
-
134
-
135
- <div id="validator-badges">
136
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
137
- </div>
138
-
139
- </body>
140
- </html>