class App < Sinatra::Base
register 'sinatra/jstsupport'
serve_jst '/jst.js'
end
This serves all JST files found in /views/**/*.jst.* as /jst.js.
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
| class Object | |
| def metaclass | |
| class << self; self; end | |
| end | |
| def self.stub_method_chain chain, &blk | |
| chain = chain.split('.') if chain.is_a? String | |
| metaclass.instance_eval do | |
| define_method chain.first do |*values| | |
| Object.new.tap do |o| |
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
Note: This is still in the workings. If you have anything you want to see added into this document please leave some feedback in the comment section below; or mail me at kuroir at gmail dot com
| # get the name of the currently checked out tag | |
| git describe --tags --abbrev=0 | |
| # list all branches (local and remote) | |
| git branch -a | |
| # list all tags | |
| git tag | |
| # delete a tag |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |