wordmove 4.0.1 → 4.0.2.pre1
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 +4 -4
- data/README.mdown +37 -16
- data/lib/wordmove/version.rb +1 -1
- data/wordmove.gemspec +1 -1
- metadata +8 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df33b88f616681e8850b01577a4c24d75dbb20a
|
4
|
+
data.tar.gz: ad48c5b5c056f61c841039ae6bbd816208e98ade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 156d8223f9e0bcf9ec92e2bc41c53888d2dc2acf2fc6b5cc0328411db648c40c3ba30c2af83c99322efe6d2fbfd4a35a9321e2b9b47cd1d564e6d6de19f7b23a
|
7
|
+
data.tar.gz: fd3080d465ca5cf59a951d9f5fafd998bc9f84a1a0733abc665ddd00b04426862a31292c8a313d8841e2bc6f7c3c0f0b0cca54d38ec27fac9b64fa3e6f6c19b2
|
data/README.mdown
CHANGED
@@ -165,22 +165,20 @@ will push your local database to the staging environment only.
|
|
165
165
|
We warmly **recommend** to read the wiki article: [Multiple environments explained
|
166
166
|
](https://github.com/welaika/wordmove/wiki/Multiple-environments-explained)
|
167
167
|
|
168
|
-
##
|
168
|
+
## Environment Variables
|
169
169
|
|
170
|
-
|
170
|
+
Wordmove allows the use of environment variables in your movefiles.
|
171
|
+
This is useful in order to protect sensitive variables and credentials, as well as make it easy to share movefiles between your team.
|
171
172
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
user: "<%= ENV['PROD_DB_USER'] %>"
|
176
|
-
password: "<%= ENV['PROD_DB_PASS'] %>"
|
173
|
+
Environment variables are written using the **ERB tags** syntax:
|
174
|
+
```
|
175
|
+
"<%= ENV['YOUR_SECRET_NAME'] %>"
|
177
176
|
```
|
178
177
|
|
179
|
-
|
180
|
-
|
181
|
-
### Shell
|
182
|
-
You can set variables like so:
|
178
|
+
### Variables set up
|
179
|
+
Environment variables can be set up using two methods:
|
183
180
|
|
181
|
+
#### Using the shell:
|
184
182
|
```bash
|
185
183
|
# bash
|
186
184
|
export PROD_DB_USER="username" PROD_DB_PASS="password"
|
@@ -188,17 +186,39 @@ export PROD_DB_USER="username" PROD_DB_PASS="password"
|
|
188
186
|
# fish
|
189
187
|
set --export --global PROD_DB_USER "username"; set --export --global PROD_DB_PASS "password"
|
190
188
|
```
|
189
|
+
#### Using a `.env` file:
|
191
190
|
|
192
|
-
|
193
|
-
Wordmove supports the [dotenv](https://github.com/bkeepers/dotenv) module. Simply create a file named `.env` next to your movefile:
|
191
|
+
Wordmove supports the [dotenv](https://github.com/bkeepers/dotenv) module.
|
194
192
|
|
195
|
-
|
196
|
-
|
197
|
-
|
193
|
+
Simply create a `.env` file next to your movefile structured as follows:
|
194
|
+
```bash
|
195
|
+
PROD_DB_USER="username"
|
196
|
+
PROD_DB_PASS="password"
|
198
197
|
```
|
198
|
+
Wordmove will take care of loading the file and making the environment variables ready to be used in your configuration file.
|
199
199
|
|
200
200
|
You may also use `.env.{environmentname}`, but this is discouraged.
|
201
201
|
|
202
|
+
### Use them in your `movefile.yml`
|
203
|
+
Using the ERB syntax described above, write your movefile as follows:
|
204
|
+
```yaml
|
205
|
+
production:
|
206
|
+
database:
|
207
|
+
user: "<%= ENV['PROD_DB_USER'] %>"
|
208
|
+
password: "<%= ENV['PROD_DB_PASS'] %>"
|
209
|
+
```
|
210
|
+
|
211
|
+
### System variables
|
212
|
+
You can use system variables to configure your movefile.
|
213
|
+
|
214
|
+
For example:
|
215
|
+
```yaml
|
216
|
+
local:
|
217
|
+
vhost: "http://wordpress-site.localhost"
|
218
|
+
wordpress_path: "<%= ENV['HOME'] %>/[wordpress directory path]/"
|
219
|
+
# wordpress_path will be substituted with /home/user_name/[wordpress directory path]
|
220
|
+
```
|
221
|
+
|
202
222
|
## Supports
|
203
223
|
|
204
224
|
### OS
|
@@ -301,3 +321,4 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
301
321
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
302
322
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
303
323
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
324
|
+
|
data/lib/wordmove/version.rb
CHANGED
data/wordmove.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_runtime_dependency "colorize", "~> 0.8.1"
|
34
34
|
spec.add_runtime_dependency "dotenv", "~> 2.2.1"
|
35
35
|
spec.add_runtime_dependency "kwalify", "~> 0"
|
36
|
-
spec.add_runtime_dependency "photocopier", "
|
36
|
+
spec.add_runtime_dependency "photocopier", "1.3.3.pre1"
|
37
37
|
spec.add_runtime_dependency "thor", "~> 0.19.4"
|
38
38
|
|
39
39
|
spec.required_ruby_version = ">= 2.4.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordmove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-
|
15
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -80,22 +80,16 @@ dependencies:
|
|
80
80
|
name: photocopier
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '1.3'
|
86
|
-
- - ">="
|
83
|
+
- - '='
|
87
84
|
- !ruby/object:Gem::Version
|
88
|
-
version: 1.3.
|
85
|
+
version: 1.3.3.pre1
|
89
86
|
type: :runtime
|
90
87
|
prerelease: false
|
91
88
|
version_requirements: !ruby/object:Gem::Requirement
|
92
89
|
requirements:
|
93
|
-
- -
|
90
|
+
- - '='
|
94
91
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
96
|
-
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: 1.3.2
|
92
|
+
version: 1.3.3.pre1
|
99
93
|
- !ruby/object:Gem::Dependency
|
100
94
|
name: thor
|
101
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -308,9 +302,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
308
302
|
version: 2.4.0
|
309
303
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
310
304
|
requirements:
|
311
|
-
- - "
|
305
|
+
- - ">"
|
312
306
|
- !ruby/object:Gem::Version
|
313
|
-
version:
|
307
|
+
version: 1.3.1
|
314
308
|
requirements: []
|
315
309
|
rubyforge_project:
|
316
310
|
rubygems_version: 2.6.11
|