staticmatic 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/History.txt +6 -0
  2. data/Manifest.txt +24 -0
  3. data/README.rdoc +48 -0
  4. data/Rakefile +22 -27
  5. data/bin/staticmatic +0 -0
  6. data/lib/staticmatic.rb +12 -4
  7. data/lib/staticmatic/base.rb +30 -242
  8. data/lib/staticmatic/mixins/build.rb +46 -0
  9. data/lib/staticmatic/mixins/helpers.rb +15 -0
  10. data/lib/staticmatic/mixins/render.rb +125 -0
  11. data/lib/staticmatic/mixins/rescue.rb +12 -0
  12. data/lib/staticmatic/mixins/server.rb +6 -0
  13. data/lib/staticmatic/mixins/setup.rb +20 -0
  14. data/lib/staticmatic/template_error.rb +40 -0
  15. data/lib/staticmatic/templates/{application.haml → default/application.haml} +0 -0
  16. data/lib/staticmatic/templates/{application.sass → default/application.sass} +0 -0
  17. data/lib/staticmatic/templates/{index.haml → default/index.haml} +0 -0
  18. data/lib/staticmatic/templates/rescues/default.haml +7 -0
  19. data/lib/staticmatic/templates/rescues/template.haml +18 -0
  20. data/test/test_helper.rb +20 -48
  21. metadata +55 -124
  22. data/CHANGELOG +0 -57
  23. data/LICENSE +0 -21
  24. data/README +0 -56
  25. data/example/site/contact.html +0 -17
  26. data/example/site/index.html +0 -16
  27. data/example/site/javascripts/application.css +0 -2
  28. data/example/src/layouts/application.haml +0 -11
  29. data/example/src/pages/contact.haml +0 -3
  30. data/example/src/pages/index.haml +0 -3
  31. data/example/src/pages/test test/blah.haml +0 -1
  32. data/example/src/stylesheets/application.sass +0 -4
  33. data/lib/staticmatic/version.rb +0 -34
  34. data/test/base_test.rb +0 -60
  35. data/test/helpers_test.rb +0 -296
  36. data/test/sandbox/test_site/configuration.rb +0 -0
  37. data/test/sandbox/test_site/site/index.html +0 -10
  38. data/test/sandbox/test_site/site/stylesheets/application.css +0 -2
  39. data/test/sandbox/test_site/src/helpers/application_helper.rb +0 -5
  40. data/test/sandbox/test_site/src/layouts/alternate_layout.haml +0 -3
  41. data/test/sandbox/test_site/src/layouts/application.haml +0 -7
  42. data/test/sandbox/test_site/src/layouts/projects.haml +0 -1
  43. data/test/sandbox/test_site/src/pages/index.haml +0 -5
  44. data/test/sandbox/test_site/src/pages/layout_test.haml +0 -2
  45. data/test/sandbox/test_site/src/partials/menu.haml +0 -1
  46. data/test/sandbox/test_site/src/stylesheets/application.sass +0 -2
  47. data/test/server_test.rb +0 -12
  48. data/test/test_helper_test.rb +0 -49
  49. data/test/version_test.rb +0 -28
  50. data/website/site/download.html +0 -84
  51. data/website/site/faq.html +0 -101
  52. data/website/site/helper_central/index.html +0 -144
  53. data/website/site/how_to_use.html +0 -307
  54. data/website/site/images/bycurve21.gif +0 -0
  55. data/website/site/images/curve21.jpg +0 -0
  56. data/website/site/images/homepage-build.jpg +0 -0
  57. data/website/site/images/homepage-previewing.jpg +0 -0
  58. data/website/site/images/homepage-templating.jpg +0 -0
  59. data/website/site/index.html +0 -98
  60. data/website/site/releases/0_8_10.html +0 -106
  61. data/website/site/releases/0_8_4.html +0 -101
  62. data/website/site/releases/0_8_8.html +0 -96
  63. data/website/site/releases/0_9_0.html +0 -124
  64. data/website/site/stylesheets/application.css +0 -287
  65. data/website/src/helpers/application_helper.rb +0 -5
  66. data/website/src/layouts/application.haml +0 -43
  67. data/website/src/layouts/test.haml +0 -4
  68. data/website/src/pages/_qa.haml +0 -2
  69. data/website/src/pages/download.haml +0 -15
  70. data/website/src/pages/faq.haml +0 -8
  71. data/website/src/pages/helper_central/_helper.haml +0 -7
  72. data/website/src/pages/helper_central/index.haml +0 -21
  73. data/website/src/pages/how_to_use.haml +0 -270
  74. data/website/src/pages/index.haml +0 -27
  75. data/website/src/pages/releases/0_8_10.haml +0 -22
  76. data/website/src/pages/releases/0_8_4.haml +0 -25
  77. data/website/src/pages/releases/0_8_8.haml +0 -35
  78. data/website/src/pages/releases/0_9_0.haml +0 -34
  79. data/website/src/partials/news.haml +0 -10
@@ -1,101 +0,0 @@
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>StaticMatic 0.8.4</h1>
52
- <p>
53
- Don't be fooled by the small minor increments - there's loads of great stuff in the latest release:
54
- </p>
55
- <h2>Sub-Directory Support</h2>
56
- <p>
57
- Thanks to Brent Beardsley, you can now have as many directories as you like. This should be considered 'beta' at the moment as there is likely to be issues with paths in the helpers, but try it out and we'll figure out the best solution.
58
- </p>
59
- <h2>Partials!</h2>
60
- <p>
61
- Simply create a 'partials' directory in your src/ and you'll be able to do:
62
- <div class='code'>partial("partial_name")</div>
63
- </p>
64
- <h2>Layouts based on directory</h2>
65
- <p>
66
- Along with sub-directory support, you can also create layouts based on the sub-directory a template is in. For example, if you have a 'projects' directory and would like it to render a different template, simply create 'projects.haml' in your layouts directory.
67
- </p>
68
- <h2>Relative Stylesheet Linking</h2>
69
- <p>
70
- You can now tell the stylesheet helper to use relative linking:
71
- <div class='code'>= stylesheets :relative => true</div>
72
- </p>
73
- <p>
74
- <em>
75
- Note that you may get issues with nested directories and relative stylesheets
76
- </em>
77
- </p>
78
- <h2>What's Next?</h2>
79
- <p>
80
- The main things on the list are configuration and clearing up any bugs not yet sorted. It'd also be great to start extending the test set more.
81
- </p>
82
- </div>
83
- </div>
84
- <div id='footer'>
85
- <p>
86
- Made with StaticMatic
87
- 0.9.0
88
- , Hosted by
89
- <a href="http://rubyforge.org">RubyForge</a>
90
- </p>
91
- </div>
92
- <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
93
- _hamlspace = "";
94
- </script>
95
- <script type='text/javascript'>
96
- _uacct = "UA-775359-8";
97
- urchinTracker();
98
- </script>
99
- </div>
100
- </body>
101
- </html>
@@ -1,96 +0,0 @@
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>StaticMatic 0.8.8</h1>
52
- <h2>Helpers</h2>
53
- <p>
54
- Thanks to Craig Webster, we now have Rails-style helpers.
55
- </p>
56
- src/application_helper.rb:
57
- <pre class="code">&#x000A;module ApplicationHelper&#x000A; def greet(name)&#x000A; "Hello, #{name}!"&#x000A; end&#x000A;end&#x000A;</pre>&#x000A;&#x000A;
58
- <h2>Configuration</h2>
59
- <p>
60
- We also now have configuration. It's only basic right now but expect this to expand.
61
- </p>
62
- src/configuration.rb:
63
- <div class='code'>
64
- configuration.preview_server_port = 3000
65
- configuration.use_relative_paths_for_links = false
66
- configuration.use_relative_paths_for_images = false
67
- configuration.use_relative_paths_for_stylesheets = false
68
- configuration.use_relative_paths_for_javascripts = false
69
- </div>
70
- <p>
71
- The configuration file is also loaded before StaticMatic starts so it can be used to monkey-patch to demonstrate new features.
72
- </p>
73
- <p>
74
- See what changed in
75
- <a href="/releases/0_8_4.html">0.8.4</a>
76
- </p>
77
- </div>
78
- </div>
79
- <div id='footer'>
80
- <p>
81
- Made with StaticMatic
82
- 0.9.0
83
- , Hosted by
84
- <a href="http://rubyforge.org">RubyForge</a>
85
- </p>
86
- </div>
87
- <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
88
- _hamlspace = "";
89
- </script>
90
- <script type='text/javascript'>
91
- _uacct = "UA-775359-8";
92
- urchinTracker();
93
- </script>
94
- </div>
95
- </body>
96
- </html>
@@ -1,124 +0,0 @@
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>StaticMatic 0.9.0</h1>
52
- <p>
53
- The biggest change is that
54
- <span class='highlight'>
55
- all the "local" links generated (pages/stylesheets/images) are relative
56
- </span>
57
- now that we know the current page. So the
58
- use_relative_path_for_* configuration settings were removed.
59
- <span class='highlight'>
60
- This will cause your configuration.rb to blow up unless you remove them.
61
- </span>
62
- </p>
63
- <h2>What's New</h2>
64
- <ul>
65
- <li>added StaticMatic::VERSION.requirements_met?</li>
66
- <li>added LICENSE and CHANGELOG files</li>
67
- <li>
68
- can now specify relative paths when only specifying a title - link("../other/How to download")
69
- </li>
70
- <li>
71
- add src_dir/stylesheets directory to sass load path so you can use @import styles.sass
72
- </li>
73
- <li>
74
- added sass_options hash to configuration so you can configure sass (ie: :style => :compact)
75
- </li>
76
- <li>
77
- added configuration.use_extensions_for_page_links (defaults to true) when false will strip index.html and .html off the end of links for pretty urls
78
- </li>
79
- <li>
80
- made all "local" links (pages/stylesheets/images) relative to the current page and removed use_relative_path_for_* configuration settings
81
- </li>
82
- <li>
83
- stylesheets helper can now take a list of stylesheets to include and the order as well as options (ie: :media => :print)
84
- </li>
85
- <li>added clean and clobber tasks to Rakefile</li>
86
- <li>added StaticMatic::VERSION in version.rb</li>
87
- <li>
88
- added package task to Rakefile and made it the default
89
- </li>
90
- </ul>
91
- <h2>What's Fixed</h2>
92
- <ul>
93
- <li>
94
- clear all instance variables in @scope except @staticmatic
95
- </li>
96
- <li>no longer add \n after the tag in the tag helper</li>
97
- <li>
98
- mailto: links were getting a / inserted in front of the mailto:
99
- </li>
100
- </ul>
101
- <p>
102
- See what changed in
103
- <a href="/releases/0_8_10.html">0.8.10</a>
104
- </p>
105
- </div>
106
- </div>
107
- <div id='footer'>
108
- <p>
109
- Made with StaticMatic
110
- 0.9.0
111
- , Hosted by
112
- <a href="http://rubyforge.org">RubyForge</a>
113
- </p>
114
- </div>
115
- <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
116
- _hamlspace = "";
117
- </script>
118
- <script type='text/javascript'>
119
- _uacct = "UA-775359-8";
120
- urchinTracker();
121
- </script>
122
- </div>
123
- </body>
124
- </html>
@@ -1,287 +0,0 @@
1
- body {
2
- background: #fff;
3
- color: #333;
4
- margin: 0;
5
- padding: 0;
6
- font: 16px/1em arial, helvetica, verdana, sans-serif;
7
- }
8
-
9
- #header {
10
- height: 50px;
11
- }
12
-
13
- #header {
14
- padding: 15px 0 0px 0;
15
- }
16
-
17
- #header .title {
18
- font: normal 35px/35px georgia, "times new roman", times, serif;
19
- border-bottom: 1px solid #999;
20
- color: #cc0000;
21
- padding-left: 20px;
22
- margin-bottom: 0px;
23
- }
24
-
25
- #header .bycurve21 {
26
- float: right;
27
-
28
- }
29
-
30
- * html #header .title {
31
- margin-bottom: 0;
32
- }
33
-
34
- #footer {
35
- border-top: 1px solid #ccc;
36
- border-bottom: 1px solid #ccc;
37
- clear: both;
38
- font-size: 75%;
39
- letter-spacing: 1px;
40
- margin: 30px 0 15px 0;
41
- width: 100%;
42
- text-align: center;
43
- padding: 10px 0 5px 0;
44
- }
45
-
46
- :link,:visited { text-decoration:none }
47
-
48
- ul,ol,li,h1,h2,h3,h4,h5,h6,form,body,html {
49
-
50
- }
51
-
52
- p {
53
- clear: both;
54
- }
55
-
56
- #content ul {
57
- margin-left: 20px;
58
- padding-left: 0;
59
-
60
- }
61
-
62
- #content li {
63
- padding-left: 18px;
64
- background: url(../images/list.png) no-repeat 0% .5em;
65
- }
66
-
67
- a, a:link, a:visited {
68
- font-weight: bold;
69
- color: #206fbc;
70
- letter-spacing: 1px;
71
- outline: none;
72
- text-decoration: underline;
73
- }
74
-
75
- a:hover {
76
- color: #669933;
77
- text-decoration: none;
78
- }
79
-
80
- #content a, #content a:link, #content a:visited {
81
- color: #cc0000;
82
- }
83
-
84
- #content a:hover {
85
- color: #cc6600;
86
- }
87
-
88
- a img,:link img,:visited img {
89
- border: none;
90
- }
91
-
92
- h1, h2, h3, h4 {
93
- font-family: arial, helvetica, verdana, sans-serif;
94
- font-weight: normal;
95
- letter-spacing: 1px;
96
- }
97
-
98
- h1 {
99
- font-size: 218%;
100
- }
101
-
102
- h2 {
103
- font-size: 164%;
104
- }
105
-
106
- h3 {
107
- color: #5190b2;
108
- font-size: 145%;
109
- }
110
-
111
- h4 {
112
- color: #669933;
113
- font-size: 118%;
114
- font-weight: bold;
115
- }
116
-
117
- #navtop, #content, #leftcolumn, #rightcolumn {
118
- font-size: 85%;
119
- }
120
-
121
- #content p, #leftcolumn p, #rightcolumn p {
122
- margin-bottom: 18px;
123
- }
124
-
125
- blockquote {
126
- background-color: #f4f4f4;
127
- padding: 5px 10px 5px 10px;
128
- margin: 15px 40px 15px 20px;
129
- border-left: 5px solid #ccc;
130
- border-right: 5px solid #ccc;
131
- font-style: italic;
132
- letter-spacing: 1px;
133
- }
134
-
135
- img {
136
- border: 1px solid #aaa;
137
- padding: 0;
138
- margin: 0;
139
- }
140
-
141
- hr {
142
- clear: both;
143
- border: 0;
144
- height: 1px;
145
- color: #ccc;
146
- background-color: #ccc;
147
- margin: 0;
148
- }
149
-
150
-
151
- #container {
152
- width: 960px;
153
- margin: 0 auto;
154
- position: relative;
155
- }
156
-
157
-
158
- #content_wrapper {
159
- width: 920px;
160
- }
161
-
162
- #content_wrapper {
163
- margin: 15px 0 15px 0;
164
- padding: 0 0 0 20px;
165
- }
166
-
167
- * html #content_wrapper { margin-top: 10px; }
168
-
169
- #content {
170
- width: 670px;
171
- float: left;
172
- }
173
-
174
- #menu {
175
- padding: 0;
176
- width: 100%;
177
- border-bottom: 5px solid #5190b2;
178
- height: 26px;
179
- background: transparent;
180
- voice-family: "\"}\"";
181
- voice-family: inherit;
182
- }
183
-
184
-
185
- #menu ul {
186
- font: bold 13px arial;
187
- margin: 0;
188
- margin-left: 20px;
189
- padding: 0;
190
- list-style: none;
191
- }
192
-
193
- #menu li {
194
- display: inline;
195
- margin: 0 2px 0 0;
196
- padding: 0;
197
- }
198
-
199
- #menu a, #menu a:link, #menu a:visited {
200
- float: left;
201
- display: block;
202
- color: #fff;
203
- margin: 0 1px 0 0;
204
- padding: 5px 10px;
205
- text-decoration: none;
206
- letter-spacing: 1px;
207
- background: #333 url(../images/button.png) repeat-x;
208
- border-bottom: 1px solid #fff;
209
- }
210
-
211
- #menu a:hover{
212
- background: #999;
213
- }
214
-
215
- #menu #current a {
216
- background: #5190b2 url(../images/button_current.png) repeat-x;
217
- border-color: #5190b2;
218
- }
219
-
220
- /* columns */
221
- .columns {
222
- width: 580px;
223
- }
224
-
225
- .left_column {
226
- width: 45%;
227
- float: left;
228
- }
229
-
230
- .right_column {
231
- width: 45%;
232
- float: right;
233
- }
234
-
235
- .code {
236
- font-family: courier, sans-serif;
237
- font-size: 10pt;
238
- padding: 5px;
239
- background-color: #efefef;
240
- border: 1px solid #aaa;
241
- margin: 2px 0 2px 0;
242
- }
243
-
244
- #quotes {
245
- margin: 10px 0 0 0;
246
- }
247
-
248
- .quote {
249
- font-style: italic;
250
- color: #555;
251
- font-size: 10pt;
252
- margin: 10px 0 10px 0;
253
- }
254
-
255
- #side {
256
- float: right;
257
- width: 200px;
258
- border: 1px solid #aaa;
259
- background-color: #efefef;
260
- padding: 5px;
261
- margin: 0 0 10px 0;
262
- }
263
-
264
- #side a {
265
- display: block;
266
- }
267
-
268
-
269
- #side #news {
270
- font-size: 10pt;
271
- }
272
-
273
- #side .title {
274
- font-weight: bold;
275
- margin: 0 0 8px 0;
276
- }
277
-
278
- #side .heading {
279
- font-weight: bold;
280
- margin: 0 0 8px 0;
281
- font-size: 12pt;
282
- }
283
-
284
- .highlight {
285
- background-color: #aaa;
286
- font-style: italic;
287
- }