theme-juice 0.24.4 → 0.25.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45f3e35c70694d2db482b46740d82e65f303a1bf
4
- data.tar.gz: 705d5bb12a3e4255150b20b33196d9aa010cc6de
3
+ metadata.gz: 846174c5dc2a6183367c4dab90a1a49b603709cd
4
+ data.tar.gz: ac69fdb2a7afc76bd0dfe7799a333fdb0adb352f
5
5
  SHA512:
6
- metadata.gz: a36aeff8e335212a46a4b476f6ad36dd8be4022b8c13aed3c1eee609a199a2a1951fa91786b93e3edb439a0db29ba4326ad27aca1556b46980c9d0cf05a259a7
7
- data.tar.gz: 324f2baa3f7d31362fc6117eafe0bccab1c22a9a56e9cf8b7fc650ab7e196736ee69c64e27db6ca20b1ba2eedb41bbd6dd5a31a04c2d1c05940a818719d592bd
6
+ metadata.gz: 4e5ec2b57c1f4c9c0e72b134ce9a5aa5f50df21e7bce61abd3e3e09bdfb827dfc2d3b0a93a908f9c7f15c138f3af09ab7a795b7bbd1183808f25d58bfc489054
7
+ data.tar.gz: 4513e0152b395956e4227e4d6f71e6f411571806798e4918e822bfa5bae40225fa0049c41deb839b47d71199f642b356d1381197b92e8db2e86d01a7b25de63f
data/README.md CHANGED
@@ -118,6 +118,7 @@ Or, you can also check out [themejuice.it](http://themejuice.it) for a pretty we
118
118
  1. [Can I add my starter template, ________?](#can-i-add-my-starter-template-________)
119
119
  1. [Can I integrate my deployments with Slack?](#can-i-integrate-my-deployments-with-slack)
120
120
  1. [Can I use a self-signed SSL cert?](#can-i-use-a-self-signed-ssl-cert)
121
+ 1. [Can I define my own Capistrano tasks?](#can-i-define-my-own-capistrano-tasks)
121
122
  1. [Troubleshooting](#troubleshooting)
122
123
 
123
124
  ### Is Windows supported?
@@ -279,6 +280,29 @@ Check out [capistrano-slackify](https://github.com/onthebeach/capistrano-slackif
279
280
  ### Can I use a self-signed SSL cert?
280
281
  Yes, unless you used the `--no-ssl` flag, `tj` will set up each new site to support SSL, [and the VM will generate a new self-signed certificate](https://github.com/ezekg/theme-juice-vvv#automatically-generated-self-signed-ssl-certs). In order to take advantage of it, [you'll need to accept the self-signed certificate on your host machine](https://github.com/ezekg/theme-juice-vvv#accepting-a-self-signed-ssl-cert).
281
282
 
283
+ ### Can I define my own Capistrano tasks?
284
+ Yes. Any file within a directory called `deploy/` in your project with extensions `.rb`, `.cap` or `.rake` will be automatically loaded by Capistrano.
285
+
286
+ For example, within our [starter template](https://github.com/ezekg/theme-juice-starter), you will find a `deploy/` directory, inside is an example task named `task.rb.example`. Open the file and you will see an example task invokable by `tj remote <stage> hello:world`.
287
+
288
+ To learn more about Rake and how you can define your own Capistrano tasks, check out the [official Rake repository](https://github.com/ruby/rake) as well as the [official Capistrano tasks documentation](http://capistranorb.com/documentation/getting-started/tasks/).
289
+
290
+ If you're interested in checking out `tj`'s predefined tasks, head over [here](https://github.com/ezekg/theme-juice-cli/tree/master/lib/theme-juice/tasks/capistrano). You may override any task with custom functionality by using the same namespace/task name as outlined below,
291
+
292
+ ```ruby
293
+ # encoding: UTF-8
294
+
295
+ Rake::Task["db:push"].clear # Clear previous task
296
+
297
+ namespace :db do
298
+
299
+ desc "Overridden database push task"
300
+ task :push do
301
+ # Your new task here
302
+ end
303
+ end
304
+ ```
305
+
282
306
  ## Troubleshooting
283
307
 
284
308
  1. [Help! It won't let me `git clone` anything!](#help-it-wont-let-me-git-clone-anything)
@@ -64,6 +64,7 @@ module ThemeJuice
64
64
  @project.no_env = @opts.fetch("no_env") { @project.wp_config_modify }
65
65
  @project.name = @opts.fetch("name") { name }
66
66
  @project.location = @opts.fetch("location") { location }
67
+ @project.location = "#{Dir.pwd}" if @project.location == "."
67
68
  @project.url = @opts.fetch("url") { url }
68
69
  @project.xip_url = @opts.fetch("xip_url") { xip_url }
69
70
  @project.template = @opts.fetch("template") { template }
@@ -11,6 +11,7 @@ module ThemeJuice
11
11
  def execute
12
12
  load_capistrano
13
13
  load_tasks
14
+ load_custom_tasks
14
15
  end
15
16
 
16
17
  private
@@ -33,6 +34,14 @@ module ThemeJuice
33
34
 
34
35
  tasks.each { |task| load "#{tasks_dir}/#{task}.rb" }
35
36
  end
37
+
38
+ def load_custom_tasks
39
+ @io.log "Loading custom Capistrano tasks"
40
+
41
+ tasks_dir = "#{@project.location}/deploy"
42
+
43
+ Dir.glob("#{tasks_dir}/*.{rb,cap,rake}").each { |task| load task }
44
+ end
36
45
  end
37
46
  end
38
47
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.24.4"
4
+ VERSION = "0.25.0"
5
5
  end
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.24.4
4
+ version: 0.25.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: 2016-04-14 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor