PageTemplate 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/site/src/version2 ADDED
@@ -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
@@ -519,6 +519,7 @@ module TestPageTemplate
519
519
  assert_equal(true, @@ns.true?("dude"),
520
520
  "If a flag is set to pretty much anything but false, then Namespace#true? returns true.")
521
521
  end
522
+
522
523
  class Foo
523
524
  def initialize(str)
524
525
  @str = str
@@ -527,12 +528,20 @@ module TestPageTemplate
527
528
  @str
528
529
  end
529
530
  end
531
+
530
532
  def test_deep_true_eh
531
533
  @@ns['foo'] = Foo.new('fizbit')
532
534
  assert(@@ns.true?('foo.bar'),"foo.bar must be true")
533
535
  assert(@@ns.true?('foo.bar.reverse'))
534
536
  assert_equal(@@ns.get('foo.bar.reverse'),'tibzif')
535
537
  end
538
+
539
+ def test_delete
540
+ @@ns['dude'] = "Sweet"
541
+ assert_equal(@@ns.get("dude"), "Sweet")
542
+ @@ns.delete("dude")
543
+ assert_equal(nil, @@ns.get("dude"))
544
+ end
536
545
  end
537
546
 
538
547
  class TestParser < Test::Unit::TestCase
metadata CHANGED
@@ -3,11 +3,11 @@ 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.6
7
- date: 2006-01-04 00:00:00 -08:00
6
+ version: 2.1.7
7
+ date: 2006-02-20 00:00:00 -08:00
8
8
  summary: A simple templating system for Web sites.
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: brianwisti@rubyforge.org
12
12
  homepage: http://coolnamehere.com/products/pagetemplate
13
13
  rubyforge_project:
@@ -18,40 +18,71 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
27
26
  signing_key:
28
27
  cert_chain:
29
28
  authors:
30
- - Brian Wisti
29
+ - Brian Wisti
31
30
  files:
32
- - Changes
33
- - lib
34
- - MANIFEST
35
- - Rakefile
36
- - README.txt
37
- - setup-usage.txt
38
- - setup.rb
39
- - tdata
40
- - test-install.rb
41
- - test.rb
42
- - lib/PageTemplate
43
- - lib/PageTemplate.rb
44
- - lib/PageTemplate/case.rb
45
- - lib/PageTemplate/commands.rb
46
- - lib/PageTemplate/htglossary.rb
47
- - lib/PageTemplate/parser.rb
48
- - tdata/dummy.txt
31
+ - Changes
32
+ - lib
33
+ - MANIFEST
34
+ - Rakefile
35
+ - README.txt
36
+ - setup-usage.txt
37
+ - setup.rb
38
+ - site
39
+ - tdata
40
+ - test-install.rb
41
+ - test.rb
42
+ - lib/PageTemplate
43
+ - lib/PageTemplate.rb
44
+ - lib/PageTemplate/case.rb
45
+ - lib/PageTemplate/commands.rb
46
+ - lib/PageTemplate/htglossary.rb
47
+ - lib/PageTemplate/parser.rb
48
+ - site/base.css
49
+ - site/footer.txt
50
+ - site/header.txt
51
+ - site/html
52
+ - site/Makefile
53
+ - site/MySubpageRenderer.rb
54
+ - site/PageNavRenderer.rb
55
+ - site/RedClothRenderer.rb
56
+ - site/Site.rb
57
+ - site/SiteNewsRenderer.rb
58
+ - site/src
59
+ - site/XhtmlTemplateRenderer.rb
60
+ - site/html/base.css
61
+ - site/html/designer.html
62
+ - site/html/index.html
63
+ - site/html/install.html
64
+ - site/html/programmer.html
65
+ - site/html/SiteMap.html
66
+ - site/html/version2.html
67
+ - site/src/designer
68
+ - site/src/index
69
+ - site/src/install
70
+ - site/src/metadata.txt
71
+ - site/src/programmer
72
+ - site/src/SiteMap
73
+ - site/src/version2
74
+ - tdata/dummy.txt
49
75
  test_files:
50
- - test.rb
76
+ - test.rb
51
77
  rdoc_options: []
78
+
52
79
  extra_rdoc_files:
53
- - README.txt
80
+ - README.txt
54
81
  executables: []
82
+
55
83
  extensions: []
84
+
56
85
  requirements: []
57
- dependencies: []
86
+
87
+ dependencies: []
88
+