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 IncomingTextsController < ApplicationController | |
| skip_before_filter :authenticate_user! | |
| skip_before_filter :verify_authenticity_token | |
| def parse | |
| # parse incoming params from Twilio and conditionally text response to patient | |
| end | |
| 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
| if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then | |
| echo "branch will be deployed!" | |
| echo -e "Host beta.aptible.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | |
| chmod 600 .travis/travis_key.pem | |
| ssh-add .travis/travis_key.pem | |
| git remote add staging [email protected]:healthify-staging-aptible.git | |
| git fetch --unshallow |
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
| headers_read = false | |
| CSV.foreach(headers: true) do |row| | |
| validate_header_row(headers) unless headers_read | |
| headers_read = true | |
| # everything else | |
| 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 NewSurveyCreation | |
| attr_reader :patient | |
| def initialize(subdomain, params) | |
| # store the data in instance variables | |
| ] end | |
| def create! | |
| set_patient_age! | |
| set_bmi! |
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
| describe '#users_dropdown' do | |
| subject { helper.users_dropdown(user) } | |
| let(:team) { create(:team) } | |
| let(:user) { create(:user, first_name: 'Current', last_name: 'User', userable: team) } | |
| let(:same_team_user1) { create(:user, first_name: 'John', last_name: 'Friend', userable: team) } | |
| let(:same_company_user2) { create(:user, first_name: 'Jack', last_name: 'Goodfriend') } | |
| let(:other_company_user) { create(:user, first_name: 'Jane', last_name: 'Enemy') } | |
| let(:deactivated_user) do |
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
| #!/bin/bash | |
| vim_plugin_dirs=$(find vim/bundle -type d -maxdepth 1 -mindepth 1 | grep -v Vundle) | |
| for dir in "${vim_plugin_dirs[@]}"; do | |
| git rm --dry-run $dir | |
| done |
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
| " Motivated by https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message | |
| syntax on " Turn on color syntax and allow custom Git commit message messages | |
| autocmd Filetype gitcommit setlocal spell textwidth=72 " Spell check git commit messages and wrap text at column 72 |
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
| [29] pry(main)> Clinic.where("subdomain LIKE ?", "%\_%") | |
| => [#<Clinic:0x007f8212b97b98 | |
| id: 1, | |
| name: "Factory Clinic 1", | |
| subdomain: "factory-clinic-1", | |
| privacy_policy: nil, | |
| optional_data_sharing: false, | |
| automated_texting: false, | |
| company_id: 2>, | |
| #<Clinic:0x007f8212b97a08 |
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
| # USAGE: run from directory that contains Git directories to iterate over | |
| summary() { | |
| for directory in $( ls -d */ ); do | |
| cd $directory | |
| if [ -d ".git" ]; then | |
| git pull > /dev/null 2>&1 | |
| echo $directory,`commit_count` | |
| fi | |
| cd .. |