Merge branch 'master' into domains-nested-refactor

Conflicts:
	config/locales/en.yml
This commit is contained in:
Martin Lensment 2015-03-06 10:26:38 +02:00
commit 08fb2966d4
93 changed files with 2356 additions and 1678 deletions

View file

@ -1,27 +1,29 @@
defaults: &defaults
app_name: .EE Registry
zonefile_export_dir: 'export/zonefiles'
# Be sure to restart your server when you modify settings.
# You can use `rake secret` to generate a secure secret key.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
secret_key_base: please-change-it-you-can-generate-it-with-rake-secret
devise_secret: please-change-it-you-can-generate-it-with-rake-secret
ca_cert_path: ca-cert-path-here
ca_key_path: ca-key-path-here
ca_key_password: ca-key-pass-phrase-here
app_name: .EE Registry
zonefile_export_dir: 'export/zonefiles'
development:
<<: *defaults
# You can use `rake secret` to generate a secure secret key.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
secret_key_base: please-change-it-you-can-generate-it-with-rake-secret
devise_secret: please-change-it-you-can-generate-it-with-rake-secret
# Used by admin server, you can leave those empty for when running EPP server:
openssl_config_path: '/etc/ssl/openssl.cnf'
crl_path: '/home/registry/registry/shared/ca/crl/crl.pem'
ca_cert_path: '/home/registry/registry/shared/ca/certs/ca.crt.pem'
ca_key_path: '/home/registry/registry/shared/ca/private/ca.key.pem'
ca_key_password: 'your-root-key-password'
# Used only by EPP server, you can leave it empty when running admin server:
webclient_ip: '127.0.0.1'
# autotest config overwrites
test:
<<: *defaults
webclient_ip: '127.0.0.1' # it should match to localhost ip address
crl_path: '/var/lib/jenkins/workspace/registry/ca/crl/crl.pem'
ca_cert_path: '/var/lib/jenkins/workspace/registry/ca/certs/ca.crt.pem'
ca_key_path: '/var/lib/jenkins/workspace/registry/ca/private/ca.key.pem'
ca_key_password: 'test'
alpha:
<<: *defaults
staging:
<<: *defaults
production:
<<: *defaults

19
config/database-robot.yml Normal file
View file

@ -0,0 +1,19 @@
default: &default
host: localhost
adapter: postgresql
encoding: unicode
pool: 5
username: test
password: test
test:
<<: *default
database: registry_test
whois_test:
<<: *default
database: registry_whois_test
api_log_test:
<<: *default
database: registry_api_log_test

View 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

View file

@ -1,2 +0,0 @@
APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env]
Registry::Application.config.secret_token = APP_CONFIG['secret_key_base']

View file

@ -4,7 +4,7 @@ Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
config.secret_key = APP_CONFIG['devise_secret']
config.secret_key = ENV['devise_secret']
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,

View file

@ -0,0 +1,13 @@
required = %w(
app_name
zonefile_export_dir
secret_key_base
devise_secret
crl_path
ca_cert_path
ca_key_path
ca_key_password
webclient_ip
)
Figaro.require_keys(required)

View file

@ -1,4 +1,5 @@
if ActiveRecord::Base.connection.table_exists? 'settings' # otherwise rake not working 100%
# otherwise rake not working 100%
if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('settings')
Setting.disclosure_name = true if Setting.disclosure_name.nil?
Setting.disclosure_name = true if Setting.disclosure_name.nil?
Setting.disclosure_org_name = true if Setting.disclosure_org_name.nil?

View file

@ -0,0 +1 @@
Registry::Application.config.secret_token = ENV['secret_key_base']

View file

@ -1,24 +1,3 @@
# Files in the config/locales directory are used for internationalization
# and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:
#
# <%= t('hello') %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
en:
views:
pagination:
@ -52,7 +31,6 @@ en:
activerecord:
errors:
models:
contact:
attributes:
code:
@ -67,6 +45,8 @@ en:
invalid: "Email is invalid"
ident:
blank: "Required parameter missing - ident"
invalid_EE_identity_format: "Ident not in valid Estonian identity format."
invalid_birthday_format: "Ident not in valid birthady format, should be YYYY-MM-DD"
domains:
exist: 'Object association prohibits operation'
@ -258,7 +238,7 @@ en:
invalid_type: 'PostalInfo type is invalid'
unimplemented_command: 'Unimplemented command'
domain_exists_but_belongs_to_other_registrar: 'Domain exists but belongs to other registrar'
required_attribute_missing: Required attributes missing
code: 'Code'
value: 'Value'
@ -321,7 +301,7 @@ en:
domain_status_prohibits_deleting: 'Domain status prohibits deleting'
domain_deleted: 'Domain deleted!'
failed_to_delete_domain: 'Failed to delete domain!'
email: 'Email'
email: 'E-mail'
fax: 'Fax'
contact_details: 'Contact details'
ident: 'Ident'
@ -330,8 +310,8 @@ en:
country: 'Country'
city: 'City'
street: 'Street'
zip: 'Zip'
org_name: 'Organisation name'
zip: 'Postcode'
org_name: 'Org name'
failed_to_add_domain: 'Failed to add domain!'
domain_added: 'Domain added!'
new_contact: 'New contact'
@ -502,3 +482,11 @@ en:
download: 'Download'
failed_to_create_certificate: 'Failed to create certificate!'
registrant_not_found: 'Registrant not found'
failed_to_revoke_certificate: 'Failed to revoke certificate!'
contact_code: Contact code
upload_csr: 'Upload CSR'
signature_algorithm: 'Signature algorithm'
version: 'Version'
sign_this_request: 'Sign this request'
revoke_this_certificate: 'Revoke this certificate'
crt_revoked: 'CRT (revoked)'

View file

@ -3,6 +3,7 @@ require 'epp_constraint'
Rails.application.routes.draw do
namespace(:epp, defaults: { format: :xml }) do
match 'session/:action', controller: 'sessions', via: :all
match 'session/pki/:action', controller: 'sessions', via: :all
post 'command/:action', controller: 'domains', constraints: EppConstraint.new(:domain)
post 'command/:action', controller: 'contacts', constraints: EppConstraint.new(:contact)
@ -47,9 +48,13 @@ Rails.application.routes.draw do
resources :admin_users
resources :api_users do
member do
get 'download_csr'
get 'download_crt'
resources :certificates do
member do
post 'sign'
post 'revoke'
get 'download_csr'
get 'download_crt'
end
end
end