matthewtodd-wordpress 0.6.0 → 0.6.1
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.
- data/CHANGELOG.rdoc +5 -0
- data/lib/wordpress/cli.rb +18 -18
- data/lib/wordpress/recipes/deploy.rb +8 -5
- data/lib/wordpress.rb +1 -1
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/lib/wordpress/cli.rb
CHANGED
@@ -27,22 +27,19 @@ module Wordpress
|
|
27
27
|
END
|
28
28
|
|
29
29
|
file 'deploy.rb', <<-END
|
30
|
-
set :application,
|
31
|
-
|
32
|
-
|
33
|
-
set :database_username, 'set your database username here'
|
30
|
+
set :application, 'set your application name here'
|
31
|
+
|
32
|
+
server 'your server here', :web, :user => 'your user here'
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
set :scm, :git
|
35
|
+
set :local_repository, "your server here:git/#{application}.git"
|
36
|
+
set :repository, "/path/to/repos/git/#{application}.git"
|
37
|
+
set :git_shallow_clone, 1
|
39
38
|
|
40
|
-
|
41
|
-
# your SCM below:
|
42
|
-
# set :scm, :git
|
43
|
-
# set :git_shallow_clone, 1
|
39
|
+
set :deploy_to, '/path/to/domains/your domain here/var/www'
|
44
40
|
|
45
|
-
|
41
|
+
set :database_name, 'set your database name here'
|
42
|
+
set :database_username, 'set your database username here'
|
46
43
|
END
|
47
44
|
|
48
45
|
file 'lighttpd.conf', <<-END
|
@@ -119,11 +116,14 @@ module Wordpress
|
|
119
116
|
)
|
120
117
|
END
|
121
118
|
|
122
|
-
config = Wordpress.config(:db_name
|
123
|
-
:db_user
|
124
|
-
:db_password
|
125
|
-
:
|
126
|
-
:
|
119
|
+
config = Wordpress.config(:db_name => File.basename(base),
|
120
|
+
:db_user => 'root',
|
121
|
+
:db_password => '',
|
122
|
+
:auth_key => Digest::SHA1.hexdigest(rand.to_s),
|
123
|
+
:secure_auth_key => Digest::SHA1.hexdigest(rand.to_s),
|
124
|
+
:logged_in_key => Digest::SHA1.hexdigest(rand.to_s),
|
125
|
+
:nonce_key => Digest::SHA1.hexdigest(rand.to_s),
|
126
|
+
:abspath => '/../public/')
|
127
127
|
|
128
128
|
file 'wp-config.php', config
|
129
129
|
file 'wp-config-sample.php', config
|
@@ -161,11 +161,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
161
161
|
DESC
|
162
162
|
task :config, :except => { :no_release => true } do
|
163
163
|
require 'digest/sha1'
|
164
|
-
wp_config = Wordpress.config(:db_name
|
165
|
-
:db_user
|
166
|
-
:db_password
|
167
|
-
:
|
168
|
-
:
|
164
|
+
wp_config = Wordpress.config(:db_name => database_name,
|
165
|
+
:db_user => database_username,
|
166
|
+
:db_password => database_password,
|
167
|
+
:auth_key => Digest::SHA1.hexdigest(rand.to_s),
|
168
|
+
:secure_auth_key => Digest::SHA1.hexdigest(rand.to_s),
|
169
|
+
:logged_in_key => Digest::SHA1.hexdigest(rand.to_s),
|
170
|
+
:nonce_key => Digest::SHA1.hexdigest(rand.to_s),
|
171
|
+
:abspath => '/../current/public/')
|
169
172
|
|
170
173
|
put wp_config, "#{shared_path}/wp-config.php", :mode => 0600
|
171
174
|
end
|
data/lib/wordpress.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matthewtodd-wordpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Todd
|
@@ -56,7 +56,7 @@ rdoc_options:
|
|
56
56
|
- --main
|
57
57
|
- README.rdoc
|
58
58
|
- --title
|
59
|
-
- wordpress-0.6.
|
59
|
+
- wordpress-0.6.1
|
60
60
|
- --inline-source
|
61
61
|
- --line-numbers
|
62
62
|
- --all
|