This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.generators do |g| | |
| g.test_framework :rspec, fixture: true | |
| g.fixture_replacement :factory_girl, dir: 'spec/factories' | |
| g.view_specs false | |
| g.helper_specs false | |
| g.stylesheets = false | |
| g.javascripts = false | |
| g.helper = false | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use Unicorn as the app server | |
| # gem 'unicorn' | |
| # Use Capistrano for deployment | |
| # gem 'capistrano-rails', group: :development |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAgAElEQVR4Xky9a9DuaVbWd/2Pz+E97vPu3t09PYeeA8OMIIIjMXE0qBWrEmOSSmE8QEXj2ZRSIqnKB/PRT6aST5qyKhXLikQQGBCIiqCgQEAQgekZmO6Z7p7u3Xvvd7/7PT6H/zn1u9b97Jmu6Zru3e/7PP//fa97rWtd61rrzr5/00/FMKksC9WjNEyTsmHUeuq1l9caykz5OGnKM2VZpmwaNY6T+nFUnueassz/Td2oIs/VZ5OqItegSVKmfhqUZ5nGcVQ5ZRomvmOU8lxFlklFJn40lzT0k/+5zUZ1Xa+iLLVfFWqmTMU4aTvIz9Blk9SP/mf/Ov86DKpnlZ9tGCYNozTyH4pCfT+p4Af7Qc3Qazav1PC8WcEj+ud5lm6YlBWZ2rZTNuXKy8yfrSkXj5rlmcaB75s08b38/ChlRa4snzRN8bvlvFS3HTTlhUZJIy/FGgyD8rzUOIxe0zHn8QqN/SReve86r6n/jDVP38N7Dr3U9b2qqtZm6FUq93qOfv9MwzBqU06aZbn/OePdJOXT5M/K2aNRasdJZZ5rHPjOUZpGdYNUz0o1Ta9qKtVNo2q/cKZNNmqb516bkpcZpLEfvNcsQte2mpWVsqpQ344qM6nNJ2Vtr6KuvJ99H2s2Frn/P2dvMqnEpn50NU5DMSnvRtVFoUmZhmzQfMw1ZJP6MlMxhREOGTbF4kmN2LTCBsAC95qUt9I4K1Sy6NgYL1fmKoZRnfcg80K0bESGycWD8JAYgPe6n7wAzTSoKkvVY6ahSEa2DaNXxYaMGvMsjHsYVZQ5a4ldq+tGbxgv2IwcDGyPQ1QoL/hnnrbQNMSB82KyKLxe6TVW3/bKJwxB/h0/K0ZR5N6IsZTGdopDOY4a+CEMi3fg+dhoxfP1g7S1IYyqqtyfM7aDpqpQp1gfDJ6FGHko1jvPNLBoGP04aj4vtVlPNnSWjnccR3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # set Ctrl-a as the default prefix key combination | |
| # and unbind C-b to free it up | |
| set -g prefix C-k | |
| unbind C-b | |
| #set-window-option -g mode-mouse on | |
| # set window and pane index to 1 (0 by default) | |
| set-option -g base-index 1 | |
| setw -g pane-base-index 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Comment < ActiveRecord::Base | |
| belongs_to :commentable, polymorphic: true | |
| has_many :comments, as: :commentable | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PasswordsController < Devise::PasswordsController | |
| # here we need to skip the automatic authentication based on current session for the following two actions | |
| # edit: shows the reset password form. need to skip, otherwise it will go directly to root | |
| # update: updates the password, need to skip otherwise it won't even reset if already logged in | |
| skip_before_filter :require_no_authentication, :only => [:edit, :update] | |
| # we need to override the update, too. | |
| # After a password is reset, all outstanding sessions are gone. | |
| # When already logged in, sign_in is a no op, so the session will expire, too. | |
| # The solution is to logout and then re-login which will make the session right. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Palestras TDC 2014 - Florianópolis | |
| Watir | |
| Lucas Prim | |
| http://www.slideshare.net/lucasprim/apresentacao-watir | |
| RSpec Best Friends | |
| Mauro George | |
| http://pt.slideshare.net/maurogeorge/rspec-best-friends-34875731 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| [ | |
| // | |
| // TABS (REGULAR) | |
| // | |
| // Tab set | |
| { | |
| "class": "tabset_control", | |
| "layer0.texture": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The default Postgresql installation on Mac OS X using homebrew includes a single extension - plpgsql (PL/pgSQL procedural language) but there are a number of them available in the lib directory (/usr/local/Cellar/postgresql/9.2.1/lib on my machine) | |
| To install an extension into the database, the easiest way I found was to open a database console using the 'rails db' command and then create it directly. I have seen mention of doing this in a Rails migration but this did not work for me. | |
| Note that an extension is installed in a specific database, rather than being added to all databases. | |
| The command to list the installed extensions is '\dx' | |
| $ rails db | |
| psql (9.2.1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| gem 'rails', '4.2.3' | |
| gem 'active_model_serializers' # Serialize json response | |
| gem 'delayed_job_active_record' # Asynchronous priority queue system | |
| gem 'figaro' # For setting environment variables | |
| gem 'kaminari' # for pagination | |
| gem 'newrelic_rpm' # Monitor | |
| gem 'pg' # Posgrees Database |