PageTemplate 2.1.3 → 2.1.5

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.
@@ -0,0 +1,59 @@
1
+ # 'title' = 'PageTemplate Version 2'
2
+ # 'subtitle' = "What's New?"
3
+
4
+ Thanks largely to Greg Millam there is a new release of PageTemplate.
5
+ Thanks entirely to Greg Millam, it is a complete revamping of PT's
6
+ internal workings. While the basics of using PageTemplate as covered
7
+ by the other pages on this site are pretty much the same, a few things
8
+ have been added.
9
+
10
+ h2. New Features
11
+
12
+ h3. The Preprocessor
13
+
14
+ h4. @reverse@
15
+
16
+ Amaze your friends! Baffle your enemies! Discover palindromes in your spare time!
17
+
18
+ This is a simple demonstration of the capabilities of PageTemplate's preprocessor. It prints out the
19
+ reversed string of the value being displayed.
20
+
21
+ <pre class="code">
22
+ Hello, [%var name%]. Your name spelled backwards is [%var name :reverse%].
23
+ </pre>
24
+
25
+ <pre class="sample">
26
+ Hello, Brian Wisti. Your name spelled backwards is itsiW nairB.
27
+ </pre>
28
+
29
+ h4. escapeHTML
30
+
31
+ <pre class="code">
32
+ Here comes some sample HTML escaped.
33
+
34
+ [%var html :escapeHTML %]
35
+ </pre>
36
+
37
+ Here comes some sample HTML escaped.
38
+
39
+ &lt;p&gt;&lt;a href='http://hack.your.email.ownzr.com/'&gt;Update your &lt;strong&gt;PayPal&lt;/strong&gt; account!&lt;/a&gt;&lt;/p&gt;
40
+
41
+ h4. escapeURI
42
+
43
+ <pre>[%var url :escapeURI %]</pre>
44
+
45
+ And here's a URI-escaped string. Isn't the preprocessor great?
46
+
47
+ Brian+Wisti+%28contact+at+brianwisti%40rubyforge.org%29
48
+
49
+ h3. Case Directive
50
+
51
+ h3. Object-style Variable Access
52
+
53
+ h3. Handling Templates "On the Fly"
54
+
55
+ h2. Fixed Problems
56
+
57
+ h2. Additional Syntax
58
+
59
+ h3. More stuff for _in_
data/test.rb CHANGED
@@ -187,7 +187,7 @@ module TestPageTemplate
187
187
 
188
188
  def test_include_path
189
189
  fs = PageTemplate::FileSource.new(
190
- 'include_path'=>File.join(Dir.getwd,'tdata')
190
+ 'include_path' => File.join(Dir.getwd,'tdata')
191
191
  )
192
192
  assert_equal([File.join(Dir.getwd,'tdata')],fs.paths,
193
193
  "Explicit set include_path should only include the one element")
@@ -547,6 +547,8 @@ module TestPageTemplate
547
547
 
548
548
  def test_compile
549
549
  assert_equal(@@tc.output, @@p.compile('foo').output)
550
+ $SAFE = 1
551
+ assert_equal(@@tc.output, @@p.compile('foo').output)
550
552
  end
551
553
 
552
554
  def test_default_processor
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: PageTemplate
5
5
  version: !ruby/object:Gem::Version
6
- version: 2.1.3
7
- date: 2005-10-30 00:00:00 -07:00
6
+ version: 2.1.5
7
+ date: 2006-01-04 00:00:00 -08:00
8
8
  summary: A simple templating system for Web sites.
9
9
  require_paths:
10
10
  - lib
@@ -36,6 +36,7 @@ files:
36
36
  - README.txt
37
37
  - setup-usage.txt
38
38
  - setup.rb
39
+ - site
39
40
  - tdata
40
41
  - test-install.rb
41
42
  - test.rb
@@ -45,6 +46,32 @@ files:
45
46
  - lib/PageTemplate/commands.rb
46
47
  - lib/PageTemplate/htglossary.rb
47
48
  - lib/PageTemplate/parser.rb
49
+ - site/base.css
50
+ - site/footer.txt
51
+ - site/header.txt
52
+ - site/html
53
+ - site/Makefile
54
+ - site/MySubpageRenderer.rb
55
+ - site/PageNavRenderer.rb
56
+ - site/RedClothRenderer.rb
57
+ - site/Site.rb
58
+ - site/SiteNewsRenderer.rb
59
+ - site/src
60
+ - site/XhtmlTemplateRenderer.rb
61
+ - site/html/base.css
62
+ - site/html/designer.html
63
+ - site/html/index.html
64
+ - site/html/install.html
65
+ - site/html/programmer.html
66
+ - site/html/SiteMap.html
67
+ - site/html/version2.html
68
+ - site/src/designer
69
+ - site/src/index
70
+ - site/src/install
71
+ - site/src/metadata.txt
72
+ - site/src/programmer
73
+ - site/src/SiteMap
74
+ - site/src/version2
48
75
  - tdata/dummy.txt
49
76
  test_files:
50
77
  - test.rb