theme-juice 0.26.3 → 0.27.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.
@@ -18,9 +18,10 @@ module ThemeJuice
18
18
  def execute
19
19
  create_entry_file
20
20
  create_entry do
21
- %Q{if defined? Landrush
21
+ %Q{case
22
+ when Vagrant.has_plugin?("landrush")
22
23
  config.landrush.host '#{@project.url}', '#{@env.vm_ip}'
23
- elsif defined? VagrantPlugins::HostsUpdater
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
- set :application, @config.deployment.application.name
28
- set :archive, @env.archive
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.0"
13
- install_vagrant_plugin "vagrant-hostsupdater", "0.0.11"
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{require:
36
- - vendor/autoload.php
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
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.26.3"
4
+ VERSION = "0.27.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.26.3
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-07-21 00:00:00.000000000 Z
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