Embedding Dylan in Rails 3.x is easy:
- Create file called app/dylan/blog.rb
- Create a template app/views/blog/index.html.erb
- Mount Blog in the router.
function use_ruby_186 { | |
export MY_RUBY_HOME=/System/Library/Frameworks/Ruby.framework/Versions/Current/usr | |
export GEM_HOME=~/.gem/ruby/1.8 | |
update_path | |
} | |
function use_ruby_187 { | |
export MY_RUBY_HOME=/opt/local | |
export GEM_HOME=~/.gem/ruby/1.8 |
sudo gem update rails | |
sudo gem update passenger | |
sudo passenger-install-apache2-module |
# It seems you need the latest version of rubygems | |
sudo gem update --system | |
# and some RPM's | |
sudo yum install libxml libxml-devel libxslt libxslt-devel | |
# now the gem should install ok | |
sudo gem install nokogiri |
# sudo gem source -a http://gems.github.com | |
# sudo gem install thoughtbot-paperclip giraffesoft-resource_controller restfulx | |
def mate(path='') | |
run "mate #{path}" | |
end | |
def step(name='') | |
$step_count ||= 0 | |
$step_count += 1 |
sudo gem sources -a http://gems.github.com | |
sudo gem install mrhenry-failtale-reporter |
FailtaleReporter.configure do |config| | |
config.base_uri 'failtale.be' | |
config.api_token '[[your projects api token here]]' | |
end |
require 'rubygems' | |
module Rack #:nodoc: | |
class GemAssets | |
F = ::File | |
# :assets_dir:: the sub directory where we will look for assets. (default: <tt>public</tt>) | |
# :xsendfile:: use XSendfile to send files.(default: <tt>true</tt>) | |
def initialize(app, options={}) |
<?xml version="1.0" encoding="UTF-8" ?> | |
<Module> | |
<ModulePrefs title="Gisty" height="120"> | |
<Require feature="wave" /> | |
</ModulePrefs> | |
<Content type="html"> | |
<![CDATA[ | |
<div id="form_div"><input type="text" value="" id="gist_id" /> <input type=button value="Click Me!" id="butCount" onClick="buttonClicked()" /></div> | |
<div id="content_div"><script src="GIST_URI"></script></div> | |
<script type="text/javascript"> |
(function($){ | |
$.fn.viewportState = (function(){ | |
var results = []; | |
this.each(function(){ | |
var bounds = this.getBoundingClientRect(); | |
if (window.viewport.height() < bounds.top) { | |
results.push(['below', $(this)]); | |
} else if (bounds.bottom <= 0) { | |
results.push(['above', $(this)]); | |
} else { |