plate 0.7.0.pre2 → 0.7.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ end
16
16
  namespace :test do
17
17
  desc "Build the sample site and leave its contents in test/sample/public"
18
18
  task :sample do
19
- sh %q(turn -I"lib:test" test/test_builder.rb -n /sample/)
19
+ sh %q(LEAVE_SAMPLE=1 turn -I"lib:test" test/test_builder.rb -n /sample/)
20
20
  end
21
21
  end
22
22
 
data/lib/plate/builder.rb CHANGED
@@ -134,7 +134,7 @@ module Plate
134
134
  log('Re-rendering site...')
135
135
 
136
136
  clear_cache!
137
-
137
+ load!
138
138
  site.reload!
139
139
  render_site!
140
140
  copy_to_destination!
@@ -249,8 +249,11 @@ module Plate
249
249
 
250
250
  if partial
251
251
  partial.reload!
252
- partial.pages.each do |page|
253
- self.render_file!(page.relative_file)
252
+
253
+ site.pages.each do |page|
254
+ if page.partials.include?(name)
255
+ self.render_file!(page.relative_file)
256
+ end
254
257
  end
255
258
  else
256
259
  partial_name = File.basename(relative_file_path, '.*').gsub(/^_/, '')
@@ -21,8 +21,9 @@ module Plate
21
21
  partial_name = Partial.name(self.site, path, self.file)
22
22
  partial = Partial.find(self.site, partial_name)
23
23
 
24
+ self.page.partials << partial_name unless self.page.partials.include?(partial_name)
25
+
24
26
  if partial
25
- self.page.partials << partial unless self.page.partials.include?(partial)
26
27
  partial.pages << self.page unless partial.pages.include?(self.page)
27
28
  partial.render(locals)
28
29
  else
data/lib/plate/page.rb CHANGED
@@ -180,7 +180,7 @@ module Plate
180
180
 
181
181
  def reload!
182
182
  self.meta = {}
183
- self.partials = []
183
+ # self.partials = []
184
184
  self.content = nil
185
185
 
186
186
  @loaded = false
data/lib/plate/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plate
2
- VERSION = "0.7.0.pre2" unless defined?(::Plate::VERSION)
2
+ VERSION = "0.7.0.pre3" unless defined?(::Plate::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.pre2
4
+ version: 0.7.0.pre3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-07 00:00:00.000000000Z
12
+ date: 2012-08-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70317428454140 !ruby/object:Gem::Requirement
16
+ requirement: &70194904166220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70317428454140
24
+ version_requirements: *70194904166220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: directory_watcher
27
- requirement: &70317428453760 !ruby/object:Gem::Requirement
27
+ requirement: &70194904165760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70317428453760
35
+ version_requirements: *70194904165760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: i18n
38
- requirement: &70317428453220 !ruby/object:Gem::Requirement
38
+ requirement: &70194904165160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.6'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70317428453220
46
+ version_requirements: *70194904165160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70317428452800 !ruby/object:Gem::Requirement
49
+ requirement: &70194904164700 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70317428452800
57
+ version_requirements: *70194904164700
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: redcarpet
60
- requirement: &70317428452260 !ruby/object:Gem::Requirement
60
+ requirement: &70194904164080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '2'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70317428452260
68
+ version_requirements: *70194904164080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tilt
71
- requirement: &70317428451720 !ruby/object:Gem::Requirement
71
+ requirement: &70194904163520 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '1.3'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70317428451720
79
+ version_requirements: *70194904163520
80
80
  description: Plate is a simple, static site generator and blog engine.
81
81
  email:
82
82
  - john@johntornow.com