Topics
- MVC
- Routes
- Convention over Configuration
- How to create a Rails project
- Directory Structure
- Route helpers
- (*) sprockets (manifest files, minification, etc, Scss)
- (*) views (view helpers
| #!/usr/bin/env ruby | |
| require 'bitly' | |
| require 'clipboard' | |
| require 'uri' | |
| username = ENV['BITLY_USERNAME'] | |
| api_key = ENV['BITLY_API_KEY'] | |
| url = ARGV.shift |
| # We want to have something this: | |
| # app/models/user.rb | |
| class User < ActiveRecord::Base | |
| include Presenter::Mixin | |
| end | |
| # or for more customization | |
| class User < ActiveRecord::Base | |
| presented |
| module.exports = (grunt) -> | |
| # configuration | |
| grunt.initConfig | |
| # grunt sass | |
| sass: | |
| compile: | |
| options: | |
| style: 'expanded' |
| require 'cucumber/rake/task' | |
| NUM_RETRIES = ENV['NUM_RETRIES'] || 2 | |
| task :default => "cucumber:run" | |
| namespace :cucumber do | |
| directory "tmp" | |
| @rerun_file = 'tmp/rerun.txt' |
| upstream foobar { | |
| server unix:///var/www/foobar/shared/sockets/puma.sock; | |
| } | |
| server { | |
| server_name www.foobar.com; | |
| return 301 $scheme://foobar.com$request_uri; | |
| } | |
| server { |
| AllCops: | |
| Include: | |
| - '**/Rakefile' | |
| - '**/config.ru' | |
| Exclude: | |
| - 'db/**/*' | |
| - 'config/**/*' | |
| - 'script/**/*' | |
| - 'bin/**/*' | |
| - 'vendor/**/*' |
| language: ruby | |
| rvm: | |
| - 2.0.0 |
| var GameObject = function(name) { | |
| this.name = name || "gameObject"; | |
| this.components = []; | |
| } | |
| GameObject.prototype.update = function() { | |
| this.components.map(function(component) { | |
| if (!!component.update) { | |
| component.update(); | |
| } |
Topics
| require "contracts" | |
| C = Contracts | |
| module ModuleWithContracts | |
| def self.included(base) | |
| base.extend ClassMethods | |
| end | |
| module ClassMethods |