frank 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/frank.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frank}
8
- s.version = "0.2.5"
8
+ s.version = "0.2.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["blahed", "nwah"]
12
- s.date = %q{2010-04-02}
12
+ s.date = %q{2010-04-14}
13
13
  s.description = %q{Create/Dump static builds using whatever templating/helper languages you wish}
14
14
  s.email = %q{travis.dunn@thisismedium.com}
15
15
  s.executables = ["frank", "frankout", "frankup"]
data/lib/frank/base.rb CHANGED
@@ -5,7 +5,7 @@ require 'frank/statik'
5
5
  require 'frank/imager'
6
6
 
7
7
  module Frank
8
- VERSION = '0.2.5'
8
+ VERSION = '0.2.6'
9
9
 
10
10
  module Render; end
11
11
 
data/lib/frank/output.rb CHANGED
@@ -8,7 +8,6 @@ module Frank
8
8
 
9
9
  def initialize(&block)
10
10
  instance_eval &block
11
- @output_path = File.join(@proj_dir, @output_folder)
12
11
  end
13
12
 
14
13
  # get all of the templates and compile them
@@ -31,15 +30,15 @@ module Frank
31
30
  # then compile it as is, otherwise name a folder based on the template
32
31
  # and compile to index.html
33
32
  if "#{name}.#{new_ext}" == 'index.html' || new_ext != 'html'
34
- new_file = File.join(@proj_dir, @output_folder, "#{name}.#{new_ext}")
33
+ new_file = File.join(@output_folder, "#{name}.#{new_ext}")
35
34
  else
36
- new_file = File.join(@proj_dir, @output_folder, name, "index.#{new_ext}")
35
+ new_file = File.join(@output_folder, name, "index.#{new_ext}")
37
36
  name = "#{name}/index"
38
37
  end
39
38
  create_dir(new_file)
40
39
  File.open(new_file, 'w') {|f| f.write render_path(path) }
41
40
  elsif options[:production] == false
42
- new_file = File.join(@proj_dir, @output_folder, "#{name}.#{new_ext}")
41
+ new_file = File.join(@output_folder, "#{name}.#{new_ext}")
43
42
  create_dir(new_file)
44
43
  File.open(new_file, 'w') {|f| f.write render_path(path) }
45
44
  end
@@ -58,12 +57,12 @@ module Frank
58
57
  def copy_static
59
58
  puts " - \033[32mCopying\033[0m static content"
60
59
  static_folder = File.join(@proj_dir, @static_folder)
61
- FileUtils.cp_r(File.join(static_folder, '/.'), @output_path)
60
+ FileUtils.cp_r(File.join(static_folder, '/.'), @output_folder)
62
61
  end
63
62
 
64
63
  # create the dump dir, compile templates, copy over static assets
65
64
  def dump(options={:production => false})
66
- FileUtils.mkdir(@output_path)
65
+ FileUtils.mkdir(@output_folder)
67
66
  puts "\nFrank is..."
68
67
  puts " - \033[32mCreating\033[0m '#{@output_folder}'"
69
68
 
data/test/test_output.rb CHANGED
@@ -15,7 +15,7 @@ class TestBase < Test::Unit::TestCase
15
15
  end
16
16
  set :environment, :test
17
17
  set :proj_dir, proj_dir
18
- set :output_folder, 'output'
18
+ set :output_folder, File.join(File.dirname(__FILE__), 'template/output')
19
19
  end.dump
20
20
  end
21
21
  end
@@ -92,7 +92,7 @@ class TestBase < Test::Unit::TestCase
92
92
  end
93
93
  set :environment, :test
94
94
  set :proj_dir, proj_dir
95
- set :output_folder, 'output'
95
+ set :output_folder, File.join(File.dirname(__FILE__), 'template/output')
96
96
  end.dump({:production => true})
97
97
  end
98
98
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 5
9
- version: 0.2.5
8
+ - 6
9
+ version: 0.2.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - blahed
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-02 00:00:00 -04:00
18
+ date: 2010-04-14 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency