mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 12:09:34 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
4e1d69d0d8
8 changed files with 26 additions and 14 deletions
|
@ -5,6 +5,8 @@ AllCops:
|
||||||
- 'Guardfile'
|
- 'Guardfile'
|
||||||
# stuff generated by AR and rails
|
# stuff generated by AR and rails
|
||||||
- 'db/schema.rb'
|
- 'db/schema.rb'
|
||||||
|
- 'db/whois_schema.rb'
|
||||||
|
- 'db/api_log_schema.rb'
|
||||||
- 'db/migrate/*'
|
- 'db/migrate/*'
|
||||||
# epp support files until 'complexity issues' will be solved
|
# epp support files until 'complexity issues' will be solved
|
||||||
- 'spec/support/epp.rb'
|
- 'spec/support/epp.rb'
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
* Registry api log and whois database added, please update your database.yml,
|
* Registry api log and whois database added, please update your database.yml,
|
||||||
you can view updated config at config/database-example.yml
|
you can view updated config at config/database-example.yml
|
||||||
|
* Upgraded to Rails 4.2 and ruby 2.2.0, be sure you have ruby 2.2.0 in your rbenv
|
||||||
|
NB! Update you passenger deb install, it should have recent fix for ruby 2.2.0
|
||||||
|
|
||||||
14.01.2015
|
14.01.2015
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
!!!
|
!!!
|
||||||
%html{:lang => "en"}
|
%html{:lang => I18n.locale.to_s}
|
||||||
%head
|
%head
|
||||||
%meta{:charset => "utf-8"}/
|
%meta{:charset => "utf-8"}/
|
||||||
%meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
|
%meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
|
||||||
|
|
|
@ -15,7 +15,7 @@ export RAILS_ENV=test
|
||||||
# cd to Rails root directory
|
# cd to Rails root directory
|
||||||
cd "$(dirname "$0")"; cd ..
|
cd "$(dirname "$0")"; cd ..
|
||||||
|
|
||||||
# cp config/secrets-example.yml config/secrets.yml
|
cp config/application-example.yml config/application.yml
|
||||||
# create manually config/database.yml
|
# create manually config/database.yml
|
||||||
|
|
||||||
bundle install
|
bundle install
|
||||||
|
|
|
@ -17,6 +17,14 @@ set :deploy_to, '$HOME/registry'
|
||||||
set :repository, 'https://github.com/domify/registry' # dev repo
|
set :repository, 'https://github.com/domify/registry' # dev repo
|
||||||
set :branch, 'master'
|
set :branch, 'master'
|
||||||
|
|
||||||
|
# alpha branch
|
||||||
|
task :epp do
|
||||||
|
set :domain, 'registry-st'
|
||||||
|
set :deploy_to, '$HOME/epp'
|
||||||
|
set :repository, 'https://github.com/domify/registry' # dev repo
|
||||||
|
set :branch, 'master'
|
||||||
|
end
|
||||||
|
|
||||||
# staging
|
# staging
|
||||||
task :st do
|
task :st do
|
||||||
set :domain, 'registry-st'
|
set :domain, 'registry-st'
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace :api_log do
|
||||||
namespace :test do
|
namespace :test do
|
||||||
namespace :schema do
|
namespace :schema do
|
||||||
# desc 'Dump additional database schema'
|
# desc 'Dump additional database schema'
|
||||||
task :dump => [:environment] do
|
task dump: [:environment] do
|
||||||
filename = "#{Rails.root}/db/api_log_schema.rb"
|
filename = "#{Rails.root}/db/api_log_schema.rb"
|
||||||
File.open(filename, 'w:utf-8') do |file|
|
File.open(filename, 'w:utf-8') do |file|
|
||||||
ActiveRecord::Base.establish_connection("api_log_#{Rails.env}".to_sym)
|
ActiveRecord::Base.establish_connection("api_log_#{Rails.env}".to_sym)
|
||||||
|
@ -11,21 +11,21 @@ namespace :api_log do
|
||||||
end
|
end
|
||||||
|
|
||||||
# desc 'Purge and load foo_test schema'
|
# desc 'Purge and load foo_test schema'
|
||||||
task :load => [:environment] do
|
task load: [:environment] do
|
||||||
# like db:test:purge
|
# like db:test:purge
|
||||||
abcs = ActiveRecord::Base.configurations
|
abcs = ActiveRecord::Base.configurations
|
||||||
ActiveRecord::Base.clear_all_connections!
|
ActiveRecord::Base.clear_all_connections!
|
||||||
|
|
||||||
ActiveRecord::Base.connection.drop_database("api_log_test")
|
ActiveRecord::Base.connection.drop_database('api_log_test')
|
||||||
ActiveRecord::Base.connection.create_database("api_log_test", abcs["api_log_test"])
|
ActiveRecord::Base.connection.create_database('api_log_test', abcs['api_log_test'])
|
||||||
|
|
||||||
# like db:test:load_schema
|
# like db:test:load_schema
|
||||||
ActiveRecord::Base.establish_connection("api_log_test")
|
ActiveRecord::Base.establish_connection('api_log_test')
|
||||||
ActiveRecord::Schema.verbose = false
|
ActiveRecord::Schema.verbose = false
|
||||||
load("#{Rails.root}/db/api_log_schema.rb")
|
load("#{Rails.root}/db/api_log_schema.rb")
|
||||||
end
|
end
|
||||||
|
|
||||||
task :reload => [:environment] do
|
task reload: [:environment] do
|
||||||
Rake::Task['api_log:test:schema:dump'].invoke
|
Rake::Task['api_log:test:schema:dump'].invoke
|
||||||
Rake::Task['api_log:test:schema:load'].invoke
|
Rake::Task['api_log:test:schema:load'].invoke
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,14 +16,14 @@ namespace :db do
|
||||||
|
|
||||||
namespace :all do
|
namespace :all do
|
||||||
desc 'Create all databases: registry, api_log and whois'
|
desc 'Create all databases: registry, api_log and whois'
|
||||||
task :setup => [:environment] do
|
task setup: [:environment] do
|
||||||
Rake::Task['db:all:create'].invoke
|
Rake::Task['db:all:create'].invoke
|
||||||
Rake::Task['db:all:schema:load'].invoke
|
Rake::Task['db:all:schema:load'].invoke
|
||||||
Rake::Task['db:seed'].invoke
|
Rake::Task['db:seed'].invoke
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Create all databases: registry, api_log and whois'
|
desc 'Create all databases: registry, api_log and whois'
|
||||||
task :create => [:environment] do
|
task create: [:environment] do
|
||||||
databases.each do |name|
|
databases.each do |name|
|
||||||
begin
|
begin
|
||||||
conf = ActiveRecord::Base.configurations
|
conf = ActiveRecord::Base.configurations
|
||||||
|
@ -37,7 +37,7 @@ namespace :db do
|
||||||
|
|
||||||
namespace :schema do
|
namespace :schema do
|
||||||
desc 'Schema load for all databases: registry, api_log and whois'
|
desc 'Schema load for all databases: registry, api_log and whois'
|
||||||
task :load => [:environment] do
|
task load: [:environment] do
|
||||||
databases.each do |name|
|
databases.each do |name|
|
||||||
begin
|
begin
|
||||||
puts "\n---------------------------- #{name} ----------------------------------------\n"
|
puts "\n---------------------------- #{name} ----------------------------------------\n"
|
||||||
|
@ -54,7 +54,7 @@ namespace :db do
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Schema load for all databases: registry, api_log and whois'
|
desc 'Schema load for all databases: registry, api_log and whois'
|
||||||
task :dump => [:environment] do
|
task dump: [:environment] do
|
||||||
databases.each do |name|
|
databases.each do |name|
|
||||||
begin
|
begin
|
||||||
puts "\n---------------------------- #{name} ----------------------------------------\n"
|
puts "\n---------------------------- #{name} ----------------------------------------\n"
|
||||||
|
|
|
@ -40,6 +40,6 @@ begin
|
||||||
`kill #{pid}`
|
`kill #{pid}`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue LoadError
|
rescue LoadError => e
|
||||||
# rspec gem not loaded, probably we are in production machine
|
puts e # rspec gem not loaded, probably we are in production machine
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue