theme-juice 0.28.1 → 0.28.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45986e3e185af0227b1519e087f5e788becedd96
4
- data.tar.gz: b2db6200715f2a28eeaa369da9d5e70cb9d1f011
3
+ metadata.gz: 3d3330b94b90b336c9ac48a2a0a37377ccddb7bb
4
+ data.tar.gz: 67f3c26154eeb10c53f33e4c6ac86191f47de21a
5
5
  SHA512:
6
- metadata.gz: c8916cc2e1b45670d343a125006a047bd4450c28966347fe07c5214d195cdb452d589e2321be84da3b33ae2fb40f590ecc1b3a5dced4440333ff4d9196962fbc
7
- data.tar.gz: 48951e85c92511d7f599c36d41439106cb6713d9ffcc192ca5af458116e99b1ee7c4acd079fae9567ce68175e0de2d9aca2909d2a8e4707f20a11fa9598ec6e8
6
+ metadata.gz: f12970fdd0a8e4fbdc74d8450de0727f6857971ca2cef7241fce1bd28cf8fff386cac1086360cbf50847e661d185901f49bd2135d2fdb073672704ba1fd764b6
7
+ data.tar.gz: 6b7b4bd22c1d21732e78df853a2d12d01a06606222cbe40245e5145eeeae176415edd1a0fd93d8700c403310c9e80aa2a896ef70a56a7763411059346de1e812
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Theme Juice CLI
2
2
  [![Gem Version](http://img.shields.io/gem/v/theme-juice.svg?style=flat-square)](https://rubygems.org/gems/theme-juice)
3
- [![Travis](https://img.shields.io/travis/ezekg/theme-juice-cli.svg?style=flat-square)](https://travis-ci.org/ezekg/theme-juice-cli)
3
+ [![Travis](https://img.shields.io/travis/ezekg/tj.svg?style=flat-square)](https://travis-ci.org/ezekg/tj)
4
4
  [![Code Climate](https://img.shields.io/codeclimate/github/ezekg/theme-juice-cli.svg?style=flat-square)](https://codeclimate.com/github/ezekg/theme-juice-cli)
5
5
  [![Code Climate](https://img.shields.io/codeclimate/coverage/github/ezekg/theme-juice-cli.svg?style=flat-square)](https://codeclimate.com/github/ezekg/theme-juice-cli)
6
6
  [![Gitter](https://img.shields.io/gitter/room/ezekg/theme-juice-cli.svg?style=flat-square)](https://gitter.im/ezekg/theme-juice-cli)
@@ -74,7 +74,7 @@ module ThemeJuice
74
74
  @project.url = @opts.fetch("url") { url }
75
75
  @project.xip_url = @opts.fetch("xip_url") { xip_url }
76
76
  @project.template = @opts.fetch("template") { template }
77
- @project.template_revision = @opts.fetch("template_revision") { nil }
77
+ @project.template_revision = @opts.fetch("template_revision") { template_revision }
78
78
  @project.repository = @opts.fetch("repository") { repository }
79
79
  @project.db_host = @opts.fetch("db_host") { db_host }
80
80
  @project.db_name = @opts.fetch("db_name") { db_name }
@@ -192,18 +192,18 @@ module ThemeJuice
192
192
  choice = @io.choose "Which starter template would you like to use?", :blue, TEMPLATES.keys
193
193
 
194
194
  case choice
195
- when /(themejuice)/
195
+ when /themejuice/i
196
196
  @io.say "Awesome choice!", :color => :green, :icon => :success
197
- when /(wordpress)/
198
- @project.wp_config_modify = true
199
- @project.no_config = true
200
- @project.no_wp_cli = true
201
- @project.no_env = true
197
+ when /wordpress/i
198
+ @project.wp_config_modify = true
199
+ @project.no_config = true
200
+ @project.no_wp_cli = true
201
+ @project.no_env = true
202
202
  @io.say "This is a stock WordPress install, so I'll go ahead and modify the 'wp-config' file for you.", {
203
203
  :color => :yellow, :icon => :notice }
204
- when /(other)/
204
+ when /other/i
205
205
  TEMPLATES[choice] = @io.ask "What is the repository URL of the starter template that you would like to clone?"
206
- when /(none)/
206
+ when /none/i
207
207
  @project.bare = true
208
208
  @io.say "Next time you need to create a project without a starter template, you can just run the 'setup' command instead.", {
209
209
  :color => :yellow, :icon => :notice }
@@ -215,6 +215,20 @@ module ThemeJuice
215
215
  template
216
216
  end
217
217
 
218
+ def template_revision
219
+ return nil if @project.bare
220
+
221
+ revision = nil
222
+
223
+ case @project.template
224
+ when /wordpress/i
225
+ revision = @io.ask "Which version of WordPress would you like to use?", {
226
+ :default => "master" }
227
+ end
228
+
229
+ revision
230
+ end
231
+
218
232
  def repository
219
233
  return false if @project.skip_repo || @project.use_defaults
220
234
 
@@ -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" "1" "August 2016" "" "Theme Juice Manual"
4
+ .TH "TJ" "1" "September 2016" "" "Theme Juice Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBtj\fR \- WordPress development made easy
@@ -37,7 +37,7 @@ Run Juicefile(5) commands from the passed path instead of from the current direc
37
37
  .
38
38
  .TP
39
39
  \fB\-\-from\-srv\fR, \fB\-\-in\-srv\fR=\fIpath\fR
40
- Run Juicefile(5) commands from the passed srv path instead of from the current host directory\.
40
+ Run Juicefile(5) commands from the passed srv path instead of from the current host directory path when using the \fB\-\-inside\-vm\fR flag\.
41
41
  .
42
42
  .TP
43
43
  \fB\-\-inside\-vm\fR, \fB\-\-in\-vm\fR
@@ -306,7 +306,7 @@ if those were the options chosen during a creation\. The following variables are
306
306
  \fBvm_ip\fR: Virtual machine IP address
307
307
  .
308
308
  .IP "\(bu" 4
309
- \fBvm_revision\fR Revision hash or branch to checkout for VM
309
+ \fBvm_revision\fR Revision hash or branch of VM
310
310
  .
311
311
  .IP "\(bu" 4
312
312
  \fBvm_path\fR: Virtual machine location on the host machine
@@ -349,12 +349,12 @@ Revision hash or branch to checkout for VM (default is master)
349
349
  Force directory prefix for project in VM
350
350
  .
351
351
  .TP
352
- \fBTJ_FROM_PATH\fR=\fIpath\fR
352
+ \fBTJ_FROM_PATH\fR\fI=path\fR
353
353
  Run Juicefile(5) commands from the passed path instead of from the current directory\.
354
354
  .
355
355
  .TP
356
- \fBTJ_FROM_SRV\fR=\fIpath\fR
357
- Run Juicefile(5) commands from the passed srv path instead of from the current host directory path\.
356
+ \fBTJ_FROM_SRV\fR\fI=path\fR
357
+ Run Juicefile(5) commands from the passed srv path instead of from the current host directory path when \fBTJ_INSIDE_VM\fR is enabled\.
358
358
  .
359
359
  .TP
360
360
  \fBTJ_INSIDE_VM\fR=\fIbool\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\-DEPLOY" "1" "August 2016" "" "Theme Juice Manual"
4
+ .TH "TJ\-DEPLOY" "1" "September 2016" "" "Theme Juice Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBtj\-deploy\fR \- Deploy a project
@@ -312,4 +312,4 @@ CONFIG FILE
312
312
 
313
313
 
314
314
 
315
- August 2016 TJ-DEPLOY(1)
315
+ September 2016 TJ-DEPLOY(1)
@@ -30,14 +30,15 @@ GLOBAL OPTIONS
30
30
 
31
31
  --from-srv, --in-srv=path
32
32
  Run Juicefile(5) commands from the passed srv path instead of
33
- from the current host directory.
33
+ from the current host directory path when using the --inside-vm
34
+ flag.
34
35
 
35
36
  --inside-vm, --in-vm
36
- Run Juicefile(5) commands from inside of the virtual machine
37
+ Run Juicefile(5) commands from inside of the virtual machine
37
38
  instead of your host machine.
38
39
 
39
40
  --yolo, --yes
40
- Say yes to anything and everything, and maybe even get a few
41
+ Say yes to anything and everything, and maybe even get a few
41
42
  surprises
42
43
 
43
44
  --boring
@@ -112,16 +113,16 @@ SECONDARY COMMANDS
112
113
  List all projects
113
114
 
114
115
  vm, vagrant, vvv=[command[,command]...]
115
- Manage development environment via vagrant(1). Commands are
116
- proxied to your Vagrant installation so that they can be run
116
+ Manage development environment via vagrant(1). Commands are
117
+ proxied to your Vagrant installation so that they can be run
117
118
  from any directory.
118
119
 
119
120
  CONFIG FILE
120
- A YAML configuration file called a Juicefile(5) can be used to store
121
- commonly used build scripts, similar to npm(1) scripts. Each command
122
- can be mapped to any build script you like, allowing you to define a
123
- set of commands that can be used across all of your projects. If you
124
- plan to deploy using tj, this file will also house your deploy(1) con-
121
+ A YAML configuration file called a Juicefile(5) can be used to store
122
+ commonly used build scripts, similar to npm(1) scripts. Each command
123
+ can be mapped to any build script you like, allowing you to define a
124
+ set of commands that can be used across all of your projects. If you
125
+ plan to deploy using tj, this file will also house your deploy(1) con-
125
126
  figuration.
126
127
 
127
128
  For reference, below is an example config:
@@ -173,8 +174,8 @@ CONFIG COMMANDS
173
174
  dev, which will in turn run the command grunt.
174
175
 
175
176
  If you noticed in the example above, there are a few commands that con-
176
- tain %args%; each command list is run within a single execution via
177
- joining: cmd1 && cmd2 [&& cmd3...], with all %args%/%argN% being
177
+ tain %args%; each command list is run within a single execution via
178
+ joining: cmd1 && cmd2 [&& cmd3...], with all %args%/%argN% being
178
179
  replaced with the corresponding argument index, when available.
179
180
 
180
181
  Here's a few example commands using placeholders:
@@ -191,16 +192,16 @@ CONFIG COMMANDS
191
192
 
192
193
 
193
194
 
194
- To clarify a little bit more, we could run tj dev build, and since our
195
- dev command contains %args%, that will in turn run the command grunt
196
- build; if we run tj dev some:other task, that would be interpreted and
195
+ To clarify a little bit more, we could run tj dev build, and since our
196
+ dev command contains %args%, that will in turn run the command grunt
197
+ build; if we run tj dev some:other task, that would be interpreted and
197
198
  run as grunt some:other task.
198
199
 
199
- You can specify an unlimited number of commands with an unlimited num-
200
- ber of arguments within your Juicefile; however, you should be careful
201
- with how this is used. Don't go including sudo rm -rf %arg1% in a com-
202
- mand, while passing / as an argument. Keep it simple. These are meant
203
- to make your life easier by helping you manage build tools, not to do
200
+ You can specify an unlimited number of commands with an unlimited num-
201
+ ber of arguments within your Juicefile; however, you should be careful
202
+ with how this is used. Don't go including sudo rm -rf %arg1% in a com-
203
+ mand, while passing / as an argument. Keep it simple. These are meant
204
+ to make your life easier by helping you manage build tools, not to do
204
205
  fancy scripting.
205
206
 
206
207
  CONFIG TEMPLATE STRINGS
@@ -258,7 +259,7 @@ CONFIG TEMPLATE STRINGS
258
259
 
259
260
  o vm_ip: Virtual machine IP address
260
261
 
261
- o vm_revision Revision hash or branch to checkout for VM
262
+ o vm_revision Revision hash or branch of VM
262
263
 
263
264
  o vm_path: Virtual machine location on the host machine
264
265
 
@@ -275,7 +276,7 @@ CONFIG TEMPLATE STRINGS
275
276
  ENVIRONMENT
276
277
  All of the global options have a corresponding ENV variable that can be
277
278
  set to permanently use the specified value each time tj(1) is run. This
278
- is useful if you're using an alternate vagrant(1) box, or if you need
279
+ is useful if you're using an alternate vagrant(1) box, or if you need
279
280
  to disable certain features due to limited support i.e. on Windows.
280
281
 
281
282
  TJ_VM_BOX=repository
@@ -294,12 +295,13 @@ ENVIRONMENT
294
295
  Force directory prefix for project in VM
295
296
 
296
297
  TJ_FROM_PATH=path
297
- Run Juicefile(5) commands from the passed path instead of from
298
+ Run Juicefile(5) commands from the passed path instead of from
298
299
  the current directory.
299
300
 
300
301
  TJ_FROM_SRV=path
301
- Run Juicefile(5) commands from the passed srv path instead of
302
- from the current host directory path.
302
+ Run Juicefile(5) commands from the passed srv path instead of
303
+ from the current host directory path when TJ_INSIDE_VM is
304
+ enabled.
303
305
 
304
306
  TJ_INSIDE_VM=bool
305
307
  Run Juicefile(5) commands from inside of the virtual machine
@@ -345,4 +347,4 @@ ENVIRONMENT
345
347
 
346
348
 
347
349
 
348
- August 2016 TJ(1)
350
+ September 2016 TJ(1)
@@ -12,8 +12,11 @@ module ThemeJuice
12
12
  return unless @project.template
13
13
 
14
14
  clone_template
15
- render_template_config_erb if @config.exist?
16
- install_template
15
+
16
+ if @config.exist?
17
+ render_template_config_erb
18
+ install_template
19
+ end
17
20
  end
18
21
 
19
22
  private
@@ -23,9 +26,10 @@ module ThemeJuice
23
26
  @util.inside @project.location do
24
27
  @util.run [], { :verbose => @env.verbose,
25
28
  :capture => @env.quiet } do |cmds|
26
- cmds << "git clone #{@project.template} ."
27
29
  if @project.template_revision
28
- cmds << "git checkout #{@project.template_revision}"
30
+ cmds << "git clone '#{@project.template}' --depth 1 --branch '#{@project.template_revision}' --single-branch ."
31
+ else
32
+ cmds << "git clone '#{@project.template}' --depth 1 ."
29
33
  end
30
34
  end
31
35
  end
@@ -27,11 +27,11 @@ module ThemeJuice
27
27
  :capture => @env.quiet } do |cmds|
28
28
  cmds << "git fetch"
29
29
  if @env.vm_revision
30
- cmds << "git checkout #{@env.vm_revision}"
30
+ cmds << "git checkout '#{@env.vm_revision}'"
31
31
  else
32
32
  cmds << "git checkout master"
33
33
  end
34
- cmds << "git pull"
34
+ cmds << "git reset --hard"
35
35
  end
36
36
  end
37
37
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.28.1"
4
+ VERSION = "0.28.2"
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.28.1
4
+ version: 0.28.2
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-08-29 00:00:00.000000000 Z
11
+ date: 2016-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor