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
| Feature: Connecting users by extra information | |
| Scenario: Connect user by alternative phone number | |
| Given Current User has <num_devices> devices | |
| Given Current User has registered with only one device | |
| When Other User has a ContactBookItem for Current User | |
| When ContactBookItem has all Current User's devices | |
| Then ContactBookItem's 'contact_session_id' will equal Current Users's ID | |
| Examples: |
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 ContactDetail < ActiveRecord::Base | |
| belongs_to :session | |
| before_save :normalize_phone_number | |
| after_commit :check_for_connections | |
| def self.find_by_phone_number(phone_number) | |
| ContactDetail.find_by(key: 'phone_number', value: phone_number) | |
| end | |
| def self.find_phone_number_by_session(session) |
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 ContactImportJob < ActiveJob::Base | |
| queue_as :default | |
| include Concerns::Logging | |
| include Concerns::Errors | |
| # For each contact, import them and link them | |
| # up to the user. After, send a push notification | |
| # to notify the app that the contacts have synced | |
| # successfully. If there is an error, end | |
| # pre-emptively and send a standard push |
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
| export AWS_DEFAULT_REGION='eu-west-1' | |
| clockwork_exists="$(aws ec2 describe-tags --filter "Name=key,Values=Processes" | jq '.Tags[].Value' | grep clockwork)" | |
| if [ "$clockwork_exists" ] | |
| then | |
| echo "YEP" | |
| else | |
| echo "NOPE" | |
| fi |
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
| #!/usr/bin/env bash | |
| ssh-add ~/.ssh/findaplayer.pem | |
| remote_user="ec2-user" | |
| hop_user="ubuntu" | |
| hop_host="hop" | |
| if [ "$1" == "ssh" ]; then | |
| ssh -A -t -l $hop_user $hop_host \ | |
| ssh -A -t -l $remote_user $2 |
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
| #!/usr/bin/env bash | |
| ssh-add ~/.ssh/findaplayer.pem | |
| if [ "$1" == "ssh" ]; then | |
| ssh -A -t -l ubuntu hop \ | |
| ssh -A -t -l ubuntu $2 | |
| exit 0 | |
| fi | |
| if [ "$1" == "tunnel" ]; then |
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
| Host hop | |
| Hostname hop.findaplayer.com | |
| User ubuntu | |
| IdentityFile ~/.ssh/findaplayer.pem | |
| ForwardAgent yes |
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
| async_job: { | |
| message: message, | |
| job_name: job.name.underscore, | |
| status: status | |
| } |
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
| {:xmlel, "message", [{"to", "johnhamelink@chat.livecoding.tv"}, {"type", "groupchat"}, {"id", "3584"}, {"xml:lang", "en"}], [{:xmlel, "body", [], [xmlcdata: "Lorem Ipsum"]}] |
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
| { | |
| "accounts": [ | |
| { | |
| "name": "FarmGeek", | |
| "client_id": "112151301201929040317", | |
| "client_email": "account-1@gcontacts-to-phone-elixir.iam.gserviceaccount.com", | |
| "rsa_key_path": "config/service_account_secrets/google_service_account.key.pem", | |
| "account_emails: ["john@johnhamelink.com"] | |
| } | |
| ] |