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.
2.0.0@mygemset |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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.
I'm a fan of MiniTest::Spec. It strikes a nice balance between the simplicity of TestUnit and the readable syntax of RSpec. When I first switched from RSpec to MiniTest::Spec, one thing I was worried I would miss was the ability to add matchers. (A note in terminology: "matchers" in MiniTest::Spec refer to something completely different than "matchers" in RSpec. I won't get into it, but from now on, let's use the proper term: "expectations").
Let's take a look in the code (I'm specifically referring to the gem, not the standard library that's built into Ruby 1.9):
# minitest/spec.rb
module MiniTest::Expectations
namespace :db do | |
namespace :data do | |
desc "Dump data into sql script file: filename=[target filename]" | |
task :dump => 'environment' do | |
environment = (ENV.include?("RAILS_ENV")) ? (ENV["RAILS_ENV"]) : 'development' | |
ENV["RAILS_ENV"] = RAILS_ENV = environment | |
database = get_database(environment) | |
user = database | |
password = ENV['PASSWORD'] |
#!/bin/bash | |
echo "Installing Sublime text handler" | |
sudo cp sublime-handler /usr/local/bin | |
sudo cp sublime-handler.desktop /usr/share/applications/ | |
echo "Updating desktop database" | |
sudo update-desktop-database | |
cat <<THE_END | |
Not done yet! |
module ActsAsJSONStore | |
def self.included base | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
attr_reader :fields_acting_as_json_store | |
# Declare a list of attributes in a model to act as JSON store. | |
# @param [Symbol, ...] The list of attributes. |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput | |
StringInput | |
TextInput |
Senior (enterprise) | |
Analyse and profile an application for performance and memory issues | |
Analyses and profile an application for security issues | |
Understand database modeling and query analysis | |
Tune a production deployment (Passenger, Thin, Apache etc) | |
Understand and use Ruby metaprogramming | |
Mentoring skills | |
Communication skills | |
Planning and Estimation |