org-ruby 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/History.txt +45 -40
  2. data/{README.txt → README.rdoc} +66 -66
  3. data/Rakefile +28 -27
  4. data/bin/org-ruby +40 -40
  5. data/lib/org-ruby.rb +50 -50
  6. data/lib/org-ruby/headline.rb +80 -80
  7. data/lib/org-ruby/html_output_buffer.rb +117 -105
  8. data/lib/org-ruby/line.rb +178 -173
  9. data/lib/org-ruby/output_buffer.rb +172 -172
  10. data/lib/org-ruby/parser.rb +80 -80
  11. data/lib/org-ruby/regexp_helper.rb +156 -156
  12. data/lib/org-ruby/textile_output_buffer.rb +67 -67
  13. data/spec/data/freeform.org +111 -111
  14. data/spec/data/hyp-planning.org +335 -335
  15. data/spec/data/remember.org +53 -53
  16. data/spec/headline_spec.rb +55 -55
  17. data/spec/html_examples/advanced-lists.html +31 -31
  18. data/spec/html_examples/advanced-lists.org +31 -31
  19. data/spec/html_examples/block_code.html +30 -30
  20. data/spec/html_examples/block_code.org +35 -35
  21. data/spec/html_examples/blockquote.html +7 -7
  22. data/spec/html_examples/blockquote.org +13 -13
  23. data/spec/html_examples/code-comment.html +19 -0
  24. data/spec/html_examples/code-comment.org +22 -0
  25. data/spec/html_examples/escape-pre.html +7 -7
  26. data/spec/html_examples/escape-pre.org +6 -6
  27. data/spec/html_examples/html-literal.html +2 -0
  28. data/spec/html_examples/html-literal.org +6 -0
  29. data/spec/html_examples/inline-formatting.html +10 -10
  30. data/spec/html_examples/inline-formatting.org +17 -17
  31. data/spec/html_examples/lists.html +19 -19
  32. data/spec/html_examples/lists.org +36 -36
  33. data/spec/html_examples/metadata-comment.org-fail +30 -0
  34. data/spec/html_examples/only-list.html +5 -5
  35. data/spec/html_examples/only-list.org +3 -3
  36. data/spec/html_examples/only-table.html +6 -6
  37. data/spec/html_examples/only-table.org +5 -5
  38. data/spec/html_examples/tables.html +20 -20
  39. data/spec/html_examples/tables.org +26 -26
  40. data/spec/html_examples/text.html +2 -2
  41. data/spec/html_examples/text.org +16 -16
  42. data/spec/line_spec.rb +89 -89
  43. data/spec/parser_spec.rb +86 -86
  44. data/spec/regexp_helper_spec.rb +57 -57
  45. data/spec/spec_helper.rb +20 -20
  46. data/spec/textile_examples/block_code.org +35 -35
  47. data/spec/textile_examples/block_code.textile +29 -29
  48. data/spec/textile_examples/blockquote.org +13 -13
  49. data/spec/textile_examples/blockquote.textile +11 -11
  50. data/spec/textile_examples/keywords.org +13 -13
  51. data/spec/textile_examples/keywords.textile +11 -11
  52. data/spec/textile_examples/links.org +11 -11
  53. data/spec/textile_examples/links.textile +10 -10
  54. data/spec/textile_examples/lists.org +36 -36
  55. data/spec/textile_examples/lists.textile +20 -20
  56. data/spec/textile_examples/single-space-plain-list.org +13 -13
  57. data/spec/textile_examples/single-space-plain-list.textile +10 -10
  58. data/spec/textile_examples/tables.org +26 -26
  59. data/spec/textile_examples/tables.textile +23 -23
  60. data/spec/textile_output_buffer_spec.rb +21 -21
  61. data/tasks/test_case.rake +49 -49
  62. metadata +10 -6
  63. data/.bnsignore +0 -18
@@ -1,10 +1,10 @@
1
- h2. Anatomy of a BVP
2
-
3
- Each BVP followed a simple, one-page template with the following parts:
4
-
5
- * Customer Summary
6
- * Storyboard
7
- * Requirements
8
- * Partner teams
9
-
10
- The following sections walk through each section and give an example from one of our BVPs, "Resource-Smart Virtualization Infrastructure":http://windows/hyper-v/initiatives/Value%20Propositions/DynamicDatacenter-ValueProp.docx (also called _Dynamic Datacenter_).
1
+ h2. Anatomy of a BVP
2
+
3
+ Each BVP followed a simple, one-page template with the following parts:
4
+
5
+ * Customer Summary
6
+ * Storyboard
7
+ * Requirements
8
+ * Partner teams
9
+
10
+ The following sections walk through each section and give an example from one of our BVPs, "Resource-Smart Virtualization Infrastructure":http://windows/hyper-v/initiatives/Value%20Propositions/DynamicDatacenter-ValueProp.docx (also called _Dynamic Datacenter_).
@@ -1,26 +1,26 @@
1
- TABLES
2
-
3
- Different types of ORG tables.
4
-
5
- * Simple table, no header.
6
-
7
- | Cell one | Cell two |
8
- | Cell three | Cell four |
9
-
10
-
11
- * Indented table
12
-
13
- | Cell one |
14
- | Cell two |
15
-
16
- And here's some paragraph content. The line breaks will need to get
17
- removed here, but not for the tables.
18
-
19
- * Table with header
20
-
21
- | One | Two | Three |
22
- |-------+-------+-------|
23
- | Four | Five | Six |
24
- | Seven | Eight | Nine |
25
-
26
- The separator row should not get printed out.
1
+ TABLES
2
+
3
+ Different types of ORG tables.
4
+
5
+ * Simple table, no header.
6
+
7
+ | Cell one | Cell two |
8
+ | Cell three | Cell four |
9
+
10
+
11
+ * Indented table
12
+
13
+ | Cell one |
14
+ | Cell two |
15
+
16
+ And here's some paragraph content. The line breaks will need to get
17
+ removed here, but not for the tables.
18
+
19
+ * Table with header
20
+
21
+ | One | Two | Three |
22
+ |-------+-------+-------|
23
+ | Four | Five | Six |
24
+ | Seven | Eight | Nine |
25
+
26
+ The separator row should not get printed out.
@@ -1,23 +1,23 @@
1
- TABLES
2
-
3
- Different types of ORG tables.
4
-
5
- h1. Simple table, no header.
6
-
7
- | Cell one | Cell two |
8
- | Cell three | Cell four |
9
-
10
- h1. Indented table
11
-
12
- | Cell one |
13
- | Cell two |
14
-
15
- And here's some paragraph content. The line breaks will need to get removed here, but not for the tables.
16
-
17
- h1. Table with header
18
-
19
- | One | Two | Three |
20
- | Four | Five | Six |
21
- | Seven | Eight | Nine |
22
-
23
- The separator row should not get printed out.
1
+ TABLES
2
+
3
+ Different types of ORG tables.
4
+
5
+ h1. Simple table, no header.
6
+
7
+ | Cell one | Cell two |
8
+ | Cell three | Cell four |
9
+
10
+ h1. Indented table
11
+
12
+ | Cell one |
13
+ | Cell two |
14
+
15
+ And here's some paragraph content. The line breaks will need to get removed here, but not for the tables.
16
+
17
+ h1. Table with header
18
+
19
+ | One | Two | Three |
20
+ | Four | Five | Six |
21
+ | Seven | Eight | Nine |
22
+
23
+ The separator row should not get printed out.
@@ -1,21 +1,21 @@
1
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
-
3
- describe Orgmode::TextileOutputBuffer do
4
- it "should substitute / with _" do
5
- Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
6
- end
7
-
8
- it "should convert simple links" do
9
- Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
10
- eql("\"http://www.google.com\":http://www.google.com")
11
- end
12
-
13
- it "should convert links with text" do
14
- Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
15
- eql("\"Google\":http://www.google.com")
16
- end
17
-
18
- it "should convert spaces in urls" do
19
- Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
20
- end
21
- end
1
+ require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+
3
+ describe Orgmode::TextileOutputBuffer do
4
+ it "should substitute / with _" do
5
+ Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
6
+ end
7
+
8
+ it "should convert simple links" do
9
+ Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
10
+ eql("\"http://www.google.com\":http://www.google.com")
11
+ end
12
+
13
+ it "should convert links with text" do
14
+ Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
15
+ eql("\"Google\":http://www.google.com")
16
+ end
17
+
18
+ it "should convert spaces in urls" do
19
+ Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
20
+ end
21
+ end
data/tasks/test_case.rake CHANGED
@@ -1,49 +1,49 @@
1
- require File.expand_path(
2
- File.join(File.dirname(__FILE__), %w[.. lib org-ruby]))
3
-
4
- namespace :testcase do
5
- @data_directory = File.join(File.dirname(__FILE__), "../spec/html_examples")
6
-
7
- desc "List all of the current HTML test cases"
8
- task :list do
9
- org_files = File.expand_path(File.join(@data_directory, "*.org" ))
10
- files = Dir.glob(org_files)
11
- files.each do |file|
12
- puts File.basename(file, ".org")
13
- end
14
- end
15
-
16
- desc "Accept the current org-ruby output for the test case as correct"
17
- task :accept, :case do |t, args|
18
- basename = args[:case]
19
- raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename
20
- fname = File.expand_path(File.join(@data_directory, "#{basename}.org"))
21
- oname = File.expand_path(File.join(@data_directory, "#{basename}.html"))
22
- data = IO.read(fname)
23
- puts "=== #{fname} is: ===>>>\n\n"
24
- puts data
25
- puts "\n\n=== ACCEPTING OUTPUT: ===>>>\n\n"
26
- p = Orgmode::Parser.new(data)
27
- puts p.to_html
28
- File.open(oname, "w") do |s|
29
- s.write(p.to_html)
30
- end
31
- end
32
-
33
- desc "Look at the current org-ruby output for a test case"
34
- task :inspect, :case do |t, args|
35
- basename = args[:case]
36
- raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename
37
- fname = File.expand_path(File.join(@data_directory, "#{basename}.org"))
38
- data = IO.read(fname)
39
- puts "=== #{fname} is: ===>>>\n\n"
40
- puts data
41
- puts "\n\n=== #{fname} converts to: ===>>>\n\n"
42
- p = Orgmode::Parser.new(data)
43
- puts p.to_html
44
- end
45
- end
46
-
47
- desc "Alias for testcase:list"
48
- task :testcase => ["testcase:list"]
49
-
1
+ require File.expand_path(
2
+ File.join(File.dirname(__FILE__), %w[.. lib org-ruby]))
3
+
4
+ namespace :testcase do
5
+ @data_directory = File.join(File.dirname(__FILE__), "../spec/html_examples")
6
+
7
+ desc "List all of the current HTML test cases"
8
+ task :list do
9
+ org_files = File.expand_path(File.join(@data_directory, "*.org" ))
10
+ files = Dir.glob(org_files)
11
+ files.each do |file|
12
+ puts File.basename(file, ".org")
13
+ end
14
+ end
15
+
16
+ desc "Accept the current org-ruby output for the test case as correct"
17
+ task :accept, :case do |t, args|
18
+ basename = args[:case]
19
+ raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename
20
+ fname = File.expand_path(File.join(@data_directory, "#{basename}.org"))
21
+ oname = File.expand_path(File.join(@data_directory, "#{basename}.html"))
22
+ data = IO.read(fname)
23
+ puts "=== #{fname} is: ===>>>\n\n"
24
+ puts data
25
+ puts "\n\n=== ACCEPTING OUTPUT: ===>>>\n\n"
26
+ p = Orgmode::Parser.new(data)
27
+ puts p.to_html
28
+ File.open(oname, "w") do |s|
29
+ s.write(p.to_html)
30
+ end
31
+ end
32
+
33
+ desc "Look at the current org-ruby output for a test case"
34
+ task :inspect, :case do |t, args|
35
+ basename = args[:case]
36
+ raise "Must supply a test case name. Example: rake testcase:accept[casename]" unless basename
37
+ fname = File.expand_path(File.join(@data_directory, "#{basename}.org"))
38
+ data = IO.read(fname)
39
+ puts "=== #{fname} is: ===>>>\n\n"
40
+ puts data
41
+ puts "\n\n=== #{fname} converts to: ===>>>\n\n"
42
+ p = Orgmode::Parser.new(data)
43
+ puts p.to_html
44
+ end
45
+ end
46
+
47
+ desc "Alias for testcase:list"
48
+ task :testcase => ["testcase:list"]
49
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dewey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-28 00:00:00 -08:00
12
+ date: 2009-12-29 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -44,12 +44,11 @@ extensions: []
44
44
 
45
45
  extra_rdoc_files:
46
46
  - History.txt
47
- - README.txt
47
+ - README.rdoc
48
48
  - bin/org-ruby
49
49
  files:
50
- - .bnsignore
51
50
  - History.txt
52
- - README.txt
51
+ - README.rdoc
53
52
  - Rakefile
54
53
  - TAGS
55
54
  - bin/org-ruby
@@ -71,12 +70,17 @@ files:
71
70
  - spec/html_examples/block_code.org
72
71
  - spec/html_examples/blockquote.html
73
72
  - spec/html_examples/blockquote.org
73
+ - spec/html_examples/code-comment.html
74
+ - spec/html_examples/code-comment.org
74
75
  - spec/html_examples/escape-pre.html
75
76
  - spec/html_examples/escape-pre.org
77
+ - spec/html_examples/html-literal.html
78
+ - spec/html_examples/html-literal.org
76
79
  - spec/html_examples/inline-formatting.html
77
80
  - spec/html_examples/inline-formatting.org
78
81
  - spec/html_examples/lists.html
79
82
  - spec/html_examples/lists.org
83
+ - spec/html_examples/metadata-comment.org-fail
80
84
  - spec/html_examples/only-list.html
81
85
  - spec/html_examples/only-list.org
82
86
  - spec/html_examples/only-table.html
@@ -113,7 +117,7 @@ licenses: []
113
117
  post_install_message:
114
118
  rdoc_options:
115
119
  - --main
116
- - README.txt
120
+ - README.rdoc
117
121
  require_paths:
118
122
  - lib
119
123
  required_ruby_version: !ruby/object:Gem::Requirement
data/.bnsignore DELETED
@@ -1,18 +0,0 @@
1
- # The list of files that should be ignored by Mr Bones.
2
- # Lines that start with '#' are comments.
3
- #
4
- # A .gitignore file can be used instead by setting it as the ignore
5
- # file in your Rakefile:
6
- #
7
- # Bones {
8
- # ignore_file '.gitignore'
9
- # }
10
- #
11
- # For a project with a C extension, the following would be a good set of
12
- # exclude patterns (uncomment them if you want to use them):
13
- # *.[oa]
14
- # *~
15
- announcement.txt
16
- coverage
17
- doc
18
- pkg