<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>steve.blog - Home</title>
  <id>tag:www.stephenbartholomew.co.uk,2010:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://www.stephenbartholomew.co.uk/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.stephenbartholomew.co.uk/" rel="alternate" type="text/html"/>
  <updated>2010-05-06T09:26:23Z</updated>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2010-04-14:272</id>
    <published>2010-04-14T08:33:00Z</published>
    <updated>2010-05-06T09:26:23Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2010/4/14/setting-a-remote-git-repository" rel="alternate" type="text/html"/>
    <title>Setting a remote git repository</title>
<content type="html">
            &lt;p&gt;Setting up a remote git repository on your own server is simple:&lt;/p&gt;

&amp;lt;script src=&quot;http://gist.github.com/365556.js?file=Simple+Remote+Git&quot;&gt;&amp;lt;/script&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2009-01-12:260</id>
    <published>2009-01-12T21:29:00Z</published>
    <updated>2009-01-14T21:58:30Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2009/1/12/show-git-branch-in-your-terminal" rel="alternate" type="text/html"/>
    <title>Show Git branch in your terminal</title>
<content type="html">
            &lt;p&gt;I've seen this around quite a bit on other blogs, but here it is in its simplest form:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;parse_git_branch() {
  git branch 2&amp;gt; /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/ [\1]/'
}

export PS1='\w $(parse_git_branch) \$ '
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Simply add this to .bash_profile/.profile and relaunch your terminal.  &lt;/p&gt;

&lt;p&gt;This gives me:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~/Sites/curve21/clients/acme/www [master] $
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The key part of the PS1 variable is $(parse_git_branch) - you can drop it into your custom prompt if you have one.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2009-01-02:259</id>
    <published>2009-01-02T22:23:00Z</published>
    <updated>2009-01-02T22:32:01Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2009/1/2/staticmatic-update" rel="alternate" type="text/html"/>
    <title>StaticMatic Update</title>
<content type="html">
            &lt;p&gt;StaticMatic has been in great need of love of late so I brushed off the old gem and gave it a bit of a spruce.&lt;/p&gt;

&lt;h2&gt;New Release: 0.10.0&lt;/h2&gt;

&lt;p&gt;The new release includes major improvements to error handling as well as internal refactoring in preparation for future work.&lt;/p&gt;

&lt;h2&gt;Code moves to github&lt;/h2&gt;

&lt;p&gt;I've been using git for the latest changes so this made sense.  StaticMatic has its own account where I'll also be hosting gem plugins: &lt;a href=&quot;http://github.com/staticmatic/staticmatic/tree/master&quot;&gt;github.com/staticmatic/staticmatic/tree/master&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;On Twitter&lt;/h2&gt;

&lt;p&gt;Like all the cool kids: &lt;a href=&quot;http://twitter.com/staticmatic&quot;&gt;twitter.com/staticmatic&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Coming Soon&lt;/h2&gt;

&lt;p&gt;StaticMatic will be supporting multiple templating languages very shortly.  More on this soon.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-11-01:251</id>
    <published>2008-11-01T17:46:00Z</published>
    <updated>2008-11-01T17:46:14Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/11/1/easy-syntax-highlighting-helper" rel="alternate" type="text/html"/>
    <title>Easy Syntax Highlighting Helper</title>
<content type="html">
            &lt;pre&gt;&lt;code&gt;sudo gem install uv
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;a href=&quot;http://snippets.aktagon.com/snippets/61-Installing-Ultraviolet-and-Onigurama&quot;&gt;read this&lt;/a&gt; if you're having trouble)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def highlight(options = {:format =&amp;gt;&quot;ruby&quot;}, &amp;amp;block)
  Uv.parse( yield, &quot;xhtml&quot;, options[:format], false, &quot;twilight&quot;)
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Which gives you:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;% highlight do %&amp;gt;
    class Person &amp;lt; ActiveRecord::Base
    end
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here's the &lt;a href=&quot;http://www.stephenbartholomew.co.uk/assets/2008/11/1/syntax.css&quot;&gt;CSS for the 'twilight' theme&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Oh and I do realise the irony of posting code about syntax highlighting with no highlighting...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://ultraviolet.rubyforge.org/&quot;&gt;Ultraviolet gem&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-10-22:250</id>
    <published>2008-10-22T13:58:00Z</published>
    <updated>2008-10-22T14:00:28Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/10/22/merb-with-datamapper-couchdb" rel="alternate" type="text/html"/>
    <title>Merb with DataMapper &amp; CouchDB</title>
<content type="html">
            &lt;p&gt;Ever the one to follow the cool kids, I've been experimenting with these up &amp;amp; coming technologies.  &lt;/p&gt;

&lt;p&gt;You can follow my progress via github: &lt;a href=&quot;http://github.com/stevebartholomew/merb-dm-couchdb-sample/tree/master&quot;&gt;Merb, DataMapper &amp;amp; CouchDB&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-09-24:248</id>
    <published>2008-09-24T17:49:00Z</published>
    <updated>2008-09-24T17:49:59Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/9/24/finally-on-twitter" rel="alternate" type="text/html"/>
    <title>Finally on Twitter</title>
<content type="html">
            &lt;p&gt;Will I regret it?  Will I say anything interesting?  You can only find out by &lt;a href=&quot;http://twitter.com/sbartholomew&quot;&gt;following me&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-08-22:233</id>
    <published>2008-08-22T17:52:00Z</published>
    <updated>2008-08-23T07:43:38Z</updated>
    <category term="Code"/>
    <link href="http://www.stephenbartholomew.co.uk/2008/8/22/quick-easy-attribute-protecting-per-activerecord-instance" rel="alternate" type="text/html"/>
    <title>Quick &amp; Easy attribute protecting per ActiveRecord instance</title>
<content type="html">
            &lt;p&gt;Here's an idea:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Member &amp;lt; ActiveRecord::Base
    ProtectedAttributes = [:is_admin]

    def protect_attributes!
      @protect_attributes = true
    end

    def attributes=(attributes)
      if @protect_attributes
        attributes.symbolize_keys!
        attributes = attributes.delete_if {|key, value| ProtectedAttributes.include? key }
      end

      super
    end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;enabling:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; member = Member.new
&amp;gt;&amp;gt; member.protect_attributes!
&amp;gt;&amp;gt; member.update_attributes(:is_admin =&amp;gt; 1)
&amp;gt;&amp;gt; member.is_admin
=&amp;gt; 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Meaning you can use mass-assignment methods on the front end without worrying about users spoofing form posts.  &lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-08-22:232</id>
    <published>2008-08-22T15:53:00Z</published>
    <updated>2008-12-09T11:41:47Z</updated>
    <category term="Code"/>
    <link href="http://www.stephenbartholomew.co.uk/2008/8/22/simple-application-wide-configuration-in-rails" rel="alternate" type="text/html"/>
    <title>Simple application wide configuration in Rails</title>
<content type="html">
            &lt;p&gt;&lt;em&gt;lib/app_config.rb:&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class AppConfig  
  def self.load
    config_file = File.join(RAILS_ROOT, &quot;config&quot;, &quot;application.yml&quot;)

    if File.exists?(config_file)
      config = YAML.load(File.read(config_file))[RAILS_ENV]

      config.keys.each do |key|
        cattr_accessor key
        send(&quot;#{key}=&quot;, config[key])
      end
    end
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;config/initializers/app_config.rb:&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require 'app_config'

AppConfig.load
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;config/application.yml:&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;development:
    merchant_email: bob@thebuilder.com

test:
    merchant_email: test@thebuilder.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then from anywhere in your application:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;AppConfig.merchant_email  -&amp;gt;  bob@thebuilder.com
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-08-21:231</id>
    <published>2008-08-21T19:23:00Z</published>
    <updated>2008-08-21T19:23:49Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/8/21/using-git-with-multiple-staged-deployments-part-2" rel="alternate" type="text/html"/>
    <title>Using Git with multiple staged deployments - Part 2</title>
<content type="html">
            &lt;p&gt;I &lt;a href=&quot;http://www.stephenbartholomew.co.uk/2008/6/13/using-git-with-multiple-staged-deployments&quot;&gt;wrote about this&lt;/a&gt; a little while a go and said I'd report back my findings.&lt;/p&gt;

&lt;p&gt;It's been a few months now and generally I've been pleased with the method.  Here's what we're doing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We have a centralised repository containing development branches, plus a production branch&lt;/li&gt;
&lt;li&gt;We're using capistrano multi-stage deployments - production &amp;amp; staging have their own configurations, overriding the base details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;config/deploy/production.rb:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set :deploy_to, &quot;/curve21/www/application&quot;
set :branch, &quot;production&quot;
set :deploy_via, :remote_cache
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;config/deploy/staging.rb:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set :deploy_to, &quot;/curve21/www/application&quot;
set :branch, &quot;staged-feature&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Pushing out changes to production&lt;/h2&gt;

&lt;p&gt;With this setup, pushing changes live is simply a matter of merging a development branch into production and running:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cap production deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If there is a small bug to fix, we fix it in the production branch and deploy straight away.  Those changes can be merged into development branches if needed.&lt;/p&gt;

&lt;h2&gt;Staging&lt;/h2&gt;

&lt;p&gt;Initially, we tried having a 'staging' branch, but that got very messy.  Sometimes, we have more than one project or feature on the go at the same time for the same site.  What we really needed was to be able to point the staging server to which ever branch we wanted.  To achieve this, we ditched the staging branch and just set it to what ever we want at the time. &lt;/p&gt;

&lt;h2&gt;In conclusion...&lt;/h2&gt;

&lt;p&gt;I've been really pleased with this setup so far. Overall it's given us the flexibility to work on features, push them out for showing the client while still being able to easily bug fix and maintain the live site.&lt;/p&gt;

&lt;h2&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://programblings.com/2008/06/23/git-remote-branches/&quot;&gt;grb&lt;/a&gt; - manage remote git branches&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/Caged/gitnub/wikis&quot;&gt;GitNub&lt;/a&gt; - OSX GUI for your Git repo&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-08-21:230</id>
    <published>2008-08-21T17:41:00Z</published>
    <updated>2008-08-21T17:41:54Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/8/21/enumerable-any" rel="alternate" type="text/html"/>
    <title>Enumerable.any?</title>
<content type="html">
            &lt;pre&gt;&lt;code&gt;def requires_signup?
  requires_signup = false

  ancestors.each do |parent|
    requires_signup = true if parent.signup_required?
    break
  end

  requires_signup
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def requires_signup?
  ancestors.any? {|parent| parent.signup_required? }
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Lovely.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-06-13:225</id>
    <published>2008-06-13T15:23:00Z</published>
    <updated>2008-06-13T15:23:35Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/6/13/using-git-with-multiple-staged-deployments" rel="alternate" type="text/html"/>
    <title>Using Git with multiple staged deployments</title>
<content type="html">
            &lt;p&gt;Like most developers, at &lt;a href=&quot;http://www.curve21.com&quot;&gt;Curve21&lt;/a&gt; generally have our applications set up with 2 remote environments - staging &amp;amp; production.  New developments are deployed to the staging server for final checking &amp;amp; sign-off before being pushed out to the wilderness.&lt;/p&gt;

&lt;p&gt;We've also (as many have) recently moved to using Git for a source control.  A lot has been written about Git in the past few months and suffice to say we've found it fantastic.  One thing I've not seen a lot about though is how to deal with different deployments targets.&lt;/p&gt;

&lt;p&gt;Here's an idea we've had which we're trying out on a project.  I'm interested to get feedback and to hear about any other ways people are working with Git.&lt;/p&gt;

&lt;h2&gt;The Idea&lt;/h2&gt;

&lt;p&gt;Basically, we need to be able to do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Work on a new feature &lt;/li&gt;
&lt;li&gt;Push the new feature out to staging&lt;/li&gt;
&lt;li&gt;Switch back to the production code for bug fixing&lt;/li&gt;
&lt;li&gt;Push the staging features to production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, here's the setup we're testing out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remote repository has 3 branches - master, staging &amp;amp; production&lt;/li&gt;
&lt;li&gt;Local repositories can push/pull to these branches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 'new feature' workflow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a branch for a new feature&lt;/li&gt;
&lt;li&gt;Merge new feature into master&lt;/li&gt;
&lt;li&gt;Rebase master into staging&lt;/li&gt;
&lt;li&gt;Deploy to staging server&lt;/li&gt;
&lt;li&gt;When ready, merge staging into production&lt;/li&gt;
&lt;li&gt;Deploy to production server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this setup, you have ultimate flexibility over what goes where.  The master branch tracks the main development which is shared to all developers.  When a new feature needs to be tested it can be easily pushed to the staging server.&lt;/p&gt;

&lt;p&gt;If there are bugs to be fixed in production, these can be fixed in the production branch and deployed without picking up or affecting the items in development or out on staging.  Capistrano can pick up any branch you ask it to for a specified environment.&lt;/p&gt;

&lt;p&gt;Once we've tried this out and fine-tuned it, I'll post the results.  If it works and others are interested, I'll sort out a tutorial for our we're doing it.&lt;/p&gt;

&lt;p&gt;So - feedback &amp;amp; questions welcome!  &lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-05-16:222</id>
    <published>2008-05-16T16:37:00Z</published>
    <updated>2008-05-16T16:39:36Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/5/16/protx-an-update" rel="alternate" type="text/html"/>
    <title>Protx: An update</title>
<content type="html">
            &lt;p&gt;Last year I wrote a rather &lt;a href=&quot;http://www.stephenbartholomew.co.uk/2007/7/27/protx-making-customers-feel-like-shit&quot;&gt;angry post&lt;/a&gt; about the quality of service provided by &lt;a href=&quot;http://www.protx.com/&quot;&gt;Protx&lt;/a&gt; during a system upgrade.&lt;/p&gt;

&lt;p&gt;This caused a bit of a stir, possibly due to the high Google ranking and certainly the derogatory tone of the post.&lt;/p&gt;

&lt;p&gt;I've since been contacted by Simon Black who took over as Managing Director of Protx last year.  He has been pushing through a number of changes that he hopes will improve the customer support experience.  &lt;/p&gt;

&lt;p&gt;One of the more apparent surface changes is an update of the &lt;a href=&quot;http://techsupport.protx.com/contactus.asp&quot;&gt;Protx support pages&lt;/a&gt;.  The change in tone from the &lt;a href=&quot;http://www.stephenbartholomew.co.uk/2007/7/27/protx-making-customers-feel-like-shit&quot;&gt;original&lt;/a&gt; pages is very positive:
&lt;hr /&gt;
&lt;i&gt;&quot;At Protx we are passionate about providing high quality support and service to our customers. Our technicians are trained to ensure that they provide you with a professional service and the correct technical response to your question. &lt;/p&gt;

&lt;p&gt;We are happy to speak to you over the phone, communicate via email, or if you prefer you can resolve the query yourself using our in-depth website. You choose the method that’s best for you. &lt;/p&gt;

&lt;p&gt;We aim to pick up calls within 60 seconds and respond to emails within 24 hours.&quot;&lt;/i&gt;
&lt;hr /&gt;
Simon also sent the following update on the progress they've been making to improve the service:
&lt;hr /&gt;
&lt;i&gt;&quot;Since last August Protx has transformed it's support operation by more than doubling the size of the team and investing in training and development. During 2008 there will be continual improvements to the way we provide customer service which will include overhauling the entire Support web pages.&lt;/p&gt;

&lt;p&gt;Our aim is provide an excellent customer experience and we are proud to receive feedback showing that this is now happening more and more. The software platform we launched last Summer has resulted in a significant decrease in the number of Support issues raised on average. It has also allowed us to launch new features, for example, a much more efficient method for taking regular payments.&lt;/p&gt;

&lt;p&gt;In the coming months and years we will invest significantly to ensure we provide a great service, remain the easiest payment gateway to integrate with and provide more and more added value to our customers' businesses.&lt;/p&gt;

&lt;p&gt;Any customers or developers that are unhappy with the service they have received from Protx can send an email to feedback@protx.com and they will receive a prompt response from one of our senior managers.&quot;&lt;/i&gt;
&lt;hr /&gt;
I'm not sure I'd use Protx again, but I think it's great to see positive action being taken on something as important as customer service.  &lt;/p&gt;

&lt;p&gt;Customer service is a product itself in any successful company.  It should be treated with the same care and attention as you give other products you sell.  &lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-05-14:219</id>
    <published>2008-05-14T20:59:00Z</published>
    <updated>2008-05-15T10:04:24Z</updated>
    <category term="Code"/>
    <link href="http://www.stephenbartholomew.co.uk/2008/5/14/staticmatic-2-is-coming" rel="alternate" type="text/html"/>
    <title>StaticMatic 2 is coming</title>
<content type="html">
            &lt;p&gt;StaticMatic is currently going through a major over-haul.  There are loads of great features in the works as well as changes to the way to core works.  &lt;/p&gt;

&lt;p&gt;The major change is that StaticMatic 2 will now use ActionPack.  This means we get loads of great new features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Any templating language you like&lt;/li&gt;
&lt;li&gt;Access to all ActionView helpers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On top of this we also now have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rake tasks for commands&lt;/li&gt;
&lt;li&gt;Better error handling&lt;/li&gt;
&lt;li&gt;'Modified Date' sensitive building of static files - StaticMatic now only builds files you've modified&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're also now hanging out with cool kids on github: &lt;a href=&quot;http://github.com/stevebartholomew/staticmatic/tree/master&quot;&gt;http://github.com/stevebartholomew/staticmatic/tree/master&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Call to Arms&lt;/h2&gt;

&lt;p&gt;Now, we need your help.  StaticMatic 2 is not yet feature complete.  There is still a lot of work to do with getting all the current features in as well as working up the new stuff.&lt;/p&gt;

&lt;p&gt;What we need is for you to try out the new features on your existing StaticMatic sites.  The great thing is, you can run the new version without conflicting with the current one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Download the edge version into your site's root directory:&lt;/p&gt;

&lt;p&gt;~/Sites/mygreatsite $ git clone git://github.com/stevebartholomew/staticmatic.git&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Rakefile in your site's root containing this:&lt;/p&gt;

&lt;p&gt;require 'rake'
require 'staticmatic/lib/tasks/staticmatic'&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it.  You can use the new StaticMatic commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rake preview
rake build
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or you can use your Gem version:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;staticmatic preview .
staticmatic build .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The main thing that needs testing is integration into ActionView - try out the helpers, see what happens.  There's a fair few hoops to jump through to make ActionView happy being separated from ActionController so it can play up!&lt;/p&gt;

&lt;h2&gt;New to StaticMatic?&lt;/h2&gt;

&lt;p&gt;If you're new to StaticMatic, you can try out the new version by installing the current one and creating a new site:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo gem install staticmatic
staticmatic setup mygreatsite
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and following the instructions above.&lt;/p&gt;

&lt;h2&gt;Be Gentle!&lt;/h2&gt;

&lt;p&gt;There's a fair way to go before we're ready for a release, but hopefully you can still have fun trying out the new features.  Join us over at the &lt;a href=&quot;http://groups.google.co.uk/group/staticmatic&quot;&gt;Google Group&lt;/a&gt; for more discussion.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-04-29:209</id>
    <published>2008-04-29T18:43:00Z</published>
    <updated>2008-04-29T18:43:45Z</updated>
    <link href="http://www.stephenbartholomew.co.uk/2008/4/29/passenger-mod_rails" rel="alternate" type="text/html"/>
    <title>Passenger (mod_rails)</title>
<content type="html">
            &lt;p&gt;We've been developing client applications with Rails for a few years now.  We're not really a hosting company, but our love of Rails meant that it was easier to host client apps ourselves than faff around trying to get them running on their own ISP's servers.  Hosting in house took that pain away.&lt;/p&gt;

&lt;p&gt;It's worked well, but now we're running quite a few, it's getting pretty cumbersome to manage.  We still manually set up mongrels for each one, define the proxy requests in apache, restart - rinse and repeat.  &lt;/p&gt;

&lt;p&gt;This is one of the reasons that I got so excited about &lt;a href=&quot;http://www.modrails.com/&quot;&gt;Passenger (mod_rails)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Passenger has been getting a fair bit of press in it's short life out in the public so far and it's easy to see why.  While it's not the answer to all the scaling issues that come with a web app, it's a fantastic way to simplify the deployment and hosting process, especially for shared hosts.&lt;/p&gt;

&lt;p&gt;In the same way that we set up mongrels to fire up our rails apps and keep them running while apache sends requests between them, Passenger loads up the rails framework and our application code when a request is made.  &lt;/p&gt;

&lt;p&gt;The framework and application code are kept loaded and are shared by separate worker processes.  These worker processes are started up and shutdown based on the load on the app.&lt;/p&gt;

&lt;p&gt;The best thing about this is that it happens behind the scenes with very little configuration.  Restarting your application is a 'touch tmp/restart.txt' away and the rest is done for you.&lt;/p&gt;

&lt;p&gt;We've already started trial this with our internal applications and it'll be interesting to see how it pans out.  If this means that our lives are made easier and more hosting companies consider rails, this is looks to be a very important development.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.stephenbartholomew.co.uk/">
    <author>
      <name>stephen</name>
    </author>
    <id>tag:www.stephenbartholomew.co.uk,2008-04-13:204</id>
    <published>2008-04-13T09:54:00Z</published>
    <updated>2008-04-13T09:57:07Z</updated>
    <category term="Code"/>
    <link href="http://www.stephenbartholomew.co.uk/2008/4/13/remember-when-we-use-to-worry-about-servers-scaling" rel="alternate" type="text/html"/>
    <title>Remember when we use to worry about servers &amp; scaling?</title>
<content type="html">
            &lt;p&gt;I'm so ridiculously excited about &lt;a href=&quot;http://code.google.com/appengine/&quot;&gt;Google App Engine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the next year or so, I hope we see more and more hosting companies taking on this model.  &lt;/p&gt;

&lt;p&gt;Removing the need to worry about servers and scaling will be great for everyone.  If you're a hosting company, I strongly recommend you look into how you could do this.  Most developers would pay over the odds for the pain of servers &amp;amp; scaling to be taken away.&lt;/p&gt;
          </content>  </entry>
</feed>
