staticmatic 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,13 @@
1
1
  *SVN*
2
2
 
3
+ * [NEW] added link_to as an alias to link for those Rails types [Brent Beardsley]
4
+
5
+ * [NEW] added text_area helper (patch #14870) [steve ross]
6
+
7
+ * [NEW] tag helper adds name as an id if no id and a name given (patch #14870) [steve ross]
8
+
9
+ * [NEW] stylesheet type='text/css' attribute is now specified [Brent Beardsley]
10
+
3
11
  *0.9.0* (October 16th, 2007)
4
12
 
5
13
  * [NEW] added StaticMatic::VERSION.requirements_met? [Brent Beardsley]
data/Rakefile CHANGED
@@ -9,13 +9,16 @@ task :default => [:package]
9
9
 
10
10
  spec = Gem::Specification.new do |s|
11
11
  s.name = "staticmatic"
12
+ s.rubyforge_project = "staticmatic"
12
13
  s.version = StaticMatic::VERSION::STRING
13
14
  s.author = "Stephen Bartholomew"
14
15
  s.email = "steve@curve21.com"
15
- s.homepage = "http//www.curve21.com"
16
+ s.authors << "Brent Beardsley (brentbeardsley@gmail.com)"
17
+ s.homepage = "http//staticmatic.rubyforge.org"
16
18
  s.summary = "Manage static sites using Haml & Sass"
17
19
  files = FileList["**/**/**"]
18
20
  files.exclude 'pkg'
21
+ files.exclude 'contrib'
19
22
  s.files = files.to_a
20
23
  s.test_files = Dir.glob("test/*_test.rb")
21
24
  s.add_dependency("haml")
@@ -81,7 +81,7 @@ module StaticMatic
81
81
 
82
82
  def preview
83
83
  puts "StaticMatic Preview Server Starting..."
84
- StaticMatic::Server.start(@base_dir, self, configuration)
84
+ StaticMatic::Server.start(self)
85
85
  end
86
86
 
87
87
  def copy_file(from, to)
@@ -280,11 +280,15 @@ module StaticMatic
280
280
  def load_helpers
281
281
 
282
282
  Dir["#{@src_dir}/helpers/**/*_helper.rb"].each do |helper|
283
- load helper
284
- module_name = File.basename(helper, '.rb').gsub(/(^|\_)./) { |c| c.upcase }.gsub(/\_/, '')
285
- Haml::Helpers.class_eval("include #{module_name}")
283
+ load_helper(helper)
286
284
  end
287
285
  end
286
+
287
+ def load_helper(helper)
288
+ load helper
289
+ module_name = File.basename(helper, '.rb').gsub(/(^|\_)./) { |c| c.upcase }.gsub(/\_/, '')
290
+ Haml::Helpers.class_eval("include #{module_name}")
291
+ end
288
292
 
289
293
  class << self
290
294
  def base_dirs
@@ -14,7 +14,7 @@ module StaticMatic
14
14
  params.slice!(-1, 1)
15
15
  end
16
16
  options[:media] = 'all' unless options.has_key?(:media)
17
- options[:rel] = 'stylesheet'
17
+ options[:rel] = 'stylesheet'; options[:type] = 'text/css'
18
18
 
19
19
  relative_path = current_page_relative_path
20
20
 
@@ -82,6 +82,13 @@ module StaticMatic
82
82
  tag(:input, options)
83
83
  end
84
84
 
85
+ # Generate a form textarea
86
+ #
87
+ def text_area(name, value, options = {})
88
+ options.merge!(:name => name)
89
+ tag(:textarea, options) { value }
90
+ end
91
+
85
92
  # Generate an HTML link
86
93
  #
87
94
  # If only the title is passed, it will automatically
@@ -116,7 +123,8 @@ module StaticMatic
116
123
 
117
124
  tag(:a, options) { title }
118
125
  end
119
-
126
+ alias link_to link
127
+
120
128
  # Generates an image tag always relative to the current page unless absolute path or http url specified.
121
129
  #
122
130
  # img('test_image.gif') -> <img src="/images/test_image.gif" alt="Test image"/>
@@ -134,6 +142,7 @@ module StaticMatic
134
142
  # tag(:a, :href => 'test.html') { "Test" } -> <a href="test.html">Test</a>
135
143
  #
136
144
  def tag(name, options = {}, &block)
145
+ options[:id] ||= options[:name] if options[:name]
137
146
  output = "<#{name}"
138
147
  options.keys.sort { |a, b| a.to_s <=> b.to_s }.each do |key|
139
148
  output << " #{key}=\"#{options[key]}\"" if options[key]
@@ -2,12 +2,13 @@ module StaticMatic
2
2
  class Server < Mongrel::HttpHandler
3
3
  @@file_only_methods = ["GET","HEAD"]
4
4
 
5
- def initialize(base_dir, staticmatic)
6
- @files = Mongrel::DirHandler.new("#{base_dir}/site",false)
5
+ def initialize(staticmatic)
6
+ @files = Mongrel::DirHandler.new(staticmatic.site_dir, false)
7
7
  @staticmatic = staticmatic
8
8
  end
9
9
 
10
10
  def process(request, response)
11
+ @staticmatic.load_helpers
11
12
  path_info = request.params[Mongrel::Const::PATH_INFO]
12
13
  get_or_head = @@file_only_methods.include? request.params[Mongrel::Const::REQUEST_METHOD]
13
14
 
@@ -69,15 +70,13 @@ module StaticMatic
69
70
 
70
71
  class << self
71
72
  # Starts the StaticMatic preview server
72
- #
73
- # StaticMatic.start('/path/to/site/')
74
- #
75
- def start(base_dir, staticmatic, configuration = Configuration.new)
76
- port = configuration.preview_server_port || 3000
77
- config = Mongrel::Configurator.new :host => configuration.preview_server_host do
78
- puts "Running Preview of #{base_dir} on #{configuration.preview_server_host||"localhost"}:#{port}"
73
+ def start(staticmatic)
74
+ port = staticmatic.configuration.preview_server_port || 3000
75
+ host = staticmatic.configuration.preview_server_host || "localhost"
76
+ config = Mongrel::Configurator.new :host => host do
77
+ puts "Running Preview of #{staticmatic.base_dir} on #{host}:#{port}"
79
78
  listener :port => port do
80
- uri "/", :handler => Server.new(base_dir, staticmatic)
79
+ uri "/", :handler => Server.new(staticmatic)
81
80
  end
82
81
  trap("INT") { stop }
83
82
  run
@@ -2,7 +2,7 @@ module StaticMatic #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  URLIFIED = STRING.tr('.', '_')
@@ -62,7 +62,7 @@ class HelpersTest < Test::Unit::TestCase
62
62
  ['/index.html', '/subdir/index.html', '/subdir/other/index.html'].each do |the_current_page|
63
63
  set_current_page(the_current_page)
64
64
 
65
- ['/foo.html', './foo.html', '../other/foo.html'].each do |the_path|
65
+ ['/foo.html', './foo.html', '../other/foo.html', '//www.google.com/search'].each do |the_path|
66
66
  expected_output = "<a href=\"#{the_path}\">Foo</a>"
67
67
  assert_match expected_output, link("Foo", the_path)
68
68
  end
@@ -174,9 +174,21 @@ class HelpersTest < Test::Unit::TestCase
174
174
 
175
175
  # Text_field tests
176
176
  def test_should_generate_input
177
- expected_output = %q{<input type="text" value="blah" name="test"/>}
177
+ expected_output = %q{<input type="text" id="test" value="blah" name="test"/>}
178
178
  assert_tags_match expected_output, text_field("test", "blah")
179
179
  end
180
+
181
+ # Text_area tests
182
+ def test_should_generate_text_area
183
+ expected_output = '<textarea id="hello" name="hello">world</textarea>'
184
+ assert_equal expected_output, text_area('hello', 'world')
185
+ end
186
+
187
+ # Element id test
188
+ def test_id_should_not_be_overwritten
189
+ expected_output = '<textarea id="goodbye" name="hello">world</textarea>'
190
+ assert_equal expected_output, text_area('hello', 'world', :id => 'goodbye')
191
+ end
180
192
 
181
193
  # Javascripts tests
182
194
  def test_should_generate_js_links
@@ -7,6 +7,8 @@ class StaticMaticVersionTest < Test::Unit::TestCase
7
7
  end
8
8
 
9
9
  def test_version_requirements_met
10
+ assert_equal true, StaticMatic::VERSION.requirements_met?
11
+
10
12
  assert_equal false, StaticMatic::VERSION.requirements_met?("#{StaticMatic::VERSION::MAJOR+1}.0.0")
11
13
  assert_equal false, StaticMatic::VERSION.requirements_met?("#{StaticMatic::VERSION::MAJOR}.#{StaticMatic::VERSION::MINOR+1}.0")
12
14
  assert_equal false, StaticMatic::VERSION.requirements_met?("#{StaticMatic::VERSION::MAJOR}.#{StaticMatic::VERSION::MINOR}.#{StaticMatic::VERSION::TINY+1}")
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="download.html">Download</a></li>
21
21
  <li><a href="how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="download.html">Download</a></li>
21
21
  <li><a href="how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -55,6 +55,30 @@
55
55
  <p>
56
56
  No. At least not at the moment. Haml is perfect for our needs so we've had no reason to investigate using other languages. However, StaticMatic is open source so patches are always welcome.
57
57
  </p>
58
+ <h3>I found a bug. How do I report it?</h3>
59
+ <p>
60
+ At the StaticMatic <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Bug Tracker</a>.
61
+ </p>
62
+ <h3>I'd like a new feature. How do I request it?</h3>
63
+ <p>
64
+ At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14309&amp;group_id=3712&amp;func=browse">Feature Request Tracker</a>.
65
+ </p>
66
+ <h3>I've got a patch for you. How do I submit it?</h3>
67
+ <p>
68
+ At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14308&amp;group_id=3712&amp;func=browse">Patch Tracker</a>.
69
+ </p>
70
+ <h3>
71
+ How do I find neat helpers that other developers have written?
72
+ </h3>
73
+ <p>
74
+ Go to the StaticMatic <a href="helper_central/">Helper Central</a>.
75
+ </p>
76
+ <h3>
77
+ I've got a neat helper to share with the world. How do I do it?
78
+ </h3>
79
+ <p>
80
+ Post on the <a href="http://groups.google.co.uk/group/staticmatic">StaticMatic Google Group</a> requesting it be added to the StaticMatic <a href="helper_central/">Helper Central</a>.
81
+ </p>
58
82
  </div>
59
83
  </div>
60
84
  <div id='footer'>
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
+ <title>StaticMatic</title>
6
+ <link href="../stylesheets/application.css" media="all" rel="stylesheet"/>
7
+ <link href="../stylesheets/application.css" media="screen" rel="stylesheet"/>
8
+ </head>
9
+ <body>
10
+ <div id='container'>
11
+ <div id='header'>
12
+ <div class='bycurve21'>
13
+ <a href="http://www.curve21.com"><img alt="Bycurve21" src="../images/bycurve21.gif"/></a>
14
+ </div>
15
+ <div class='title'>StaticMatic</div>
16
+ </div>
17
+ <div id='menu'>
18
+ <ul>
19
+ <li><a href="/">Home</a></li>
20
+ <li><a href="../download.html">Download</a></li>
21
+ <li><a href="../how_to_use.html">How to use</a></li>
22
+ <li><a href="../faq.html">FAQ</a></li>
23
+ <li>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
25
+ </li>
26
+ <li><a href="../helper_central/">Helper Central</a></li>
27
+ <li>
28
+ <a href="http://rubyforge.org/projects/staticmatic">Development</a>
29
+ </li>
30
+ </ul>
31
+ </div>
32
+ <div id='content_wrapper'>
33
+ <div id='side'>
34
+ <div id='news'>
35
+ <div class='heading'>News</div>
36
+ <div class='title'>0.9.0 Released!</div>
37
+ <p>Complete with:</p>
38
+ <ul>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
+ <li>
43
+ Ability to strip .html and index.html from link tag urls
44
+ </li>
45
+ <li>configuration.sass_options</li>
46
+ </ul>
47
+ <a href="/releases/0_9_0.html">And More!</a>
48
+ </div>
49
+ </div>
50
+ <div id='content'>
51
+ <h1>Helper Central</h1>
52
+ <p>
53
+ This is a place where nifty helpers not accepted into core can be found.
54
+ <span class='highlight'>
55
+ Use them at your own risk. StaticMatic core developers are not responsible for these helpers or their results.
56
+ </span>
57
+ <br />
58
+ <br />
59
+ Helpers are listed in alphabetical order.
60
+ </p>
61
+ <table border='0'>
62
+ <tr>
63
+ <th>Name</th>
64
+ <th>Description</th>
65
+ <th>Author</th>
66
+ <th>Download</th>
67
+ </tr>
68
+ <tr valign='top'>
69
+ <td>
70
+ <strong>Blueprint Css</strong>
71
+ </td>
72
+ <td>
73
+ Easily include blueprint css framework files and plugins
74
+ </td>
75
+ <td>Brent Beardsley</td>
76
+ <td>
77
+ <a class="download" href="http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/blueprintcss_helper.rb" id="blueprintcss_helper">Download</a>
78
+ </td>
79
+ </tr>
80
+ <tr valign='top'>
81
+ <td>
82
+ <strong>Google Analytics</strong>
83
+ </td>
84
+ <td>
85
+ Easily include google analytics javascript code using http or https
86
+ </td>
87
+ <td>Brent Beardsley</td>
88
+ <td>
89
+ <a class="download" href="http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/google_analytics_helper.rb" id="google_analytics_helper">Download</a>
90
+ </td>
91
+ </tr>
92
+ <tr valign='top'>
93
+ <td>
94
+ <strong>Menubar</strong>
95
+ </td>
96
+ <td>Easily create a menubar using an unordered list</td>
97
+ <td>Brent Beardsley</td>
98
+ <td>
99
+ <a class="download" href="http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/menubar_helper.rb" id="menubar_helper">Download</a>
100
+ </td>
101
+ </tr>
102
+ <tr valign='top'>
103
+ <td>
104
+ <strong>Navigation</strong>
105
+ </td>
106
+ <td>Easily create breadcrumbs, sitemaps, and menus.</td>
107
+ <td>Andrew Neil</td>
108
+ <td>
109
+ <a class="download" href="http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/navigation_helper.rb" id="navigation_helper">Download</a>
110
+ </td>
111
+ </tr>
112
+ <tr valign='top'>
113
+ <td>
114
+ <strong>Rss List</strong>
115
+ </td>
116
+ <td>
117
+ Easily create an unordered list from an rss feed. Special helpers for delicious, flickr, ebay, magnolia, and twitter.
118
+ </td>
119
+ <td>Brent Beardsley</td>
120
+ <td>
121
+ <a class="download" href="http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/rss_list_helper.rb" id="rss_list_helper">Download</a>
122
+ </td>
123
+ </tr>
124
+ </table>
125
+ </div>
126
+ </div>
127
+ <div id='footer'>
128
+ <p>
129
+ Made with StaticMatic
130
+ 0.9.0
131
+ , Hosted by
132
+ <a href="http://rubyforge.org">RubyForge</a>
133
+ </p>
134
+ </div>
135
+ <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
136
+ _hamlspace = "";
137
+ </script>
138
+ <script type='text/javascript'>
139
+ _uacct = "UA-775359-8";
140
+ urchinTracker();
141
+ </script>
142
+ </div>
143
+ </body>
144
+ </html>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="download.html">Download</a></li>
21
21
  <li><a href="how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -113,7 +113,7 @@
113
113
  <div class='code'>staticmatic build my_site</div>
114
114
  <h2 id='configuration'>Configuration</h2>
115
115
  <p>
116
- You can put a file called configuration.rb in your staticmatic project base directory.
116
+ You can put a file called configuration.rb in your staticmatic project's basedir/src directory.
117
117
  In this file, you can set configuration settings or whatever else since it's just a
118
118
  ruby file.
119
119
  </p>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="download.html">Download</a></li>
21
21
  <li><a href="how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="../download.html">Download</a></li>
21
21
  <li><a href="../how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="../faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="../helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="../download.html">Download</a></li>
21
21
  <li><a href="../how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="../faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="../helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="../download.html">Download</a></li>
21
21
  <li><a href="../how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="../faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="../helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -19,13 +19,11 @@
19
19
  <li><a href="/">Home</a></li>
20
20
  <li><a href="../download.html">Download</a></li>
21
21
  <li><a href="../how_to_use.html">How to use</a></li>
22
- <li>
23
- <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
24
- </li>
25
22
  <li><a href="../faq.html">FAQ</a></li>
26
23
  <li>
27
- <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Report Bug</a>
24
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
28
25
  </li>
26
+ <li><a href="../helper_central/">Helper Central</a></li>
29
27
  <li>
30
28
  <a href="http://rubyforge.org/projects/staticmatic">Development</a>
31
29
  </li>
@@ -38,7 +36,9 @@
38
36
  <div class='title'>0.9.0 Released!</div>
39
37
  <p>Complete with:</p>
40
38
  <ul>
41
- <li>&quot;Local&quot; links are always relative</li>
39
+ <li>
40
+ &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
41
+ </li>
42
42
  <li>
43
43
  Ability to strip .html and index.html from link tag urls
44
44
  </li>
@@ -52,12 +52,12 @@
52
52
  <p>
53
53
  The biggest change is that
54
54
  <span class='highlight'>
55
- all the "local" links (pages/stylesheets/images) are always relative
55
+ all the "local" links generated (pages/stylesheets/images) are relative
56
56
  </span>
57
57
  now that we know the current page. So the
58
58
  use_relative_path_for_* configuration settings were removed.
59
59
  <span class='highlight'>
60
- This will cause your configuration.rb to blow up unless you delete them.
60
+ This will cause your configuration.rb to blow up unless you remove them.
61
61
  </span>
62
62
  </p>
63
63
  <h2>What's New</h2>
@@ -95,7 +95,7 @@
95
95
  </li>
96
96
  <li>no longer add \n after the tag in the tag helper</li>
97
97
  <li>
98
- mailto: links were getting a / inserted at in front of the mailto:
98
+ mailto: links were getting a / inserted in front of the mailto:
99
99
  </li>
100
100
  </ul>
101
101
  <p>
@@ -17,9 +17,9 @@
17
17
  %li= link "Home", "/"
18
18
  %li= link "Download"
19
19
  %li= link "How to use"
20
- %li= link "Community", "http://groups.google.co.uk/group/staticmatic"
21
20
  %li= link "FAQ"
22
- %li= link 'Report Bug', 'http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306'
21
+ %li= link "Community", "http://groups.google.co.uk/group/staticmatic"
22
+ %li= link "Helper Central", "helper_central/"
23
23
  %li= link "Development", "http://rubyforge.org/projects/staticmatic"
24
24
  #content_wrapper
25
25
  #side
@@ -0,0 +1,2 @@
1
+ %h3= question
2
+ %p= answer
@@ -1,6 +1,8 @@
1
1
  %h1 FAQ
2
2
 
3
- %h3 I hate Haml. Can I use a different template language?
4
-
5
- %p No. At least not at the moment. Haml is perfect for our needs so we've had no reason to investigate using other languages. However, StaticMatic is open source so patches are always welcome.
6
-
3
+ =partial('qa', :locals => { :question => 'I hate Haml. Can I use a different template language?', :answer => 'No. At least not at the moment. Haml is perfect for our needs so we\'ve had no reason to investigate using other languages. However, StaticMatic is open source so patches are always welcome.' })
4
+ =partial('qa', :locals => { :question => 'I found a bug. How do I report it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?func=browse&amp;group_id=3712&amp;atid=14306">Bug Tracker</a>.' })
5
+ =partial('qa', :locals => { :question => 'I\'d like a new feature. How do I request it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14309&amp;group_id=3712&amp;func=browse">Feature Request Tracker</a>.' })
6
+ =partial('qa', :locals => { :question => 'I\'ve got a patch for you. How do I submit it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14308&amp;group_id=3712&amp;func=browse">Patch Tracker</a>.' })
7
+ =partial('qa', :locals => { :question => 'How do I find neat helpers that other developers have written?', :answer => 'Go to the StaticMatic <a href="helper_central/">Helper Central</a>.' })
8
+ =partial('qa', :locals => { :question => 'I\'ve got a neat helper to share with the world. How do I do it?', :answer => 'Post on the <a href="http://groups.google.co.uk/group/staticmatic">StaticMatic Google Group</a> requesting it be added to the StaticMatic <a href="helper_central/">Helper Central</a>.' })
@@ -0,0 +1,7 @@
1
+ %tr{:valign => :top}
2
+ %td
3
+ %strong= title
4
+ %td= description
5
+ %td= author
6
+ %td
7
+ = link "Download", download_link, :id => id, :class => 'download'
@@ -0,0 +1,21 @@
1
+ %h1 Helper Central
2
+
3
+ %p
4
+ This is a place where nifty helpers not accepted into core can be found.
5
+ %span.highlight Use them at your own risk. StaticMatic core developers are not responsible for these helpers or their results.
6
+ %br
7
+ %br
8
+ Helpers are listed in alphabetical order.
9
+
10
+ %table{:border => '0'}
11
+ %tr
12
+ %th Name
13
+ %th Description
14
+ %th Author
15
+ %th Download
16
+ =partial('helper', :locals => { :title => 'Blueprint Css', :author => 'Brent Beardsley', :description => 'Easily include blueprint css framework files and plugins', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/blueprintcss_helper.rb', :id => 'blueprintcss_helper' })
17
+ =partial('helper', :locals => { :title => 'Google Analytics', :author => 'Brent Beardsley', :description => 'Easily include google analytics javascript code using http or https', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/google_analytics_helper.rb', :id => 'google_analytics_helper' })
18
+ =partial('helper', :locals => { :title => 'Menubar', :author => 'Brent Beardsley', :description => 'Easily create a menubar using an unordered list', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/menubar_helper.rb', :id => 'menubar_helper' })
19
+ =partial('helper', :locals => { :title => 'Navigation', :author => 'Andrew Neil', :description => 'Easily create breadcrumbs, sitemaps, and menus.', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/navigation_helper.rb', :id => 'navigation_helper' })
20
+ =partial('helper', :locals => { :title => 'Rss List', :author => 'Brent Beardsley', :description => 'Easily create an unordered list from an rss feed. Special helpers for delicious, flickr, ebay, magnolia, and twitter.', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/rss_list_helper.rb', :id => 'rss_list_helper' })
21
+
@@ -27,7 +27,10 @@
27
27
  %li
28
28
  src/ - where you'll work on your templates
29
29
  %ul
30
- %li helpers/ - contains any helpers you want to use in your website
30
+ %li
31
+ helpers/ - contains any helpers you want to use in your website
32
+ (write your own or grab some from
33
+ = link_to('Helper Central', '/helper_central/') + ')'
31
34
  %li layouts/ - contains templates that 'wrap' your main content pages
32
35
  %li pages/ - contains the actual pages of content
33
36
  %li partials/ - contains any &quot;partial pages&quot; that can be reused in other pages or layouts
@@ -56,7 +59,7 @@
56
59
  %h2{:id => 'configuration'} Configuration
57
60
 
58
61
  %p
59
- You can put a file called configuration.rb in your staticmatic project base directory.
62
+ You can put a file called configuration.rb in your staticmatic project's basedir/src directory.
60
63
  In this file, you can set configuration settings or whatever else since it's just a
61
64
  ruby file.
62
65
 
@@ -114,10 +117,20 @@
114
117
  %h3{:id => 'helpers'} Helpers
115
118
 
116
119
  %p StaticMatic provides a number of 'helpers' on top of those in Haml to handle common code and reduce code.
120
+ %p
121
+ %em
122
+ Additionally you can write your own helpers and put them in your
123
+ staticmatic src/helpers directory. You can checkout the
124
+ = link_to 'Helper Central', '/helper_central/'
125
+ for some helpers that have already been written by others that
126
+ you can drop in your helper directory.
117
127
 
118
128
  %h4 Links
119
129
 
120
- %p 'link' can automatically set up hyperlinks for you:
130
+ %p
131
+ 'link' ('link_to' works too for you
132
+ = link_to 'Rails', 'http://www.rubyonrails.com/'
133
+ types) can automatically set up hyperlinks for you:
121
134
 
122
135
  .code = link "Contact Us"
123
136
 
@@ -206,6 +219,14 @@ For the page src/pages/subdirectory/other.html
206
219
  %br
207
220
  \= urlify(&quot;Test/Link&quot;) # =&gt; &quot;testlink&quot;
208
221
 
222
+ %h4 text_area
223
+
224
+ %p Generates a text area field
225
+
226
+ .code = text_area 'myname', 'myvalue'
227
+ produces:
228
+ .code &lt;textarea id=&quot;myname&quot; name=&quot;myname&quot;&gt;myvalue&lt;/textarea&gt;
229
+
209
230
  %h4 text_field
210
231
 
211
232
  %p Generates a text input field
@@ -2,10 +2,10 @@
2
2
 
3
3
  %p
4
4
  The biggest change is that
5
- %span.highlight all the "local" links (pages/stylesheets/images) are always relative
5
+ %span.highlight all the "local" links generated (pages/stylesheets/images) are relative
6
6
  now that we know the current page. So the
7
7
  use_relative_path_for_* configuration settings were removed.
8
- %span.highlight This will cause your configuration.rb to blow up unless you delete them.
8
+ %span.highlight This will cause your configuration.rb to blow up unless you remove them.
9
9
 
10
10
  %h2 What's New
11
11
 
@@ -27,7 +27,7 @@
27
27
  %ul
28
28
  %li clear all instance variables in @scope except @staticmatic
29
29
  %li no longer add \n after the tag in the tag helper
30
- %li mailto: links were getting a / inserted at in front of the mailto:
30
+ %li mailto: links were getting a / inserted in front of the mailto:
31
31
 
32
32
  %p
33
33
  See what changed in
@@ -3,7 +3,7 @@
3
3
  %p Complete with:
4
4
 
5
5
  %ul
6
- %li &quot;Local&quot; links are always relative
6
+ %li &quot;Local&quot; generated links are relative - no more use_relative_path_for_* configuration settings
7
7
  %li Ability to strip .html and index.html from link tag urls
8
8
  %li configuration.sass_options
9
9
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: staticmatic
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.0
7
- date: 2007-10-16 00:00:00 -06:00
6
+ version: 0.9.1
7
+ date: 2007-11-29 00:00:00 +00:00
8
8
  summary: Manage static sites using Haml & Sass
9
9
  require_paths:
10
10
  - lib
11
11
  email: steve@curve21.com
12
- homepage: http//www.curve21.com
13
- rubyforge_project:
12
+ homepage: http//staticmatic.rubyforge.org
13
+ rubyforge_project: staticmatic
14
14
  description:
15
15
  autorequire:
16
16
  default_executable:
@@ -28,6 +28,7 @@ cert_chain:
28
28
  post_install_message:
29
29
  authors:
30
30
  - Stephen Bartholomew
31
+ - Brent Beardsley (brentbeardsley@gmail.com)
31
32
  files:
32
33
  - bin
33
34
  - bin/staticmatic
@@ -99,6 +100,8 @@ files:
99
100
  - website/site
100
101
  - website/site/download.html
101
102
  - website/site/faq.html
103
+ - website/site/helper_central
104
+ - website/site/helper_central/index.html
102
105
  - website/site/how_to_use.html
103
106
  - website/site/images
104
107
  - website/site/images/bycurve21.gif
@@ -121,8 +124,12 @@ files:
121
124
  - website/src/layouts/application.haml
122
125
  - website/src/layouts/test.haml
123
126
  - website/src/pages
127
+ - website/src/pages/_qa.haml
124
128
  - website/src/pages/download.haml
125
129
  - website/src/pages/faq.haml
130
+ - website/src/pages/helper_central
131
+ - website/src/pages/helper_central/_helper.haml
132
+ - website/src/pages/helper_central/index.haml
126
133
  - website/src/pages/how_to_use.haml
127
134
  - website/src/pages/index.haml
128
135
  - website/src/pages/releases