dkdeploy-php 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.rubocop.yml +22 -0
  4. data/.travis.yml +12 -0
  5. data/Berksfile +3 -0
  6. data/Berksfile.lock +61 -0
  7. data/CHANGELOG.md +11 -0
  8. data/CONTRIBUTORS.md +16 -0
  9. data/Gemfile +3 -0
  10. data/LICENSE +7 -0
  11. data/README.md +84 -0
  12. data/Rakefile +5 -0
  13. data/Vagrantfile +63 -0
  14. data/config/vm/cookbooks/dkdeploy-php/attributes/default.rb +1 -0
  15. data/config/vm/cookbooks/dkdeploy-php/metadata.rb +12 -0
  16. data/config/vm/cookbooks/dkdeploy-php/recipes/default.rb +77 -0
  17. data/config/vm/cookbooks/dkdeploy-php/templates/default/web_app.conf.erb +28 -0
  18. data/dkdeploy-php.gemspec +27 -0
  19. data/features/composer.feature +20 -0
  20. data/features/db.feature +84 -0
  21. data/features/php.feature +44 -0
  22. data/features/support/env.rb +14 -0
  23. data/features/support/path.rb +30 -0
  24. data/features/support/step_definitions/steps.rb +15 -0
  25. data/features/support/templates/empty-doctrine-migration.erb +20 -0
  26. data/lib/capistrano/dkdeploy/php.rb +25 -0
  27. data/lib/dkdeploy/php/helpers/db.rb +43 -0
  28. data/lib/dkdeploy/php/helpers/http.rb +60 -0
  29. data/lib/dkdeploy/php/i18n.rb +74 -0
  30. data/lib/dkdeploy/php/tasks/composer.rake +50 -0
  31. data/lib/dkdeploy/php/tasks/db.rake +121 -0
  32. data/lib/dkdeploy/php/tasks/php.rake +90 -0
  33. data/lib/dkdeploy/php/version.rb +15 -0
  34. data/spec/fixtures/application/Capfile +8 -0
  35. data/spec/fixtures/application/Gemfile +6 -0
  36. data/spec/fixtures/application/config/deploy.rb +8 -0
  37. data/spec/fixtures/application/config/deploy/dev.rb +40 -0
  38. data/spec/fixtures/application/config/migrations/cli-config.php.erb +23 -0
  39. data/spec/fixtures/application/config/migrations/migrations.yml.erb +4 -0
  40. data/spec/fixtures/application/htdocs/.hidden/.gitkeep +0 -0
  41. data/spec/fixtures/application/htdocs/composer.json +22 -0
  42. data/spec/fixtures/application/vendor/composer.phar +0 -0
  43. data/spec/fixtures/application/vendor/doctrine-migrations.phar +0 -0
  44. data/spec/fixtures/capistrano/configuration/server_with_faulty_domain_configuration.rb +2 -0
  45. data/spec/fixtures/capistrano/configuration/server_with_valid_domain.rb +2 -0
  46. data/vendor/apc_clear.php +14 -0
  47. data/vendor/opcache_reset.php +10 -0
  48. metadata +185 -0
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dkdeploy/php/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'dkdeploy-php'
8
+ spec.version = Dkdeploy::Php::Version
9
+ spec.license = 'MIT'
10
+ spec.authors = ['Lars Tode', 'Timo Webler', 'Kieran Hayes', 'Nicolai Reuschling']
11
+ spec.email = ['lars.tode@dkd.de', 'timo.webler@dkd.de', 'kieran.hayes@dkd.de', 'nicolai.reuschling@dkd.de']
12
+ spec.description = 'dkd PHP deployment tasks and strategies'
13
+ spec.summary = 'dkd php deployment tasks and strategies'
14
+ spec.homepage = 'https://github.com/dkdeploy/dkdeploy-php'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.12.5'
22
+ spec.add_development_dependency 'rake', '~> 11.2'
23
+ spec.add_development_dependency 'rubocop', '~> 0.40'
24
+ spec.add_development_dependency 'dkdeploy-test_environment', '~> 1.0'
25
+
26
+ spec.add_dependency 'dkdeploy-core', '~> 8.0'
27
+ end
@@ -0,0 +1,20 @@
1
+ Feature: Test tasks for namespace 'composer'
2
+
3
+ Background:
4
+ Given a test app with the default configuration
5
+
6
+ Scenario: check for valid composer file
7
+ Then a file named "htdocs/composer.json" should exist
8
+ Then I successfully run `cap dev composer:local:validate`
9
+ Then the output should contain "composer.json is valid"
10
+
11
+ Scenario: Check if composer status is successful
12
+ Given the default aruba exit timeout is 120 seconds
13
+ And I successfully run `cap dev composer:local:run['install']`
14
+ When I successfully run `cap dev composer:local:check_status`
15
+ Then the output should contain "No local changes"
16
+
17
+ Scenario: Check if composer status is not successful
18
+ Given the default aruba exit timeout is 120 seconds
19
+ When I run `cap dev composer:local:check_status`
20
+ Then the exit status should not be 0
@@ -0,0 +1,84 @@
1
+ Feature: Test tasks for namespace 'db'
2
+
3
+ Background:
4
+ Given a test app with the default configuration
5
+ And I want to use the database `dkdeploy_php`
6
+ And I successfully run `cap dev "db:upload_settings[127.0.0.1,3306,dkdeploy_php,root,ilikerandompasswords,utf8]"`
7
+
8
+ Scenario Outline: Check if the basic file structure for doctrine migrations has been successfully created on the server
9
+ When I successfully run `cap dev db:migrations:copy_doctrine_to_server`
10
+ Then a remote file named "<remote_directory>/<target_file>" should exist
11
+ And a remote directory named "migrations_path/classes" should exist
12
+
13
+ Examples:
14
+ | target_file | remote_directory |
15
+ | doctrine-migrations.phar | migrations_path |
16
+ | cli-config.php | migrations_path |
17
+ | migrations.yml | migrations_path |
18
+
19
+ Scenario Outline: Check the correct stage specifig configuration of remote migrations root directory
20
+ When I extend the development capistrano configuration variable remote_migrations_root_directory with value 'alternative_migrations_directory'
21
+ And I successfully run `cap dev db:migrations:copy_doctrine_to_server`
22
+ Then a remote file named "<remote_directory>/<target_file>" should exist
23
+ And a remote directory named "shared_path/alternative_migrations_directory/classes" should exist
24
+
25
+ Examples:
26
+ | target_file | remote_directory |
27
+ | doctrine-migrations.phar | shared_path/alternative_migrations_directory |
28
+ | cli-config.php | shared_path/alternative_migrations_directory |
29
+ | migrations.yml | shared_path/alternative_migrations_directory |
30
+
31
+ Scenario: Check if a generated migration has benn successfully downloaded to the local directory config/migrations/classes
32
+ When I successfully run `cap dev db:migrations:generate`
33
+ And a file matching %r</migrations/classes/Version.+.php> should exist
34
+
35
+ Scenario: Checking if the migrations status table is outputed on the console
36
+ When I successfully run `cap dev db:migrations:status`
37
+ Then the output should contain "Doctrine TYPO3 Migrations"
38
+
39
+ Scenario: Checking if only global and current stage specific doctrine migrations are uploaded on the server
40
+ Given an empty doctrine migration with name "config/migrations/classes/Version99999999999997.php"
41
+ And an empty doctrine migration with name "config/migrations/stage/dev/Version99999999999998.php"
42
+ And an empty doctrine migration with name "config/migrations/stage/integration/Version99999999999999.php"
43
+ When I successfully run `cap dev db:migrations:copy_migrations_to_server`
44
+ Then a remote file named "migrations_path/classes/Version99999999999997.php" should exist
45
+ And a remote file named "migrations_path/classes/Version99999999999998.php" should exist
46
+ And a remote file named "migrations_path/classes/Version99999999999999.php" should not exist
47
+
48
+ Scenario: Check if migrations copied recursive to server
49
+ Given an empty doctrine migration with name "config/migrations/classes/Version99999999999997.php"
50
+ And an empty doctrine migration with name "config/migrations/classes/test1/Version99999999999997.php"
51
+ And an empty doctrine migration with name "config/migrations/classes/test1/test2/Version99999999999997.php"
52
+ And an empty doctrine migration with name "config/migrations/classes/test3/Version99999999999997.php"
53
+ And an empty doctrine migration with name "config/migrations/stage/dev/Version99999999999998.php"
54
+ And an empty doctrine migration with name "config/migrations/stage/dev/test1/test2/Version99999999999998.php"
55
+ And an empty doctrine migration with name "config/migrations/stage/dev/test4/Version99999999999998.php"
56
+ When I successfully run `cap dev db:migrations:copy_migrations_to_server`
57
+ Then a remote file named "migrations_path/classes/Version99999999999997.php" should exist
58
+ And a remote file named "migrations_path/classes/Version99999999999998.php" should exist
59
+ And a remote file named "migrations_path/classes/test1/Version99999999999997.php" should exist
60
+ And a remote file named "migrations_path/classes/test1/test2/Version99999999999997.php" should exist
61
+ And a remote file named "migrations_path/classes/test1/test2/Version99999999999998.php" should exist
62
+ And a remote file named "migrations_path/classes/test3/Version99999999999997.php" should exist
63
+ And a remote file named "migrations_path/classes/test4/Version99999999999998.php" should exist
64
+
65
+ Scenario: Checking if executed migrations result in database entries
66
+ Given an empty doctrine migration with name "config/migrations/stage/dev/Version22222222222222.php"
67
+ And an empty doctrine migration with name "config/migrations/stage/dev/Version33333333333333.php"
68
+ When I successfully run `cap dev db:migrations:copy_migrations_to_server`
69
+ And I successfully run `cap dev db:migrations:migrate`
70
+ Then the database should have a value `22222222222222` in table `doctrine_migrations` for column `version`
71
+
72
+ Scenario: Checking if downgraded migration is deleted from migrations table, but not other migrations
73
+ Given an empty doctrine migration with name "config/migrations/stage/dev/Version22222222222222.php"
74
+ And an empty doctrine migration with name "config/migrations/stage/dev/Version33333333333333.php"
75
+ And an empty doctrine migration with name "config/migrations/stage/dev/Version44444444444444.php"
76
+ When I successfully run `cap dev db:migrations:copy_migrations_to_server`
77
+ And I successfully run `cap dev db:migrations:migrate`
78
+ And I run `cap dev db:migrations:execute_down` interactively
79
+ And I type "33333333333333"
80
+ And I close the stdin stream
81
+ And I wait 10 seconds to let the database commit the transaction
82
+ Then the database should not have a value `33333333333333` in table `doctrine_migrations` for column `version`
83
+ And the database should have a value `22222222222222` in table `doctrine_migrations` for column `version`
84
+ And the database should have a value `44444444444444` in table `doctrine_migrations` for column `version`
@@ -0,0 +1,44 @@
1
+ Feature: Test tasks for namespace 'php'
2
+
3
+ Background:
4
+ Given a test app with the default configuration
5
+ And the default aruba exit timeout is 120 seconds
6
+ And I successfully run `cap dev deploy`
7
+
8
+ Scenario: Clear APC cache on the server
9
+ When I run `cap dev php:clear_apc_cache`
10
+ Then the exit status should be 0
11
+
12
+ Scenario: Clear APC fails on non existing PHP file
13
+ When I run `cap dev php:clear_apc_cache['htdocs/apc_clear.php']`
14
+ Then the exit status should not be 0
15
+
16
+ Scenario: Clear APC use server domain configuration
17
+ And I extend the development capistrano configuration from the fixture file server_with_valid_domain.rb
18
+ When I run `cap dev php:clear_apc_cache`
19
+ Then the exit status should be 0
20
+ And the output should contain "200 - OK"
21
+
22
+ Scenario: Clear APC break non not valid configuration
23
+ And I extend the development capistrano configuration from the fixture file server_with_faulty_domain_configuration.rb
24
+ When I run `cap dev php:clear_apc_cache`
25
+ Then the exit status should not be 0
26
+
27
+ Scenario: Clear OPcache on the server
28
+ When I run `cap dev php:clear_opcache`
29
+ Then the exit status should be 0
30
+
31
+ Scenario: Clear OPcache fails on non existing PHP file
32
+ When I run `cap dev php:clear_opcache['htdocs/opcache_reset.php']`
33
+ Then the exit status should not be 0
34
+
35
+ Scenario: Clear OPcache use server domain configuration
36
+ And I extend the development capistrano configuration from the fixture file server_with_valid_domain.rb
37
+ When I run `cap dev php:clear_opcache`
38
+ Then the exit status should be 0
39
+ And the output should contain "200 - OK"
40
+
41
+ Scenario: Clear OPcache break non not valid configuration
42
+ And I extend the development capistrano configuration from the fixture file server_with_faulty_domain_configuration.rb
43
+ When I run `cap dev php:clear_opcache`
44
+ Then the exit status should not be 0
@@ -0,0 +1,14 @@
1
+ require 'dkdeploy/test_environment/application'
2
+ ssh_config = {}
3
+
4
+ ssh_key_files = Dir.glob(File.join(Dir.getwd, '.vagrant', 'machines', '**', 'virtualbox', 'private_key'))
5
+ unless ssh_key_files.empty?
6
+ # Define generated ssh key files
7
+ ssh_config = {
8
+ user: 'vagrant',
9
+ keys: ssh_key_files
10
+ }
11
+ end
12
+
13
+ TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('../../../', __FILE__), 'dkdeploy-php.dev', ssh_config)
14
+ TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-php.dev', username: 'root', password: 'ilikerandompasswords' }
@@ -0,0 +1,30 @@
1
+ # Navigation helper module for cucumber steps
2
+ #
3
+ module NavigationHelpers
4
+ # Mapping for path names to real remote path
5
+ #
6
+ # @param path [String]
7
+ # @return [String]
8
+ def path_to(path)
9
+ case path
10
+ when 'deploy_path'
11
+ TEST_APPLICATION.deploy_to
12
+ when 'current_path'
13
+ TEST_APPLICATION.current_path
14
+ when 'releases_path'
15
+ TEST_APPLICATION.remote.releases_path
16
+ when 'shared_path'
17
+ TEST_APPLICATION.remote.shared_path
18
+ when 'assets_path'
19
+ TEST_APPLICATION.remote.assets_path
20
+ when 'migrations_path'
21
+ File.join TEST_APPLICATION.remote.shared_path, 'migrations'
22
+ when 'tmp_path'
23
+ TEST_APPLICATION.remote_tmp_path
24
+ else
25
+ path
26
+ end
27
+ end
28
+ end
29
+
30
+ World(NavigationHelpers)
@@ -0,0 +1,15 @@
1
+ require 'erb'
2
+ require 'ostruct'
3
+
4
+ # Creates an empty doctrine migration with a given migration version and basic content
5
+ #
6
+ # @yieldparam migration_version [String] the 14 digits migration number
7
+ Given(/^an empty doctrine migration with name "([^"]*)"$/) do |file_path|
8
+ context_object = OpenStruct.new migration_name: file_path.scan(/Version[0-9]+/)[0]
9
+ def context_object.binding_for_erb
10
+ binding
11
+ end
12
+ empty_doctrine_migration_template_path = File.expand_path('../../templates/empty-doctrine-migration.erb', __FILE__)
13
+ empty_doctrine_migration_template = ERB.new File.read(empty_doctrine_migration_template_path)
14
+ write_file file_path, empty_doctrine_migration_template.result(context_object.binding_for_erb)
15
+ end
@@ -0,0 +1,20 @@
1
+ <?php
2
+ namespace DoctrineMigrations;
3
+
4
+ use Doctrine\DBAL\Migrations\AbstractMigration,
5
+ Doctrine\DBAL\Schema\Schema;
6
+
7
+ /**
8
+ * Auto-generated Migration: Please modify to your need!
9
+ */
10
+ class <%= migration_name %> extends AbstractMigration {
11
+
12
+ public function up(Schema $schema) {
13
+ // this up() migration is autogenerated, please modify it to your needs
14
+ }
15
+
16
+ public function down(Schema $schema) {
17
+ // this down() migration is autogenerated, please modify it to your needs
18
+ }
19
+
20
+ }
@@ -0,0 +1,25 @@
1
+ require 'capistrano/dkdeploy/core'
2
+
3
+ include Capistrano::DSL
4
+
5
+ # Load dkdeploy tasks
6
+ load File.expand_path('../../../dkdeploy/php/tasks/php.rake', __FILE__)
7
+ load File.expand_path('../../../dkdeploy/php/tasks/composer.rake', __FILE__)
8
+ load File.expand_path('../../../dkdeploy/php/tasks/db.rake', __FILE__)
9
+
10
+ namespace :load do
11
+ task :defaults do
12
+ set :composer_default_arguments, ['--no-interaction']
13
+ set :composer_install_arguments, []
14
+
15
+ set :doctrine_phar, './vendor/doctrine-migrations.phar'
16
+ set :remote_migrations_root_directory, 'migrations'
17
+ set :migrations_default_arguments, ['--no-interaction']
18
+
19
+ set :remote_apc_file_name, 'apc_clear.php'
20
+ set :local_apc_file, File.join(__dir__, '..', '..', '..', 'vendor', 'apc_clear.php')
21
+
22
+ set :remote_opcache_file_name, 'opcache_reset.php'
23
+ set :local_opcache_file, File.join(__dir__, '..', '..', '..', 'vendor', 'opcache_reset.php')
24
+ end
25
+ end
@@ -0,0 +1,43 @@
1
+ module Dkdeploy
2
+ module Php
3
+ module Helpers
4
+ # DB related helpers
5
+ module DB
6
+ # Local migrations classes directory
7
+ #
8
+ # @return [String]
9
+ def local_migrations_root_directory
10
+ File.join 'config', 'migrations'
11
+ end
12
+
13
+ # Local migrations classes directory
14
+ #
15
+ # @return [String]
16
+ def local_migrations_classes_directory
17
+ File.join local_migrations_root_directory, 'classes'
18
+ end
19
+
20
+ # Local migrations stages directory
21
+ #
22
+ # @return [String]
23
+ def local_migrations_stage_directory
24
+ File.join local_migrations_root_directory, 'stage'
25
+ end
26
+
27
+ # Remote migrations root directory
28
+ #
29
+ # @return [String]
30
+ def remote_migrations_root_directory
31
+ File.join shared_path, fetch(:remote_migrations_root_directory)
32
+ end
33
+
34
+ # Remote migrations classes directory
35
+ #
36
+ # @return [String]
37
+ def remote_migrations_classes_directory
38
+ File.join(remote_migrations_root_directory, 'classes')
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,60 @@
1
+ require 'socket'
2
+ require 'net/http'
3
+
4
+ module Dkdeploy
5
+ module Php
6
+ module Helpers
7
+ # HTTP related helpers
8
+ module Http
9
+ # Local migrations classes directory
10
+ #
11
+ # @param filename [String]
12
+ # @param server [SSHKit::Host]
13
+ # @return [Net::HTTPResponse]
14
+ def call_file_on_server(filename, server)
15
+ # Setting up URL to call
16
+ domain_scheme = server.properties.respond_to?(:domain_scheme) ? server.fetch(:domain_scheme) : 'http'
17
+ domain = server.properties.respond_to?(:domain) ? server.fetch(:domain) : server.hostname
18
+ web_server_port = domain_scheme == 'https' ? 443 : 80
19
+ # Use server configuration, if exists
20
+ web_server_port = server.fetch(:web_server_port) if server.properties.respond_to?(:web_server_port)
21
+
22
+ url = URI.parse("#{domain_scheme}://#{domain}").merge("/#{filename}")
23
+ url.port = web_server_port
24
+ info "Call URL #{url}"
25
+
26
+ http_get_with_redirect url
27
+ end
28
+
29
+ # Sends a get request that handles redirects
30
+ #
31
+ # @param url [URI]
32
+ # @param limit [Integer] defines how many redirects are allowed
33
+ # @return [NET::HTTPResponse]
34
+ def http_get_with_redirect(url, limit = 5)
35
+ limit = Integer(limit)
36
+ raise ArgumentError, 'limit cannot be negative' if limit < 0
37
+ raise 'too many HTTP redirects' if limit.zero?
38
+ # configure Net::HTTP
39
+ http = Net::HTTP.new(url.host, url.port)
40
+ http.open_timeout = fetch :http_open_timeout, nil
41
+ http.read_timeout = fetch :http_read_timeout, 60
42
+ if url.scheme == 'https'
43
+ http.use_ssl = true
44
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
45
+ end
46
+ request = Net::HTTP::Get.new(url.path) # build request
47
+ # call url
48
+ response = http.request(request)
49
+ if response.is_a? Net::HTTPRedirection
50
+ # Does not handle multiple redirects. Code/idea from http://stackoverflow.com/a/7210600/1796645
51
+ location = URI.parse(response.header['location'])
52
+ info "redirected to #{location}"
53
+ response = http_get_with_redirect(location, limit - 1)
54
+ end
55
+ response
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,74 @@
1
+ require 'i18n'
2
+
3
+ en = {
4
+ tasks: {
5
+ composer: {
6
+ local: {
7
+ check_status: {
8
+ run_install: 'Please run command "%{command}"',
9
+ failure: %q(You can't deploy Packages with local changes. Please run command "%{command}" to see which files are modified.')
10
+ }
11
+ }
12
+ },
13
+ php: {
14
+ clear_apc_cache: {
15
+ local_apc_file: 'Please enter the path to local apc clear cache file ',
16
+ result_msg: 'Result %{code} - %{message}',
17
+ cache_not_cleared: 'Can not clear apc cache. Result code is 2xx, but cache is not cleared. See php log for more information.',
18
+ response_not_success: 'Can not clear apc cache. Result code is not 2xx. %{code} - %{message}'
19
+ },
20
+ clear_opcache: {
21
+ local_opcache_file: 'Please enter the path to local OPcache clear cache file ',
22
+ result_msg: 'Result %{code} - %{message}',
23
+ cache_not_cleared: 'Can not clear OPcache. Result code is 2xx, but cache is not cleared. See php log for more information.',
24
+ response_not_success: 'Can not clear OPcache. Result code is not 2xx. %{code} - %{message}'
25
+ }
26
+ },
27
+ db: {
28
+ migrations: {
29
+ generate: {
30
+ info: 'Generating new migration.'
31
+ },
32
+ status: {
33
+ info: 'Getting status of migrations.'
34
+ },
35
+ migrate: {
36
+ info: 'Migrating database.'
37
+ },
38
+ execute_down: {
39
+ info: 'Migrating down to version %{migration_version}',
40
+ abort: "Please set the variable 'migration_version' before you execute the task"
41
+ },
42
+ copy_doctrine_to_server: {
43
+ info: {
44
+ doctrine_phar: '%{doctrine_phar} found.',
45
+ remove: 'Removing old migrations.',
46
+ create_directories: 'Creating directories for migrations.',
47
+ upload_doctrine: 'Copying doctrine-migrations.phar to %{migrations_root_directory} directory.',
48
+ upload_doctrine_configuration: 'Copying configuration.yml to %{migrations_root_directory}.',
49
+ upload_doctrine_db_configuration: 'Copying db-configuration.php to %{migrations_root_directory}.'
50
+ }
51
+ },
52
+ copy_migrations_to_server: {
53
+ info: {
54
+ upload_migrations: 'Uploading migrations to %{migrations_classes_directory}.',
55
+ upload_stage_migrations: 'Uploading migrations for stage %{stage} to %{migrations_classes_directory}.'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ questions: {
62
+ db: {
63
+ migrations: {
64
+ migration_version: 'Please enter the doctrine migration version:'
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ I18n.backend.store_translations(:en, dkdeploy: en)
71
+
72
+ if I18n.respond_to?(:enforce_available_locales=)
73
+ I18n.enforce_available_locales = true
74
+ end