From a5b292f59b4ea160daff23d5f616abf335fdb1c2 Mon Sep 17 00:00:00 2001 From: "Davis W. Frank" Date: Tue, 25 Jan 2011 13:13:32 -0800 Subject: [PATCH] Move to staticmatic generated static HTML instead of relying on Jekyll (or server-side Jekyll) --- .gitignore | 1 + Gemfile | 3 ++ Gemfile.lock | 17 +++++++++++ Rakefile | 5 ++++ _layouts/default.html | 53 ----------------------------------- css/screen.css | 9 ++++++ download.html.md | 51 --------------------------------- index.html.md | 37 ------------------------ src/helpers/snippet_helper.rb | 9 ++++++ src/pages/download.haml | 45 +++++++++++++++++++++++++++++ 10 files changed, 89 insertions(+), 141 deletions(-) create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 Rakefile delete mode 100644 _layouts/default.html delete mode 100644 download.html.md delete mode 100644 index.html.md create mode 100644 src/helpers/snippet_helper.rb create mode 100644 src/pages/download.haml diff --git a/.gitignore b/.gitignore index f6f0f5d..6b2d9a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ _site/ +site/ \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..d91e7d0 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source :rubygems + +gem "staticmatic" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..cc49288 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,17 @@ +GEM + remote: http://rubygems.org/ + specs: + compass (0.10.6) + haml (>= 3.0.4) + haml (3.0.25) + rack (1.2.1) + staticmatic (0.11.1) + compass (>= 0.10.0) + haml (>= 2.0.0) + rack (>= 1.0) + +PLATFORMS + ruby + +DEPENDENCIES + staticmatic diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..cec2066 --- /dev/null +++ b/Rakefile @@ -0,0 +1,5 @@ +desc "build the site" +task :site do + system("staticmatic build .") + system("cp -r site/ .") +end \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 5aabc01..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - {% if page.title %}{{ page.title }} | {% endif %}{{site.title}} - - - - - - - -Fork me on GitHub -
-
-

Jasmine

-
-
-
- {% capture toc %} {% include toc.html %} {% endcapture %} - {{ toc | textilize }} -
-
- {{ content }} -
-
-
-
- Powered by   - - Pivotal Labs, Inc. - - -
- -
-
-
- - - \ No newline at end of file diff --git a/css/screen.css b/css/screen.css index 5a08a87..477b984 100644 --- a/css/screen.css +++ b/css/screen.css @@ -24,6 +24,15 @@ body font-size:87.5%; /* 16px * 0.875 = 14px */ line-height: 137.5%; /* 16px * 1.375 = 22px */ } + +.content { + margin: 32px; +} + +.copy { + margin-top: 24px; +} + a { color: #55862e; diff --git a/download.html.md b/download.html.md deleted file mode 100644 index 01436f5..0000000 --- a/download.html.md +++ /dev/null @@ -1,51 +0,0 @@ ---- - layout: default - title: Downloads ---- - -## Downloads - -These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files. - -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 [Using the Jasmine Gem](gem.html). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VersionSizeDateSHA1
1.0.120k2010/10/05 13:37:01 PDTb2b3d00a7cb8d5ccd65a3356bb5ae15775328119
1.0.020k2010/09/14 12:54:38 PDT1866f654a3ad0ab9109393ce31d6613c77916607
1.0.0.rc119k2010/08/26 13:09:41 PDT20e7da22bc7ce3433331a5ad44eb199f4ff34065
0.11.118k2010/06/25 16:05:30 PDT26998c7ca047e47f84c382a4efeb1dc5cb8661a6
\ No newline at end of file diff --git a/index.html.md b/index.html.md deleted file mode 100644 index 1c7f52e..0000000 --- a/index.html.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default -title: "Jasmine: BDD for Javascript" ---- - -# BDD for your JavaScript - -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 javascript %} -describe("Jasmine", function() { - it("makes testing JavaScript awesome!", function() { - expect(yourCode).toBeLotsBetter(); - }); -}); -{% endhighlight %} - -## Adding Jasmine to your Rails project - -{% highlight sh %} -$ gem install jasmine -$ script/generate jasmine -$ rake spec -{% endhighlight %} - -Jasmine can be run on a static web page, in your continuous integration environment, or with [node.js](http://nodejs.org). -See more in the documentation. - -## Support - -__Discussion:__ [Google Group](http://groups.google.com/group/jasmine-js)
-__Group email:__ [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com)
-__Current Build Status:__ [Jasmine at Pivotal Labs CI](http://ci.pivotallabs.com)
-__Report bugs__ at [GitHub](http://github.com/pivotal/jasmine/issues)
-__Project Backlog:__ [Jasmine on Pivotal Tracker](http://www.pivotaltracker.com/projects/10606)
-__Twitter:__ [@JasmineBDD](http://twitter.com/JasmineBDD)
diff --git a/src/helpers/snippet_helper.rb b/src/helpers/snippet_helper.rb new file mode 100644 index 0000000..3833837 --- /dev/null +++ b/src/helpers/snippet_helper.rb @@ -0,0 +1,9 @@ +module SnippetHelper + def snippet + "describe("Jasmine", function() { + it("makes testing JavaScript awesome!", function() { + expect(yourCode).toBeLotsBetter(); + }); +});" + end +end \ No newline at end of file diff --git a/src/pages/download.haml b/src/pages/download.haml new file mode 100644 index 0000000..0e56223 --- /dev/null +++ b/src/pages/download.haml @@ -0,0 +1,45 @@ + +.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 "downloads/jasmine-standalone-1.0.1.zip", "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 "downloads/jasmine-standalone-1.0.0.zip", "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 "downloads/jasmine-standalone-1.0.0.rc1.zip", "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 "downloads/jasmine-standalone-0.11.1.zip", "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 + +