Skip to content

Instantly share code, notes, and snippets.

View annaswims's full-sized avatar

Anna Carey annaswims

View GitHub Profile

Request Spec

# vets-api/spec/request/email_request_spec.rb

describe 'GET /v0/profile/email' do
  it 'should match the email schema' do
    VCR.use_cassette('evss/pciu/email') do
      get '/v0/profile/email', nil, auth_header
# vets-api/lib/evss/pciu/service.rb
require 'common/client/base'
module EVSS
module PCIU
class Service < EVSS::Service
include Common::Client::Monitoring
configuration EVSS::PCIU::Configuration
# vets-api/app/controllers/v0/profile/emails_controller.rb
module V0
module Profile
class EmailsController < ApplicationController
before_action { authorize :evss, :access? }
# Fetches the email address, and its effective datetime, for the current user
#
# @return [Response] Sample response.body:
# vets-api/app/swagger/requests/profile.rb
module Swagger
module Requests
class Profile
include Swagger::Blocks
swagger_path '/v0/profile/email' do
operation :get do
extend Swagger::Responses::AuthenticationError
# vets-api/config/betamocks/services_config.yml
# EVSS
- :name: 'EVSS'
:base_uri: <%= "#{URI(Settings.evss.url).host}:#{URI(Settings.evss.url).port}" %>
:endpoints:
# PCIU email
- :method: :get
:path: "/wss-pciu-services-web/rest/pciuServices/v1/emailAddress"
:file_path: "evss/pciu/email"
# vets-api-mockdata/evss/pciu/email/796376250.yml
---
:method: :get
:body:
cnp_email_address:
effective_date: '2012-04-03T04:00:00.000+0000'
value: test2@test1.net
control_information:
can_update: true

Keybase proof

I hereby claim:

  • I am annaswims on github.
  • I am annacarey (https://keybase.io/annacarey) on keybase.
  • I have a public key ASCfZQoexylgcuyOGkMJQftYcxv-6peFNQEFbquCqcqyaQo

To claim this, I am signing this object:

@annaswims
annaswims / pf.md
Last active August 29, 2015 14:11 — forked from ryanzhou/pf.md

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

1) Error:
BasicsTest#test_unicode_column_name:
Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
/Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:359:in `do_exec_query'
/Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:33:in `exec_query'
/Users/acarey/code/nextgear/sqlserver/annaswims/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:39:in `exec_insert'
/Users/acarey/.rvm/gems/ruby-2.0.0-p353/bundler/gems/rails-aee1be6fe346/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `insert'
/Users/acarey/.rvm/gems/ruby-2.0.0-p353/bundler/gems/rails-aee1be6fe346/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
/Users/acarey/.rvm/gems