nanoc 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,10 +4,12 @@ require 'rake/clean'
4
4
  require 'rake/gempackagetask'
5
5
  require 'rake/testtask'
6
6
 
7
+ require File.dirname(__FILE__) + '/lib/nanoc.rb'
8
+
7
9
  #####
8
10
 
9
11
  NAME = 'nanoc'
10
- VERS = '1.0'
12
+ VERS = Nanoc::VERSION
11
13
  SUMMARY = 'a CMS that doesn\'t even run on your server'
12
14
 
13
15
  HOMEPAGE = 'http://stoneship.org/software/nanoc'
data/bin/nanoc CHANGED
@@ -17,7 +17,7 @@ require 'getoptlong'
17
17
  require File.dirname(__FILE__) + '/../lib/nanoc.rb'
18
18
 
19
19
  # Define some texts
20
- version_text = 'nanoc 0.1 (c) 2007 Denis Defreyne.'
20
+ version_text = "nanoc #{Nanoc::VERSION} (c) 2007 Denis Defreyne."
21
21
  help_text = <<EOT
22
22
  usage: nanoc [-hv]
23
23
  nanoc create_site <name>
@@ -28,7 +28,8 @@ module Nanoc
28
28
  Dir.glob('lib/*.rb').each { |f| require f }
29
29
 
30
30
  # Compile pages
31
- pages = compile_pages(uncompiled_pages)
31
+ pages = uncompiled_pages.sort { |x,y| x[:order].to_i <=> y[:order].to_i }
32
+ pages = compile_pages(pages)
32
33
 
33
34
  # Put pages in their layout
34
35
  pages.each do |page|
@@ -103,15 +103,17 @@ module Nanoc
103
103
  # Read template
104
104
  template_index = nil
105
105
  template_meta = nil
106
+ template = a_params[:template] || 'default'
106
107
  begin
107
- template = a_params[:template] || 'default'
108
- template_meta = File.read_file('templates/' + template + '/meta.yaml').eruby
108
+ template_meta = File.read_file('templates/' + template + '/meta.yaml')
109
109
  template_index_filename = Dir.glob('templates/' + template + '/index.*')[0]
110
- template_index = File.read_file(template_index_filename).eruby
110
+ template_index = File.read_file(template_index_filename)
111
111
  rescue
112
112
  $stderr.puts 'ERROR: no such template'
113
113
  exit
114
114
  end
115
+ template_meta = template_meta.eruby
116
+ template_index = template_index.eruby
115
117
 
116
118
  # Create index and yaml file
117
119
  FileManager.create_dir 'content' do
@@ -1,5 +1,5 @@
1
1
  module Nanoc
2
- VERSION = '1.0'
2
+ VERSION = '1.0.1'
3
3
 
4
4
  def self.ensure_in_site
5
5
  unless in_site?
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: nanoc
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.0"
7
- date: 2007-05-03 00:00:00 +02:00
6
+ version: 1.0.1
7
+ date: 2007-05-05 00:00:00 +02:00
8
8
  summary: a CMS that doesn't even run on your server
9
9
  require_paths:
10
10
  - lib