From c2ff4ae0fa8123dfdefe3f2653fea3c92cc82e5a Mon Sep 17 00:00:00 2001 From: Peter Hellberg Date: Sun, 18 Aug 2013 14:19:13 +0200 Subject: [PATCH 1/3] Updated development dependencies --- Gemfile | 12 +++---- Gemfile.lock | 98 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 70 insertions(+), 40 deletions(-) diff --git a/Gemfile b/Gemfile index ebe0f96..b4d66ba 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ -source 'http://rubygems.org' +source 'https://rubygems.org' group :development do - gem "RedCloth", "~> 4.2" - gem "foreman", "~> 0.13" - gem "serve", "~> 1.0" - gem "jekyll", "~> 0.10" - gem "thin", "~> 1.2" + gem "github-pages" + gem "tzinfo-data" + + gem "foreman", "~> 0.63" + gem "serve", "~> 1.5" end diff --git a/Gemfile.lock b/Gemfile.lock index 0b46357..d8185b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,47 +1,77 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: RedCloth (4.2.9) - activesupport (3.0.7) + activesupport (3.2.14) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) classifier (1.3.3) fast-stemmer (>= 1.0.0) - daemons (1.1.3) - directory_watcher (1.4.0) - eventmachine (0.12.10) - fast-stemmer (1.0.0) - foreman (0.13.0) - term-ansicolor (~> 1.0.5) + colorator (0.1) + commander (4.1.5) + highline (~> 1.6.11) + directory_watcher (1.4.1) + dotenv (0.8.0) + fast-stemmer (1.0.2) + foreman (0.63.0) + dotenv (>= 0.7) thor (>= 0.13.6) - i18n (0.4.2) - jekyll (0.10.0) - classifier (>= 1.3.1) - directory_watcher (>= 1.1.1) - liquid (>= 1.9.0) - maruku (>= 0.5.9) - liquid (2.2.2) - maruku (0.6.0) + github-pages (1) + RedCloth (= 4.2.9) + jekyll (= 1.1.2) + kramdown (= 1.0.2) + liquid (= 2.5.1) + maruku (= 0.6.1) + rdiscount (= 1.6.8) + redcarpet (= 2.2.2) + highline (1.6.19) + i18n (0.6.5) + jekyll (1.1.2) + classifier (~> 1.3) + colorator (~> 0.1) + commander (~> 4.1.3) + directory_watcher (~> 1.4.1) + kramdown (~> 1.0.2) + liquid (~> 2.5.1) + maruku (~> 0.5) + pygments.rb (~> 0.5.0) + redcarpet (~> 2.2.2) + safe_yaml (~> 0.7.0) + kramdown (1.0.2) + liquid (2.5.1) + maruku (0.6.1) syntax (>= 1.0.0) - rack (1.2.2) - serve (1.0.0) - activesupport (~> 3.0.1) - i18n (~> 0.4.1) - rack (~> 1.2.1) - tzinfo (~> 0.3.23) + multi_json (1.7.9) + posix-spawn (0.3.6) + pygments.rb (0.5.2) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.1.0) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rdiscount (1.6.8) + redcarpet (2.2.2) + safe_yaml (0.7.1) + serve (1.5.2) + activesupport (~> 3.2.12) + i18n + rack (~> 1.5.2) + rack-test (~> 0.6.2) + tilt (~> 1.3.3) + tzinfo syntax (1.0.0) - term-ansicolor (1.0.5) - thin (1.2.11) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - thor (0.14.6) - tzinfo (0.3.27) + thor (0.18.1) + tilt (1.3.7) + tzinfo (1.0.1) + tzinfo-data (1.2013.4) + tzinfo (>= 1.0.0) + yajl-ruby (1.1.0) PLATFORMS ruby DEPENDENCIES - RedCloth (~> 4.2) - foreman (~> 0.13) - jekyll (~> 0.10) - serve (~> 1.0) - thin (~> 1.2) + foreman (~> 0.63) + github-pages + serve (~> 1.5) + tzinfo-data From fffd98eed9629cb74817e6c9bc2d1a7d906b6b20 Mon Sep 17 00:00:00 2001 From: Peter Hellberg Date: Sun, 18 Aug 2013 14:21:24 +0200 Subject: [PATCH 2/3] Now using the github-pages gem in order to better mirror the production environment. --- .ruby-gemset | 1 + .ruby-version | 1 + Procfile | 2 +- _config.yml | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .ruby-gemset create mode 100644 .ruby-version diff --git a/.ruby-gemset b/.ruby-gemset new file mode 100644 index 0000000..119b7fd --- /dev/null +++ b/.ruby-gemset @@ -0,0 +1 @@ +coffeescript-cookbook diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..77fee73 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +1.9.3 diff --git a/Procfile b/Procfile index c41ebb6..26a670a 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -jekyll: bundle exec jekyll --auto +jekyll: bundle exec jekyll build --watch serve: bundle exec serve 4000 development _site diff --git a/_config.yml b/_config.yml index f61488e..fef8911 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,7 @@ +safe: true pygments: true lsi: false +markdown: redcarpet exclude: - README.md - CNAME From 7ebd0275b2c5569b7a5f30723551028d8d8ea6b5 Mon Sep 17 00:00:00 2001 From: Peter Hellberg Date: Sun, 18 Aug 2013 15:13:54 +0200 Subject: [PATCH 3/3] Updated the Developer's Guide to better reflect the current workflow. --- developers-guide.md | 54 ++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/developers-guide.md b/developers-guide.md index 8d8c210..909847e 100644 --- a/developers-guide.md +++ b/developers-guide.md @@ -9,7 +9,8 @@ _Please help out by updating this page_ ### Operating System -It works on Mac OSX. Probably works without any changes or issues on linux. A masochist could probably get it working on Windows. +It works on Mac OSX. Probably works without any changes or issues on Linux. +A masochist could probably get it working on Windows. ## Installation @@ -19,54 +20,47 @@ It works on Mac OSX. Probably works without any changes or issues on linux. A ma git clone git://github.com/coffeescript-cookbook/coffeescript-cookbook.github.com.git {% endhighlight %} -### Create a Ruby Gemset +### Ruby environment -Optional, but highly recommended. +You probably want to have [RVM](http://rvm.io/) installed. -{% highlight bash %} -$ rvm gemset create jekyll -$ echo 'rvm gemset use jekyll' >> .rvmrc -{% endhighlight %} - -### Install Required Gems +The project includes a `.ruby-version` file locked to +*1.9.3* since that is what Github Pages are currently using. -{% highlight bash %} -gem install jekyll # needed for testing building the site -gem install RedCloth # needed for .md rendering -gem install serve # needed for resolving .html files w/o extension -gem install thin # optional; more efficient webserver than Webrick but not strictly necessary -{% endhighlight %} +There is also a `.ruby-gemset` that is set to *coffeescript-cookbook* -### Install pygments +### Required dependencies -You'll need python installed for this. Macs and most linuces come with it preinstalled. +We are using [Bundler](http://bundler.io/) to install the required Ruby dependencies. {% highlight bash %} -easy_install pygments # for syntax highlighting +bundle install {% endhighlight %} -## Building and Viewing the Website - -### Run jekyll +#### Install pygments -Open a terminal window, cd into the project folder and run jekyll from the project root. +You'll need python installed for this. +Macs and most Linuces come with it preinstalled. {% highlight bash %} -jekyll --auto +easy_install pygments # for syntax highlighting {% endhighlight %} -Leave this window running while you work. Any time you change a file, jekyll will rerender it into the `_site` folder. - -### Run serve +## Building and Viewing the Website -Open another terminal window, cd into the project folder, then cd into the `_site` subfolder, and run +Open a terminal window, cd into the project folder and run `foreman start` from the project root. {% highlight bash %} -serve +foreman start {% endhighlight %} -This will start a webserver in the `_site` folder. Open a browser and visit `http://localhost:4000/` and you should see the site. +Leave this window running while you work. +Any time you change a file, jekyll will rerender it into the `_site` folder. + +Open a browser and visit and you should see the site. ## Minutiae and Other Trivialities -jekyll can take a second or two to catch up when you save a file. If you edit a file and don't see the changes in your browser, give it a second or two and try again. You may also see Maruku warnings, but as long as it prints `Successfully generated site` you should be alright. +Jekyll can take a second or two to catch up when you save a file. +If you edit a file and don't see the changes in your browser, give it a second or two and try again. +As long as it prints `Successfully generated site` you should be alright.