Moving to Frank for static page gen

This commit is contained in:
Davis W. Frank 2011-02-27 09:44:24 -08:00
parent 2fc784e03d
commit b68c363186
12 changed files with 279 additions and 99 deletions

View File

@ -1,3 +1,4 @@
source :rubygems source :rubygems
gem "staticmatic" gem "frank"
gem "haml"

View File

@ -1,17 +1,28 @@
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
compass (0.10.6) daemons (1.0.10)
haml (>= 3.0.4) frank (1.0.8)
haml (3.0.25) haml (>= 3.0)
rack (1.2.1) mongrel (>= 1.2.0.pre2)
staticmatic (0.11.1) net-scp (>= 1.0)
compass (>= 0.10.0) net-ssh (>= 2.0)
haml (>= 2.0.0)
rack (>= 1.0) rack (>= 1.0)
tilt (= 0.9)
gem_plugin (0.2.3)
haml (3.0.25)
mongrel (1.2.0.pre2)
daemons (~> 1.0.10)
gem_plugin (~> 0.2.3)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.1.0)
rack (1.2.1)
tilt (0.9)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
staticmatic frank
haml

View File

@ -0,0 +1,7 @@
%tr
%td.link
%a{ :href => "/jasmine/downloads/#{filename}"}= filename
%td.version= version
%td.size= size
%td.date= date
%td.sha= sha

View File

@ -0,0 +1,72 @@
body
color: #222
font-family: Helvetica, Arial
font-size: 14px
line-height: 20px
ul, ol
margin: 0
padding: 0
h1
margin: 0 0 10px
font: bold 72px Georgia
h2
margin: 0
font-size: 24px
line-height: 32px
color: #cecece
em
color: #4D9EEF
font-family: Inconsolata, Monaco, monospace
font-style: normal
#wrapper
position: relative
width: 600px
margin: 0px auto
#tooltip
position: absolute
top: 80px
left: 380px
color: #4D9EEF
font-weight: bold
z-index: 20
cursor: pointer
#header, #help
position: absolute
left: 300px
width: 300px
margin-left: -150px
#header
width: 350px
height: 600px
margin-left: -175px
background: #fff
z-index: 10
top: 60px
cursor: pointer
h2
width: 300px
img
margin-left: -25px
h1
margin-left: -3px
#help
top: 150px
border-top: 1px #7a7a7a solid
li
font-weight: bold
color: #ddd
p
font-weight: normal
color: #222

View File

@ -0,0 +1,54 @@
.copy
These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files.
.copy
For a using Jasmine with Ruby on Rails, other Ruby frameworks, within continuous integration environments, or to gain more dynamic source and test file loading, see
%a{ :href => "http://github.com/pivotal/jasmine/wiki" } Using the Jasmine Gem
.
%table#standalone-downloads
%tr
%th
%th Version
%th Size
%th Date
%th SHA1
- downloads.each do |d|
= render_partial "download_item", :filename => d[:filename],
:version => d[:version],
:size => d[:size],
:date => d[:date],
:sha => d[:sha]
-#%tr
-# %td.link= link "jasmine-standalone-1.0.1.zip", "/jasmine/downloads/jasmine-standalone-1.0.1.zip"
-# %td.version 1.0.1
-# %td.size 20k
-# %td.date 2010/10/05 13:37:01 PDT
-# %td.sha b2b3d00a7cb8d5ccd65a3356bb5ae15775328119
-#
-#%tr
-# %td.link= link "jasmine-standalone-1.0.0.zip", "/jasmine/downloads/jasmine-standalone-1.0.0.zip"
-# %td.version 1.0.0
-# %td.size 20k
-# %td.date 2010/09/14 12:54:38 PDT
-# %td.sha 1866f654a3ad0ab9109393ce31d6613c77916607
-#
-#%tr.rc
-# %td.link= link "jasmine-standalone-1.0.0.rc1.zip", "/jasmine/downloads/jasmine-standalone-1.0.0.rc1.zip"
-# %td.version 1.0.0.rc1
-# %td.size 19k
-# %td.date 2010/08/26 13:09:41 PDT
-# %td.sha 20e7da22bc7ce3433331a5ad44eb199f4ff34065
-#
-#%tr
-# %td.link= link "jasmine-standalone-0.11.1.zip", "/jasmine/downloads/jasmine-standalone-0.11.1.zip"
-# %td.version 0.11.1
-# %td.size 18k
-# %td.date 2010/06/25 16:05:30 PDT
-# %td.sha 26998c7ca047e47f84c382a4efeb1dc5cb8661a6

48
pages/dynamic/index.haml Normal file
View File

@ -0,0 +1,48 @@
.copy
Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other
JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
.highlight
%pre
%code.javascript= jasmine_snippet
.copy
Jasmine can be run anywhere you can execute JavaScript: a static web page, your continuous integration environment, |
or server-side environments like
%a{:target => '_blank', :href => "httpe://nodejs.org"} Node.js
.
.copy
Find out more in the
%a{:target => '_blank', :href => "http://github.com/pivotal/jasmine/wiki"} documentation
.
%h2 Downloads
%ul
%li
%a{:target => '_blank', :href => "download.html"} Standalone
%li
%a{:target => '_blank', :href => "http://github.com/pivotal/jasmine/wiki/A-ruby-project"} Jasmine Ruby Gem
for Rails, Ruby, or Ruby-friendly development
%li
%a{:target => '_blank', :href => "http://github.com/pivotal/jasmine/wiki"} Other environments
Node.js, Maven, etc.
%h2 Support
%ul
%li
%a{:target => '_blank', :href => "jsdoc/index.html"} API Documentation
%li
%a{:target => '_blank', :href => "http://groups.google.com/group/jasmine-js"} Google Group for email list:
%a{:target => '_blank', :href => "mailto:jasmine-js@googlegroups.com"} jasmine-js@googlegroups.com
%li
%a{:target => '_blank', :href => "http://ci.pivotallabs.com"} Current Build Status
%li
%a{:target => '_blank', :href => "http://github.com/pivotal/jasmine/issues"} Report bugs at Github
%li
%a{:target => '_blank', :href => "http://www.pivotaltracker.com/projects/10606"} Project Backlog at Pivotal Tracker
%li
%img{:src => "http://twitter-badges.s3.amazonaws.com/t_mini-c.png"}
%a{:target => '_blank', :href => "http://twitter.com/JasmineBDD"} Follow @JasmineBDD on Twitter

View File

@ -1,9 +1,10 @@
module SnippetHelper module FrankHelpers
def snippet def jasmine_snippet
"<span class='nx'>describe</span><span class='p'>(</span><span class='s2'>&quot;Jasmine&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span> "<span class='nx'>describe</span><span class='p'>(</span><span class='s2'>&quot;Jasmine&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span>
<span class='nx'>it</span><span class='p'>(</span><span class='s2'>&quot;makes testing JavaScript awesome!&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span> <span class='nx'>it</span><span class='p'>(</span><span class='s2'>&quot;makes testing JavaScript awesome!&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span>
<span class='nx'>expect</span><span class='p'>(</span><span class='nx'>yourCode</span><span class='p'>).</span><span class='nx'>toBeLotsBetter</span><span class='p'>();</span> <span class='nx'>expect</span><span class='p'>(</span><span class='nx'>yourCode</span><span class='p'>).</span><span class='nx'>toBeLotsBetter</span><span class='p'>();</span>
<span class='p'>});</span> <span class='p'>});</span>
<span class='p'>});</span>" <span class='p'>});</span>"
end end
end end

View File

@ -1,7 +1,9 @@
!!! !!!
%head %head
%meta{:charset => "utf-8"} %meta{:charset => "utf-8"}
%title Jasmine: BDD for your JavaScript %title
= "Jasmine: BDD for your JavaScript"
= "| #{title}" if title
%link{ :rel => "shortcut icon", :type => "image/x-icon", :href =>"favicon.ico" } %link{ :rel => "shortcut icon", :type => "image/x-icon", :href =>"favicon.ico" }
%link{ :rel => "stylesheet", :type => "text/css", :media => "screen, projection", :href => "/jasmine/css/screen.css" } %link{ :rel => "stylesheet", :type => "text/css", :media => "screen, projection", :href => "/jasmine/css/screen.css" }
%link{ :rel => "stylesheet", :type => "text/css", :media => "screen, projection", :href => "/jasmine/css/pygments.css" } %link{ :rel => "stylesheet", :type => "text/css", :media => "screen, projection", :href => "/jasmine/css/pygments.css" }
@ -16,4 +18,4 @@
%a{ :href => "http://pivotallabs.com" , :target => '_blank' } %a{ :href => "http://pivotallabs.com" , :target => '_blank' }
%img{ :src => "/jasmine/images/pivotal_logo.gif", :alt => "Pivotal Labs, Inc." } %img{ :src => "/jasmine/images/pivotal_logo.gif", :alt => "Pivotal Labs, Inc." }
.content= yield

70
pages/setup.rb Normal file
View File

@ -0,0 +1,70 @@
# ----------------------
# Server settings:
#
# Change the server host/port to bind rack to.
# 'server' can be any Rack-supported server, e.g.
# Mongrel, Thin, WEBrick
#
Frank.server.handler = "mongrel"
Frank.server.hostname = "0.0.0.0"
Frank.server.port = "3601"
# ----------------------
# Static folder:
#
# All files in this folder will be served up
# directly, without interpretation
#
Frank.static_folder = "static"
# ----------------------
# Dynamic folder:
#
# Frank will try to interpret any of the files
# in this folder based on their extension
#
Frank.dynamic_folder = "dynamic"
# ----------------------
# Layouts folder:
#
# Frank will look for layouts in this folder
# the default layout is `default'
# it respects nested layouts that correspond to nested
# folders in the `dynamic_folder'
# for example: a template: `dynamic_folder/blog/a-blog-post.haml'
# would look for a layout: `layouts/blog/default.haml'
# and if not found use the default: `layouts/default.haml'
#
# Frank also supports defining layouts on an
# individual template basis using meta data
# you can do this by defining a meta field `layout: my_layout.haml'
#
Frank.layouts_folder = "layouts"
# ----------------------
# Publish settings:
#
# Frank can publish your exported project to
# a server. All you have to do is tell Frank what host, path, and username.
# If you have ssh keys setup there is no need for a password.
# Just uncomment the Publish settings below and
# make the appropriate changes.
#
# Frank.publish.host = "example.com"
# Frank.publish.path = "/www"
# Frank.publish.username = 'me'
# Frank.publish.password = 'secret'
# Frank.publish.port = 22
#
# ----------------------
# Sass Options:
# Frank.sass_options = { :load_paths => [ File.join(File.dirname(__FILE__), 'dynamic/css') ] }
# ----------------------
# Initializers:
#
# Add any other project setup code, or requires here
# ....

0
pages/static/favicon.ico Normal file
View File

View File

@ -1,45 +0,0 @@
.copy
These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files.
.copy
For a using Jasmine with Ruby on Rails, other Ruby frameworks, within continuous integration environments, or to gain more dynamic source and test file loading, see
= link "Using the Jasmine Gem", "http://github.com/pivotal/jasmine/wiki" + '.'
%table#standalone-downloads
%tr
%th
%th Version
%th Size
%th Date
%th SHA1
%tr
%td.link= link "jasmine-standalone-1.0.1.zip", "/jasmine/downloads/jasmine-standalone-1.0.1.zip"
%td.version 1.0.1
%td.size 20k
%td.date 2010/10/05 13:37:01 PDT
%td.sha b2b3d00a7cb8d5ccd65a3356bb5ae15775328119
%tr
%td.link= link "jasmine-standalone-1.0.0.zip", "/jasmine/downloads/jasmine-standalone-1.0.0.zip"
%td.version 1.0.0
%td.size 20k
%td.date 2010/09/14 12:54:38 PDT
%td.sha 1866f654a3ad0ab9109393ce31d6613c77916607
%tr.rc
%td.link= link "jasmine-standalone-1.0.0.rc1.zip", "/jasmine/downloads/jasmine-standalone-1.0.0.rc1.zip"
%td.version 1.0.0.rc1
%td.size 19k
%td.date 2010/08/26 13:09:41 PDT
%td.sha 20e7da22bc7ce3433331a5ad44eb199f4ff34065
%tr
%td.link= link "jasmine-standalone-0.11.1.zip", "/jasmine/downloads/jasmine-standalone-0.11.1.zip"
%td.version 0.11.1
%td.size 18k
%td.date 2010/06/25 16:05:30 PDT
%td.sha 26998c7ca047e47f84c382a4efeb1dc5cb8661a6

View File

@ -1,41 +0,0 @@
.copy
Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other
JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
.highlight
%pre
%code.javascript= snippet
.copy
Jasmine can be run anywhere you can execute JavaScript: a static web page, your continuous integration environment, |
or server-side environments like
= link "Node.js", "http://nodejs.org"
.copy
Find out more in the
= link("documentation", "http://github.com/pivotal/jasmine/wiki", :target => '_blank') + '.'
%h2 Downloads
%ul
%li= link "Standalone", "download.html"
%li
= link "Jasmine Ruby Gem", "http://github.com/pivotal/jasmine/wiki/A-ruby-project", :target => '_blank'
for Rails, Ruby, or Ruby-friendly development
%li
= link "Other environments", "http://github.com/pivotal/jasmine/wiki", :target => '_blank'
Node.js, Maven, etc.
%h2 Support
%ul
%li= link "API Documentation", "jsdoc/index.html", :target => '_blank'
%li
= link "Google Group for email list:", "http://groups.google.com/group/jasmine-js", :target => '_blank'
= link "jasmine-js@googlegroups.com", "mailto:jasmine-js@googlegroups.com", :target => '_blank'
%li= link "Current Build Status", "http://ci.pivotallabs.com", :target => '_blank'
%li= link "Report bugs at GitHub", "http://github.com/pivotal/jasmine/issues", :target => '_blank'
%li= link "Project Backlog at Pivotal Tracker", "http://www.pivotaltracker.com/projects/10606", :target => '_blank'
%li
%img{:src => "http://twitter-badges.s3.amazonaws.com/t_mini-c.png"}
= link "Follow @JasmineBDD on Twitter", "http://twitter.com/JasmineBDD"