theme-juice 0.26.3 → 0.27.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 +66 -47
- data/lib/theme-juice.rb +1 -0
- data/lib/theme-juice/cli.rb +2 -4
- data/lib/theme-juice/commands/create.rb +47 -18
- data/lib/theme-juice/commands/delete.rb +4 -1
- data/lib/theme-juice/commands/init.rb +5 -2
- data/lib/theme-juice/config.rb +33 -10
- data/lib/theme-juice/env.rb +3 -3
- data/lib/theme-juice/helpers/singleton_helper.rb +11 -0
- data/lib/theme-juice/man/tj +154 -53
- data/lib/theme-juice/man/tj-create +0 -4
- data/lib/theme-juice/man/tj-create.txt +0 -3
- data/lib/theme-juice/man/tj-deploy +136 -4
- data/lib/theme-juice/man/tj-deploy.txt +138 -11
- 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 +0 -4
- data/lib/theme-juice/man/tj-setup.txt +0 -3
- data/lib/theme-juice/man/tj.txt +141 -57
- data/lib/theme-juice/project.rb +1 -1
- data/lib/theme-juice/tasks/dns.rb +4 -3
- data/lib/theme-juice/tasks/settings.rb +7 -2
- data/lib/theme-juice/tasks/template.rb +15 -1
- data/lib/theme-juice/tasks/vm_plugins.rb +3 -4
- data/lib/theme-juice/tasks/wp_cli.rb +2 -8
- data/lib/theme-juice/version.rb +1 -1
- metadata +12 -3
@@ -18,9 +18,10 @@ module ThemeJuice
|
|
18
18
|
def execute
|
19
19
|
create_entry_file
|
20
20
|
create_entry do
|
21
|
-
%Q{
|
21
|
+
%Q{case
|
22
|
+
when Vagrant.has_plugin?("landrush")
|
22
23
|
config.landrush.host '#{@project.url}', '#{@env.vm_ip}'
|
23
|
-
|
24
|
+
when Vagrant.has_plugin?("vagrant-hostsupdater")
|
24
25
|
config.hostsupdater.aliases << '#{@project.url}'
|
25
26
|
end}
|
26
27
|
end
|
@@ -35,7 +36,7 @@ end}
|
|
35
36
|
|
36
37
|
def remove_landrush_entry
|
37
38
|
return if @env.no_landrush
|
38
|
-
|
39
|
+
|
39
40
|
@io.log "Removing URL from Landrush"
|
40
41
|
@util.run "vagrant landrush rm #{@project.url}", { :verbose => @env.verbose,
|
41
42
|
:capture => @env.quiet }
|
@@ -24,8 +24,13 @@ module ThemeJuice
|
|
24
24
|
|
25
25
|
# Required global settings
|
26
26
|
def configure_required_settings
|
27
|
-
|
28
|
-
|
27
|
+
begin
|
28
|
+
set :application, @config.project.name
|
29
|
+
rescue NoMethodError
|
30
|
+
@io.notice "Deprecation Notice: 'config.deployment.application.name' has been deprecated! Please use 'config.project.name' instead."
|
31
|
+
set :application, @config.deployment.application.name
|
32
|
+
end
|
33
|
+
set :archive, @env.archive
|
29
34
|
|
30
35
|
set :linked_files, fetch(:linked_files, []).concat(fetch(:shared_files, []))
|
31
36
|
set :linked_dirs, fetch(:linked_dirs, []).concat(fetch(:shared_dirs, []))
|
@@ -10,8 +10,9 @@ module ThemeJuice
|
|
10
10
|
|
11
11
|
def execute
|
12
12
|
return unless @project.template
|
13
|
-
|
13
|
+
|
14
14
|
clone_template
|
15
|
+
render_template_config_erb if @config.exist?
|
15
16
|
install_template
|
16
17
|
end
|
17
18
|
|
@@ -25,6 +26,19 @@ module ThemeJuice
|
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
29
|
+
def render_template_config_erb
|
30
|
+
@io.log "Rendering template config ERB"
|
31
|
+
save_template_config ERB.new(File.read(@config.path)).result(
|
32
|
+
@project.to_h.merge(@env.to_h).to_ostruct.instance_eval { binding }
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
def save_template_config(contents)
|
37
|
+
@io.log "Saving rendered template config"
|
38
|
+
File.open(@config.path, "w+") { |f| f << contents }
|
39
|
+
@config.refresh!
|
40
|
+
end
|
41
|
+
|
28
42
|
def install_template
|
29
43
|
@io.log "Running template installation"
|
30
44
|
@config.command :install
|
@@ -9,9 +9,8 @@ module ThemeJuice
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def execute
|
12
|
-
install_vagrant_plugin "vagrant-triggers", "0.5.
|
13
|
-
install_vagrant_plugin "
|
14
|
-
install_vagrant_plugin "landrush", "0.18.0" unless @env.no_landrush
|
12
|
+
install_vagrant_plugin "vagrant-triggers", "0.5.3"
|
13
|
+
install_vagrant_plugin "landrush", "1.0.0" unless @env.no_landrush
|
15
14
|
end
|
16
15
|
|
17
16
|
private
|
@@ -22,7 +21,7 @@ module ThemeJuice
|
|
22
21
|
|
23
22
|
def install_vagrant_plugin(plugin, version)
|
24
23
|
return if vagrant_plugin_is_installed? plugin
|
25
|
-
|
24
|
+
|
26
25
|
@io.log "Installing #{plugin}"
|
27
26
|
@util.run "vagrant plugin install #{plugin} --plugin-version #{version}", {
|
28
27
|
:verbose => @env.verbose, :capture => @env.quiet }
|
@@ -32,14 +32,8 @@ module ThemeJuice
|
|
32
32
|
@io.log "Creating WP-CLI file"
|
33
33
|
@util.create_file wp_cli_file, { :verbose => @env.verbose,
|
34
34
|
:capture => @env.quiet } do
|
35
|
-
%Q{
|
36
|
-
|
37
|
-
ssh:
|
38
|
-
vagrant:
|
39
|
-
url: #{@project.url}
|
40
|
-
path: #{@project.vm_srv}
|
41
|
-
cmd: cd #{@env.vm_path} && vagrant ssh-config > /tmp/vagrant_ssh_config && ssh -q %pseudotty% -F /tmp/vagrant_ssh_config default %cmd%
|
42
|
-
|
35
|
+
%Q{@development:
|
36
|
+
ssh: vagrant@#{@env.vm_ip}#{@project.vm_srv}
|
43
37
|
}
|
44
38
|
end
|
45
39
|
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.27.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-
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -218,7 +218,16 @@ homepage: http://themejuice.it
|
|
218
218
|
licenses:
|
219
219
|
- GPLv2
|
220
220
|
metadata: {}
|
221
|
-
post_install_message:
|
221
|
+
post_install_message: |-
|
222
|
+
################################################################################
|
223
|
+
Hello there!
|
224
|
+
|
225
|
+
There have been a few changes since the last time you updated, so please head
|
226
|
+
over to https://github.com/ezekg/theme-juice-cli and check out the 0.27.0
|
227
|
+
release to review everything that's changed.
|
228
|
+
|
229
|
+
Thanks for using Theme Juice!
|
230
|
+
################################################################################
|
222
231
|
rdoc_options: []
|
223
232
|
require_paths:
|
224
233
|
- lib
|