spohlenz-sassic 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'echoe'
2
2
 
3
- Echoe.new('sassic', '0.2.5') do |p|
3
+ Echoe.new('sassic', '0.2.6') do |p|
4
4
  p.author = "Sam Pohlenz"
5
5
  p.email = "sam@sampohlenz.com"
6
6
  p.description = "Sassic is a simple framework for creating static web sites using SASS stylesheets."
@@ -56,11 +56,11 @@ private
56
56
  end
57
57
 
58
58
  def copy_images
59
- FileUtils.cp_r 'images', "#{@output}/images"
59
+ FileUtils.cp_r 'images', "#{@output}/images" if File.exists?('images')
60
60
  end
61
61
 
62
62
  def copy_javascripts
63
- FileUtils.cp_r 'javascripts', "#{@output}/javascripts"
63
+ FileUtils.cp_r 'javascripts', "#{@output}/javascripts" if File.exists?('javascripts')
64
64
  end
65
65
 
66
66
  def relativize_paths
@@ -76,7 +76,7 @@ private
76
76
  end
77
77
 
78
78
  def template_files
79
- Dir['templates/**/*.html.erb'] - ['templates/layout.html.erb'] - Dir['templates/**/_*.html.erb']
79
+ Dir['templates/**/*.html.erb'] - Dir['templates/*layout.html.erb'] - Dir['templates/**/_*.html.erb']
80
80
  end
81
81
 
82
82
  def fetch_and_write(path, file)
@@ -6,10 +6,11 @@ class Sassic::Page
6
6
 
7
7
  if exists?
8
8
  @template_content = File.read(template_path(@template))
9
- @layout_content = File.read(layout_path)
10
-
9
+
11
10
  # Preparse template content
12
11
  content
12
+
13
+ @layout_content = File.read(layout_path)
13
14
  end
14
15
  end
15
16
 
@@ -18,7 +19,7 @@ class Sassic::Page
18
19
  end
19
20
 
20
21
  def layout_path
21
- Dir::pwd + '/templates/layout.html.erb'
22
+ Dir::pwd + "/templates/#{layout}.html.erb"
22
23
  end
23
24
 
24
25
  def exists?
@@ -42,6 +43,11 @@ class Sassic::Page
42
43
  @title
43
44
  end
44
45
 
46
+ def layout(new_layout=nil)
47
+ @layout = new_layout if new_layout
48
+ @layout || 'layout'
49
+ end
50
+
45
51
  def body_classes(new_classes=nil)
46
52
  @body_classes = new_classes if new_classes
47
53
  @body_classes
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{sassic}
5
- s.version = "0.2.5"
5
+ s.version = "0.2.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Pohlenz"]
9
- s.date = %q{2008-11-25}
9
+ s.date = %q{2008-12-05}
10
10
  s.default_executable = %q{sassic}
11
11
  s.description = %q{Sassic is a simple framework for creating static web sites using SASS stylesheets.}
12
12
  s.email = %q{sam@sampohlenz.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spohlenz-sassic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-25 00:00:00 -08:00
12
+ date: 2008-12-05 00:00:00 -08:00
13
13
  default_executable: sassic
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency