YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| For environment specific vars: https://github.com/sstephenson/rbenv-vars | |
| For handling gemsets: https://github.com/jf/rbenv-gemset | |
| Easily build rubies: https://github.com/sstephenson/ruby-build | |
| RbEnv driven Bundler: https://github.com/carsomyr/rbenv-bundler | |
| Find info on gems: https://github.com/rkh/rbenv-whatis.git | |
| Alias `use` & mimic rvm: https://github.com/rkh/rbenv-use.git | |
| Automatically rehash RbEnv: https://github.com/sstephenson/rbenv-gem-rehash.git |
| $ bundle exec cap dev_sandbox deploy | |
| INFO [c3608890] Running /usr/bin/env mkdir -p /tmp/capstan/ on capstan-dev-sandbox.stonecroptech.com | |
| DEBUG [c3608890] Command: ( RAILS_ENV=dev_sandbox /usr/bin/env mkdir -p /tmp/capstan/ ) | |
| INFO [7aecad29] Running /usr/bin/env mkdir -p /tmp/capstan/ on capstan-dev-sandbox-dj.stonecroptech.com | |
| DEBUG [7aecad29] Command: ( RAILS_ENV=dev_sandbox /usr/bin/env mkdir -p /tmp/capstan/ ) | |
| cap aborted! | |
| Authentication failed for user capstan@capstan-dev-sandbox.stonecroptech.com | |
| /Users/rkellermeyer/.rvm/gems/ruby-1.9.3-p551@badger/gems/net-ssh-2.8.0/lib/net/ssh.rb:217:in `start' | |
| /Users/rkellermeyer/.rvm/gems/ruby-1.9.3-p551@badger/gems/sshkit-1.3.0/lib/sshkit/backends/connection_pool.rb:25:in `create_or_reuse_connection' | |
| /Users/rkellermeyer/.rvm/gems/ruby-1.9.3-p551@badger/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:173:in `ssh' |
| class User < ActiveRecord::Base | |
| attr_accessible :email, :password, :password_confirmation, :first_name, :last_name, :zipcode | |
| attr_accessor :password | |
| before_save :encrypt_password | |
| validates_confirmation_of :password | |
| validates_presence_of :password, :on => :create | |
| validates_presence_of :email | |
| validates_uniqueness_of :email |
| <!DOCTYPE HTML> | |
| <html lang="ru-RU"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <style> | |
| body, .nested { | |
| background: blue; | |
| } | |
| .container, .nested { |
| = semantic_form_for [:admin, @sale], html: { :class => "filter_form" } do |f| | |
| = select "sale_", "id", Sale.all.collect{ |s| [s.title + " " + s.start_date.to_s, s.id] }, {include_blank: true}, class: "sale_dropdown" | |
| = f.inputs "Sale Information" do | |
| = f.input :sales_merchandiser_id, :as => :hidden, :value => proc{current_user.id} | |
| = f.input :category_id, as: :hidden | |
| = f.input :title | |
| = f.input :featured_image, as: :file, label: "Sale Image" | |
| = content_tag :li, class: "field_toggle" do | |
| %span.show_overwrite_fields Overwrite Versions | |
| %span.hide_overwrite_fields Cancel Override |
| MyAppName::Application.routes.draw do | |
| # ... | |
| namespace :admin do | |
| resources :sales do | |
| resources :consignment_items do | |
| collection { post :search_items, to: 'sales#search_consignment_items' } | |
| end | |
| end | |
| end | |
| # ... |
| Routing Error | |
| No route matches {:action=>"new", :controller=>"messages"} | |
| Try running rake routes for more information on available routes. |
| # ... | |
| = semantic_form_for users_path, :method => 'get', :id => "users_search" do |f| | |
| = f.input :search, params[:search] | |
| = f.submit_tag | |
| #... |
| <?php | |
| require_once '../anet_php_sdk/AuthorizeNet.php'; // The SDK | |
| $url = "http://YOURSITE.tld/post_result.php"; | |
| $api_login_id = '######'; | |
| $transaction_key = '#############'; | |
| $md5_setting = '######'; // Your MD5 Setting | |
| $amount = "5.99"; | |
| AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting); | |
| define("AUTHORIZENET_API_LOGIN_ID", $api_login_id); |