mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
143fb7eb1b
8 changed files with 61 additions and 10 deletions
27
.travis.yml
Normal file
27
.travis.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
language: ruby
|
||||
rvm:
|
||||
- 2.2
|
||||
- ruby-head
|
||||
env:
|
||||
- DB=postgresql
|
||||
sudo: false
|
||||
before_install:
|
||||
- gem install bundler
|
||||
- "rm ${BUNDLE_GEMFILE}.lock"
|
||||
before_script:
|
||||
- psql -c 'create database registry_test;' -U postgres
|
||||
- psql -c 'create database registry_whois_test;' -U postgres
|
||||
- psql -c 'create database registry_api_log_test;' -U postgres
|
||||
- bundle update
|
||||
- cp config/application-example.yml config/application.yml
|
||||
- cp config/secrets-example.yml config/secrets.yml
|
||||
- cp config/database-travis.yml config/database.yml
|
||||
- RAILS_ENV=test bundle exec rake db:all:schema:load
|
||||
- RAILS_ENV=test bundle exec rake db:seed
|
||||
script:
|
||||
- RAILS_ENV=test bundle exec rake
|
||||
cache: bundler
|
||||
services:
|
||||
- postgresql
|
||||
addons:
|
||||
postgresql: "9.3"
|
3
Gemfile
3
Gemfile
|
@ -110,4 +110,7 @@ group :development, :test do
|
|||
|
||||
# dev tools
|
||||
gem 'unicorn'
|
||||
|
||||
# for travis
|
||||
gem 'rake'
|
||||
end
|
||||
|
|
|
@ -478,6 +478,7 @@ DEPENDENCIES
|
|||
railroady (~> 1.3.0)
|
||||
rails (= 4.2.0)
|
||||
rails-settings-cached (~> 0.4.1)
|
||||
rake
|
||||
ransack (~> 1.5.1)
|
||||
rspec-rails (~> 3.0.2)
|
||||
rubocop (~> 0.26.1)
|
||||
|
|
|
@ -359,3 +359,8 @@ This needs a static greeting file, so you will have to make /var/www writable.
|
|||
mkdir epp
|
||||
|
||||
Copy the files from $mod_epp/examples/cgis to /usr/lib/cgi-bin/epp
|
||||
|
||||
## Code Status
|
||||
|
||||
Alpha release status, only model tests:
|
||||
[](https://travis-ci.org/domify/registry)
|
||||
|
|
|
@ -5,9 +5,6 @@ class Epp::Contact < Contact
|
|||
# disable STI, there is type column present
|
||||
self.inheritance_column = :sti_disabled
|
||||
|
||||
# temp fix
|
||||
has_many :legal_documents, as: :documentable
|
||||
|
||||
class << self
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
|
@ -54,11 +51,10 @@ class Epp::Contact < Contact
|
|||
end
|
||||
|
||||
def legal_document_attrs(legal_frame)
|
||||
attrs = {}.with_indifferent_access
|
||||
attrs[0] = {}.with_indifferent_access
|
||||
attrs[0][:body] = legal_frame.text
|
||||
attrs[0][:document_type] = legal_frame['type']
|
||||
attrs
|
||||
[{
|
||||
body: legal_frame.text,
|
||||
document_type: legal_frame['type']
|
||||
}]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
19
config/database-travis.yml
Normal file
19
config/database-travis.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
default: &default
|
||||
host: localhost
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
pool: 5
|
||||
username: postgres
|
||||
password:
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
||||
whois_test:
|
||||
<<: *default
|
||||
database: registry_whois_test
|
||||
|
||||
api_log_test:
|
||||
<<: *default
|
||||
database: registry_api_log_test
|
|
@ -41,7 +41,7 @@ namespace :db do
|
|||
databases.each do |name|
|
||||
begin
|
||||
puts "\n---------------------------- #{name} ----------------------------------------\n"
|
||||
ActiveRecord::Base.establish_connection(name)
|
||||
ActiveRecord::Base.establish_connection(name.to_sym)
|
||||
if ActiveRecord::Base.connection.table_exists?('schema_migrations')
|
||||
puts 'Found tables, skip schema load!'
|
||||
else
|
||||
|
|
|
@ -30,7 +30,7 @@ begin
|
|||
end
|
||||
|
||||
Rake::Task[:default].prerequisites.clear
|
||||
task default: :test
|
||||
task default: 'test:other'
|
||||
|
||||
def test_against_server
|
||||
_stdin, _stdout, _stderr, wait_thr = Open3.popen3('unicorn -E test -p 8989')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue