frank 1.0.3 → 1.0.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.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frank}
8
- s.version = "1.0.3"
8
+ s.version = "1.0.4"
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-11-16}
12
+ s.date = %q{2010-11-18}
13
13
  s.default_executable = %q{frank}
14
14
  s.description = %q{Rapidly develop static sites using any supported templating language}
15
15
  s.email = %q{travis.dunn@thisismedium.com}
@@ -72,6 +72,7 @@ Gem::Specification.new do |s|
72
72
  "spec/template/dynamic/_partial.haml",
73
73
  "spec/template/dynamic/_partial_with_locals.haml",
74
74
  "spec/template/dynamic/builder.builder",
75
+ "spec/template/dynamic/coffee.coffee",
75
76
  "spec/template/dynamic/erb.erb",
76
77
  "spec/template/dynamic/helper_test.haml",
77
78
  "spec/template/dynamic/index.haml",
@@ -6,7 +6,7 @@ require 'frank/middleware/statik'
6
6
  require 'frank/middleware/refresh'
7
7
 
8
8
  module Frank
9
- VERSION = '1.0.3'
9
+ VERSION = '1.0.4'
10
10
  extend Frank::Upgrades
11
11
 
12
12
  module Render; end
@@ -64,7 +64,8 @@ module Frank
64
64
 
65
65
  TMPL_EXTS = {
66
66
  :html => %w[haml erb rhtml builder liquid textile md mkd markdown],
67
- :css => %w[sass less scss]
67
+ :css => %w[sass less scss],
68
+ :js => %w[coffee]
68
69
  }
69
70
 
70
71
  LAYOUT_EXTS = %w[.haml .erb .rhtml .liquid]
@@ -81,7 +82,7 @@ module Frank
81
82
 
82
83
  # regex for kinds that don't support meta
83
84
  # and define the meta delimiter
84
- nometa, delimiter = /\/_|\.(scss|sass|less)$/, /^META-{3,}\s*$|^-{3,}META\s*$/
85
+ nometa, delimiter = /\/_|\.(scss|sass|less|coffee)$/, /^META-{3,}\s*$|^-{3,}META\s*$/
85
86
 
86
87
  # set the layout
87
88
  layout = path.match(nometa) ? nil : layout_for(path)
@@ -22,6 +22,8 @@
22
22
 
23
23
  - if path.match(/\.css$/)
24
24
  = "<tt>#{path.match(/([\w\/]+)\./)[1]}.sass</tt>"
25
+ - if path.match(/\.js$/)
26
+ = "<tt>#{path.match(/([\w\/]+)\./)[1]}.coffee</tt>"
25
27
  - else
26
28
  = "<tt>#{path.gsub(/\/$/, '')}.haml</tt>"
27
29
  = "in the <tt>#{dynamic_folder}</tt> folder, or"
@@ -47,6 +47,11 @@ describe Frank::Compile do
47
47
  File.read(output).should == "<h1>i have no layout</h1>\n"
48
48
  end
49
49
 
50
+ it 'creates coffee.js' do
51
+ output = File.join(File.dirname(__FILE__), 'template/output/coffee.js')
52
+ File.read(output).should == "(function(){\n var greeting;\n greeting = \"Hello CoffeeScript\";\n})();"
53
+ end
54
+
50
55
  it 'creates erb.html' do
51
56
  output = File.join(File.dirname(__FILE__), 'template/output/erb.html')
52
57
  File.read(output).should == "<div id='p'>/erb</div>\n<div id='layout'>\n <h1>hello worlds</h1>\n</div>\n"
@@ -147,6 +152,11 @@ describe Frank::Compile do
147
152
  File.read(output).should == "<h1>i have no layout</h1>\n"
148
153
  end
149
154
 
155
+ it 'creates coffee.js' do
156
+ output = File.join(File.dirname(__FILE__), 'template/output/coffee.js')
157
+ File.read(output).should == "(function(){\n var greeting;\n greeting = \"Hello CoffeeScript\";\n})();"
158
+ end
159
+
150
160
  it 'creates erb.html' do
151
161
  output = File.join(File.dirname(__FILE__), 'template/output/erb/index.html')
152
162
  File.read(output).should == "<div id='p'>/erb</div>\n<div id='layout'>\n <h1>hello worlds</h1>\n</div>\n"
@@ -74,6 +74,11 @@ describe Frank::Render do
74
74
  template.should include("border-radius: 5px;\n")
75
75
  end
76
76
 
77
+ it 'renders coffee template' do
78
+ template = @app.render('coffee.coffee')
79
+ template.should == "(function(){\n var greeting;\n greeting = \"Hello CoffeeScript\";\n})();"
80
+ end
81
+
77
82
  it 'renders erb template' do
78
83
  template = @app.render('erb.erb')
79
84
  template.should == "<div id='p'>/erb</div>\n<div id='layout'>\n <h1>hello worlds</h1>\n</div>\n"
@@ -0,0 +1 @@
1
+ greeting: "Hello CoffeeScript"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frank
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - blahed
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-16 00:00:00 -05:00
19
+ date: 2010-11-18 00:00:00 -05:00
20
20
  default_executable: frank
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -453,6 +453,7 @@ files:
453
453
  - spec/template/dynamic/_partial.haml
454
454
  - spec/template/dynamic/_partial_with_locals.haml
455
455
  - spec/template/dynamic/builder.builder
456
+ - spec/template/dynamic/coffee.coffee
456
457
  - spec/template/dynamic/erb.erb
457
458
  - spec/template/dynamic/helper_test.haml
458
459
  - spec/template/dynamic/index.haml