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.
| (in /Users/Simon/Projects/json_select/t) | |
| FF | |
| Failures: | |
| 1) Parser should not swallow the first object after parsing a number(integer) | |
| Failure/Error: ] | |
| expected: ["foo", "bar", 42, "baz", "bax"] | |
| got: ["foo", "bar", 42, "bax"] (using ==) | |
| Diff: |
| class A | |
| def foo | |
| puts "bar #{self.class}" | |
| end | |
| end | |
| class B < A | |
| def foo | |
| puts "baz #{self.class}" | |
| end |
| /* | |
| * Curry a JS function. | |
| * | |
| * Note: | |
| * Curry doesn't change `this`. | |
| * | |
| * Example: | |
| * function f(a, b, c){ | |
| * return [a, b, c]; | |
| * }; |
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| <script src="http://simonmenke.me/chains.js/build/jquery.stacks.min.js" type="text/javascript" charset="utf-8"></script> | |
| <script type="text/javascript" charset="utf-8"> | |
| (function(exports){ | |
| exports.state_machine = function(def){ | |
| (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 { |
| <?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"> |
| 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={}) |
| FailtaleReporter.configure do |config| | |
| config.base_uri 'failtale.be' | |
| config.api_token '[[your projects api token here]]' | |
| end |
| sudo gem sources -a http://gems.github.com | |
| sudo gem install mrhenry-failtale-reporter |