theme-juice 0.26.2 → 0.26.3
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/lib/theme-juice/cli.rb +3 -1
- data/lib/theme-juice/commands/create.rb +11 -2
- data/lib/theme-juice/man/tj-create +4 -0
- data/lib/theme-juice/man/tj-create.txt +3 -0
- data/lib/theme-juice/man/tj-init +1 -1
- data/lib/theme-juice/man/tj-init.txt +1 -1
- data/lib/theme-juice/man/tj-setup +4 -0
- data/lib/theme-juice/man/tj-setup.txt +3 -0
- data/lib/theme-juice/tasks/vm_provision.rb +1 -15
- data/lib/theme-juice/tasks/vm_restart.rb +16 -5
- 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: 993a7061f134c09e5214a50afd234d7c72f3e56a
|
4
|
+
data.tar.gz: cac7fcedefb39e8d768727237ed03014522f4dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 060a2da004e18ec839ab6e25d7bdd0fb95c9f1a50ac1e75e783056590e4ad25d804836987e4fb4406a3ef5b19c7bded3cc1126cc46ed022b9613a3bef4ab6295
|
7
|
+
data.tar.gz: 4e738554ac822d7e020f200b60570d8cf39b2cb022b0544d3e34cceb2d71c0cc947dd812012a07a26920e56fc142f424016f42963aa5075c425733b4e6ae4d07
|
data/lib/theme-juice/cli.rb
CHANGED
@@ -121,7 +121,7 @@ module ThemeJuice
|
|
121
121
|
end
|
122
122
|
|
123
123
|
desc "init", "Initialize the VM"
|
124
|
-
method_option :provision, :type => :boolean, :
|
124
|
+
method_option :provision, :type => :boolean, :desc => ""
|
125
125
|
def init
|
126
126
|
@io.say "Initializing the VM...", {
|
127
127
|
:color => [:black, :on_green, :bold],
|
@@ -148,6 +148,7 @@ module ThemeJuice
|
|
148
148
|
method_option :no_config, :type => :boolean, :aliases => %w[--no-juicefile], :desc => ""
|
149
149
|
method_option :wp_config_modify, :type => :boolean, :aliases => %w[--modify-wp-config], :desc => ""
|
150
150
|
method_option :no_ssl, :type => :boolean, :aliases => %w[--no-https], :desc => ""
|
151
|
+
method_option :provision, :type => :boolean, :desc => ""
|
151
152
|
def create
|
152
153
|
@io.hello
|
153
154
|
@create.new(options).execute
|
@@ -169,6 +170,7 @@ module ThemeJuice
|
|
169
170
|
method_option :no_config, :type => :boolean, :aliases => %w[--no-juicefile], :desc => ""
|
170
171
|
method_option :wp_config_modify, :type => :boolean, :aliases => %w[--modify-wp-config], :desc => ""
|
171
172
|
method_option :no_ssl, :type => :boolean, :aliases => %w[--no-https], :desc => ""
|
173
|
+
method_option :provision, :type => :boolean, :desc => ""
|
172
174
|
def setup
|
173
175
|
@io.hello
|
174
176
|
@create.new(options.dup.merge(:bare => true)).execute
|
@@ -41,7 +41,11 @@ module ThemeJuice
|
|
41
41
|
tasks << Tasks::DNS.new
|
42
42
|
tasks << Tasks::WPCLI.new
|
43
43
|
tasks << Tasks::Repo.new
|
44
|
-
|
44
|
+
if @project.provision
|
45
|
+
tasks << Tasks::VMProvision.new
|
46
|
+
else
|
47
|
+
tasks << Tasks::VMRestart.new
|
48
|
+
end
|
45
49
|
tasks << Tasks::ImportDatabase.new
|
46
50
|
tasks << Tasks::CreateSuccess.new
|
47
51
|
end
|
@@ -60,6 +64,7 @@ module ThemeJuice
|
|
60
64
|
@project.wp_config_modify = @opts.fetch("wp_config_modify") { false }
|
61
65
|
@project.no_config = @opts.fetch("no_config") { false }
|
62
66
|
@project.no_ssl = @opts.fetch("no_ssl") { false }
|
67
|
+
@project.provision = @opts.fetch("provision") { false }
|
63
68
|
@project.no_env = @opts.fetch("no_env") { @project.wp_config_modify }
|
64
69
|
@project.name = @opts.fetch("name") { name }
|
65
70
|
@project.location = @opts.fetch("location") { location }
|
@@ -92,7 +97,7 @@ module ThemeJuice
|
|
92
97
|
@io.error "Project name '#{name}' looks like it's empty. Aborting mission."
|
93
98
|
end
|
94
99
|
|
95
|
-
"#{name}".match /[^0-
|
100
|
+
"#{name}".match /[^0-9a-z\.\-]/ do |char|
|
96
101
|
@io.error "Project name contains an invalid character '#{char}'. This name is used internally for a ton of stuff, so that's not gonna work. Aborting mission."
|
97
102
|
end
|
98
103
|
|
@@ -133,6 +138,10 @@ module ThemeJuice
|
|
133
138
|
@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."
|
134
139
|
end
|
135
140
|
|
141
|
+
"#{url}".match /[^0-9a-z\.\-]/ do |char|
|
142
|
+
@io.error "Your development url contains an invalid character '#{char}'. Aborting mission."
|
143
|
+
end
|
144
|
+
|
136
145
|
true
|
137
146
|
end
|
138
147
|
|
data/lib/theme-juice/man/tj-init
CHANGED
@@ -9,11 +9,7 @@ module ThemeJuice
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def execute
|
12
|
-
|
13
|
-
provision
|
14
|
-
else
|
15
|
-
restart
|
16
|
-
end
|
12
|
+
provision
|
17
13
|
end
|
18
14
|
|
19
15
|
def unexecute
|
@@ -42,16 +38,6 @@ module ThemeJuice
|
|
42
38
|
end
|
43
39
|
end
|
44
40
|
end
|
45
|
-
|
46
|
-
def restart
|
47
|
-
@io.log "Restarting VM"
|
48
|
-
@util.inside @env.vm_path do
|
49
|
-
@util.run [] do |cmds|
|
50
|
-
cmds << "vagrant halt" if vm_is_up?
|
51
|
-
cmds << "vagrant up --no-provision"
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
41
|
end
|
56
42
|
end
|
57
43
|
end
|
@@ -13,18 +13,29 @@ module ThemeJuice
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def unexecute
|
16
|
-
if @project.vm_restart
|
17
|
-
restart
|
18
|
-
end
|
16
|
+
restart if @project.vm_restart
|
19
17
|
end
|
20
18
|
|
21
19
|
private
|
22
20
|
|
21
|
+
def vm_is_up?
|
22
|
+
res = false
|
23
|
+
|
24
|
+
@util.inside @env.vm_path do
|
25
|
+
res = @util.run("vagrant status --machine-readable", {
|
26
|
+
:verbose => @env.verbose, :capture => true }).include? "running"
|
27
|
+
end
|
28
|
+
|
29
|
+
res
|
30
|
+
end
|
31
|
+
|
23
32
|
def restart
|
24
33
|
@io.log "Restarting VM"
|
25
34
|
@util.inside @env.vm_path do
|
26
|
-
@util.run
|
27
|
-
|
35
|
+
@util.run [] do |cmds|
|
36
|
+
cmds << "vagrant halt" if vm_is_up?
|
37
|
+
cmds << "vagrant up"
|
38
|
+
end
|
28
39
|
end
|
29
40
|
end
|
30
41
|
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.26.
|
4
|
+
version: 0.26.3
|
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-07-
|
11
|
+
date: 2016-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|