Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Andres Keskküla 2014-10-06 13:24:21 +03:00
commit d82479485c
2 changed files with 9 additions and 7 deletions

View file

@ -28,7 +28,8 @@ class Domain < ActiveRecord::Base
has_many :domain_transfers, dependent: :delete_all
has_many :dnskeys, dependent: :delete_all
accepts_nested_attributes_for :dnskeys, allow_destroy: true
accepts_nested_attributes_for :dnskeys, allow_destroy: true,
reject_if: proc { |attrs| attrs[:public_key].blank? }
delegate :code, to: :owner_contact, prefix: true
delegate :email, to: :owner_contact, prefix: true

View file

@ -1,13 +1,15 @@
#!/bin/bash -e
#!/bin/bash
#
# Build and run everything for automatic tests
#
set -o pipefail
# cd to current script directory
cd "$(dirname "$0")"
# cd to Rails root directory
cd "$(dirname "$0")"; cd ..
git pull origin master
git --git-dir=. --work-tree=$PWD/.. reset --hard
bundle install --deployment
# cp config/secrets-example.yml config/secrets.yml
@ -27,6 +29,5 @@ echo "END_OF_RUBOCOP_RESULTS"
# run tests
echo "TEST_RESULTS"
RAILS_ENV=test bundle exec rake test:other
RAILS_ENV=test bundle exec rake test
echo "END_OF_TEST_RESULTS"