Skip to content

Commit

Permalink
Merge pull request #1673 from 18F/stages/rc-2017-09-18
Browse files Browse the repository at this point in the history
Promote RC 39 to staging
  • Loading branch information
zachmargolis authored Sep 14, 2017
2 parents ddb1a97 + f7d7319 commit 6c16b51
Show file tree
Hide file tree
Showing 175 changed files with 2,862 additions and 4,028 deletions.
91 changes: 91 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
build:
docker:
# Specify the Ruby version you desire here
- image: circleci/ruby:2.3.3-node-browsers
environment:
RAILS_ENV: test
CC_TEST_REPORTER_ID: faecd27e9aed532634b3f4d3e251542d7de9457cfca96a94208a63270ef9b42e
COVERAGE: true

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:9.4.12-alpine
environment:
POSTGRES_USER: circleci

- image: redis:4.0.1

working_directory: ~/identity-idp

steps:
- checkout

- restore-cache:
key: identity-idp-{{ checksum "Gemfile.lock" }}

- run:
name: Install dependencies
command: |
gem install bundler
bundle install --deployment --jobs=4 --retry=3 --without deploy development doc production --path vendor/bundle
- run:
name: Install phantomjs
command: |
sudo curl --output /tmp/phantomjs https://s3.amazonaws.com/circle-downloads/phantomjs-2.1.1
sudo chmod ugo+x /tmp/phantomjs
sudo ln -sf /tmp/phantomjs /usr/local/bin/phantomjs
- run:
name: Install Code Climate Test Reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
# Store bundle cache
- save-cache:
key: identity-idp-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

- run:
name: Test Setup
command: |
npm install
npm run build
cp config/application.yml.example config/application.yml
cp certs/saml.crt.example certs/saml.crt
cp keys/saml.key.enc.example keys/saml.key.enc
cp keys/equifax_rsa.example keys/equifax_rsa
gpg --dearmor < keys/equifax_gpg.pub.example > keys/equifax_gpg.pub.bin
gpg --import keys/equifax_gpg.example
bundle exec rake db:setup --trace
bundle exec rake assets:precompile
- run:
name: Run Tests
command: |
mkdir /tmp/test-results
./cc-test-reporter before-build
bundle exec rspec --format progress
bundle exec teaspoon
bundle exec slim-lint app/views
- run:
name: Upload Test Results to Code Climate
command: |
./cc-test-reporter format-coverage -t simplecov $CIRCLE_ARTIFACTS/coverage/.resultset.json
./cc-test-reporter upload-coverage
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,11 @@ Vagrantfile
/kitchen/cookbooks
/log/*
/private_certs/*
/public/*.ico
/public/*.png
/public/*.svg
/public/browserconfig.xml
/public/manifest.json
/public/system
/public/user_flows
/spec/tmp
/test
/tmp/*
/vendor/assets/fonts
/vendor/bundle
/node_modules

Expand Down
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ gem 'phonelib'
gem 'phony_rails'
gem 'premailer-rails'
gem 'proofer', github: '18F/identity-proofer-gem', branch: 'master'
gem 'rack-attack'
gem 'rack-cors', require: 'rack/cors'
gem 'readthis'
gem 'redis-session-store', github: '18F/redis-session-store', branch: 'master'
Expand Down
5 changes: 2 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: [email protected]:18F/identity-equifax-api-client-gem.git
revision: 889aad815bda2ff2a41cd2b108e2afae7f50d8b8
revision: 8021646f4a67216b0a1bdb99e501ad652104f889
branch: master
specs:
equifax (1.0.0)
Expand Down Expand Up @@ -712,7 +712,6 @@ DEPENDENCIES
premailer-rails
proofer!
pry-byebug
rack-attack
rack-cors
rack-mini-profiler
rack-test
Expand Down Expand Up @@ -759,4 +758,4 @@ RUBY VERSION
ruby 2.3.3p222

BUNDLED WITH
1.15.3
1.15.4
1 change: 1 addition & 0 deletions app/assets/images/no-verify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 28 additions & 12 deletions app/assets/javascripts/app/form-validation.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
import 'classlist.js';

const I18n = window.LoginGov.I18n;

document.addEventListener('DOMContentLoaded', () => {
const form = document.querySelector('form');
if (form) {
const fields = ['dob', 'personal-key', 'ssn', 'zipcode'];
const forms = document.querySelectorAll('form');

function addListenerMulti(el, events, fn) {
events.split(' ').forEach(e => el.addEventListener(e, fn, false));
}

if (forms.length !== 0) {
[].forEach.call(forms, function(form) {
const inputs = form.querySelectorAll('.field');

if (inputs.length !== 0) {
[].forEach.call(inputs, function(input) {
const types = ['dob', 'personal-key', 'ssn', 'zipcode'];

addListenerMulti(input, 'input invalid', (e) => {
e.target.setCustomValidity('');

fields.forEach(function(f) {
const input = document.querySelector(`.${f}`);
if (input) {
input.addEventListener('input', () => {
if (input.validity.patternMismatch) {
input.setCustomValidity(I18n.t(`idv.errors.pattern_mismatch.${I18n.key(f)}`));
} else {
input.setCustomValidity('');
}
if (e.target.validity.valueMissing) {
e.target.setCustomValidity(I18n.t('simple_form.required.text'));
} else if (e.target.validity.patternMismatch) {
types.forEach(function(type) {
if (e.target.classList.contains(type)) {
e.target.setCustomValidity(I18n.t(`idv.errors.pattern_mismatch.${I18n.key(type)}`));
}
});
}
});
});
}
});
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/misc/i18n-strings.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ window.LoginGov = window.LoginGov || {};
'instructions.password.strength.iv',
'instructions.password.strength.v',
'links.remove',
'simple_form.required.text',
'valid_email.validations.email.invalid',
'zxcvbn.feedback.a_word_by_itself_is_easy_to_guess',
'zxcvbn.feedback.add_another_word_or_two_uncommon_words_are_better',
Expand Down
8 changes: 8 additions & 0 deletions app/assets/stylesheets/_vendor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import 'normalize.css/normalize';
@import 'hint.css/hint';

@import 'basscss-sass/basscss';
@import 'basscss/margin';
@import 'basscss/padding';
@import 'basscss/responsive-margin';
@import 'basscss/responsive-padding';
7 changes: 4 additions & 3 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'fonts';

@import 'identity-style-guide/src/css/app';

@import 'variables/colors';
@import 'variables/app';
@import 'vendor';
@import 'components/all';
@import 'print';
3 changes: 3 additions & 0 deletions app/assets/stylesheets/components/_abbr.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// normalize.css adds a text underline by default
// scss-lint:disable QualifyingElement
abbr[title] { text-decoration: none; }
87 changes: 87 additions & 0 deletions app/assets/stylesheets/components/_accordion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.no-js {
.accordion {
.accordion-header {
cursor: initial;
}

.accordion-footer {
display: none;
}

.accordion-content {
display: block;
}

[class*="btn-"] {
display: none;
}
}
}

.accordion {
border: $border-width solid $border-color;
border-radius: $border-radius-md;

.accordion-header {
color: $blue;
cursor: pointer;
position: relative;

img {
position: absolute;
right: 1rem;
top: .8rem;
}
}

.accordion-content {
border-top: $border-width solid $border-color;
display: none;
opacity: 1;

&.shown {
display: block;
}
}

.accordion-footer {
background-color: $blue-lightest;
border-top: $border-width solid $border-color;
color: $blue;
cursor: pointer;
text-align: center;

img {
margin-top: -2px;
vertical-align: middle;
}
}
}

.animate-in {
animation: accordionIn .2s normal ease-in both 1;
}

.animate-out {
animation: accordionOut .15s normal ease-out both 1;
}

@keyframes accordionIn {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

@keyframes accordionOut {
0% {
opacity: 1;
}

100% {
opacity: 0;
}
}
Loading

0 comments on commit 6c16b51

Please sign in to comment.