capistrano-cul 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 6da6c2bee3ddded589694efdcf93f211ba7deab6
4
- data.tar.gz: fc9fa5f5e9de5cc55682e7d9598d56f0302b1213
3
+ metadata.gz: 161c5a342d46c0ab1d91da08ed039d91d75e9afa
4
+ data.tar.gz: 974295390ae434f9b2092e9c6f2592360f3f9d60
5
5
  SHA512:
6
- metadata.gz: 4a18bd826ed7cfb61e7bbaa7710a573c78dfc6845a44ddbd5eae1988ba852cd89b128f23e312c194f109d2245282a8eaac5d9dff0a9279619d0ab9cbe3303881
7
- data.tar.gz: 0f788a729b1f170f4b9e0d1d08e015ef00138f163f1bd721f6d9077172c396081b58704b7bbc0764d91304573e6e4b57745ecbfae5733b1095aed5833876ac02
6
+ metadata.gz: 33997e92ca28ff3af7e25dbdcd0d4ec5228c9f5adaefde025a08aa2cae89ec385e18058c293d11961155e8fc92341ca5c79e02264dca4b71b1641423f4783ea7
7
+ data.tar.gz: 3ed6a1652ecf0d239a3cf21f5c9617de61b028a6e11b3658e0c0b83e09c33b830028dfce54544ed52fc61ac5b449228c3e37933ba15858ad52ae72d07e6545e4
data/README.md CHANGED
@@ -89,8 +89,8 @@ set :wp_custom_themes # (hash) Map of custom theme file/directory names to repo-
89
89
  Here's a sample configuration:
90
90
 
91
91
  ```ruby
92
- set :wp_docroot, "#{fetch(:deploy_to)}/wp_docroot"
93
- set :wp_data_path, "/path/to/data/directory/#{fetch(:application)}_#{fetch(:stage)}"
92
+ set :wp_docroot, "#{fetch(:deploy_to)}/wp-docroot"
93
+ set :wp_content_path, "#{fetch(:deploy_to)}/wp-content"
94
94
  set :multisite, false
95
95
  set :title, 'Amazing WordPress Site'
96
96
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -20,7 +20,7 @@ namespace :cul do
20
20
  # capture version before running any other commands.
21
21
  puts "Setting up wp_version: #{fetch(:wp_version)}"
22
22
 
23
- require_cap_params!([:branch, :wp_version, :wp_docroot, :wp_data_path])
23
+ require_cap_params!([:branch, :wp_version, :wp_docroot, :wp_content_path])
24
24
 
25
25
  on roles(:web) do
26
26
  wp_docroot_wp_config_file_path = File.join(fetch(:wp_docroot), 'wp-config.php')
@@ -30,7 +30,7 @@ namespace :cul do
30
30
  shared_wp_config_file_path = shared_path.join('wp-config.php')
31
31
  shared_robots_txt_file_path = shared_path.join('robots.txt')
32
32
 
33
- wp_data_wp_content_path = File.join(fetch(:wp_data_path), 'wp-content')
33
+ wp_content_path = fetch(:wp_content_path)
34
34
 
35
35
  invoke 'deploy' # Deploy before doing setup
36
36
 
@@ -40,8 +40,8 @@ namespace :cul do
40
40
  # Make full path to wp_docroot directory if not exist
41
41
  execute :mkdir, '-p', fetch(:wp_docroot)
42
42
 
43
- # Make full path to wp_data_path if not exist
44
- execute :mkdir, '-p', fetch(:wp_data_path)
43
+ # Make full path to wp_content_path if not exist
44
+ execute :mkdir, '-p', wp_content_path
45
45
 
46
46
  # If wp_docroot/wp-includes does not exist, do wordpress download
47
47
  unless test("[ -d #{File.join(fetch(:wp_docroot), 'wp-includes')} ]")
@@ -67,15 +67,15 @@ namespace :cul do
67
67
  # Create symlink for wp_document_root robots.txt to 'shared' version.
68
68
  execute :ln, '-sf', shared_robots_txt_file_path, wp_docroot_robots_txt_file_path
69
69
 
70
- # Check for wp-content directory at wp_data_wp_content_path. Create if it doesn't exist.
71
- unless test("[ -d #{wp_data_wp_content_path} ]")
70
+ # Check for actual wp-content directory at wp_content_path. Create if it doesn't exist.
71
+ unless test("[ -d #{wp_content_path} ]")
72
72
  # If no wp-config.php file is found in the 'shared' directory, copy WordPress built-in wp-config-sample.php to there
73
- execute :cp, '-r', wp_docroot_wp_content_path, wp_data_wp_content_path
73
+ execute :cp, '-r', wp_docroot_wp_content_path, wp_content_path
74
74
  end
75
75
  # Delete original wp-content directory
76
76
  execute :rm, '-rf', wp_docroot_wp_content_path
77
- # Create symlink for wp_document_root wp-content to wp_data_wp_content_path
78
- execute :ln, '-sf', wp_data_wp_content_path, wp_docroot_wp_content_path
77
+ # Create symlink for wp_document_root wp-content to wp_content_path
78
+ execute :ln, '-sf', wp_content_path, wp_docroot_wp_content_path
79
79
  end
80
80
 
81
81
  symlink_custom_plugins_and_themes
@@ -112,34 +112,34 @@ namespace :cul do
112
112
 
113
113
  def self.symlink_custom_plugins_and_themes
114
114
  on roles(:web) do
115
- wp_data_wp_content_path = File.join(fetch(:wp_data_path), 'wp-content')
116
- wp_data_plugin_path = File.join(wp_data_wp_content_path, 'plugins')
117
- wp_data_mu_plugin_path = File.join(wp_data_wp_content_path, 'mu-plugins')
118
- wp_data_themes_path = File.join(wp_data_wp_content_path, 'themes')
115
+ wp_content_path = fetch(:wp_content_path)
116
+ wp_content_plugin_path = File.join(wp_content_path, 'plugins')
117
+ wp_content_mu_plugin_path = File.join(wp_content_path, 'mu-plugins')
118
+ wp_content_themes_path = File.join(wp_content_path, 'themes')
119
119
 
120
- if test("[ -d #{wp_data_wp_content_path} ]")
120
+ if test("[ -d #{wp_content_path} ]")
121
121
 
122
122
  # Create necessary directories
123
- execute :mkdir, '-p', wp_data_plugin_path
124
- execute :mkdir, '-p', wp_data_mu_plugin_path
125
- execute :mkdir, '-p', wp_data_themes_path
123
+ execute :mkdir, '-p', wp_content_plugin_path
124
+ execute :mkdir, '-p', wp_content_mu_plugin_path
125
+ execute :mkdir, '-p', wp_content_themes_path
126
126
 
127
127
  # Remove old symlinks
128
- [wp_data_plugin_path, wp_data_themes_path].each do |dir|
128
+ [wp_content_plugin_path, wp_content_mu_plugin_path, wp_content_themes_path].each do |dir|
129
129
  execute :find, dir, '-maxdepth 1', '-type l', '-exec rm {} \;'
130
130
  end
131
131
 
132
132
  # Add latest symlinks
133
133
  fetch(:wp_custom_plugins, {}).each do |plugin, repo_relative_path|
134
- execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_data_plugin_path, plugin)
134
+ execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_content_plugin_path, plugin)
135
135
  end
136
136
 
137
137
  fetch(:wp_custom_mu_plugins, {}).each do |mu_plugin, repo_relative_path|
138
- execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_data_mu_plugin_path, mu_plugin)
138
+ execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_content_mu_plugin_path, mu_plugin)
139
139
  end
140
140
 
141
141
  fetch(:wp_custom_themes, {}).each do |theme, repo_relative_path|
142
- execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_data_themes_path, theme)
142
+ execute :ln, '-sf', File.join(current_path, repo_relative_path), File.join(wp_content_themes_path, theme)
143
143
  end
144
144
  end
145
145
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-cul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carla Galarza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-08-14 00:00:00.000000000 Z
12
+ date: 2017-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.5.2
83
+ rubygems_version: 2.6.12
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Common capistrano tasks shared across projects at CUL