prawn-format 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/Manifest +37 -0
  2. data/Rakefile +31 -0
  3. data/examples/basic-formatting.rb +37 -0
  4. data/examples/christmas-carol.txt +717 -0
  5. data/examples/document.rb +61 -0
  6. data/examples/flowing.rb +24 -0
  7. data/examples/style-classes.rb +12 -0
  8. data/examples/syntax-highlighting.rb +31 -0
  9. data/examples/tags.rb +24 -0
  10. data/lib/prawn/format.rb +211 -0
  11. data/lib/prawn/format/effects/link.rb +30 -0
  12. data/lib/prawn/format/effects/underline.rb +32 -0
  13. data/lib/prawn/format/instructions/base.rb +62 -0
  14. data/lib/prawn/format/instructions/tag_close.rb +52 -0
  15. data/lib/prawn/format/instructions/tag_open.rb +95 -0
  16. data/lib/prawn/format/instructions/text.rb +89 -0
  17. data/lib/prawn/format/layout_builder.rb +113 -0
  18. data/lib/prawn/format/lexer.rb +222 -0
  19. data/lib/prawn/format/line.rb +99 -0
  20. data/lib/prawn/format/parser.rb +181 -0
  21. data/lib/prawn/format/state.rb +189 -0
  22. data/lib/prawn/format/text_object.rb +107 -0
  23. data/lib/prawn/format/version.rb +11 -0
  24. data/manual/html.rb +187 -0
  25. data/manual/include/basics.rb +6 -0
  26. data/manual/include/breaks.rb +13 -0
  27. data/manual/include/custom-tags.rb +10 -0
  28. data/manual/include/custom-tags2.rb +2 -0
  29. data/manual/include/indent.rb +4 -0
  30. data/manual/include/options.rb +15 -0
  31. data/manual/include/style-classes.rb +5 -0
  32. data/manual/manual.txt +101 -0
  33. data/manual/pdf.rb +204 -0
  34. data/prawn-format.gemspec +45 -0
  35. data/spec/layout_builder_spec.rb +27 -0
  36. data/spec/lexer_spec.rb +91 -0
  37. data/spec/parser_spec.rb +103 -0
  38. data/spec/spec_helper.rb +24 -0
  39. metadata +157 -0
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ puts "Prawn-Format specs: Running on Ruby Version: #{RUBY_VERSION}"
4
+
5
+ require "rubygems"
6
+ require "test/spec"
7
+ require "mocha"
8
+ require "prawn"
9
+ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
10
+ $LOAD_PATH << File.join(Prawn::BASEDIR, 'vendor','pdf-inspector','lib')
11
+ require "prawn/format"
12
+
13
+ Prawn.debug = true
14
+
15
+ gem 'pdf-reader', ">=0.7.3"
16
+ require "pdf/reader"
17
+ require "pdf/inspector"
18
+
19
+ def create_pdf(klass=Prawn::Document)
20
+ @pdf = klass.new(:left_margin => 0,
21
+ :right_margin => 0,
22
+ :top_margin => 0,
23
+ :bottom_margin => 0)
24
+ end
metadata ADDED
@@ -0,0 +1,157 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: prawn-format
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jamis Buck
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-26 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: prawn
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0.4"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: prawn
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - <
32
+ - !ruby/object:Gem::Version
33
+ version: "0.5"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: echoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rake
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: coderay
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ description: an extension of Prawn that allows inline formatting
66
+ email: jamis@jamisbuck.org
67
+ executables: []
68
+
69
+ extensions: []
70
+
71
+ extra_rdoc_files:
72
+ - lib/prawn/format/effects/link.rb
73
+ - lib/prawn/format/effects/underline.rb
74
+ - lib/prawn/format/instructions/base.rb
75
+ - lib/prawn/format/instructions/tag_close.rb
76
+ - lib/prawn/format/instructions/tag_open.rb
77
+ - lib/prawn/format/instructions/text.rb
78
+ - lib/prawn/format/layout_builder.rb
79
+ - lib/prawn/format/lexer.rb
80
+ - lib/prawn/format/line.rb
81
+ - lib/prawn/format/parser.rb
82
+ - lib/prawn/format/state.rb
83
+ - lib/prawn/format/text_object.rb
84
+ - lib/prawn/format/version.rb
85
+ - lib/prawn/format.rb
86
+ files:
87
+ - examples/basic-formatting.rb
88
+ - examples/christmas-carol.txt
89
+ - examples/document.rb
90
+ - examples/flowing.rb
91
+ - examples/style-classes.rb
92
+ - examples/syntax-highlighting.rb
93
+ - examples/tags.rb
94
+ - lib/prawn/format/effects/link.rb
95
+ - lib/prawn/format/effects/underline.rb
96
+ - lib/prawn/format/instructions/base.rb
97
+ - lib/prawn/format/instructions/tag_close.rb
98
+ - lib/prawn/format/instructions/tag_open.rb
99
+ - lib/prawn/format/instructions/text.rb
100
+ - lib/prawn/format/layout_builder.rb
101
+ - lib/prawn/format/lexer.rb
102
+ - lib/prawn/format/line.rb
103
+ - lib/prawn/format/parser.rb
104
+ - lib/prawn/format/state.rb
105
+ - lib/prawn/format/text_object.rb
106
+ - lib/prawn/format/version.rb
107
+ - lib/prawn/format.rb
108
+ - manual/html.rb
109
+ - manual/include/basics.rb
110
+ - manual/include/breaks.rb
111
+ - manual/include/custom-tags.rb
112
+ - manual/include/custom-tags2.rb
113
+ - manual/include/indent.rb
114
+ - manual/include/options.rb
115
+ - manual/include/style-classes.rb
116
+ - manual/manual.txt
117
+ - manual/pdf.rb
118
+ - Rakefile
119
+ - spec/layout_builder_spec.rb
120
+ - spec/lexer_spec.rb
121
+ - spec/parser_spec.rb
122
+ - spec/spec_helper.rb
123
+ - Manifest
124
+ - prawn-format.gemspec
125
+ has_rdoc: true
126
+ homepage: http://rubyforge.org/projects/prawn
127
+ post_install_message:
128
+ rdoc_options:
129
+ - --line-numbers
130
+ - --inline-source
131
+ - --title
132
+ - Prawn-format
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: "0"
140
+ version:
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "1.2"
146
+ version:
147
+ requirements: []
148
+
149
+ rubyforge_project: prawn
150
+ rubygems_version: 1.2.0
151
+ signing_key:
152
+ specification_version: 2
153
+ summary: an extension of Prawn that allows inline formatting
154
+ test_files:
155
+ - spec/layout_builder_spec.rb
156
+ - spec/lexer_spec.rb
157
+ - spec/parser_spec.rb