<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No One Is Perfect &#187; sass</title>
	<atom:link href="http://watchitlater.com/blog/tag/sass/feed/" rel="self" type="application/rss+xml" />
	<link>http://watchitlater.com/blog</link>
	<description>A reluctant foray into the world of blogging.</description>
	<lastBuildDate>Tue, 08 Nov 2011 12:32:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>RubyGems in a JAR</title>
		<link>http://watchitlater.com/blog/2011/08/rubygems-in-a-jar/</link>
		<comments>http://watchitlater.com/blog/2011/08/rubygems-in-a-jar/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 12:39:10 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[fpm]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[scp]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=291</guid>
		<description><![CDATA[On a few projects now I&#8217;ve used jruby with rake. I know that I can use rvm and just fetch the gems per project, but for developers stuck on windows that way is a little more than difficult. So here&#8217;s how I package up rubygems in a JAR. #!/bin/bash mkdir gemjar java -jar jruby-complete-1.6.3.jar -S [...]]]></description>
			<content:encoded><![CDATA[<p>On a few projects now I&#8217;ve used jruby with rake. I know that I can use rvm and just fetch the gems per project, but for developers stuck on windows that way is a little more than difficult. So here&#8217;s how I package up rubygems in a JAR.</p>
<pre name="code" class="ruby:nogutter">#!/bin/bash
mkdir gemjar
java -jar jruby-complete-1.6.3.jar -S gem install -i ./gemjar haml --version 3.1.2 --no-rdoc --no-ri
java -jar jruby-complete-1.6.3.jar -S gem install -i ./gemjar net-scp --version 1.0.4 --no-rdoc --no-ri
java -jar jruby-complete-1.6.3.jar -S gem install -i ./gemjar jruby-openssl --version 0.7.4 --no-rdoc --no-ri
java -jar jruby-complete-1.6.3.jar -S gem install -i ./gemjar fpm --version 0.3.7 --no-rdoc --no-ri
jar cf ruby-gems.jar -C gemjar .
rm -rf gemjar
</pre>
<p>You then invoke jruby rake via:</p>
<pre name="code" class="ruby:nogutter">#!/bin/bash
java -jar jruby-complete-1.6.3.jar -rruby-gems.jar -S rake build.rb $@
</pre>
<p>This means that you can then invoke the following useful little nuggets:</p>
<pre name="code" class="ruby:nogutter">task :list_gems do
  require "rubygems/gem_runner"
  Gem::GemRunner.new.run ["list"]
end

task :sass_watch do
  require 'haml'
  require 'haml/exec'
  opts = Haml::Exec::Sass.new ['--watch', 'src/main/sass:src/main/webapp/static/css']
  opts.parse!
end

task :ssh_copy, :file do |t, args|
  require "net/ssh"
  require "net/scp"
  Net::SSH.start("repository.remote", "user") do |ssh|
    ssh.scp.upload!(args.file, "/tmp/files/")
  end
end

task :make_rpm =&gt; :make_war do
  fail "Please install rpm-build to make RPMs!" unless system("rpmbuild --version")

  require "fpm"
  require "fpm/program"
  exit_code = FPM::Program.new.run([
    "-s", "dir", "-t", "rpm", "-n", APPLICATION_NAME, "-v", RPM_VERSION_NUMBER, "-a", "all",
    "--post-install", "target/rpmbuild/opt/application/bin/post_install.sh",
    "--pre-uninstall", "target/rpmbuild/opt/application/bin/pre_uninstall.sh",
    "-C", "target/rpmbuild", "opt"
  ])

  fail "Build failed" if exit_code != 0
end
</pre>
<p>How awesome is this?</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2011/08/rubygems-in-a-jar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post-Redirect-Get in Rails</title>
		<link>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/</link>
		<comments>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:06:28 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[My Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[post-redirect-get]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sass]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=182</guid>
		<description><![CDATA[For a while now I&#8217;ve been flying the flag for using a post-redirect-get design pattern when writing web applications. In my opinion the current crop of web frameworks still make it very easy to do the &#8220;bad&#8221; thing since to do PRG properly you need to think what kind of an interaction you want with [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been flying the flag for using a <a href="http://en.wikipedia.org/wiki/Post/Redirect/Get">post-redirect-get</a> design pattern when writing web applications. In my opinion the current crop of web frameworks still make it very easy to do the &#8220;bad&#8221; thing since to do PRG properly you need to think what kind of an interaction you want with users and not cop out saying its technically very difficult in &lt;insert framework here&gt;. If you resort to ActiveX controls, popups without navigation bars and/or weird javascript hacks to stop users from clicking refresh or back buttons then perhaps you should have written a better web application.</p>
<p>Whenever I play with Rails, or for that matter any other web framework, I get stuck on trying to find a problem to solve (or a set of requirements). Fortunately the <a href="http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition">Agile Development with Rails</a> book from the Pragmatic Programmers has a nice little bookstore application that I can develop iteratively. I&#8217;ve put my latest adaptation of their depot application to use post-redirect-get (even works with ActiveResource scaffolds), UUIDs as ActiveRecord primary keys, HAML, SASS and RSpec on <a href="http://github.com/tomcz/pragprog-depot-prg">GitHub</a>. Feedback is always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

