dkdeploy-typo3-cms 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 (61) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rubocop.yml +23 -0
  4. data/.travis.yml +12 -0
  5. data/Berksfile +3 -0
  6. data/Berksfile.lock +66 -0
  7. data/CHANGELOG.md +12 -0
  8. data/CONTRIBUTORS.md +16 -0
  9. data/Gemfile +3 -0
  10. data/LICENSE +7 -0
  11. data/README.md +87 -0
  12. data/Rakefile +1 -0
  13. data/Vagrantfile +62 -0
  14. data/assets/dkdeploy-logo.png +0 -0
  15. data/config/vm/cookbooks/dkdeploy-typo3-cms/metadata.rb +12 -0
  16. data/config/vm/cookbooks/dkdeploy-typo3-cms/recipes/default.rb +71 -0
  17. data/dkdeploy-typo3-cms.gemspec +29 -0
  18. data/features/advanced_typo3.feature +156 -0
  19. data/features/caretaker_key_management.feature +36 -0
  20. data/features/clear_cache_on_rollback.feature +17 -0
  21. data/features/cli.feature +61 -0
  22. data/features/step_definitions/mysql.rb +75 -0
  23. data/features/step_definitions/typo3.rb +16 -0
  24. data/features/support/env.rb +11 -0
  25. data/features/typo3.feature +100 -0
  26. data/features/typoscript_upload_and_merge_config.feature +128 -0
  27. data/features/typoscript_upload_and_merge_pagets.feature +128 -0
  28. data/features/typoscript_upload_and_merge_userts.feature +128 -0
  29. data/features/update_database.feature +23 -0
  30. data/lib/capistrano/dkdeploy/typo3_cms.rb +37 -0
  31. data/lib/dkdeploy/typo3/cms.rb +1 -0
  32. data/lib/dkdeploy/typo3/cms/dsl.rb +27 -0
  33. data/lib/dkdeploy/typo3/cms/helpers/cli.rb +165 -0
  34. data/lib/dkdeploy/typo3/cms/helpers/erb.rb +25 -0
  35. data/lib/dkdeploy/typo3/cms/i18n.rb +111 -0
  36. data/lib/dkdeploy/typo3/cms/tasks/cache.rake +18 -0
  37. data/lib/dkdeploy/typo3/cms/tasks/caretaker_key_management.rake +60 -0
  38. data/lib/dkdeploy/typo3/cms/tasks/cli.rake +45 -0
  39. data/lib/dkdeploy/typo3/cms/tasks/typo3.rake +272 -0
  40. data/lib/dkdeploy/typo3/cms/tasks/typoscript.rake +288 -0
  41. data/lib/dkdeploy/typo3/cms/version.rb +16 -0
  42. data/spec/fixtures/application/Capfile +8 -0
  43. data/spec/fixtures/application/Gemfile +3 -0
  44. data/spec/fixtures/application/config/deploy.rb +8 -0
  45. data/spec/fixtures/application/config/deploy/dev.rb +41 -0
  46. data/spec/fixtures/application/htdocs/.hidden/.gitkeep +0 -0
  47. data/spec/fixtures/application/htdocs/catalog/index.html +1 -0
  48. data/spec/fixtures/application/htdocs/composer.json +24 -0
  49. data/spec/fixtures/application/htdocs/typo3/cli_dispatch.phpsh +2 -0
  50. data/spec/fixtures/application/htdocs/typo3conf/AdditionalConfiguration.php +3 -0
  51. data/spec/fixtures/application/htdocs/typo3conf/LocalConfiguration.php +28 -0
  52. data/spec/fixtures/application/htdocs/typo3conf/PackageStates.php +358 -0
  53. data/spec/fixtures/application/vendor/composer.phar +0 -0
  54. data/spec/fixtures/capistrano/configuration/additional_configuration_for_server.rb +1 -0
  55. data/spec/fixtures/capistrano/configuration/cli_break_after_one_run_in_release_path.rb +14 -0
  56. data/spec/fixtures/capistrano/configuration/cli_break_after_three_runs_in_release_path.rb +14 -0
  57. data/spec/fixtures/capistrano/configuration/cli_test_tasks.rb +19 -0
  58. data/spec/fixtures/capistrano/configuration/cli_test_tasks_with_path.rb +15 -0
  59. data/vendor/AdditionalConfiguration.php.erb +57 -0
  60. data/vendor/create_caretaker_instance_keys.php.erb +18 -0
  61. metadata +222 -0
@@ -0,0 +1 @@
1
+ server 'dkdeploy-typo3-cms.dev', roles: %w(web app), additional_configuration_file: 'config/typo3/ServerConfiguration.php'
@@ -0,0 +1,14 @@
1
+ namespace :typo3 do
2
+ namespace :cms do
3
+ namespace :cli do
4
+ task 'break_after_one_run' do |_, args|
5
+ capture_typo3_cli_in_path_in_loop release_path, 3, args.extra do |output|
6
+ puts output
7
+ false
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+ before 'deploy:publishing', 'typo3:cms:cli:break_after_one_run' # with this release_path is defined for the rake task during runtime
@@ -0,0 +1,14 @@
1
+ namespace :typo3 do
2
+ namespace :cms do
3
+ namespace :cli do
4
+ task 'break_after_three_runs' do |_, args|
5
+ capture_typo3_cli_in_path_in_loop release_path, 3, args.extra do |output|
6
+ puts output
7
+ true
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+ before 'deploy:publishing', 'typo3:cms:cli:break_after_three_runs' # with this release_path is defined for the rake task during runtime
@@ -0,0 +1,19 @@
1
+ namespace :typo3 do
2
+ namespace :cms do
3
+ namespace :cli do
4
+ task 'break_after_one_run' do |_, args|
5
+ capture_typo3_cli_in_loop 3, args.extra do |output|
6
+ puts output
7
+ false
8
+ end
9
+ end
10
+
11
+ task 'break_after_three_runs' do |_, args|
12
+ capture_typo3_cli_in_loop 3, args.extra do |output|
13
+ puts output
14
+ true
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,15 @@
1
+ namespace :typo3 do
2
+ namespace :cms do
3
+ namespace :cli do
4
+ # desc 'Execute TYPO3 cli task in Specific directory'
5
+ # task :run_in_release_path do |task, args| # First agument is directory
6
+ task 'run_in_release_path' do |task, args|
7
+ typo3_cli_in_path(release_path, args.extras)
8
+ # Reenable Task to allow multiple invokation
9
+ task.reenable
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ before 'deploy:publishing', 'typo3:cms:cli:run_in_release_path' # with this release_path is defined for the rake task during runtime
@@ -0,0 +1,57 @@
1
+ <?php
2
+ <% if File.exist?(File.join('htdocs', 'typo3conf', 'AdditionalConfiguration.php')) %>
3
+ // Content of default configuration file
4
+ <%= sanitize_php File.read(File.join('htdocs', 'typo3conf', 'AdditionalConfiguration.php')) %>
5
+ <% end %>
6
+ <% if File.exist?(File.join('config', 'typo3', "AdditionalConfiguration.#{fetch(:stage)}.php")) %>
7
+
8
+ // Content of stage configuration file
9
+ <%= sanitize_php File.read(File.join('config', 'typo3', "AdditionalConfiguration.#{fetch(:stage)}.php")) %>
10
+ <% end %>
11
+ <% if defined?(server) && server.properties.respond_to?(:additional_configuration_file)
12
+ configuration_file = server.fetch(:additional_configuration_file)
13
+ if File.exist? configuration_file
14
+ file_content = File.read(File.join(configuration_file))
15
+ if File.extname(configuration_file) == '.erb'
16
+ # Use ruby template parsing for '.erb' files
17
+ file_content = ERB.new(file_content, nil, '>', '_additional_server_template').result(binding)
18
+ end %>
19
+
20
+ // Content of server "<%= server %>" configuration file "<%= File.basename configuration_file %>"
21
+ <%= sanitize_php file_content %>
22
+ <% else
23
+ warn I18n.t('tasks.typo3.cms.v6.setup_additional_configuration.file_not_found_and_ignored', file: configuration_file, scope: :dkdeploy)
24
+ end
25
+ end
26
+ %>
27
+ <% if any?(:additional_configuration_files) && fetch(:additional_configuration_files).kind_of?(Array)
28
+ fetch(:additional_configuration_files).each_with_index do | configuration_file,index |
29
+ if File.exist? configuration_file
30
+ file_content = File.read(File.join(configuration_file))
31
+ if File.extname(configuration_file) == '.erb'
32
+ # Use ruby template parsing for '.erb' files
33
+ file_content = ERB.new(file_content, nil, '>', "_additional_template_#{index}").result(binding)
34
+ end %>
35
+
36
+ // Content of additional configuration file "<%= File.basename configuration_file %>"
37
+ <%= sanitize_php file_content %>
38
+ <% else
39
+ warn I18n.t('tasks.typo3.cms.v6.setup_additional_configuration.file_not_found_and_ignored', file: configuration_file, scope: :dkdeploy)
40
+ end
41
+ end
42
+ end
43
+ %>
44
+
45
+ // Include section
46
+ <% if execute(:test, '-e', "#{shared_path}/config/db_settings.#{fetch(:stage)}.php", raise_on_non_zero_exit: false) %>
47
+ include('<%= shared_path %>/config/db_settings.<%= fetch(:stage) %>.php');
48
+ <% end %>
49
+ <% if execute(:test, '-e', "#{shared_path}/config/install_tool_password.php", raise_on_non_zero_exit: false) %>
50
+ include('<%= shared_path %>/config/install_tool_password.php');
51
+ <% end %>
52
+ <% if execute(:test, '-e', "#{shared_path}/config/encryption_key.php", raise_on_non_zero_exit: false) %>
53
+ include('<%= shared_path %>/config/encryption_key.php');
54
+ <% end %>
55
+ <% if execute(:test, '-e', "#{shared_path}/config/caretaker_instance_keys.php", raise_on_non_zero_exit: false) %>
56
+ include('<%= shared_path %>/config/caretaker_instance_keys.php');
57
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <?php
2
+
3
+ $handle = fopen('<%= fetch(:caretaker_instance_keys_path) %>', 'w');
4
+ fwrite($handle, "<?php
5
+ \$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance'] = serialize(
6
+ array_replace_recursive(
7
+ unserialize(\$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance']),
8
+ array (
9
+ 'crypto.' => array(
10
+ 'instance.' => array(
11
+ 'publicKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_public_key_path) %>')) . "',
12
+ 'privateKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_private_key_path) %>')) . "'
13
+ )
14
+ )
15
+ )
16
+ )
17
+ );
18
+ ?>");
metadata ADDED
@@ -0,0 +1,222 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dkdeploy-typo3-cms
3
+ version: !ruby/object:Gem::Version
4
+ version: 7.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kieran Hayes
8
+ - Timo Webler
9
+ - Nicolai Reuschling
10
+ - Luka Lüdicke
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2017-01-16 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: bundler
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.12.5
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 1.12.5
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: '11.2'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '11.2'
44
+ - !ruby/object:Gem::Dependency
45
+ name: rubocop
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - "~>"
49
+ - !ruby/object:Gem::Version
50
+ version: '0.46'
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '0.46'
58
+ - !ruby/object:Gem::Dependency
59
+ name: dkdeploy-test_environment
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: '1.0'
65
+ type: :development
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '1.0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: dkdeploy-php
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '7.0'
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '7.0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: phpass-ruby
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - "~>"
91
+ - !ruby/object:Gem::Version
92
+ version: '0.1'
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '0.1'
100
+ description: dkd TYPO3 deployment tasks and strategies
101
+ email:
102
+ - kieran.hayes@dkd.de
103
+ - timo.webler@dkd.de
104
+ - nicolai.reuschling@dkd.de
105
+ - luka.luedicke@dkd.de
106
+ executables: []
107
+ extensions: []
108
+ extra_rdoc_files: []
109
+ files:
110
+ - ".gitignore"
111
+ - ".rubocop.yml"
112
+ - ".travis.yml"
113
+ - Berksfile
114
+ - Berksfile.lock
115
+ - CHANGELOG.md
116
+ - CONTRIBUTORS.md
117
+ - Gemfile
118
+ - LICENSE
119
+ - README.md
120
+ - Rakefile
121
+ - Vagrantfile
122
+ - assets/dkdeploy-logo.png
123
+ - config/vm/cookbooks/dkdeploy-typo3-cms/metadata.rb
124
+ - config/vm/cookbooks/dkdeploy-typo3-cms/recipes/default.rb
125
+ - dkdeploy-typo3-cms.gemspec
126
+ - features/advanced_typo3.feature
127
+ - features/caretaker_key_management.feature
128
+ - features/clear_cache_on_rollback.feature
129
+ - features/cli.feature
130
+ - features/step_definitions/mysql.rb
131
+ - features/step_definitions/typo3.rb
132
+ - features/support/env.rb
133
+ - features/typo3.feature
134
+ - features/typoscript_upload_and_merge_config.feature
135
+ - features/typoscript_upload_and_merge_pagets.feature
136
+ - features/typoscript_upload_and_merge_userts.feature
137
+ - features/update_database.feature
138
+ - lib/capistrano/dkdeploy/typo3_cms.rb
139
+ - lib/dkdeploy/typo3/cms.rb
140
+ - lib/dkdeploy/typo3/cms/dsl.rb
141
+ - lib/dkdeploy/typo3/cms/helpers/cli.rb
142
+ - lib/dkdeploy/typo3/cms/helpers/erb.rb
143
+ - lib/dkdeploy/typo3/cms/i18n.rb
144
+ - lib/dkdeploy/typo3/cms/tasks/cache.rake
145
+ - lib/dkdeploy/typo3/cms/tasks/caretaker_key_management.rake
146
+ - lib/dkdeploy/typo3/cms/tasks/cli.rake
147
+ - lib/dkdeploy/typo3/cms/tasks/typo3.rake
148
+ - lib/dkdeploy/typo3/cms/tasks/typoscript.rake
149
+ - lib/dkdeploy/typo3/cms/version.rb
150
+ - spec/fixtures/application/Capfile
151
+ - spec/fixtures/application/Gemfile
152
+ - spec/fixtures/application/config/deploy.rb
153
+ - spec/fixtures/application/config/deploy/dev.rb
154
+ - spec/fixtures/application/htdocs/.hidden/.gitkeep
155
+ - spec/fixtures/application/htdocs/catalog/index.html
156
+ - spec/fixtures/application/htdocs/composer.json
157
+ - spec/fixtures/application/htdocs/typo3/cli_dispatch.phpsh
158
+ - spec/fixtures/application/htdocs/typo3conf/AdditionalConfiguration.php
159
+ - spec/fixtures/application/htdocs/typo3conf/LocalConfiguration.php
160
+ - spec/fixtures/application/htdocs/typo3conf/PackageStates.php
161
+ - spec/fixtures/application/vendor/composer.phar
162
+ - spec/fixtures/capistrano/configuration/additional_configuration_for_server.rb
163
+ - spec/fixtures/capistrano/configuration/cli_break_after_one_run_in_release_path.rb
164
+ - spec/fixtures/capistrano/configuration/cli_break_after_three_runs_in_release_path.rb
165
+ - spec/fixtures/capistrano/configuration/cli_test_tasks.rb
166
+ - spec/fixtures/capistrano/configuration/cli_test_tasks_with_path.rb
167
+ - vendor/AdditionalConfiguration.php.erb
168
+ - vendor/create_caretaker_instance_keys.php.erb
169
+ homepage: https://github.com/dkdeploy/dkdeploy-typo3-cms
170
+ licenses:
171
+ - MIT
172
+ metadata: {}
173
+ post_install_message:
174
+ rdoc_options: []
175
+ require_paths:
176
+ - lib
177
+ required_ruby_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '2.1'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ requirements: []
188
+ rubyforge_project:
189
+ rubygems_version: 2.6.8
190
+ signing_key:
191
+ specification_version: 4
192
+ summary: dkd TYPO3 deployment tasks and strategies
193
+ test_files:
194
+ - features/advanced_typo3.feature
195
+ - features/caretaker_key_management.feature
196
+ - features/clear_cache_on_rollback.feature
197
+ - features/cli.feature
198
+ - features/step_definitions/mysql.rb
199
+ - features/step_definitions/typo3.rb
200
+ - features/support/env.rb
201
+ - features/typo3.feature
202
+ - features/typoscript_upload_and_merge_config.feature
203
+ - features/typoscript_upload_and_merge_pagets.feature
204
+ - features/typoscript_upload_and_merge_userts.feature
205
+ - features/update_database.feature
206
+ - spec/fixtures/application/Capfile
207
+ - spec/fixtures/application/Gemfile
208
+ - spec/fixtures/application/config/deploy.rb
209
+ - spec/fixtures/application/config/deploy/dev.rb
210
+ - spec/fixtures/application/htdocs/.hidden/.gitkeep
211
+ - spec/fixtures/application/htdocs/catalog/index.html
212
+ - spec/fixtures/application/htdocs/composer.json
213
+ - spec/fixtures/application/htdocs/typo3/cli_dispatch.phpsh
214
+ - spec/fixtures/application/htdocs/typo3conf/AdditionalConfiguration.php
215
+ - spec/fixtures/application/htdocs/typo3conf/LocalConfiguration.php
216
+ - spec/fixtures/application/htdocs/typo3conf/PackageStates.php
217
+ - spec/fixtures/application/vendor/composer.phar
218
+ - spec/fixtures/capistrano/configuration/additional_configuration_for_server.rb
219
+ - spec/fixtures/capistrano/configuration/cli_break_after_one_run_in_release_path.rb
220
+ - spec/fixtures/capistrano/configuration/cli_break_after_three_runs_in_release_path.rb
221
+ - spec/fixtures/capistrano/configuration/cli_test_tasks.rb
222
+ - spec/fixtures/capistrano/configuration/cli_test_tasks_with_path.rb