wslave 0.0.11 → 0.0.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89f19d84a47dbf216cbe71bbe9484a14b2884707
4
- data.tar.gz: 3e12604338f17a7325ba9ac7f773eee6b08770c4
3
+ metadata.gz: 58645e2dc583bfadc3b2bc439a8e72e9bcd98d2b
4
+ data.tar.gz: 6c028b51d4b5e302f93cc5739545a7a9632a13b3
5
5
  SHA512:
6
- metadata.gz: b32b603ef3c6e920a244d898692510a05becaefded65edca93f246f01e550f71b242f431de1effe153324d274e252859364b73acebfe50cd07f9d2679b343765
7
- data.tar.gz: 3cf50f5eeec130cde368f3a67f906c9f749bc338f820a6ccccca07829195ce9b7572e750d66892d9998afdc3fabace4332dadc73d29ec04ec385bbaa6ba932ca
6
+ metadata.gz: 37ecc69147551a32752071f7e7379aa4dbc9e6079c9a9a6f2edabea2fa788d610531dc543d87e600443b3a1cf2adfda612bcfd6d523208ffe41d91709b227b42
7
+ data.tar.gz: e2be211c0fcc96c4d415700b246dc1d83d13269a6c5ed77881ebcd757793dbbdf6a9fa120e5cf55b53dc89dfb1e3872b00ae2e5339b3b857b07adf35aeaed420
data/base/Rakefile CHANGED
@@ -10,8 +10,10 @@ namespace :db do
10
10
  desc 'Backup development container database to db/dev (container must be running)'
11
11
  task :backup do
12
12
  rm_dbfile('dev')
13
- puts "Creating backup of development database..."
13
+ puts 'Creating backup of development database...'
14
14
  sh 'docker-compose exec db sh -c "exec mysqldump --single-transaction -hlocalhost -uroot -pwordpress wordpress > /db/wordpress.sql"'
15
+ sh 'docker-compose exec db sh -c "chown :www-data /db/wordpress.sql"'
16
+ sh 'docker-compose exec db sh -c "chmod 664 /db/wordpress.sql"'
15
17
  end
16
18
 
17
19
  desc 'Set the development container database image to the active image'
@@ -1,5 +1,5 @@
1
1
  # config valid only for current version of Capistrano
2
- lock "3.9.1"
2
+ lock "3.10.0"
3
3
 
4
4
  require 'yaml'
5
5
  opts = YAML.load_file('config/definitions.yml')
data/lib/wslave_docker.rb CHANGED
@@ -36,7 +36,7 @@ class WSlaveDocker
36
36
  def _unfuck_dot_htaccess()
37
37
  begin
38
38
  FileUtils.cp_r("#{__dir__}/../base/public/.htaccess", "./public/.htaccess")
39
- FileUtils.chmod(0444, "./public/.htaccess")
39
+ # FileUtils.chmod(0444, "./public/.htaccess")
40
40
  rescue => e
41
41
  # noop
42
42
  end
data/lib/wslave_tools.rb CHANGED
@@ -10,16 +10,54 @@ class WSlaveTools
10
10
  false
11
11
  end
12
12
 
13
- def self.set_dev_perms
13
+ def self.set_dev_perms(path = '.')
14
14
  begin
15
- FileUtils.chown(nil, 'www-data', 'public/wp-content/themes')
16
- FileUtils.chmod(0775, 'public/wp-content/themes')
17
- FileUtils.chown(nil, 'www-data', 'public/wp-content/uploads')
18
- FileUtils.chmod(0775, 'public/wp-content/uploads')
19
- FileUtils.chown(nil, 'www-data', 'public/wp-content/plugins')
20
- FileUtils.chmod(0775, 'public/wp-content/plugins')
21
- FileUtils.chown(nil, 'www-data', 'public/wp-content/upgrade')
22
- FileUtils.chmod(0775, 'public/wp-content/upgrade')
15
+ unless Dir.exist?("#{path}/public/wp-content/upgrade")
16
+ fileutils.mkdir("#{path}/public/wp-content/upgrade")
17
+ fileutils.touch("#{path}/public/wp-content/upgrade/.gitkeep")
18
+ end
19
+ FileUtils.chown(nil, 'www-data', "#{path}/public/wp-content/themes")
20
+ FileUtils.chmod(0775, "#{path}/public/wp-content/themes")
21
+ FileUtils.chown(nil, 'www-data', "#{path}/public/wp-content/uploads")
22
+ FileUtils.chmod(0775, "#{path}/public/wp-content/uploads")
23
+ FileUtils.chown(nil, 'www-data', "#{path}/public/wp-content/plugins")
24
+ FileUtils.chmod(0775, "#{path}/public/wp-content/plugins")
25
+ FileUtils.chown(nil, 'www-data', "#{path}/public/wp-content/upgrade")
26
+ FileUtils.chmod(0775, "#{path}/public/wp-content/upgrade")
27
+
28
+ unless Dir.exist?("#{path}/db")
29
+ FileUtils.mkdir("#{path}/db")
30
+ end
31
+ FileUtils.chown(nil, 'www-data', "#{path}/db")
32
+ FileUtils.chmod(0775, "#{path}/db")
33
+
34
+ unless Dir.exist?("#{path}/db/active")
35
+ FileUtils.mkdir("#{path}/db/active")
36
+ FileUtils.touch("#{path}/db/active/.gitkeep")
37
+ end
38
+ FileUtils.chown(nil, 'www-data', "#{path}/db/active")
39
+ FileUtils.chmod(0775, "#{path}/db/active")
40
+
41
+ unless Dir.exist?("#{path}/db/dev")
42
+ FileUtils.mkdir("#{path}/db/dev")
43
+ FileUtils.touch("#{path}/db/dev/.gitkeep")
44
+ end
45
+ FileUtils.chown(nil, 'www-data', "#{path}/db/dev")
46
+ FileUtils.chmod(0775, "#{path}/db/dev")
47
+
48
+ unless Dir.exist?("#{path}/db/staging")
49
+ FileUtils.mkdir("#{path}/db/staging")
50
+ FileUtils.touch("#{path}/db/staging/.gitkeep")
51
+ end
52
+ FileUtils.chown(nil, 'www-data', "#{path}/db/staging")
53
+ FileUtils.chmod(0775, "#{path}/db/staging")
54
+
55
+ unless Dir.exist?("#{path}/db/production")
56
+ FileUtils.mkdir("#{path}/db/production")
57
+ FileUtils.touch("#{path}/db/production/.gitkeep")
58
+ end
59
+ FileUtils.chown(nil, 'www-data', "#{path}/db/production")
60
+ FileUtils.chmod(0775, "#{path}/db/production")
23
61
  rescue Errno::EPERM
24
62
  puts "!!!WARNING!!! Your user does not belong to the www-data group!\n" \
25
63
  " >>> Unable to make folders writable for devlopment. <<<\n" \
@@ -27,6 +65,9 @@ class WSlaveTools
27
65
  end
28
66
  end
29
67
 
68
+ def self._check_and_mk_dirs(path = '.')
69
+ end
70
+
30
71
  def self.update_submodules
31
72
  `git submodule update --init --recursive`
32
73
  end
data/lib/wslave_update.rb CHANGED
@@ -19,7 +19,7 @@ class WSlaveUpdate
19
19
  Dir.chdir path
20
20
 
21
21
  FileUtils.cp("#{base_path}/Capfile", "#{path}/Capfile")
22
- FileUtils.cp("#{base_path}/Gemfile", "#{path}/Gemfile")
22
+ # FileUtils.cp("#{base_path}/Gemfile", "#{path}/Gemfile")
23
23
  FileUtils.cp("#{base_path}/Rakefile", "#{path}/Rakefile")
24
24
  FileUtils.cp("#{base_path}/Dockerfile", "#{path}/Dockerfile")
25
25
  FileUtils.cp("#{base_path}/docker-compose.yml", "#{path}/docker-compose.yml")
@@ -33,6 +33,6 @@ class WSlaveUpdate
33
33
  File.open("#{path}/config/.wslave", 'w') {|f| f.write(spec.version)}
34
34
 
35
35
  Dir.chdir path
36
- WSlaveTools.set_dev_perms
36
+ WSlaveTools.set_dev_perms(path)
37
37
  end
38
38
  end
data/wslave.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'wslave'
3
- s.version = '0.0.11'
3
+ s.version = '0.0.12'
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,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.bindir = 'bin'
21
21
  s.executables << 'wslave'
22
22
 
23
- s.add_dependency 'capistrano', '= 3.9.1'
23
+ s.add_dependency 'capistrano', '= 3.10.0'
24
24
  s.add_dependency 'capistrano-git-with-submodules', '~> 2.0'
25
25
  s.add_dependency 'capistrano-scm-copy', '~> 0.7'
26
26
 
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.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-02 00:00:00.000000000 Z
11
+ date: 2017-11-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.9.1
19
+ version: 3.10.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.9.1
26
+ version: 3.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capistrano-git-with-submodules
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.6.11
136
+ rubygems_version: 2.6.14
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: '"Word Slave" generates and controls a WordPress installation'