wslave 0.3.5 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3005a61b1ba567a6fce7a42060082c45c7f325615dd3f884459c44a001b0a91b
4
- data.tar.gz: b57388304f2e9711ee41be958749bbe0d2bc99d2be320c99ac87922745df9cf1
3
+ metadata.gz: 7beef53bb5664bdd4d7c010e64130366b45d8c51e5914735d20c2c7b7c78ad49
4
+ data.tar.gz: c217df1bb2f1a3c98cb2ec235009df760e1c21edbf144187c93f92c8a4bffd97
5
5
  SHA512:
6
- metadata.gz: 8b4bbb740b9c5922bb4bd01c3b2901fa6d9fa211d54d3af3d3c6da6da80c7addd765558f0f943706b8341b065f533e7ea3cf07445e1ebb4b173e448a21d1b276
7
- data.tar.gz: 985284c6599e4675807ae3ea4ea6c2c6f363c2d14a6379fcdc6b0989cd05e3279948056f66bc36c3a336e552496cbc29ba63dc33fe295673c427241f07f37ccf
6
+ metadata.gz: ee80b70f838cfbf0747c3f671a06567f10904f420bfdbde1bfbf0eb8ff460a9e1b1c7d26b5f6e1ae35d92dfde21480f5063907357354ec06060e08212b482382
7
+ data.tar.gz: ba5543b2123617ac2cdbe19ac1e5a47a5ae1abb53b989229709eb241d67a978c9b73d0dd21731038c447ecc123a58ad0a99a2277ddf3104c2f23d2034cbb8aef
Binary file
@@ -2,8 +2,8 @@ require 'yaml'
2
2
  require 'date'
3
3
  require 'wslave_sage'
4
4
 
5
- opts = YAML.load_file('config/definitions.yml')
6
- db_info = YAML.load_file('config/database.yml')
5
+ opts = YAML.load_file('config/definitions.yml', aliases: true)
6
+ db_info = YAML.load_file('config/database.yml', aliases: true)
7
7
 
8
8
  deploy_user = opts['deployer']['user']
9
9
  deploy_group = opts['deployer']['www_data_group']
@@ -159,9 +159,9 @@ namespace :deploy do
159
159
  # replace instances of it with something that won't match
160
160
  db_data = db_data.gsub(/#{opts['deployer']['fqdn']['production']}/, anchor)
161
161
 
162
- # Set staging URL's to the anchor
163
- if opts['deployer']['fqdn']['staging'] != ''
164
- db_data = db_data.gsub(/#{opts['deployer']['fqdn']['staging']}/, anchor)
162
+ # Set production URL's to the anchor
163
+ if opts['deployer']['fqdn']['production'] != ''
164
+ db_data = db_data.gsub(/#{opts['deployer']['fqdn']['production']}/, anchor)
165
165
  end
166
166
 
167
167
  # Set localhost entries to the anchor
@@ -197,6 +197,16 @@ namespace :deploy do
197
197
  end
198
198
  end
199
199
 
200
+ desc 'Creates an additional symlink at the path specified in definitions.yml to current/public'
201
+ task :set_symlink do
202
+ on roles(:web) do
203
+ puts 'Setting symlink'
204
+ if (opts['deployer'].include?('symlink') && opts['deployer']['symlink'].include?('production'))
205
+ execute "ln -s #{deploy_path}/current/public #{opts['deployer']['root']}/#{opts['deployer']['symlink']['production']}"
206
+ end
207
+ end
208
+ end
209
+
200
210
  desc 'Perform special seed tasks required on intial seed'
201
211
  task :initial do
202
212
  on roles(:web) do
@@ -220,6 +230,7 @@ namespace :deploy do
220
230
  invoke('deploy:chikan')
221
231
  invoke('deploy:sage')
222
232
  invoke('deploy:set_permissions')
233
+ invoke('deploy:set_symlink')
223
234
  end
224
235
  end
225
236
 
@@ -2,8 +2,8 @@ require 'yaml'
2
2
  require 'date'
3
3
  require 'wslave_sage'
4
4
 
5
- opts = YAML.load_file('config/definitions.yml')
6
- db_info = YAML.load_file('config/database.yml')
5
+ opts = YAML.load_file('config/definitions.yml', aliases: true)
6
+ db_info = YAML.load_file('config/database.yml', aliases: true)
7
7
 
8
8
  deploy_user = opts['deployer']['user']
9
9
  deploy_group = opts['deployer']['www_data_group']
@@ -197,6 +197,16 @@ namespace :deploy do
197
197
  end
198
198
  end
199
199
 
200
+ desc 'Creates an additional symlink at the path specified in definitions.yml to current/public'
201
+ task :set_symlink do
202
+ on roles(:web) do
203
+ puts 'Setting symlink'
204
+ if (opts['deployer'].include?('symlink') && opts['deployer']['symlink'].include?('staging'))
205
+ execute "ln -s #{deploy_path}/current/public #{opts['deployer']['root']}/#{opts['deployer']['symlink']['staging']}"
206
+ end
207
+ end
208
+ end
209
+
200
210
  desc 'Perform special seed tasks required on intial seed'
201
211
  task :initial do
202
212
  on roles(:web) do
@@ -220,6 +230,7 @@ namespace :deploy do
220
230
  invoke('deploy:chikan')
221
231
  invoke('deploy:sage')
222
232
  invoke('deploy:set_permissions')
233
+ invoke('deploy:set_symlink')
223
234
  end
224
235
  end
225
236
 
@@ -8,8 +8,8 @@ def GenerateWPConfig(profile = 'production', out_path = './')
8
8
  config_path = File.dirname(File.expand_path(File.dirname(__FILE__)))
9
9
  vars = {}
10
10
  vars[:profile] = profile.to_sym
11
- vars[:db_info] = YAML.load_file("#{config_path}/database.yml")
12
- vars[:salt] = YAML.load_file("#{config_path}/salts.yml")
11
+ vars[:db_info] = YAML.load_file("#{config_path}/database.yml", aliases: true)
12
+ vars[:salt] = YAML.load_file("#{config_path}/salts.yml", aliases: true)
13
13
 
14
14
  erb_source = File.read("#{config_path}/deploy-tools/wp-config.php.erb")
15
15
  rend = ERB.new(erb_source)
@@ -1,8 +1,8 @@
1
1
  # config valid only for current version of Capistrano
2
- lock "3.16.0"
2
+ lock "3.17.0"
3
3
 
4
4
  require 'yaml'
5
- opts = YAML.load_file('config/definitions.yml')
5
+ opts = YAML.load_file('config/definitions.yml', aliases: true)
6
6
 
7
7
  set :application, opts['app']['name']
8
8
  set :repo_url, opts['app']['repo']
@@ -1,24 +1,22 @@
1
- <IfModule mod_rewrite.c>
2
- RewriteEngine On
3
- RewriteBase /
1
+ RewriteEngine On
2
+ RewriteBase /
4
3
 
5
- # Open the subfoldered index when accessing the apex
6
- RewriteRule ^$ wordpress/index.php [L]
4
+ # Open the subfoldered index when accessing the apex
5
+ RewriteRule ^$ wordpress/index.php [L]
7
6
 
8
- # Special forwarding to wp-admin
9
- RewriteRule ^wp-admin$ wp-admin/
10
- RewriteRule ^wp-admin/(.*) wordpress/wp-admin/$1 [R=301,L]
7
+ # Special forwarding to wp-admin
8
+ RewriteRule ^wp-admin$ wp-admin/
9
+ RewriteRule ^wp-admin/(.*) wordpress/wp-admin/$1 [R=301,L]
11
10
 
12
- # Skip real files and directories
13
- RewriteCond %{REQUEST_FILENAME} !-f
14
- RewriteCond %{REQUEST_FILENAME} !-d
11
+ # Skip real files and directories
12
+ RewriteCond %{REQUEST_FILENAME} !-f
13
+ RewriteCond %{REQUEST_FILENAME} !-d
15
14
 
16
- # Otherwise send it to WordPress
17
- RewriteRule .* wordpress/index.php [L]
15
+ # Otherwise send it to WordPress
16
+ RewriteRule .* wordpress/index.php [L]
18
17
 
19
18
  # BEGIN WordPress
20
19
  # END WordPress
21
- </IfModule>
22
20
 
23
21
  <FilesMatch ".+\.(blade\.php)$">
24
22
  <IfModule mod_authz_core.c>
@@ -31,6 +29,3 @@
31
29
  Deny from all
32
30
  </IfModule>
33
31
  </FilesMatch>
34
-
35
- php_value upload_max_filesize 0
36
- php_value post_max_size 0
data/lib/wslave_new.rb CHANGED
@@ -53,7 +53,7 @@ class WSlaveNew
53
53
  end
54
54
  end
55
55
 
56
- `cd #{path} && git submodule add git://github.com/WordPress/WordPress.git public/wordpress`
56
+ `cd #{path} && git submodule add https://github.com/WordPress/WordPress.git public/wordpress`
57
57
  `cd #{path} && git submodule update --init --recursive public/wordpress`
58
58
  if (version == 'edge' || version == 'master')
59
59
  `cd #{path}/public/wordpress && git checkout master`
@@ -12,6 +12,10 @@ deployer:
12
12
  branch:
13
13
  staging: master
14
14
  production: master
15
+ # Uncomment this to create a symlink to the deploy root's current/public at the specified location relative to the deploy root
16
+ # symlink:
17
+ # staging:
18
+ # production:
15
19
  app:
16
20
  name:
17
21
  repo:
data/wslave.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'wslave'
3
- s.version = '0.3.5'
3
+ s.version = '0.3.8'
4
4
  s.licenses = ['GPL-3.0', 'AGPL-3.0']
5
5
  s.summary = '"Word Slave" generates and controls a WordPress installation'
6
6
  s.description = 'Word Slave includes the wslave command and a control library to generate a ' \
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
20
20
  s.bindir = 'bin'
21
21
  s.executables << 'wslave'
22
22
 
23
- s.add_dependency 'capistrano', '= 3.16.0'
24
- s.add_dependency 'capistrano-git-with-submodules', '~> 2.0', '2.0.4'
23
+ s.add_dependency 'capistrano', '= 3.17.0'
24
+ s.add_dependency 'capistrano-git-with-submodules', '~> 2.0', '2.0.6'
25
25
  s.add_dependency 'capistrano-scm-copy', '~> 0.7', '0.7.0'
26
26
  s.add_dependency 'capistrano-file-permissions', '~> 1.0', '1.0.0'
27
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wslave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.16.0
19
+ version: 3.17.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.16.0
26
+ version: 3.17.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capistrano-git-with-submodules
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '2.0'
34
34
  - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 2.0.4
36
+ version: 2.0.6
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2.0'
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
- version: 2.0.4
46
+ version: 2.0.6
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capistrano-scm-copy
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,7 @@ files:
164
164
  - base/config/deploy-tools/wp-config.php.erb
165
165
  - base/config/deploy-tools/wp-config.php.local
166
166
  - base/config/deploy.rb
167
+ - base/config/deploy/.staging.rb.swp
167
168
  - base/config/deploy/production.rb
168
169
  - base/config/deploy/staging.rb
169
170
  - base/docker-compose.yml