From 0bef913a174d0696ae66cf6e5f2f6b10272feaec Mon Sep 17 00:00:00 2001 From: Darren Shafae Date: Thu, 14 Jul 2011 09:18:09 -0700 Subject: [PATCH 1/5] Added .idea/ to .gitignore. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 49eac9d..031b859 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .sass-cache/ _site/ - +.idea/* From 46fcaf62bb3d1e4d0200d4ef79ec4c4474996fad Mon Sep 17 00:00:00 2001 From: Darren Shafae Date: Thu, 14 Jul 2011 09:22:21 -0700 Subject: [PATCH 2/5] Moved the README.md file from the master branch to the gh-pages branch. --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d3cc4af --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ +# Jasmine Headless WebKit Runner + +Run your specs at sonic boom speed! No pesky reload button or page rendering slowdowns! Jasmine +Headless WebKit Runner is a great way to run continuous integration without running a Web browser, +such as FireFox or Chrome. + +## Install Jasmine Headless WebKit +The simplest way to install Jasmine Headless Webkit is to install it via the Gemfile. +Add `gem "jasmine-headless-webkit"` to your Gemfile, and run `bundle install`. This gem has three gem dependencies: + + coffee-script >= 2.2 + jasmine ~> 1.1.beta + rainbow >= 0 + +Next, run `bundle install` + +## Configure Jasmine + +In the **jasmine.yml** file, located under the **support** sub-directory, you can control +which source files you would like to test. The default line that includes all JavaScript +files is `public/javascripts/**/*.js`, but this does not guarantee an order of execution. +It is recommended that you include files that jQuery plug-ins may depend on first. + + src_files: + public/javascripts/jquery.min.js + public/javascripts/underscore.js + public/javascripts/underscore.date.min.js + public/javascripts/jquery-ui-1.8.14.custom.min.js + public/javascripts/**/*.js + +## Continuous Integration + +Since most continuous integration servers do not have a display, you will need to use +Xvfb or virtual framebuffer Xserver for Version 11 [Xvfb Manpages] +(http://manpages.ubuntu.com/manpages/natty/man1/Xvfb.1.html). + +1. `sudo apt-get install xvfb` +2. run `Xvfb :99 -ac` and resolve missing dependencies. + * `sudo apt-get install x11-xkb-utils` + * `sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic` + * `sudo apt-get install xserver-xorg-core` +3. Use Xvfb to run the headless rake command `xvfb-run rake jasmine:headless` or `xvfb-run jasmine-headless-webkit -c` +4. Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) + +# Gotcha(s) + +## Qt 4.7.X + +The gem is compiled using **qt4-qmake** and you will need Qt 4.7.x or greater. +To test if it is installed, you should run `qmake --version` and you should +receive something like: + + QMake version 2.01a + Using Qt version 4.7.2 in /usr/lib + +If you receive a different message, you can install qt4-qmake using the following commands as root: + +**Ubuntu 11.04** + + sudo apt-get install libqt4-dev + sudo apt-get install qt4-qmake + +**Mac OS X 10.6** + + sudo port install qt4-mac + +**Ubuntu 9.10** + +Running `sudo apt-get install libqt4-dev` and `sudo apt-get install qt4-qmake` will install qt4, +but it installs **version 4.5.2**, which will not be able to install +`gem "jasmine-headless-webkit"`, as it requires Qt 4.7.X or later version. + +You will need to compile qt4-qmake from source +[Qt version 4.7.0](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz). +There are excellent [directions](http://doc.qt.nokia.com/latest/install-x11.html) on how to compile +the source code. You will need to ensure Qt is exported to your $PATH before using qmake, as it will +install to /usr/local/Trolltech/. + +## RubyMine + +RubyMine may throw an error when running rake spec, you will need to provide a +JavaScript runtime environment. Install `gem "therubyracer"` to resolve this problem. + + rake aborted! + Could not find a JavaScript runtime. + See https://github.com/sstephenson/execjs + for a list of available runtimes. + +http://johnbintz.github.com/jasmine-headless-webkit/ has the most up-to-date information on using +this project. You can see the source of that site on the gh-pages branch. + +## License + +* Copyright (c) 2011 John Bintz +* Original Qt WebKit runner Copyright (c) 2010 Sencha Inc. +* Jasmine JavaScript library Copyright (c) 2008-2011 Pivotal Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + From e8fd548d068da3357130cccb0e0cbb969e3e89c1 Mon Sep 17 00:00:00 2001 From: Darren Shafae Date: Thu, 14 Jul 2011 10:36:55 -0700 Subject: [PATCH 3/5] Removed the README.md file that I added and edited the index.md file. --- README.md | 2 -- index.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3cc4af..2505d5b 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,6 @@ Xvfb or virtual framebuffer Xserver for Version 11 [Xvfb Manpages] 3. Use Xvfb to run the headless rake command `xvfb-run rake jasmine:headless` or `xvfb-run jasmine-headless-webkit -c` 4. Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) -# Gotcha(s) - ## Qt 4.7.X The gem is compiled using **qt4-qmake** and you will need Qt 4.7.x or greater. diff --git a/index.md b/index.md index d71be27..eeb8add 100644 --- a/index.md +++ b/index.md @@ -329,6 +329,62 @@ rake jasmine:headless # Run Jasmine specs headlessly This is the same as running `jasmine-headless-webkit -c`. +## Continuous Integration + +Since most continuous integration servers do not have a display, you will need to use +Xvfb or virtual framebuffer Xserver for Version 11 [Xvfb Manpages](http://manpages.ubuntu.com/manpages/natty/man1/Xvfb.1.html) + +1. sudo apt-get install xvfb` +2. run `Xvfb :99 -ac` and resolve missing dependencies. + * sudo apt-get install x11-xkb-utils + * sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic + * sudo apt-get install xserver-xorg-core +3. Use Xvfb to run the headless rake command `xvfb-run rake jasmine:headless` or `xvfb-run jasmine-headless-webkit -c` +4. Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) + +## Qt 4.7.X + +The gem is compiled using **qt4-qmake** and you will need Qt 4.7.x or greater. +To test if it is installed, you should run `qmake --version` and you should +receive something like: + + QMake version 2.01a + Using Qt version 4.7.2 in /usr/lib + +If you receive a different message, you can install qt4-qmake using the following commands as root: + +### Ubuntu 11.04 + + sudo apt-get install libqt4-dev + sudo apt-get install qt4-qmake + +### Mac OS X 10.6 + + sudo port install qt4-mac + +### Ubuntu 9.10 + +Running `sudo apt-get install libqt4-dev` and `sudo apt-get install qt4-qmake` will install qt4, +but it installs **version 4.5.2**, which will not be able to install +`gem "jasmine-headless-webkit"`, as it requires Qt 4.7.X or later version. + +You will need to compile qt4-qmake from source +[Qt version 4.7.0](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz). +There are excellent [directions](http://doc.qt.nokia.com/latest/install-x11.html) on how to compile +the source code. You will need to ensure Qt is exported to your $PATH before using qmake, as it will +install to /usr/local/Trolltech/. + +## RubyMine + +RubyMine may throw an error when running rake spec, you will need to provide a +JavaScript runtime environment. Install `gem "therubyracer"` to resolve this problem. + + rake aborted! + Could not find a JavaScript runtime. + See https://github.com/sstephenson/execjs + for a list of available runtimes. + + ## I have a problem or helpful suggestion, good sir. Here's what you can do: From f9b3c27986a678934f66e3ca9a1993a628891bd4 Mon Sep 17 00:00:00 2001 From: Darren Shafae Date: Thu, 14 Jul 2011 12:26:15 -0700 Subject: [PATCH 4/5] Removed README.md --- README.md | 113 ------------------------------------------------------ index.md | 100 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 84 insertions(+), 129 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 2505d5b..0000000 --- a/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# Jasmine Headless WebKit Runner - -Run your specs at sonic boom speed! No pesky reload button or page rendering slowdowns! Jasmine -Headless WebKit Runner is a great way to run continuous integration without running a Web browser, -such as FireFox or Chrome. - -## Install Jasmine Headless WebKit -The simplest way to install Jasmine Headless Webkit is to install it via the Gemfile. -Add `gem "jasmine-headless-webkit"` to your Gemfile, and run `bundle install`. This gem has three gem dependencies: - - coffee-script >= 2.2 - jasmine ~> 1.1.beta - rainbow >= 0 - -Next, run `bundle install` - -## Configure Jasmine - -In the **jasmine.yml** file, located under the **support** sub-directory, you can control -which source files you would like to test. The default line that includes all JavaScript -files is `public/javascripts/**/*.js`, but this does not guarantee an order of execution. -It is recommended that you include files that jQuery plug-ins may depend on first. - - src_files: - public/javascripts/jquery.min.js - public/javascripts/underscore.js - public/javascripts/underscore.date.min.js - public/javascripts/jquery-ui-1.8.14.custom.min.js - public/javascripts/**/*.js - -## Continuous Integration - -Since most continuous integration servers do not have a display, you will need to use -Xvfb or virtual framebuffer Xserver for Version 11 [Xvfb Manpages] -(http://manpages.ubuntu.com/manpages/natty/man1/Xvfb.1.html). - -1. `sudo apt-get install xvfb` -2. run `Xvfb :99 -ac` and resolve missing dependencies. - * `sudo apt-get install x11-xkb-utils` - * `sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic` - * `sudo apt-get install xserver-xorg-core` -3. Use Xvfb to run the headless rake command `xvfb-run rake jasmine:headless` or `xvfb-run jasmine-headless-webkit -c` -4. Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) - -## Qt 4.7.X - -The gem is compiled using **qt4-qmake** and you will need Qt 4.7.x or greater. -To test if it is installed, you should run `qmake --version` and you should -receive something like: - - QMake version 2.01a - Using Qt version 4.7.2 in /usr/lib - -If you receive a different message, you can install qt4-qmake using the following commands as root: - -**Ubuntu 11.04** - - sudo apt-get install libqt4-dev - sudo apt-get install qt4-qmake - -**Mac OS X 10.6** - - sudo port install qt4-mac - -**Ubuntu 9.10** - -Running `sudo apt-get install libqt4-dev` and `sudo apt-get install qt4-qmake` will install qt4, -but it installs **version 4.5.2**, which will not be able to install -`gem "jasmine-headless-webkit"`, as it requires Qt 4.7.X or later version. - -You will need to compile qt4-qmake from source -[Qt version 4.7.0](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz). -There are excellent [directions](http://doc.qt.nokia.com/latest/install-x11.html) on how to compile -the source code. You will need to ensure Qt is exported to your $PATH before using qmake, as it will -install to /usr/local/Trolltech/. - -## RubyMine - -RubyMine may throw an error when running rake spec, you will need to provide a -JavaScript runtime environment. Install `gem "therubyracer"` to resolve this problem. - - rake aborted! - Could not find a JavaScript runtime. - See https://github.com/sstephenson/execjs - for a list of available runtimes. - -http://johnbintz.github.com/jasmine-headless-webkit/ has the most up-to-date information on using -this project. You can see the source of that site on the gh-pages branch. - -## License - -* Copyright (c) 2011 John Bintz -* Original Qt WebKit runner Copyright (c) 2010 Sencha Inc. -* Jasmine JavaScript library Copyright (c) 2008-2011 Pivotal Labs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/index.md b/index.md index eeb8add..a4c45d7 100644 --- a/index.md +++ b/index.md @@ -329,29 +329,87 @@ rake jasmine:headless # Run Jasmine specs headlessly This is the same as running `jasmine-headless-webkit -c`. -## Continuous Integration +## Continuous Integration and Using Xvfb Since most continuous integration servers do not have a display, you will need to use -Xvfb or virtual framebuffer Xserver for Version 11 [Xvfb Manpages](http://manpages.ubuntu.com/manpages/natty/man1/Xvfb.1.html) +Xvfb or virtual framebuffer Xserver for Version 11. If you elect not to use Xvfb, you will +need to have a browser and graphical display to run `jasmine-headless-webkit -c`. -1. sudo apt-get install xvfb` -2. run `Xvfb :99 -ac` and resolve missing dependencies. - * sudo apt-get install x11-xkb-utils - * sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic - * sudo apt-get install xserver-xorg-core -3. Use Xvfb to run the headless rake command `xvfb-run rake jasmine:headless` or `xvfb-run jasmine-headless-webkit -c` -4. Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) +Reference: [Xvfb Manpages](http://manpages.ubuntu.com/manpages/natty/man1/Xvfb.1.html) + +### Install Xvfb + sudo apt-get install xvfb + +### Resolve Missing Dependencies +To resolve missing dependencies, you will need to know what to install. + $ Xvfb :99 -ac +You will see a long list of warning messages: + + [dix] Could not init font path element /usr/share/fonts/X11/misc, + removing from list! + [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, + removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/100dpi/:unscaled, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/75dpi/:unscaled, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/Type1, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/100dpi, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/75dpi, removing from list! + sh: /usr/bin/xkbcomp: not found + (EE) Error compiling keymap (server-42) + (EE) XKB: Couldn't compile keymap + [config/dbus] couldn't take over org.x.config: + org.freedesktop.DBus.Error.AccessDenied + (Connection ":1.74" is not allowed to + own the service "org.x.config.display99" + due to security policies in the configuration file) + +Installing the following packages would resolve the above warning messages. Your +missing packages may be different depending on the packages you have installed. + sudo apt-get install x11-xkb-utils + sudo apt-get install xfonts-100dpi xfonts-75dpi + sudo apt-get install xfonts-scalable xfonts-cyrillic + sudo apt-get install xserver-xorg-core + +Once you have resolved these dependencies, you should see: + [dix] Could not init font path element /usr/share/fonts/X11/misc, + removing from list! + [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, + removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/100dpi/:unscaled, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/75dpi/:unscaled, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/Type1, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/100dpi, removing from list! + [dix] Could not init font path element + /usr/share/fonts/X11/75dpi, removing from list! + +### Run with Xvfb +Use Xvfb to run the headless rake command. This will resolve the issue of jasmine-webkit-specrunner failing to connect +to X server. + xvfb-run rake jasmine:headless + xvfb-run jasmine-headless-webkit -c + +Reference: [MARTIN DALE LYNESS](http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala) ## Qt 4.7.X The gem is compiled using **qt4-qmake** and you will need Qt 4.7.x or greater. -To test if it is installed, you should run `qmake --version` and you should -receive something like: +Test that qt4-qmake it is installed and verify your version. + qmake --version +If you have the Qt 4.7.x or greater, you are ready to install jasmine-headless-webkit. QMake version 2.01a Using Qt version 4.7.2 in /usr/lib -If you receive a different message, you can install qt4-qmake using the following commands as root: +If you receive a different message, you can install qt4-qmake using one of the following commands as root. ### Ubuntu 11.04 @@ -365,25 +423,35 @@ If you receive a different message, you can install qt4-qmake using the followin ### Ubuntu 9.10 Running `sudo apt-get install libqt4-dev` and `sudo apt-get install qt4-qmake` will install qt4, -but it installs **version 4.5.2**, which will not be able to install -`gem "jasmine-headless-webkit"`, as it requires Qt 4.7.X or later version. +but it installs **version 4.5.2**, which will not be able to compile +**jasmine-headless-webkit**, as it requires Qt 4.7.X or greater. You will need to compile qt4-qmake from source [Qt version 4.7.0](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz). There are excellent [directions](http://doc.qt.nokia.com/latest/install-x11.html) on how to compile -the source code. You will need to ensure Qt is exported to your $PATH before using qmake, as it will +the source code. You will need to ensure Qt is exported to your $PATH before using qmake, as the source code will install to /usr/local/Trolltech/. ## RubyMine RubyMine may throw an error when running rake spec, you will need to provide a -JavaScript runtime environment. Install `gem "therubyracer"` to resolve this problem. +JavaScript runtime environment. rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. +To resolve this problem, install the **therubyracer** gem, which is the embed V8 JavaScript interpreter into Ruby. +Reference: [therubyracer](https://github.com/cowboyd/therubyracer) + +You can use it standalone: + + gem install therubyracer + +Or you can use it with Bundler: + + gem 'therubyracer' ## I have a problem or helpful suggestion, good sir. From 3a77f71cd5166dd3e9aeac37f5e78656c6d9bdfa Mon Sep 17 00:00:00 2001 From: Darren Shafae Date: Thu, 14 Jul 2011 12:34:50 -0700 Subject: [PATCH 5/5] I modified the Continuous Integration heading. I corrected a typo. --- index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.md b/index.md index a4c45d7..d159f88 100644 --- a/index.md +++ b/index.md @@ -329,7 +329,7 @@ rake jasmine:headless # Run Jasmine specs headlessly This is the same as running `jasmine-headless-webkit -c`. -## Continuous Integration and Using Xvfb +## Continuous Integration Using Xvfb Since most continuous integration servers do not have a display, you will need to use Xvfb or virtual framebuffer Xserver for Version 11. If you elect not to use Xvfb, you will