theme-juice 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -6
- data/lib/theme-juice/man/tj +1 -1
- data/lib/theme-juice/man/tj-create +6 -6
- data/lib/theme-juice/man/tj-create.txt +6 -6
- data/lib/theme-juice/man/tj-deploy +2 -2
- data/lib/theme-juice/man/tj-deploy.txt +4 -3
- data/lib/theme-juice/man/tj.txt +9 -8
- data/lib/theme-juice/tasks/capistrano/rsync.rb +6 -0
- data/lib/theme-juice/tasks/settings.rb +2 -1
- data/lib/theme-juice/tasks/stage.rb +2 -1
- data/lib/theme-juice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da436c1899c43d49e6c60060ca315c566012697
|
4
|
+
data.tar.gz: fda413bca1b40ce1c21605bc4dc741f04a51433a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae1f99aa474c1b1fe6e3e2f95248a123916473348a5e2d8f4f45b0e04f98887b3081c81235215a687be1a3f4a0a185300b5c21628c2f4c985e30f212ffa51d2a
|
7
|
+
data.tar.gz: f3e72b175c8e09f154a3d6a69901457d21d0339c60084de7055cebdcc016ef0acd8a9462783e96ec3ceb86d0afcb88c88e609c66daba7fa12d752654bf3b5f6b
|
data/README.md
CHANGED
@@ -7,7 +7,11 @@
|
|
7
7
|
|
8
8
|
![Theme Juice CLI](demo.gif)
|
9
9
|
|
10
|
-
|
10
|
+
***The master branch contains features currently in development, so don't expect it to work at all times. Grab the newest RubyGem instead of building directly from master. Until `1.0`, we'll most likely be adjusting things, and that means breaking changes. Before updating, be sure to check back here to make sure that nothing major has changed.***
|
11
|
+
|
12
|
+
_All breaking changes will go up a minor version (`0.x.0`), while patches and backwards compatible changes will bump up the patch number (`0.0.x`). After `1.0`, we will follow [semantic versioning](http://semver.org/)_.
|
13
|
+
|
14
|
+
_On that note, as of `0.12`, we have renamed all mentions of "theme" to "template" (to avoid confusion, since these are application templates, and not just WordPress themes), and we have also renamed the default directory where `tj` installs the virtual machine to `~/tj-vagrant` to avoid possible conflicts with existing Vagrant installations._
|
11
15
|
|
12
16
|
## What is it?
|
13
17
|
[Theme Juice CLI](http://themejuice.it) (`tj`) is a command line utility that allows you to generate, manage and deploy new local WordPress development applications in seconds using Vagrant, utilizing an Apache fork of [VVV](https://github.com/Varying-Vagrant-Vagrants/VVV) called [VVV-Apache](https://github.com/ezekg/theme-juice-vvv) as the virtual machine.
|
@@ -49,7 +53,7 @@ tj create
|
|
49
53
|
* `wp-cli.local.yml` containing VM paths
|
50
54
|
1. `tj` will provision the VM to put the new configuration into effect.
|
51
55
|
|
52
|
-
If you've never used `tj` before,
|
56
|
+
If you've never used `tj` before, then that last step might take awhile. After that's done, you should be able to access your new project at the specified url. It's that easy!
|
53
57
|
|
54
58
|
### Set up an existing project
|
55
59
|
This sets up an existing local project within the development environment. You will go through a series of prompts to create the necessary files. This command is essentially an alias for `tj create --bare`.
|
@@ -158,7 +162,7 @@ Yes and no; in order for `tj` to properly create a project, the Vagrant box need
|
|
158
162
|
[It's a file that contains custom rules to add into the main `Vagrantfile`, without actually having to modify it](https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/Vagrantfile#L208-L218). This allows us to easily modify the Vagrant box without causing merge conflicts if you were to update the VM source via `git pull`. Every file that `tj` modifies is _meant to be modified_, so at any time you may update your installation of VVV with a simple `git pull` without getting merge conflicts out the wazoo.
|
159
163
|
|
160
164
|
### What is a `Juicefile`?
|
161
|
-
A YAML configuration file
|
165
|
+
A YAML configuration file called `Juicefile` can be used to store commonly-used build scripts, similar to [npm scripts](https://docs.npmjs.com/misc/scripts). Each command block sequence can be mapped to an individual project's build script, allowing a streamlined set of commands to be used across multiple projects that utilize different tools. In the near-future, this will also house your deployment configuration.
|
162
166
|
|
163
167
|
Below is the config that comes baked into [our starter template](https://github.com/ezekg/theme-juice-starter):
|
164
168
|
|
@@ -253,16 +257,17 @@ Check out [capistrano-slackify](https://github.com/onthebeach/capistrano-slackif
|
|
253
257
|
## Troubleshooting
|
254
258
|
|
255
259
|
1. [Help! It won't let me `git clone` anything!](#help-it-wont-let-me-git-clone-anything)
|
256
|
-
1. [What the heck is an `invalid multibyte char (US-ASCII)
|
260
|
+
1. [What the heck is an `invalid multibyte char (US-ASCII)`?!](#what-the-heck-is-an-invalid-multibyte-char-us-ascii)
|
261
|
+
1. [Why are my `.dev` domains resolving to `127.0.53.53`?!](#why-are-my-dev-domains-resolving-to-12705353)
|
257
262
|
|
258
263
|
### Help! It won't let me `git clone` anything!
|
259
264
|
If you're hitting issues related to `git clone`, either cloning the VM or a starter template, then you most likely don't have [SSH-keys for GitHub set up correctly](https://help.github.com/articles/error-permission-denied-publickey/). Either go through that article and assure that you can use Git with the `git@github.com` protocol, or else you can manually run `tj` with the appropriate flags corresponding to the problem-repository, swapping out `git@github.com:` for `https://github.com/`. For example:
|
260
265
|
|
261
266
|
```
|
262
|
-
tj create --template https://github.com/
|
267
|
+
tj create --template https://github.com/starter-template/repository.git --vm-box https://github.com/vm-box/repository.git
|
263
268
|
```
|
264
269
|
|
265
|
-
|
270
|
+
The flag duo above replaces the URLs for the starter template and VM box repositories so that they use `https` instead of the `git` protocol.
|
266
271
|
|
267
272
|
### What the heck is an `invalid multibyte char (US-ASCII)`?!
|
268
273
|
For one reason or another, your terminal probably doesn't support UTF-8, so it's throwing a fit. Use the `--no-unicode` flag to disable the unicode characters. If the problem still persists, try running it with the `--boring` flag. That should disable all unicode characters and coloring.
|
@@ -271,6 +276,17 @@ For one reason or another, your terminal probably doesn't support UTF-8, so it's
|
|
271
276
|
tj create --no-unicode # Or: tj create --boring
|
272
277
|
```
|
273
278
|
|
279
|
+
### Why are my `.dev` domains resolving to `127.0.53.53`?!
|
280
|
+
[Google has applied for control of the `.dev` TLD (top level domain)](https://gtldresult.icann.org/application-result/applicationstatus/applicationdetails/1339). To fix it, you'll need to periodically flush your local DNS cache (I'm honestly not entirely sure why). In the future, we'll probably switch to something like `.localhost`. Here are a few commands to flush your cache on OSX:
|
281
|
+
|
282
|
+
```bash
|
283
|
+
# Yosemite:
|
284
|
+
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
|
285
|
+
|
286
|
+
# Mountain Lion:
|
287
|
+
sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches
|
288
|
+
```
|
289
|
+
|
274
290
|
_Still having issues? [Yell at me!](https://github.com/ezekg/theme-juice-cli/issues)_
|
275
291
|
|
276
292
|
## Contributing
|
data/lib/theme-juice/man/tj
CHANGED
@@ -147,7 +147,7 @@ Backup project
|
|
147
147
|
Manage and run project tests
|
148
148
|
.
|
149
149
|
.SH "CONFIG FILE"
|
150
|
-
A YAML Juicefile(5) configuration can be used to store commonly\-used build scripts\. Each command block sequence can be mapped to an individual project\'s build tool, allowing a streamlined set of commands to be used across multiple projects that utilize different tools\.
|
150
|
+
A YAML Juicefile(5) configuration can be used to store commonly\-used build scripts, similar to npm(1) scripts\. Each command block sequence can be mapped to an individual project\'s build tool, allowing a streamlined set of commands to be used across multiple projects that utilize different tools\.
|
151
151
|
.
|
152
152
|
.TP
|
153
153
|
\fBcommands\fR
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "TJ\-CREATE" "1" "
|
4
|
+
.TH "TJ\-CREATE" "1" "August 2015" "" "Theme Juice Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBtj\-create\fR \- Create a new project
|
@@ -10,7 +10,7 @@
|
|
10
10
|
\fBtj create\fR [\-\-flag=\fIarg\fR] [\-\-flag]
|
11
11
|
.
|
12
12
|
.SH "DESCRIPTION"
|
13
|
-
Creates a new project\. It will lead you through a series of prompts to set up required project information, such as name, location,
|
13
|
+
Creates a new project\. It will lead you through a series of prompts to set up required project information, such as name, location, template, database info, etc\. Using the specified information, it will run the installation process and set up a local development environment, if one hasn\'t already been set up\. It will sync your local project location with the project location within the VM\.
|
14
14
|
.
|
15
15
|
.SH "GLOBAL OPTIONS"
|
16
16
|
.
|
@@ -23,8 +23,8 @@ Name of the project
|
|
23
23
|
Location of the local project
|
24
24
|
.
|
25
25
|
.TP
|
26
|
-
\fB\-t\fR, \fB\-\-
|
27
|
-
Starter
|
26
|
+
\fB\-t\fR, \fB\-\-template\fR=\fIrepository\fR
|
27
|
+
Starter template to install
|
28
28
|
.
|
29
29
|
.TP
|
30
30
|
\fB\-u\fR, \fB\-\-url\fR=\fIurl\fR
|
@@ -39,8 +39,8 @@ Initialize a new git(1) remote repository
|
|
39
39
|
Import an existing database
|
40
40
|
.
|
41
41
|
.TP
|
42
|
-
\fB\-\-bare\fR, \fB\-\-no\-
|
43
|
-
Create a project without a starter
|
42
|
+
\fB\-\-bare\fR, \fB\-\-no\-template\fR
|
43
|
+
Create a project without a starter template
|
44
44
|
.
|
45
45
|
.TP
|
46
46
|
\fB\-\-skip\-repo\fR
|
@@ -10,7 +10,7 @@ SYNOPSIS
|
|
10
10
|
|
11
11
|
DESCRIPTION
|
12
12
|
Creates a new project. It will lead you through a series of prompts to
|
13
|
-
set up required project information, such
|
13
|
+
set up required project information, such as name, location, template,
|
14
14
|
database info, etc. Using the specified information, it will run the
|
15
15
|
installation process and set up a local development environment, if one
|
16
16
|
hasn't already been set up. It will sync your local project location
|
@@ -23,8 +23,8 @@ GLOBAL OPTIONS
|
|
23
23
|
-l, --location=path
|
24
24
|
Location of the local project
|
25
25
|
|
26
|
-
-t, --
|
27
|
-
Starter
|
26
|
+
-t, --template=repository
|
27
|
+
Starter template to install
|
28
28
|
|
29
29
|
-u, --url=url
|
30
30
|
Development URL for the project
|
@@ -35,8 +35,8 @@ GLOBAL OPTIONS
|
|
35
35
|
-i, --import-db=path
|
36
36
|
Import an existing database
|
37
37
|
|
38
|
-
--bare, --no-
|
39
|
-
Create a project without a starter
|
38
|
+
--bare, --no-template
|
39
|
+
Create a project without a starter template
|
40
40
|
|
41
41
|
--skip-repo
|
42
42
|
Skip repository prompts and use default settings
|
@@ -56,4 +56,4 @@ GLOBAL OPTIONS
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
|
59
|
+
August 2015 TJ-CREATE(1)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "TJ\-DEPLOY" "1" "
|
4
|
+
.TH "TJ\-DEPLOY" "1" "August 2015" "" "Theme Juice Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBtj\-deploy\fR \- Deploy a project
|
@@ -137,7 +137,7 @@ Relative path from deploy path to the tmp folder
|
|
137
137
|
.
|
138
138
|
.TP
|
139
139
|
\fBdeployment\.stages\.<stage>\.shared\fR
|
140
|
-
Sequence of relative files from application root to place inside of the shared folder
|
140
|
+
Sequence of relative files from application root to place inside of the shared folder\. Files that end with a trailing forward slash are assumed to be a directory\.
|
141
141
|
.
|
142
142
|
.TP
|
143
143
|
\fBdeployment\.stages\.<stage>\.roles\fR
|
@@ -121,13 +121,14 @@ CONFIG FILE
|
|
121
121
|
|
122
122
|
deployment.stages.<stage>.shared
|
123
123
|
Sequence of relative files from application root to place inside
|
124
|
-
of the shared folder
|
124
|
+
of the shared folder. Files that end with a trailing forward
|
125
|
+
slash are assumed to be a directory.
|
125
126
|
|
126
127
|
deployment.stages.<stage>.roles
|
127
128
|
Sequence of deployment roles for the stage
|
128
129
|
|
129
130
|
deployment.stages.vagrant
|
130
|
-
Required
|
131
|
+
Required development environment settings; these are used for
|
131
132
|
database and file migration
|
132
133
|
|
133
134
|
deployment.stages.vagrant.server
|
@@ -160,4 +161,4 @@ CONFIG FILE
|
|
160
161
|
|
161
162
|
|
162
163
|
|
163
|
-
|
164
|
+
August 2015 TJ-DEPLOY(1)
|
data/lib/theme-juice/man/tj.txt
CHANGED
@@ -121,9 +121,10 @@ CONFIG COMMANDS
|
|
121
121
|
|
122
122
|
CONFIG FILE
|
123
123
|
A YAML Juicefile(5) configuration can be used to store commonly-used
|
124
|
-
build scripts. Each command
|
125
|
-
|
126
|
-
used across multiple projects that
|
124
|
+
build scripts, similar to npm(1) scripts. Each command block sequence
|
125
|
+
can be mapped to an individual project's build tool, allowing a stream-
|
126
|
+
lined set of commands to be used across multiple projects that utilize
|
127
|
+
different tools.
|
127
128
|
|
128
129
|
commands
|
129
130
|
Collection of various command block sequences
|
@@ -152,7 +153,7 @@ CONFIG FILE
|
|
152
153
|
commands.test
|
153
154
|
Command used to manage and run project tests
|
154
155
|
|
155
|
-
Placeholder
|
156
|
+
Placeholder arguments can be used within any command block sequence to
|
156
157
|
allow splat or indexed arguments to be passed to the corresponding com-
|
157
158
|
mand when executed.
|
158
159
|
|
@@ -162,8 +163,8 @@ CONFIG FILE
|
|
162
163
|
%argN%, %argumentN%
|
163
164
|
Where n is the argument index e.g. cmd %arg1% | cmd %arg2%
|
164
165
|
|
165
|
-
When
|
166
|
-
.tj.yaml
|
166
|
+
When naming your configuration file, use the recommended Juicefile, or
|
167
|
+
.tj.yaml naming convention. The raw filename regex matcher is below if
|
167
168
|
you want to be a little different.
|
168
169
|
|
169
170
|
/^(((\.)?(tj)|((J|j)uicefile))(\.y(a)?ml)?$)/
|
@@ -171,7 +172,7 @@ CONFIG FILE
|
|
171
172
|
ENVIRONMENT
|
172
173
|
All of the global options have a corresponding ENV variable that can be
|
173
174
|
set to permanently use the specified value each time tj(1) is run. This
|
174
|
-
is
|
175
|
+
is useful if you're using an alternate vagrant(1) box, or if you need
|
175
176
|
to disable certain features due to limited support e.g. on Windows.
|
176
177
|
|
177
178
|
TJ_VM_BOX=repository
|
@@ -187,7 +188,7 @@ ENVIRONMENT
|
|
187
188
|
Force directory prefix for project in VM
|
188
189
|
|
189
190
|
TJ_YOLO=bool
|
190
|
-
Say
|
191
|
+
Say yes to anything and everything, and maybe even get a few
|
191
192
|
surprises
|
192
193
|
|
193
194
|
TJ_BORING=bool
|
@@ -35,5 +35,11 @@ namespace :rsync do
|
|
35
35
|
fetch(:linked_files).each { |f| execute :touch, shared_path.join(f) }
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
before "deploy:check:linked_dirs", :dirs do
|
40
|
+
on roles(:app) do
|
41
|
+
fetch(:linked_dirs).each { |f| execute :mkdir, "-p", shared_path.join(f) }
|
42
|
+
end
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
@@ -24,7 +24,8 @@ module ThemeJuice
|
|
24
24
|
set :application, @config.deployment.application.name
|
25
25
|
|
26
26
|
set :linked_files, fetch(:linked_files, []).concat(fetch(:shared_files, []))
|
27
|
-
set :linked_dirs, fetch(:linked_dirs, []).
|
27
|
+
set :linked_dirs, fetch(:linked_dirs, []).concat(fetch(:shared_dirs, []))
|
28
|
+
.push(fetch(:uploads_dir, ""))
|
28
29
|
|
29
30
|
%w[settings repository].each do |task|
|
30
31
|
@config.deployment.send(task).symbolize_keys.each do |key, value|
|
@@ -30,7 +30,8 @@ module ThemeJuice
|
|
30
30
|
set :deploy_to, -> { @stage.path }
|
31
31
|
set :stage_url, -> { @stage.url }
|
32
32
|
set :uploads_dir, -> { @stage.uploads }
|
33
|
-
set :shared_files, -> { @stage.shared }
|
33
|
+
set :shared_files, -> { @stage.shared.select { |f| !f.end_with? "/" } }
|
34
|
+
set :shared_dirs, -> { @stage.shared.select { |f| f.end_with? "/" }.map { |f| f.chomp "/" } }
|
34
35
|
set :tmp_dir, -> { @stage.tmp }
|
35
36
|
set :stage, -> { @env.stage }
|
36
37
|
end
|
data/lib/theme-juice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theme-juice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezekiel Gabrielse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|