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
@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