theme-juice 0.11.8 → 0.12.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 +70 -32
- data/lib/theme-juice.rb +1 -1
- data/lib/theme-juice/cli.rb +1 -1
- data/lib/theme-juice/commands/create.rb +11 -11
- data/lib/theme-juice/env.rb +16 -16
- data/lib/theme-juice/man/tj-delete +2 -2
- data/lib/theme-juice/man/tj-delete.txt +5 -4
- data/lib/theme-juice/project.rb +1 -1
- data/lib/theme-juice/tasks/{theme.rb → template.rb} +9 -9
- data/lib/theme-juice/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2caab119d7f4e084b6430b0096fb091571df09bb
|
4
|
+
data.tar.gz: 656de710741b965747acf271547e2a6423a6a1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ed6de8ce066bdef5f2203a922d7447d41bdedba34f29d87c17c4628ce2fa087e5ccb37ebecec33dcc009429e360cc62844a2b105bfffa4d2270f3c07b48e41
|
7
|
+
data.tar.gz: d9fd6b3ab9f391efb182b5ec2f5f63f7812754ffc14ffe8e9ef3fd92eb9553b9ed8d84d2b67356682d932c170fc22a74afbe8652ecabcc110edcf8087d11a148
|
data/README.md
CHANGED
@@ -7,14 +7,12 @@
|
|
7
7
|
|
8
8
|
![Theme Juice CLI](demo.gif)
|
9
9
|
|
10
|
-
_This project is currently under active development and will not be completely 'stable' per-say until we hit `1.0`. Everything here is subject to change without notice. (We will of course semantically version all of our releases, with the minor version being incremented with new features/breaking changes.) Feel free to contribute to the development with new features, ideas or bug fixes._
|
11
|
-
|
12
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._
|
13
11
|
|
14
|
-
[View our contributing guidelines to get started!](#contributing)
|
15
|
-
|
16
12
|
## What is it?
|
17
|
-
Theme Juice (`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/
|
13
|
+
[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.
|
14
|
+
|
15
|
+
Check out [our getting started guide over at SitePoint](http://www.sitepoint.com/introducing-theme-juice-for-local-wordpress-development/), or [view the documentation site](http://themejuice.it).
|
18
16
|
|
19
17
|
## Requirements
|
20
18
|
**`tj` requires [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) to be able to create virtual machines for local development. Please download and install both of these before getting started.**
|
@@ -30,10 +28,10 @@ gem install theme-juice
|
|
30
28
|
|
31
29
|
## Getting Started
|
32
30
|
|
33
|
-
_If you're going to be using [our starter
|
31
|
+
_If you're going to be using [our starter template](https://github.com/ezekg/theme-juice-starter), then I recommend checking out [it's dependencies](https://github.com/ezekg/theme-juice-starter#development-dependencies) before running your first `create`. That way, the build step doesn't fail._
|
34
32
|
|
35
33
|
### Create a new project
|
36
|
-
This will lead you through a series of prompts to set up required project information, such as name, location,
|
34
|
+
This 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
|
37
35
|
location within the VM, so you can run this from anywhere on your local system.
|
38
36
|
|
39
37
|
```
|
@@ -41,13 +39,17 @@ tj create
|
|
41
39
|
```
|
42
40
|
|
43
41
|
#### What happens on your first `create`?
|
44
|
-
`tj` will clone the selected VM to your `vm-path` (default path is `~/vagrant/`)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
* `
|
49
|
-
|
50
|
-
|
42
|
+
1. `tj` will clone the selected VM to your `vm-path` (default path is `~/tj-vagrant/`)
|
43
|
+
1. `tj` will clone the selected starter template
|
44
|
+
1. `tj` will run the starter template's installation (via the `Juicefile`, if present)
|
45
|
+
1. `tj` will create all of the necessary project files, such as:
|
46
|
+
* `Customfile` containing DNS and synced folder settings
|
47
|
+
* `init-custom.sql` containing database setup
|
48
|
+
* `project.conf` containing server settings
|
49
|
+
* `wp-cli.local.yml` containing VM paths
|
50
|
+
1. `tj` will provision the VM to put the new configuration into effect.
|
51
|
+
|
52
|
+
If you've never used `tj` before, the 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!
|
51
53
|
|
52
54
|
### Set up an existing project
|
53
55
|
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`.
|
@@ -56,8 +58,8 @@ This sets up an existing local project within the development environment. You w
|
|
56
58
|
tj setup
|
57
59
|
```
|
58
60
|
|
59
|
-
###
|
60
|
-
This will remove a project from your development environment. This will only remove files that were generated by `tj` i.e. the database setup, DNS setup, and other project configuration files.
|
61
|
+
### Remove a project
|
62
|
+
This will remove a project from your development environment. You will go through a series of prompts to delete a project. This will only remove files that were generated by `tj` i.e. the database setup, DNS setup, and other project configuration files.
|
61
63
|
|
62
64
|
It will not touch your local folders that were synced to the VM.
|
63
65
|
|
@@ -65,8 +67,8 @@ It will not touch your local folders that were synced to the VM.
|
|
65
67
|
tj delete
|
66
68
|
```
|
67
69
|
|
68
|
-
###
|
69
|
-
This will deploy a project to the passed `<stage>` using [Capistrano](http://capistranorb.com/). Head over to the [docs](http://themejuice.it/deploy) to
|
70
|
+
### Deploy a project
|
71
|
+
This will deploy a project to the passed `<stage>` using [Capistrano](http://capistranorb.com/). Head over to the [docs](http://themejuice.it/deploy) to see all of the available commands. There's a quick getting started section there too for your first deployment!
|
70
72
|
|
71
73
|
```
|
72
74
|
tj deploy <stage>
|
@@ -88,11 +90,11 @@ Or, you can also check out [themejuice.it](http://themejuice.it) for a pretty we
|
|
88
90
|
1. [So, does that mean I can use any Vagrant box?](#so-does-that-mean-i-can-use-any-vagrant-box)
|
89
91
|
1. [What is a `Customfile`?](#what-is-a-customfile)
|
90
92
|
1. [What is a `Juicefile`?](#what-is-a-juicefile)
|
91
|
-
1. [Does `tj` handle deployments?](#does-tj-handle-deployments)
|
92
93
|
1. [Does `tj` support subdomain multi-sites?](#does-tj-support-subdomain-multi-sites)
|
93
94
|
1. [Can I access a project from another device (i.e. mobile)?](#can-i-access-a-project-from-another-device-ie-mobile)
|
94
|
-
1. [
|
95
|
-
1. [Can I
|
95
|
+
1. [Can I add my starter template, ________?](#can-i-add-my-starter-template-________)
|
96
|
+
1. [Can I integrate my deployments with Slack?](#can-i-integrate-my-deployments-with-slack)
|
97
|
+
1. [Troubleshooting](#troubleshooting)
|
96
98
|
|
97
99
|
### Is Windows supported?
|
98
100
|
Yes! But, since Windows doesn't support UTF-8 characters inside of the terminal, and is picky about ASCII colors, you'll probably have to run `tj` with a couple flags.
|
@@ -119,7 +121,7 @@ tj new --vm-box git@github.com:Varying-Vagrant-Vagrants/VVV.git --nginx
|
|
119
121
|
|
120
122
|
To use these permanently, set the appropriate `ENV` variables through your `.bashrc` or similar, i.e. `export TJ_VM_BOX=git@github.com:Varying-Vagrant-Vagrants/VVV.git` and `export TJ_NGINX=true`.
|
121
123
|
|
122
|
-
_Note: Before running this, you might want to either choose a new `vm-path`, or destroy any existing VMs inside of your `~/vagrant` directory. If `tj` detects that a VM already installed, it will skip installing the new box._
|
124
|
+
_Note: Before running this, you might want to either choose a new `vm-path`, or destroy any existing VMs inside of your `~/tj-vagrant` directory. If `tj` detects that a VM already installed, it will skip installing the new box._
|
123
125
|
|
124
126
|
### So, does that mean I can use any Vagrant box?
|
125
127
|
Yes and no; in order for `tj` to properly create a project, the Vagrant box needs to follow the same directory structure as VVV, and include a `Customfile`. Here is the required structure that `tj` needs in order to be able to create new projects:
|
@@ -153,12 +155,12 @@ Yes and no; in order for `tj` to properly create a project, the Vagrant box need
|
|
153
155
|
```
|
154
156
|
|
155
157
|
### What is a `Customfile`?
|
156
|
-
[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`.
|
158
|
+
[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.
|
157
159
|
|
158
160
|
### What is a `Juicefile`?
|
159
161
|
A YAML configuration file (`Juicefile`) 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. In the near-future, this will also house your deployment configuration.
|
160
162
|
|
161
|
-
Below is the config that comes baked into [our starter
|
163
|
+
Below is the config that comes baked into [our starter template](https://github.com/ezekg/theme-juice-starter):
|
162
164
|
|
163
165
|
```yml
|
164
166
|
#
|
@@ -212,28 +214,64 @@ cmd3 "%arg4%"
|
|
212
214
|
|
213
215
|
You can specify an unlimited number of commands with an unlimited number of arguments; however, you should be careful with how this is used. Don't go including `sudo rm -rf %arg1%` in a command, while passing `/` as an argument. Keep it simple. These are meant to make your life easier by helping you manage build tools, not to do fancy scripting.
|
214
216
|
|
215
|
-
### Does `tj` handle deployments?
|
216
|
-
As of `0.11`, yes! Check out the [documentation](http://themejuice.it/deploy) to get started.
|
217
|
-
|
218
217
|
### Does `tj` support subdomain multi-sites?
|
219
218
|
If you're able to use [Landrush](https://github.com/phinze/landrush) for your DNS, then yes. All subdomains will resolve to their parent domain. Landrush comes pre-installed when you create your first project with `tj`. Having said that, unfortunately, if you're on Windows you'll probably have to manually add the subdomains due to Landrush not being fully supported. If you have the Windows chops, head over there and contribute to Landrush by squashing that bug. I'm sure he would appreciate it!
|
220
219
|
|
221
|
-
|
220
|
+
### Can I access a project from another device (i.e. mobile)?
|
222
221
|
Yes! Every project created with `tj` will automatically be set up to support using [xip.io](http://xip.io/). If you're using OSX, then everything should work out of the box. If you're not using OSX, then you'll need to point port `80` on your host machine to `8080`; Vagrant cannot do this by default for security reasons.
|
223
222
|
|
224
223
|
Once everything is good to go, you can access a project from another device on the same network by going to `<project-name>.<your-hosts-ip-address>.xip.io` e.g. `themejuice.192.168.1.1.xip.io`.
|
225
224
|
|
226
225
|
_If you're familiar with forwarding host ports on operating systems other than OSX, check out [this file](https://github.com/ezekg/theme-juice-cli/blob/master/lib/theme-juice/tasks/forward_ports.rb#L34-L51) and make a pull request so that everybody else can benefit from your smarts._
|
227
226
|
|
227
|
+
### Can I add my starter template, ________?
|
228
|
+
Yes! Just update the `TEMPLATES` constant inside [commands/create.rb](https://github.com/ezekg/theme-juice-cli/blob/master/lib/theme-juice/commands/create.rb#L7-L12) and make a pull request. I'll verify that the template includes a `Juicefile` (not required, but preferred to automate build steps), and that everything looks solid. Until then (or if your template is private), just run the command below to clone your template.
|
229
|
+
|
230
|
+
```
|
231
|
+
tj create --template git@your.repo:link/goes-here.git
|
232
|
+
```
|
233
|
+
|
234
|
+
### Can I integrate my deployments with Slack?
|
235
|
+
Yes, you can integrate deployment notifications with your teams Slack account by adding the following template to your `Juicefile`:
|
236
|
+
|
237
|
+
```yml
|
238
|
+
deployment:
|
239
|
+
# ...
|
240
|
+
|
241
|
+
slack:
|
242
|
+
url: https://hooks.slack.com/services/your-token
|
243
|
+
subdomain: example
|
244
|
+
user: deploybot
|
245
|
+
channel: "#devops"
|
246
|
+
emoji: ":rocket:"
|
247
|
+
|
248
|
+
# ...
|
249
|
+
```
|
250
|
+
|
251
|
+
Check out [capistrano-slackify](https://github.com/onthebeach/capistrano-slackify) for more information.
|
252
|
+
|
253
|
+
## Troubleshooting
|
254
|
+
|
255
|
+
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)`](#what-the-heck-is-an-invalid-multibyte-char-us-ascii)
|
257
|
+
|
228
258
|
### Help! It won't let me `git clone` anything!
|
229
|
-
|
259
|
+
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
|
+
|
261
|
+
```
|
262
|
+
tj create --template https://github.com/theme/repository.git --vm-box https://github.com/vm-box/repository.git
|
263
|
+
```
|
264
|
+
|
265
|
+
This replaces the starter template and VM box repository URLs to use `https://` instead of the `git@` protocol.
|
266
|
+
|
267
|
+
### What the heck is an `invalid multibyte char (US-ASCII)`?!
|
268
|
+
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.
|
230
269
|
|
231
270
|
```
|
232
|
-
tj create --
|
271
|
+
tj create --no-unicode # Or: tj create --boring
|
233
272
|
```
|
234
273
|
|
235
|
-
|
236
|
-
Yes! Just update the `THEMES` constant inside [commands/create.rb](https://github.com/ezekg/theme-juice-cli/blob/master/lib/theme-juice/commands/create.rb#L7-L12) and make a pull request. I'll verify that the theme includes a `Juicefile` (not required, but preferred to automate build steps), and that everything looks solid. Until then (or if your theme is private), just run `tj create --theme https://your.repo/link/goes.here` to clone your theme.
|
274
|
+
_Still having issues? [Yell at me!](https://github.com/ezekg/theme-juice-cli/issues)_
|
237
275
|
|
238
276
|
## Contributing
|
239
277
|
1. First, create a _well documented_ [issue](https://github.com/ezekg/theme-juice-cli/issues) for your proposed feature/bug fix
|
data/lib/theme-juice.rb
CHANGED
@@ -23,7 +23,7 @@ require "theme-juice/tasks/vm_box"
|
|
23
23
|
require "theme-juice/tasks/create_confirm"
|
24
24
|
require "theme-juice/tasks/delete_confirm"
|
25
25
|
require "theme-juice/tasks/location"
|
26
|
-
require "theme-juice/tasks/
|
26
|
+
require "theme-juice/tasks/template"
|
27
27
|
require "theme-juice/tasks/repo"
|
28
28
|
require "theme-juice/tasks/dot_env"
|
29
29
|
require "theme-juice/tasks/forward_ports"
|
data/lib/theme-juice/cli.rb
CHANGED
@@ -102,7 +102,7 @@ module ThemeJuice
|
|
102
102
|
desc "create", "Create new project"
|
103
103
|
method_option :name, :type => :string, :aliases => "-n", :default => nil, :desc => ""
|
104
104
|
method_option :location, :type => :string, :aliases => "-l", :default => nil, :desc => ""
|
105
|
-
method_option :
|
105
|
+
method_option :template, :type => :string, :aliases => "-t", :default => nil, :desc => ""
|
106
106
|
method_option :url, :type => :string, :aliases => "-u", :default => nil, :desc => ""
|
107
107
|
method_option :repository, :type => :string, :aliases => "-r", :desc => ""
|
108
108
|
method_option :db_import, :type => :string, :aliases => %w[-i --import-db], :desc => ""
|
@@ -4,7 +4,7 @@ module ThemeJuice
|
|
4
4
|
module Commands
|
5
5
|
class Create < Command
|
6
6
|
|
7
|
-
|
7
|
+
TEMPLATES = {
|
8
8
|
"theme-juice/trellis" => "git@github.com:ezekg/theme-juice-starter.git",
|
9
9
|
"wordpress/wordpress" => "git@github.com:WordPress/WordPress.git",
|
10
10
|
"other (specify)" => nil,
|
@@ -19,7 +19,7 @@ module ThemeJuice
|
|
19
19
|
runner do |tasks|
|
20
20
|
tasks << Tasks::CreateConfirm.new
|
21
21
|
tasks << Tasks::Location.new
|
22
|
-
tasks << Tasks::
|
22
|
+
tasks << Tasks::Template.new
|
23
23
|
tasks << Tasks::VMBox.new
|
24
24
|
tasks << Tasks::VMPlugins.new
|
25
25
|
tasks << Tasks::VMLocation.new
|
@@ -56,7 +56,7 @@ module ThemeJuice
|
|
56
56
|
@project.location = @opts.fetch("location") { location }
|
57
57
|
@project.url = @opts.fetch("url") { url }
|
58
58
|
@project.xip_url = @opts.fetch("xip_url") { xip_url }
|
59
|
-
@project.
|
59
|
+
@project.template = @opts.fetch("template") { template }
|
60
60
|
@project.repository = @opts.fetch("repository") { repository }
|
61
61
|
@project.db_host = @opts.fetch("db_host") { db_host }
|
62
62
|
@project.db_name = @opts.fetch("db_name") { db_name }
|
@@ -119,7 +119,7 @@ module ThemeJuice
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def valid_url?(url)
|
122
|
-
unless "#{url}".match
|
122
|
+
unless "#{url}".match /\.dev$/
|
123
123
|
@io.error "Your development url '#{url}' doesn't end with '.dev'. This is used internally by Landrush, so that's not gonna work. Aborting mission."
|
124
124
|
end
|
125
125
|
|
@@ -132,13 +132,13 @@ module ThemeJuice
|
|
132
132
|
xip_url
|
133
133
|
end
|
134
134
|
|
135
|
-
def
|
135
|
+
def template
|
136
136
|
return false if @project.bare
|
137
137
|
|
138
138
|
if @project.use_defaults
|
139
|
-
|
139
|
+
template = TEMPLATES["theme-juice/trellis"]
|
140
140
|
else
|
141
|
-
choice = @io.choose "Which starter
|
141
|
+
choice = @io.choose "Which starter template would you like to use?", :blue, TEMPLATES.keys
|
142
142
|
|
143
143
|
case choice
|
144
144
|
when /(theme-juice)/
|
@@ -147,17 +147,17 @@ module ThemeJuice
|
|
147
147
|
@io.say "This is a stock WordPress install, so things such as the '.env' file will not be set up. You'll need to input your database information manually after the setup.", {
|
148
148
|
:color => :yellow, :icon => :notice }
|
149
149
|
when /(other)/
|
150
|
-
|
150
|
+
TEMPLATES[choice] = @io.ask "What is the repository URL of the starter template that you would like to clone?"
|
151
151
|
when /(none)/
|
152
152
|
@project.bare = true
|
153
|
-
@io.say "Next time you need to create a project without a starter
|
153
|
+
@io.say "Next time you need to create a project without a starter template, you can just run the 'setup' command instead.", {
|
154
154
|
:color => :yellow, :icon => :notice }
|
155
155
|
end
|
156
156
|
|
157
|
-
|
157
|
+
template = TEMPLATES[choice]
|
158
158
|
end
|
159
159
|
|
160
|
-
|
160
|
+
template
|
161
161
|
end
|
162
162
|
|
163
163
|
def repository
|
data/lib/theme-juice/env.rb
CHANGED
@@ -24,67 +24,67 @@ module ThemeJuice
|
|
24
24
|
attr_accessor :cap
|
25
25
|
|
26
26
|
def vm_box=(val)
|
27
|
-
@vm_box = val
|
27
|
+
@vm_box = val || ENV.fetch("TJ_VM_BOX") { "git@github.com:ezekg/theme-juice-vvv.git" }
|
28
28
|
end
|
29
29
|
|
30
30
|
def vm_path=(val)
|
31
|
-
@vm_path = val
|
31
|
+
@vm_path = val || ENV.fetch("TJ_VM_PATH") { File.expand_path("~/tj-vagrant") }
|
32
32
|
end
|
33
33
|
|
34
34
|
def vm_ip=(val)
|
35
|
-
@vm_ip = val
|
35
|
+
@vm_ip = val || ENV.fetch("TJ_VM_IP") { "192.168.50.4" }
|
36
36
|
end
|
37
37
|
|
38
38
|
def vm_prefix=(val)
|
39
|
-
@vm_prefix = val
|
39
|
+
@vm_prefix = val || ENV.fetch("TJ_VM_PREFIX") { "tj-" }
|
40
40
|
end
|
41
41
|
|
42
42
|
def yolo=(val)
|
43
|
-
@yolo = val
|
43
|
+
@yolo = val || ENV.fetch("TJ_YOLO") { false }
|
44
44
|
end
|
45
45
|
|
46
46
|
def boring=(val)
|
47
|
-
@boring = val
|
47
|
+
@boring = val || ENV.fetch("TJ_BORING") { false }
|
48
48
|
end
|
49
49
|
|
50
50
|
def no_unicode=(val)
|
51
|
-
@no_unicode = val
|
51
|
+
@no_unicode = val || ENV.fetch("TJ_NO_UNICODE") { boring }
|
52
52
|
end
|
53
53
|
|
54
54
|
def no_colors=(val)
|
55
|
-
@no_colors = val
|
55
|
+
@no_colors = val || ENV.fetch("TJ_NO_COLORS") { boring }
|
56
56
|
end
|
57
57
|
|
58
58
|
def no_animations=(val)
|
59
|
-
@no_animations = val
|
59
|
+
@no_animations = val || ENV.fetch("TJ_NO_ANIMATIONS") { boring }
|
60
60
|
end
|
61
61
|
|
62
62
|
def no_landrush=(val)
|
63
|
-
@no_landrush = val
|
63
|
+
@no_landrush = val || ENV.fetch("TJ_NO_LANDRUSH") { false }
|
64
64
|
end
|
65
65
|
|
66
66
|
def no_port_forward=(val)
|
67
|
-
@no_port_forward = val
|
67
|
+
@no_port_forward = val || ENV.fetch("TJ_NO_PORT_FORWARD") { false }
|
68
68
|
end
|
69
69
|
|
70
70
|
def verbose=(val)
|
71
|
-
@verbose = val
|
71
|
+
@verbose = val || ENV.fetch("TJ_VERBOSE") { false }
|
72
72
|
end
|
73
73
|
|
74
74
|
def quiet=(val)
|
75
|
-
@quiet = val
|
75
|
+
@quiet = val || ENV.fetch("TJ_QUIET") { false }
|
76
76
|
end
|
77
77
|
|
78
78
|
def trace=(val)
|
79
|
-
@trace = val
|
79
|
+
@trace = val || ENV.fetch("TJ_TRACE") { false }
|
80
80
|
end
|
81
81
|
|
82
82
|
def dryrun=(val)
|
83
|
-
@dryrun = val
|
83
|
+
@dryrun = val || ENV.fetch("TJ_DRYRUN") { false }
|
84
84
|
end
|
85
85
|
|
86
86
|
def nginx=(val)
|
87
|
-
@nginx = val
|
87
|
+
@nginx = val || ENV.fetch("TJ_NGINX") { false }
|
88
88
|
end
|
89
89
|
|
90
90
|
extend self
|
@@ -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\-DELETE" "1" "
|
4
|
+
.TH "TJ\-DELETE" "1" "August 2015" "" "Theme Juice Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBtj\-delete\fR \- Delete a project
|
@@ -10,7 +10,7 @@
|
|
10
10
|
\fBtj delete\fR [\-\-flag=\fIarg\fR] [\-\-flag]
|
11
11
|
.
|
12
12
|
.SH "DESCRIPTION"
|
13
|
-
Removes a project from your development environment\. This will only remove files that were generated by tj(1) i\.e\. the database setup, DNS setup, and
|
13
|
+
Removes a project from your development environment\. You will go through a series of prompts to delete a project\. This will only remove files that were generated by tj(1) i\.e\. the database setup, DNS setup, and other project configuration files\.
|
14
14
|
.
|
15
15
|
.P
|
16
16
|
It will not touch your local folders that were synced to the VM\.
|
@@ -9,9 +9,10 @@ SYNOPSIS
|
|
9
9
|
tj delete [--flag=arg] [--flag]
|
10
10
|
|
11
11
|
DESCRIPTION
|
12
|
-
Removes a project from your
|
13
|
-
|
14
|
-
|
12
|
+
Removes a project from your development environment. You will go
|
13
|
+
through a series of prompts to delete a project. This will only remove
|
14
|
+
files that were generated by tj(1) i.e. the database setup, DNS setup,
|
15
|
+
and other project configuration files.
|
15
16
|
|
16
17
|
It will not touch your local folders that were synced to the VM.
|
17
18
|
|
@@ -31,4 +32,4 @@ GLOBAL OPTIONS
|
|
31
32
|
|
32
33
|
|
33
34
|
|
34
|
-
|
35
|
+
August 2015 TJ-DELETE(1)
|
data/lib/theme-juice/project.rb
CHANGED
@@ -2,31 +2,31 @@
|
|
2
2
|
|
3
3
|
module ThemeJuice
|
4
4
|
module Tasks
|
5
|
-
class
|
5
|
+
class Template < Task
|
6
6
|
|
7
7
|
def initialize(opts = {})
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
11
11
|
def execute
|
12
|
-
if @project.
|
13
|
-
|
14
|
-
|
12
|
+
if @project.template
|
13
|
+
clone_template
|
14
|
+
install_template
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
|
-
def
|
21
|
-
@io.log "Cloning
|
20
|
+
def clone_template
|
21
|
+
@io.log "Cloning template"
|
22
22
|
@util.inside @project.location do
|
23
|
-
@util.run "git clone --depth 1 #{@project.
|
23
|
+
@util.run "git clone --depth 1 #{@project.template} .", {
|
24
24
|
:verbose => @env.verbose, :capture => @env.quiet }
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
@io.log "Running
|
28
|
+
def install_template
|
29
|
+
@io.log "Running template installation"
|
30
30
|
@config.command :install
|
31
31
|
end
|
32
32
|
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.12.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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -181,7 +181,7 @@ files:
|
|
181
181
|
- lib/theme-juice/tasks/settings.rb
|
182
182
|
- lib/theme-juice/tasks/stage.rb
|
183
183
|
- lib/theme-juice/tasks/synced_folder.rb
|
184
|
-
- lib/theme-juice/tasks/
|
184
|
+
- lib/theme-juice/tasks/template.rb
|
185
185
|
- lib/theme-juice/tasks/vm_box.rb
|
186
186
|
- lib/theme-juice/tasks/vm_customfile.rb
|
187
187
|
- lib/theme-juice/tasks/vm_location.rb
|