- Install Hubot locally
- Install Slack Adapter
- Configure integration on Slack
- Go to
[your-slack].slack.com/services/new/hubot
- Go to
- Deploy to Heroku
If you want to rename the automatically generated heroku domain name:
# RSpec's subject method, both implicitly and explicitly set, is useful for | |
# declaratively setting up the context of the object under test. If you provide a | |
# class for your describe block, subject will implicitly be set to a new instance | |
# of this class (with no arguments passed to the constructor). If you want | |
# something more complex done, such as setting arguments, you can use the | |
# explicit subject setter, which takes a block. | |
describe Person do | |
context "born 19 years ago" do | |
subject { Person.new(:birthdate => 19.years.ago } | |
it { should be_eligible_to_vote } |
# iTerm2, OS X | |
# 1. change 'your_app_production' to your application name | |
# 1a. Tune the colors by your taste | |
# 2. put these functions to your .bashrc, .zshrc | |
# or anywhere where it gets loaded for your iTerm session | |
# 3. restart iTerm or 'source ~/.zshrc' and use these functions | |
set_color() { | |
local HEX_FG=$1 | |
local HEX_BG=$2 |
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
fr: | |
devise: | |
confirmations: | |
confirmed: 'Votre compte a été validé.' | |
send_instructions: 'Vous allez recevoir les instructions nécessaires à la confirmation de votre compte dans quelques minutes.' | |
send_paranoid_instructions: 'Si votre e-mail existe dans notre base de données, vous allez bientôt recevoir un e-mail contenant les instructions de confirmation de votre compte.' | |
failure: | |
already_authenticated: "Vous êtes déjà connecté" |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
require 'rake' | |
# http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html | |
require 'net/http' | |
desc "this is a test" | |
task :testing_rake do | |
puts "Hello from rake!" | |
end | |
namespace :remote_file do |
[your-slack].slack.com/services/new/hubot
If you want to rename the automatically generated heroku domain name:
Get the Heroku db as detailed here: http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup
heroku pg:backups capture
heroku pg:backups --app <you-app-name> #=> <backup_num>
heroku pg:backups public-url <backup_num> #=> <backup_url>
curl -o db/latest.dump <backup_url>
echo 'db/latest.dump' >> .gitignore # if not already done
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps