deris 0.1.3 → 0.1.4
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/lib/deris.rb +8 -1
- data/lib/directory.rb +23 -28
- data/lib/directory_writer.rb +32 -33
- data/lib/file.rb +52 -43
- data/lib/partial_hasher.rb +24 -27
- data/lib/project.rb +39 -46
- data/lib/subdirectory_list.rb +18 -21
- data/tests/examples/file/initial.haml +23 -23
- data/tests/examples/file/nested.haml +2 -2
- data/tests/examples/project/_src/content.haml +2 -2
- data/tests/examples/project/_src/layout.haml +20 -20
- data/tests/examples/project/_src/menu.haml +5 -6
- data/tests/examples/project/_src/morrisons/bread/content.haml +2 -2
- data/tests/examples/project/_src/morrisons/content.haml +5 -5
- data/tests/examples/project/_src/morrisons/fish/content.haml +2 -0
- data/tests/examples/project/_src/morrisons/subnav.haml +5 -5
- data/tests/examples/project/_src/subnav.haml +1 -3
- data/tests/project_specs/nested_files.rb +41 -33
- data/tests/spec_helper.rb +3 -0
- data/tests/spec_tasks.rake +8 -0
- metadata +27 -21
- data/tests/build_project.rb +0 -16
data/lib/deris.rb
CHANGED
@@ -1 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'haml'
|
4
|
+
|
5
|
+
# load the files in dependency order to avoid loads of require statements in each file
|
6
|
+
['subdirectory_list', 'partial_hasher', 'file', 'directory_writer', 'directory', 'project'].each do |f|
|
7
|
+
require File.join(File.expand_path(File.dirname(__FILE__)), "#{f}.rb")
|
8
|
+
end
|
data/lib/directory.rb
CHANGED
@@ -1,28 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
class Directory
|
4
|
+
include PartialHasher
|
5
|
+
include DirectoryWriter
|
6
|
+
include SubdirectoryList
|
7
|
+
|
8
|
+
attr_reader :file_name, :partials, :directory
|
9
|
+
|
10
|
+
def initialize(directory, defaults = {}, depth = 0)
|
11
|
+
@directory = directory
|
12
|
+
@file_name = ::File.basename(directory)
|
13
|
+
@partials = defaults.merge(partials_hash)
|
14
|
+
@depth = depth
|
15
|
+
end
|
16
|
+
|
17
|
+
def sub_output(output)
|
18
|
+
return ::File.join(output, @file_name), @depth + 1
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/lib/directory_writer.rb
CHANGED
@@ -1,33 +1,32 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
module DirectoryWriter
|
4
|
+
|
5
|
+
def write(output)
|
6
|
+
unless respond_to?(:sub_directories) and respond_to?(:partials) and respond_to?(:sub_output)
|
7
|
+
raise 'need to respond to "sub directories", "partials" and "sub_output" to write'
|
8
|
+
end
|
9
|
+
|
10
|
+
# write out the content from this directory
|
11
|
+
write_file output
|
12
|
+
|
13
|
+
# write out the sub directories
|
14
|
+
sub_directories.each do |dir|
|
15
|
+
sub_output_dir, sub_depth = sub_output(output)
|
16
|
+
Directory.new(dir, partials, sub_depth).write(sub_output_dir)
|
17
|
+
end
|
18
|
+
|
19
|
+
true # don't return anything the client could work with
|
20
|
+
end
|
21
|
+
|
22
|
+
def write_file(output)
|
23
|
+
unless respond_to?(:file_name) and respond_to?(:partials)
|
24
|
+
raise 'need to respond to "file_name" and "partials" to use write_file'
|
25
|
+
end
|
26
|
+
|
27
|
+
File.new(file_name, partials, @depth).write(output)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/lib/file.rb
CHANGED
@@ -1,43 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
class File
|
4
|
+
|
5
|
+
attr_reader :name
|
6
|
+
|
7
|
+
def initialize(name = 'index', partials = {}, depth = nil)
|
8
|
+
@name = name
|
9
|
+
@partials = partials
|
10
|
+
@depth = depth || 0
|
11
|
+
end
|
12
|
+
|
13
|
+
def write(directory)
|
14
|
+
FileUtils.mkdir(directory) unless ::File.exist? directory
|
15
|
+
output_path = ::File.join(directory, "#{@name}.html")
|
16
|
+
::File.open(output_path, 'w+') do |file|
|
17
|
+
file.write render
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def render(template = nil)
|
22
|
+
if template.nil?
|
23
|
+
template = @partials[:layout]
|
24
|
+
else
|
25
|
+
template = ::File.new(template).read if ::File.exist?(template)
|
26
|
+
end
|
27
|
+
haml_engine = Haml::Engine.new(template)
|
28
|
+
haml_engine.render(self)
|
29
|
+
end
|
30
|
+
|
31
|
+
def partial(template)
|
32
|
+
if template.is_a? Symbol
|
33
|
+
template = @partials[template] || ''
|
34
|
+
end
|
35
|
+
render(template)
|
36
|
+
end
|
37
|
+
|
38
|
+
def url(*segments)
|
39
|
+
sections = []
|
40
|
+
@depth.times do
|
41
|
+
sections << '..'
|
42
|
+
end
|
43
|
+
segments.each do |segment|
|
44
|
+
sections << segment
|
45
|
+
end
|
46
|
+
|
47
|
+
sections.join('/') + '.html'
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
data/lib/partial_hasher.rb
CHANGED
@@ -1,27 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
module PartialHasher
|
4
|
+
|
5
|
+
def partials_hash
|
6
|
+
unless respond_to?(:directory)
|
7
|
+
raise 'need to response to "directory" to create a hash of partials'
|
8
|
+
end
|
9
|
+
|
10
|
+
partials = {}
|
11
|
+
partial_file_mask = ::File.join(directory, '*.haml')
|
12
|
+
partial_files = ::Dir.glob(partial_file_mask)
|
13
|
+
|
14
|
+
partial_files.each do |file|
|
15
|
+
file_sym = ::File.basename(file, '.haml').to_sym
|
16
|
+
partials[file_sym] = ::File.new(file).read
|
17
|
+
end
|
18
|
+
|
19
|
+
partials
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/lib/project.rb
CHANGED
@@ -1,46 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
def
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
def sub_output(output)
|
41
|
-
output
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
class Project
|
4
|
+
include PartialHasher
|
5
|
+
include DirectoryWriter
|
6
|
+
include SubdirectoryList
|
7
|
+
|
8
|
+
attr_reader :file_name, :partials, :directory
|
9
|
+
|
10
|
+
def initialize(source, defaults = {})
|
11
|
+
@source = source
|
12
|
+
@file_name = 'index'
|
13
|
+
@directory = ::File.join(@source, '_src')
|
14
|
+
@partials = defaults.merge(partials_hash)
|
15
|
+
end
|
16
|
+
|
17
|
+
def write(output)
|
18
|
+
# adds additional behaviour on top of the DirectoryWriter mixin
|
19
|
+
|
20
|
+
# recreate the output directory
|
21
|
+
FileUtils.rm_rf(output) if ::File.exists?(output)
|
22
|
+
FileUtils.mkdir(output)
|
23
|
+
|
24
|
+
# find and copy all static content
|
25
|
+
static_content_mask = ::File.join(@source, "**")
|
26
|
+
static_content = Dir[static_content_mask].reject{|path| path =~ /_src$/}
|
27
|
+
static_content.each{|path| FileUtils.cp_r(path, output)}
|
28
|
+
|
29
|
+
# call the DirectoryWriter mixin
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
33
|
+
def sub_output(output)
|
34
|
+
return output, 0 # zero default depth
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/lib/subdirectory_list.rb
CHANGED
@@ -1,21 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
1
|
+
module Deris
|
2
|
+
|
3
|
+
module SubdirectoryList
|
4
|
+
|
5
|
+
def sub_directories
|
6
|
+
unless respond_to?(:directory)
|
7
|
+
raise 'need to respond to "directory" to list sub directories'
|
8
|
+
end
|
9
|
+
|
10
|
+
sub_directory_mask = ::File.join(directory, '*')
|
11
|
+
::Dir[sub_directory_mask].find_all do |dir|
|
12
|
+
::File.directory?(dir)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
%html
|
2
|
-
|
3
|
-
%head
|
4
|
-
%title
|
5
|
-
Documentation
|
6
|
-
|
7
|
-
%body
|
8
|
-
|
9
|
-
#menu
|
10
|
-
=partial :menu
|
11
|
-
|
12
|
-
:markdown
|
13
|
-
void test()
|
14
|
-
{
|
15
|
-
return 'some code';
|
16
|
-
}
|
17
|
-
|
18
|
-
#content
|
19
|
-
=partial 'examples/file/nested.haml'
|
20
|
-
|
21
|
-
#subnav
|
22
|
-
=partial :subnav
|
23
|
-
|
1
|
+
%html
|
2
|
+
|
3
|
+
%head
|
4
|
+
%title
|
5
|
+
Documentation
|
6
|
+
|
7
|
+
%body
|
8
|
+
|
9
|
+
#menu
|
10
|
+
=partial :menu
|
11
|
+
|
12
|
+
:markdown
|
13
|
+
void test()
|
14
|
+
{
|
15
|
+
return 'some code';
|
16
|
+
}
|
17
|
+
|
18
|
+
#content
|
19
|
+
=partial 'examples/file/nested.haml'
|
20
|
+
|
21
|
+
#subnav
|
22
|
+
=partial :subnav
|
23
|
+
|
@@ -1,2 +1,2 @@
|
|
1
|
-
.nested
|
2
|
-
woot! nested content
|
1
|
+
.nested
|
2
|
+
woot! nested content
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%p
|
2
|
-
This is the home page
|
1
|
+
%p
|
2
|
+
This is the home page
|
@@ -1,21 +1,21 @@
|
|
1
|
-
!!! 5
|
2
|
-
%html
|
3
|
-
|
4
|
-
%head
|
5
|
-
%title
|
6
|
-
Deris example
|
7
|
-
|
8
|
-
%body{:class => name}
|
9
|
-
|
10
|
-
%h1 Deris example
|
11
|
-
|
12
|
-
#content_wrapper
|
13
|
-
|
14
|
-
#menu
|
15
|
-
=partial :menu
|
16
|
-
|
17
|
-
#content
|
18
|
-
=partial :content
|
19
|
-
|
20
|
-
#subnav
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
|
4
|
+
%head
|
5
|
+
%title
|
6
|
+
Deris example
|
7
|
+
|
8
|
+
%body{:class => name}
|
9
|
+
|
10
|
+
%h1 Deris example
|
11
|
+
|
12
|
+
#content_wrapper
|
13
|
+
|
14
|
+
#menu
|
15
|
+
=partial :menu
|
16
|
+
|
17
|
+
#content
|
18
|
+
=partial :content
|
19
|
+
|
20
|
+
#subnav
|
21
21
|
=partial :subnav
|
@@ -1,6 +1,5 @@
|
|
1
|
-
%ul
|
2
|
-
%li
|
3
|
-
%a{:href =>
|
4
|
-
%li
|
5
|
-
%a{:href =>
|
6
|
-
%li Third
|
1
|
+
%ul
|
2
|
+
%li
|
3
|
+
%a{:href => url(:index)} Home
|
4
|
+
%li
|
5
|
+
%a{:href => url(:morrisons)} Morrisons
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%p
|
2
|
-
Freshly baked in store, every day
|
1
|
+
%p
|
2
|
+
Freshly baked in store, every day
|
@@ -1,5 +1,5 @@
|
|
1
|
-
%p
|
2
|
-
I enjoy locally sourced produce, particularly fish
|
3
|
-
|
4
|
-
%p
|
5
|
-
Advertised by Richard Hammond
|
1
|
+
%p
|
2
|
+
I enjoy locally sourced produce, particularly fish
|
3
|
+
|
4
|
+
%p
|
5
|
+
Advertised by Richard Hammond
|
@@ -1,5 +1,5 @@
|
|
1
|
-
%
|
2
|
-
|
3
|
-
%
|
4
|
-
%li
|
5
|
-
|
1
|
+
%ul
|
2
|
+
%li
|
3
|
+
%a{:href => url(:morrisons, :bread)} Bread
|
4
|
+
%li
|
5
|
+
%a{:href => url(:morrisons, :fish)} Fish
|
@@ -1,33 +1,41 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
let(:examples) { File.join(File.dirname(__FILE__), '..', 'examples') }
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
let(:
|
12
|
-
let(:
|
13
|
-
let(:bread_file) { File.join(morrisons_directory, 'bread.html') }
|
14
|
-
|
15
|
-
before do
|
16
|
-
project.write(output)
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'should create the morrisons directory' do
|
20
|
-
File.exist?(morrisons_directory).should be_true
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'should create a file called "bread.html" in the morrisons directory' do
|
24
|
-
File.exist?(bread_file).should be_true
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'should have the phrase "Freshly baked in store, every day" in "bread.html"' do
|
28
|
-
File.read(bread_file).should =~ /Freshly baked in store, every day/
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
1
|
+
require File.join(File.dirname(__FILE__), '..', 'spec_helper')
|
2
|
+
|
3
|
+
describe Deris::Project do
|
4
|
+
|
5
|
+
let(:output) { File.join(File.dirname(__FILE__), '..', '..', 'output') }
|
6
|
+
let(:examples) { File.join(File.dirname(__FILE__), '..', 'examples') }
|
7
|
+
|
8
|
+
context 'with nested templates' do
|
9
|
+
|
10
|
+
let(:project) { Deris::Project.new(File.join(examples, 'project')) }
|
11
|
+
let(:morrisons_directory) { File.join(output, 'morrisons') }
|
12
|
+
let(:morrisons_file) { File.join(output, 'morrisons.html') }
|
13
|
+
let(:bread_file) { File.join(morrisons_directory, 'bread.html') }
|
14
|
+
|
15
|
+
before do
|
16
|
+
project.write(output)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should create the morrisons directory' do
|
20
|
+
File.exist?(morrisons_directory).should be_true
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should create a file called "bread.html" in the morrisons directory' do
|
24
|
+
File.exist?(bread_file).should be_true
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should have the phrase "Freshly baked in store, every day" in "bread.html"' do
|
28
|
+
File.read(bread_file).should =~ /Freshly baked in store, every day/
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should have a relative link to "index.html" in "morrisons.html"' do
|
32
|
+
File.read(morrisons_file).should include("href='index.html'")
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should have a relative link to "index.html" in "bread.html"' do
|
36
|
+
File.read(bread_file).should include("href='../index.html'")
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Garry Shutler
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-09 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -42,13 +42,15 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
45
|
+
hash: 62196465
|
46
46
|
segments:
|
47
|
-
-
|
48
|
-
- 3
|
47
|
+
- 2
|
49
48
|
- 0
|
50
|
-
|
51
|
-
|
49
|
+
- 0
|
50
|
+
- beta
|
51
|
+
- 9
|
52
|
+
version: 2.0.0.beta.9
|
53
|
+
type: :development
|
52
54
|
version_requirements: *id002
|
53
55
|
description: Simple documentation creation engine based on HAML
|
54
56
|
email: garry@robustsoftware.co.uk
|
@@ -66,17 +68,19 @@ files:
|
|
66
68
|
- lib/partial_hasher.rb
|
67
69
|
- lib/project.rb
|
68
70
|
- lib/subdirectory_list.rb
|
69
|
-
- tests/
|
70
|
-
- tests/
|
71
|
+
- tests/project_specs/nested_files.rb
|
72
|
+
- tests/spec_helper.rb
|
71
73
|
- tests/examples/file/nested.haml
|
72
|
-
- tests/examples/
|
73
|
-
- tests/examples/project/_src/layout.haml
|
74
|
+
- tests/examples/file/initial.haml
|
74
75
|
- tests/examples/project/_src/menu.haml
|
76
|
+
- tests/examples/project/_src/layout.haml
|
77
|
+
- tests/examples/project/_src/morrisons/subnav.haml
|
78
|
+
- tests/examples/project/_src/morrisons/fish/content.haml
|
75
79
|
- tests/examples/project/_src/morrisons/bread/content.haml
|
76
80
|
- tests/examples/project/_src/morrisons/content.haml
|
77
|
-
- tests/examples/project/_src/morrisons/subnav.haml
|
78
81
|
- tests/examples/project/_src/subnav.haml
|
79
|
-
- tests/
|
82
|
+
- tests/examples/project/_src/content.haml
|
83
|
+
- tests/spec_tasks.rake
|
80
84
|
has_rdoc: true
|
81
85
|
homepage: http://github.com/gshutler/deris
|
82
86
|
licenses: []
|
@@ -112,14 +116,16 @@ signing_key:
|
|
112
116
|
specification_version: 3
|
113
117
|
summary: Simple documentation creation engine based on HAML
|
114
118
|
test_files:
|
115
|
-
- tests/
|
116
|
-
- tests/
|
119
|
+
- tests/project_specs/nested_files.rb
|
120
|
+
- tests/spec_helper.rb
|
117
121
|
- tests/examples/file/nested.haml
|
118
|
-
- tests/examples/
|
119
|
-
- tests/examples/project/_src/layout.haml
|
122
|
+
- tests/examples/file/initial.haml
|
120
123
|
- tests/examples/project/_src/menu.haml
|
124
|
+
- tests/examples/project/_src/layout.haml
|
125
|
+
- tests/examples/project/_src/morrisons/subnav.haml
|
126
|
+
- tests/examples/project/_src/morrisons/fish/content.haml
|
121
127
|
- tests/examples/project/_src/morrisons/bread/content.haml
|
122
128
|
- tests/examples/project/_src/morrisons/content.haml
|
123
|
-
- tests/examples/project/_src/morrisons/subnav.haml
|
124
129
|
- tests/examples/project/_src/subnav.haml
|
125
|
-
- tests/
|
130
|
+
- tests/examples/project/_src/content.haml
|
131
|
+
- tests/spec_tasks.rake
|
data/tests/build_project.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# work out base paths
|
4
|
-
current_dir = File.dirname(__FILE__)
|
5
|
-
root_dir = File.join(current_dir, '..')
|
6
|
-
|
7
|
-
# require the project class
|
8
|
-
require File.join(root_dir, 'lib', 'project')
|
9
|
-
|
10
|
-
# work out paths for test
|
11
|
-
project_path = File.join(current_dir, 'examples', 'project')
|
12
|
-
output_path = File.join(root_dir, 'output')
|
13
|
-
|
14
|
-
# create and write out project
|
15
|
-
project = Deris::Project.new project_path
|
16
|
-
project.write output_path
|