wordmove 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.mdown +9 -1
- data/lib/wordmove/cli.rb +37 -28
- data/lib/wordmove/deployer/base.rb +20 -0
- data/lib/wordmove/generators/Movefile +3 -0
- data/lib/wordmove/version.rb +1 -1
- metadata +26 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: da3433741e44f5370da4d08531069e1ce0cde347
|
4
|
+
data.tar.gz: d414446e93618ed466f3eb5537b912b91e1beeab
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 125846b75ad78e19ecc9dc761b97968c0523fe07b9f7e3550eec71d5f5772616d8f12bf3a848f58fe27b9e73b8a4e3ed3eda527ef1108df8d07eac73121c6d1e
|
7
|
+
data.tar.gz: 264934b9ab412dca254e65472cb05586d503e2daa67af5c91685a5359ade1df993a78ab54fbbddd5b4fcfe8ede60721ca68c84641b070ae7b13e8c9464551d3f
|
data/README.mdown
CHANGED
@@ -51,11 +51,19 @@ local:
|
|
51
51
|
staging:
|
52
52
|
vhost: "http://remote.com"
|
53
53
|
wordpress_path: "/var/www/your_site"
|
54
|
-
# paths: # you can customize wordpress paths
|
54
|
+
# paths: # you can customize wordpress internal paths
|
55
55
|
# wp_content: "wp-content"
|
56
56
|
# uploads: "wp-content/uploads"
|
57
57
|
# plugins: "wp-content/plugins"
|
58
58
|
# languages: "wp-content/languages"
|
59
|
+
exclude:
|
60
|
+
- ".sass-cache"
|
61
|
+
- ".git"
|
62
|
+
- "bin"
|
63
|
+
- "tmp/*"
|
64
|
+
- "wp-content/*.sql"
|
65
|
+
- "Gemfile*"
|
66
|
+
- "Movefile"
|
59
67
|
database:
|
60
68
|
name: "database_name"
|
61
69
|
user: "user"
|
data/lib/wordmove/cli.rb
CHANGED
@@ -10,43 +10,52 @@ module Wordmove
|
|
10
10
|
Wordmove::Generators::Movefile.start
|
11
11
|
end
|
12
12
|
|
13
|
+
shared_options = {
|
14
|
+
:wordpress => { :aliases => "-w", :type => :boolean },
|
15
|
+
:uploads => { :aliases => "-u", :type => :boolean },
|
16
|
+
:themes => { :aliases => "-t", :type => :boolean },
|
17
|
+
:plugins => { :aliases => "-p", :type => :boolean },
|
18
|
+
:languages => { :aliases => "-l", :type => :boolean },
|
19
|
+
:db => { :aliases => "-d", :type => :boolean },
|
20
|
+
|
21
|
+
:verbose => { :aliases => "-v", :type => :boolean },
|
22
|
+
:simulate => { :aliases => "-s", :type => :boolean },
|
23
|
+
:environment => { :aliases => "-e" },
|
24
|
+
:config => { :aliases => "-c" },
|
25
|
+
|
26
|
+
:no_adapt => { :type => :boolean },
|
27
|
+
:all => { :type => :boolean }
|
28
|
+
}
|
29
|
+
|
30
|
+
no_tasks do
|
31
|
+
def handle_options(options)
|
32
|
+
%w(wordpress uploads themes plugins languages db).map(&:to_sym).each do |task|
|
33
|
+
if options[task] || options[:all]
|
34
|
+
yield task
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
13
40
|
desc "pull", "Pulls WP data from remote host to the local machine"
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
method_option :plugins, :aliases => "-p", :type => :boolean
|
18
|
-
method_option :languages, :aliases => "-l", :type => :boolean
|
19
|
-
method_option :verbose, :aliases => "-v", :type => :boolean
|
20
|
-
method_option :simulate, :aliases => "-s", :type => :boolean
|
21
|
-
method_option :no_adapt, :type => :boolean
|
22
|
-
method_option :environment, :aliases => "-e"
|
23
|
-
method_option :config, :aliases => "-c"
|
41
|
+
shared_options.each do |option, args|
|
42
|
+
method_option option, args
|
43
|
+
end
|
24
44
|
def pull
|
25
45
|
deployer = Wordmove::Deployer::Base.deployer_for(options)
|
26
|
-
|
27
|
-
|
28
|
-
deployer.send("pull_#{task}")
|
29
|
-
end
|
46
|
+
handle_options(options) do |task|
|
47
|
+
deployer.send("pull_#{task}")
|
30
48
|
end
|
31
49
|
end
|
32
50
|
|
33
51
|
desc "push", "Pushes WP data from local machine to remote host"
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
method_option :plugins, :aliases => "-p", :type => :boolean
|
38
|
-
method_option :languages, :aliases => "-l", :type => :boolean
|
39
|
-
method_option :verbose, :aliases => "-v", :type => :boolean
|
40
|
-
method_option :simulate, :aliases => "-s", :type => :boolean
|
41
|
-
method_option :no_adapt, :type => :boolean
|
42
|
-
method_option :environment, :aliases => "-e"
|
43
|
-
method_option :config, :aliases => "-c"
|
52
|
+
shared_options.each do |option, args|
|
53
|
+
method_option option, args
|
54
|
+
end
|
44
55
|
def push
|
45
56
|
deployer = Wordmove::Deployer::Base.deployer_for(options)
|
46
|
-
|
47
|
-
|
48
|
-
deployer.send("push_#{task}")
|
49
|
-
end
|
57
|
+
handle_options(options) do |task|
|
58
|
+
deployer.send("push_#{task}")
|
50
59
|
end
|
51
60
|
end
|
52
61
|
|
@@ -77,6 +77,26 @@ module Wordmove
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
+
def get_options_for_wordpress(type)
|
81
|
+
{
|
82
|
+
:local_path => local_options[:wordpress_path],
|
83
|
+
:remote_path => remote_options[:wordpress_path],
|
84
|
+
:exclude_paths => paths_to_exclude.push(send("#{type}_wp_content_dir").relative_path)
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
def push_wordpress
|
89
|
+
logger.task "Pushing wordpress core"
|
90
|
+
options = get_options_for_wordpress("local")
|
91
|
+
remote_put_directory(options[:local_path], options[:remote_path], options[:exclude_paths])
|
92
|
+
end
|
93
|
+
|
94
|
+
def pull_wordpress
|
95
|
+
logger.task "Pulling wordpress core"
|
96
|
+
options = get_options_for_wordpress("remote")
|
97
|
+
remote_get_directory(options[:remote_path], options[:local_path], options[:exclude_paths])
|
98
|
+
end
|
99
|
+
|
80
100
|
protected
|
81
101
|
|
82
102
|
def paths_to_exclude
|
data/lib/wordmove/version.rb
CHANGED
metadata
CHANGED
@@ -1,158 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordmove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.8
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Stefano Verna
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: colored
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: thor
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: activesupport
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: i18n
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: photocopier
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: 0.0.6
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: 0.0.6
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rspec
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: cucumber
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>='
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: aruba
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - '>='
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - '>='
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
description: Capistrano for Wordpress
|
@@ -192,32 +173,30 @@ files:
|
|
192
173
|
- wordmove.gemspec
|
193
174
|
homepage: ''
|
194
175
|
licenses: []
|
195
|
-
|
176
|
+
metadata: {}
|
177
|
+
post_install_message: 'Beware! We have changed the wordmove flags'' behaviour: they
|
196
178
|
used to tell wordmove what to _skip_, now they tell what to _include_. Read `wordmove
|
197
179
|
help` for more info.'
|
198
180
|
rdoc_options: []
|
199
181
|
require_paths:
|
200
182
|
- lib
|
201
183
|
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
184
|
requirements:
|
204
|
-
- -
|
185
|
+
- - '>='
|
205
186
|
- !ruby/object:Gem::Version
|
206
187
|
version: '0'
|
207
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
|
-
none: false
|
209
189
|
requirements:
|
210
|
-
- -
|
190
|
+
- - '>='
|
211
191
|
- !ruby/object:Gem::Version
|
212
192
|
version: '0'
|
213
193
|
requirements: []
|
214
194
|
rubyforge_project:
|
215
|
-
rubygems_version:
|
195
|
+
rubygems_version: 2.0.0
|
216
196
|
signing_key:
|
217
|
-
specification_version:
|
197
|
+
specification_version: 4
|
218
198
|
summary: Capistrano for Wordpress
|
219
199
|
test_files:
|
220
200
|
- spec/fixtures/Movefile
|
221
201
|
- spec/spec_helper.rb
|
222
202
|
- spec/sql_mover_spec.rb
|
223
|
-
has_rdoc:
|