This file contains 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
require 'rails_helper' | |
RSpec.describe 'GET /api/v1/gorilla' do | |
let(:gorilla) {FactoryGirl.create(:gorilla)} | |
before { get '/api/v1/gorilla'} | |
subject { response } |
This file contains 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
FactoryGirl.define do | |
factory :gorilla do | |
first_name 'Björn' | |
middle_name { Faker::Name.name } | |
last_name { Faker::Name.last_name } | |
end | |
end |
This file contains 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 GorillaController < JungleController | |
def share_banana | |
respond_to do |format| | |
format.json { render :json => banana_json } | |
end | |
end | |
def get_banana | |
respond_to do |format| |
This file contains 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 JungleController < ActionController::Base | |
before_filter :is_there_a_hunter? | |
inherit_resources | |
protected | |
def is_there_a_hunter? | |
false | |
end | |
end |
This file contains 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
#!/bin/bash | |
# https://git-scm.com/book/en/v2/Git-Basics-Tagging | |
# $1 => version | |
# $2 => comment | |
# example: | |
# git tag -a version -m "my tagged version" | |
git tag -a $1 -m "$2" |
This file contains 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
#!/bin/bash | |
dig example.com +nostats +nocomments +nocmd |
OlderNewer