staticmatic 0.10.0 → 0.10.1

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.
data/README.rdoc CHANGED
@@ -1,48 +1,50 @@
1
- = staticmatic-core
1
+ # StaticMatic
2
2
 
3
- * FIX (url)
3
+ *For information on Haml & Sass please see [haml.hamptoncatlin.com](http://haml.hamptoncatlin.com)*.
4
4
 
5
- == DESCRIPTION:
5
+ ## What's it all about?
6
6
 
7
- FIX (describe your package)
7
+ CMS is overrated. A lot of the time, clients want us to do what we do
8
+ best - well designed pages with structured, accessible and maintainable markup & styling.
8
9
 
9
- == FEATURES/PROBLEMS:
10
+ CMSs are often perfect for this, but sometimes they can be restrictive and more cumbersome
11
+ than just working with good ol' source code. At the same time we want our code to be
12
+ structured, DRY and flexible.
10
13
 
11
- * FIX (list of features or problems)
14
+ Enter **StaticMatic**.
12
15
 
13
- == SYNOPSIS:
16
+ ## Usage
14
17
 
15
- FIX (code sample of usage)
18
+ StaticMatic will set up a basic site structure for you with this command:
16
19
 
17
- == REQUIREMENTS:
20
+ staticmatic setup <directory>
18
21
 
19
- * FIX (list of requirements)
22
+ After this command you'll have the following files:
20
23
 
21
- == INSTALL:
24
+ <directory>/
25
+ site/
26
+ images/
27
+ stylesheets/
28
+ javascripts/
29
+ src/
30
+ helpers/
31
+ layouts/
32
+ application.haml
33
+ pages/
34
+ index.haml
35
+ stylesheets/
36
+ application.sass
22
37
 
23
- * FIX (sudo gem install, anything else)
38
+ StaticMatic sets you up with a sample layout, stylesheet and page file. Once you've
39
+ edited the pages and stylesheets, you can generate the static site:
24
40
 
25
- == LICENSE:
41
+ staticmatic build <directory>
42
+
43
+ All of the pages are parsed and wrapped up in application.haml and put into the site directory.
26
44
 
27
- (The MIT License)
45
+ ## Templates
28
46
 
29
- Copyright (c) 2008 FIXME full name
47
+ StaticMatic adds a few helpers to the core Haml helpers:
30
48
 
31
- Permission is hereby granted, free of charge, to any person obtaining
32
- a copy of this software and associated documentation files (the
33
- 'Software'), to deal in the Software without restriction, including
34
- without limitation the rights to use, copy, modify, merge, publish,
35
- distribute, sublicense, and/or sell copies of the Software, and to
36
- permit persons to whom the Software is furnished to do so, subject to
37
- the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be
40
- included in all copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+ = link 'Title', 'url'
50
+ = img 'my_image.jpg'
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ require File.dirname(__FILE__) + '/lib/staticmatic'
5
5
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
6
6
  $hoe = Hoe.new('staticmatic', StaticMatic::VERSION) do |p|
7
7
  p.developer('Stephen Bartholomew', 'steve@curve21.com')
8
+ p.summary = "Lightweight Static Site Framework"
8
9
  p.rubyforge_name = p.name
9
10
  p.extra_deps = [
10
11
  ['haml','>= 2.0'],
@@ -16,7 +17,7 @@ $hoe = Hoe.new('staticmatic', StaticMatic::VERSION) do |p|
16
17
 
17
18
  p.clean_globs |= %w[**/.DS_Store tmp *.log]
18
19
  path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
19
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
20
+ p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'markdown')
20
21
  p.rsync_args = '-av --delete --ignore-errors'
21
22
  end
22
23
 
@@ -6,11 +6,13 @@ module StaticMatic
6
6
 
7
7
  attr_accessor :use_extensions_for_page_links
8
8
  attr_accessor :sass_options
9
-
9
+ attr_accessor :haml_options
10
+
10
11
  def initialize
11
12
  self.preview_server_port = 3000
12
13
  self.use_extensions_for_page_links = true
13
14
  self.sass_options = {}
15
+ self.haml_options = {}
14
16
  end
15
17
  end
16
18
  end
@@ -93,9 +93,9 @@ module StaticMatic::RenderMixin
93
93
  # generate_html_from_template_source("content:\n= yield") { "blah" } -> "content: blah"
94
94
  #
95
95
  def generate_html_from_template_source(source, options = {})
96
- html = Haml::Engine.new(source, options)
96
+ html = Haml::Engine.new(source, self.configuration.haml_options.merge(options))
97
97
 
98
- html.render(@scope) { yield }
98
+ html.render(@scope, options) { yield }
99
99
  end
100
100
 
101
101
  def determine_layout(dir = '')
data/lib/staticmatic.rb CHANGED
@@ -5,7 +5,7 @@ require 'mongrel'
5
5
  require 'fileutils'
6
6
 
7
7
  module StaticMatic
8
- VERSION = '0.10.0'
8
+ VERSION = '0.10.1'
9
9
  end
10
10
 
11
11
  ["render", "build", "setup", "server", "helpers", "rescue"].each do |mixin|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staticmatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Bartholomew
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-01 00:00:00 +00:00
12
+ date: 2009-01-30 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -52,7 +52,7 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.8.0
54
54
  version:
55
- description: FIX (describe your package)
55
+ description:
56
56
  email:
57
57
  - steve@curve21.com
58
58
  executables:
@@ -88,7 +88,7 @@ files:
88
88
  - lib/staticmatic/template_error.rb
89
89
  - lib/staticmatic/mixins/rescue.rb
90
90
  has_rdoc: true
91
- homepage: FIX (url)
91
+ homepage:
92
92
  post_install_message:
93
93
  rdoc_options:
94
94
  - --main
@@ -113,6 +113,6 @@ rubyforge_project: staticmatic
113
113
  rubygems_version: 1.3.1
114
114
  signing_key:
115
115
  specification_version: 2
116
- summary: FIX (describe your package)
116
+ summary: Lightweight Static Site Framework
117
117
  test_files:
118
118
  - test/test_helper.rb