theme-juice 0.16.2 → 0.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2daf93c3af67ac83117ca46ba72e8d1fc6c02b41
4
- data.tar.gz: 1ecd546f8da3c3305bf21314f704bfe45b04cb50
3
+ metadata.gz: c141fd94370ee7a1fba783f494a38cd9ee78902f
4
+ data.tar.gz: 887ff3470169bd7dd7b4b50d9a09af5fb043a2f0
5
5
  SHA512:
6
- metadata.gz: 30c03563416e26d5241e19d9ebc0060d77ba7e651da18b3103e5562a2d561cfc5fd15c2a99df84b63538c037bab7893f04719e96a12918fdcb48c64e60734fa5
7
- data.tar.gz: 56f8a3348b4c08fed0314568252b8fd5d9c52d38f0c1b1d26d6bfe2c949bd80f76537af08c91ae930723bc365a544a1c3d59acc40fe6d89e99143cb7a4c12fd0
6
+ metadata.gz: 72d13f7ceb2fee6f182ce1666040ddca5e27abd86bbc1fd26338e80bff13182564061cbbf98512b4b90ee7d926b947822524bbee79d8c4927a3ac52c19f6d05e
7
+ data.tar.gz: e6d2989c65d4c4fe9e933e5716b48dad0a1b650598ab4fd48dd1372a6dbb3c3ccad44c66926cc319960125a592c3ea1c870bc9c1ffbc11c8c1555ece3c2d97b2
@@ -27,10 +27,11 @@ module ThemeJuice
27
27
  end
28
28
 
29
29
  def create_apache_file
30
- unless apache_is_setup?
31
- @io.log "Creating apache conf file"
32
- @util.create_file apache_file, { :verbose => @env.verbose,
33
- :capture => @env.quiet } do
30
+ return if apache_is_setup?
31
+
32
+ @io.log "Creating apache conf file"
33
+ @util.create_file apache_file, { :verbose => @env.verbose,
34
+ :capture => @env.quiet } do
34
35
  %Q{<VirtualHost *:80>
35
36
  DocumentRoot #{@project.vm_srv}
36
37
  ServerName #{@project.url}
@@ -38,7 +39,6 @@ module ThemeJuice
38
39
  </VirtualHost>
39
40
 
40
41
  }
41
- end
42
42
  end
43
43
  end
44
44
 
@@ -33,16 +33,15 @@ GRANT ALL PRIVILEGES ON `#{@project.db_name}`.* TO '#{@project.db_user}'@'localh
33
33
  private
34
34
 
35
35
  def drop_database
36
- if @project.db_drop
37
-
38
- # Double check that the database should be dropped
39
- if @io.agree? "Are you sure you want to drop the database for '#{@project.name}'?"
40
- @io.log "Dropping database"
41
- @util.run_inside_vm [], { :verbose => @env.verbose,
42
- :capture => @env.quiet } do |cmds|
43
- cmds << "cd #{@project.vm_srv}"
44
- cmds << "wp db drop --yes"
45
- end
36
+ return unless @project.db_drop
37
+
38
+ # Double check that the database should be dropped
39
+ if @io.agree? "Are you sure you want to drop the database for '#{@project.name}'?"
40
+ @io.log "Dropping database"
41
+ @util.run_inside_vm [], { :verbose => @env.verbose,
42
+ :capture => @env.quiet } do |cmds|
43
+ cmds << "cd #{@project.vm_srv}"
44
+ cmds << "wp db drop --yes"
46
45
  end
47
46
  end
48
47
  end
@@ -34,11 +34,11 @@ end}
34
34
  private
35
35
 
36
36
  def remove_landrush_entry
37
- unless @env.no_landrush
38
- @io.log "Removing URL from Landrush"
39
- @util.run "vagrant landrush rm #{@project.url}", { :verbose => @env.verbose,
40
- :capture => @env.quiet }
41
- end
37
+ return if @env.no_landrush
38
+
39
+ @io.log "Removing URL from Landrush"
40
+ @util.run "vagrant landrush rm #{@project.url}", { :verbose => @env.verbose,
41
+ :capture => @env.quiet }
42
42
  end
43
43
  end
44
44
  end
@@ -9,9 +9,9 @@ module ThemeJuice
9
9
  end
10
10
 
11
11
  def execute
12
- unless @project.no_wp
13
- create_dot_env_file
14
- end
12
+ return if @project.no_wp
13
+
14
+ create_dot_env_file
15
15
  end
16
16
 
17
17
  def unexecute
@@ -29,10 +29,11 @@ module ThemeJuice
29
29
  end
30
30
 
31
31
  def create_dot_env_file
32
- unless dot_env_is_setup?
33
- @io.log "Creating .env file"
34
- @util.create_file dot_env_file, { :verbose => @env.verbose,
35
- :capture => @env.quiet } do
32
+ return if dot_env_is_setup?
33
+
34
+ @io.log "Creating .env file"
35
+ @util.create_file dot_env_file, { :verbose => @env.verbose,
36
+ :capture => @env.quiet } do
36
37
  %Q{DB_NAME=#{@project.db_name}
37
38
  DB_USER=#{@project.db_user}
38
39
  DB_PASSWORD=#{@project.db_pass}
@@ -43,7 +44,6 @@ WP_HOME=http://#{@project.url}
43
44
  WP_SITEURL=http://#{@project.url}/wp
44
45
 
45
46
  }
46
- end
47
47
  end
48
48
  end
49
49
 
@@ -16,11 +16,11 @@ module ThemeJuice
16
16
  end
17
17
 
18
18
  def create_entry_file
19
- unless entry_file_is_setup?
20
- @io.log "Creating #{@entry.fetch(:name)} file"
21
- @util.create_file @entry.fetch(:file), nil, { :verbose => @env.verbose,
22
- :capture => @env.quiet }
23
- end
19
+ return if entry_file_is_setup?
20
+
21
+ @io.log "Creating #{@entry.fetch(:name)} file"
22
+ @util.create_file @entry.fetch(:file), nil, { :verbose => @env.verbose,
23
+ :capture => @env.quiet }
24
24
  end
25
25
 
26
26
  def entry_is_setup?
@@ -28,17 +28,17 @@ module ThemeJuice
28
28
  end
29
29
 
30
30
  def create_entry(&block)
31
- unless entry_is_setup?
32
- @io.log "Creating #{@entry.fetch(:name)} entry"
33
- @util.append_to_file @entry.fetch(:file), { :verbose => @env.verbose,
34
- :capture => @env.quiet } do
31
+ return if entry_is_setup?
32
+
33
+ @io.log "Creating #{@entry.fetch(:name)} entry"
34
+ @util.append_to_file @entry.fetch(:file), { :verbose => @env.verbose,
35
+ :capture => @env.quiet } do
35
36
  %Q{# Begin '#{@entry.fetch(:project)}' #{@entry.fetch(:id)}
36
37
  # The contents below are automatically generated by Theme Juice. Do not modify.
37
38
  #{yield}
38
39
  # End '#{@entry.fetch(:project)}' #{@entry.fetch(:id)}
39
40
 
40
41
  }
41
- end
42
42
  end
43
43
  end
44
44
 
@@ -16,12 +16,12 @@ module ThemeJuice
16
16
  end
17
17
 
18
18
  def execute
19
- unless @env.no_port_forward
20
- create_entry_file
21
- create_entry do
19
+ return if @env.no_port_forward
20
+
21
+ create_entry_file
22
+ create_entry do
22
23
  %Q{#{forward_host_ports}config.vm.network "forwarded_port", guest: 80, host: 8080
23
24
  config.vm.network "forwarded_port", guest: 443, host: 8443}
24
- end
25
25
  end
26
26
  end
27
27
 
@@ -16,12 +16,12 @@ module ThemeJuice
16
16
  end
17
17
 
18
18
  def execute
19
- unless @env.no_landrush
20
- create_entry_file
21
- create_entry do
19
+ return if @env.no_landrush
20
+
21
+ create_entry_file
22
+ create_entry do
22
23
  %Q{config.landrush.enabled = true
23
24
  config.landrush.tld = 'dev'}
24
- end
25
25
  end
26
26
  end
27
27
 
@@ -27,10 +27,11 @@ module ThemeJuice
27
27
  end
28
28
 
29
29
  def create_nginx_file
30
- unless nginx_is_setup?
31
- @io.log "Creating nginx conf file"
32
- @util.create_file nginx_file, { :verbose => @env.verbose,
33
- :capture => @env.quiet } do
30
+ return if nginx_is_setup?
31
+
32
+ @io.log "Creating nginx conf file"
33
+ @util.create_file nginx_file, { :verbose => @env.verbose,
34
+ :capture => @env.quiet } do
34
35
  %Q(server {
35
36
  listen 80;
36
37
  listen 443 ssl;
@@ -40,7 +41,6 @@ module ThemeJuice
40
41
  }
41
42
 
42
43
  )
43
- end
44
44
  end
45
45
  end
46
46
 
@@ -9,9 +9,9 @@ module ThemeJuice
9
9
  end
10
10
 
11
11
  def execute
12
- if @project.repository
13
- create_repo
14
- end
12
+ return unless @project.repository
13
+
14
+ create_repo
15
15
  end
16
16
 
17
17
  private
@@ -9,10 +9,10 @@ module ThemeJuice
9
9
  end
10
10
 
11
11
  def execute
12
- if @project.template
13
- clone_template
14
- install_template
15
- end
12
+ return unless @project.template
13
+
14
+ clone_template
15
+ install_template
16
16
  end
17
17
 
18
18
  private
@@ -19,11 +19,11 @@ module ThemeJuice
19
19
  end
20
20
 
21
21
  def install_box
22
- unless box_is_installed?
23
- @io.log "Installing Vagrant box"
24
- @util.run "git clone #{@env.vm_box} #{@env.vm_path} --depth 1", {
25
- :verbose => @env.verbose, :capture => @env.quiet }
26
- end
22
+ return if box_is_installed?
23
+
24
+ @io.log "Installing Vagrant box"
25
+ @util.run "git clone #{@env.vm_box} #{@env.vm_path} --depth 1", {
26
+ :verbose => @env.verbose, :capture => @env.quiet }
27
27
  end
28
28
  end
29
29
  end
@@ -27,11 +27,11 @@ module ThemeJuice
27
27
  end
28
28
 
29
29
  def create_custom_file
30
- unless custom_file_is_setup?
31
- @io.log "Creating customfile"
32
- @util.create_file custom_file, nil, { :verbose => @env.verbose,
33
- :capture => @env.quiet }
34
- end
30
+ return if custom_file_is_setup?
31
+
32
+ @io.log "Creating customfile"
33
+ @util.create_file custom_file, nil, { :verbose => @env.verbose,
34
+ :capture => @env.quiet }
35
35
  end
36
36
 
37
37
  def remove_custom_file
@@ -21,11 +21,11 @@ module ThemeJuice
21
21
  end
22
22
 
23
23
  def install_vagrant_plugin(plugin, version)
24
- unless vagrant_plugin_is_installed? plugin
25
- @io.log "Installing #{plugin}"
26
- @util.run "vagrant plugin install #{plugin} --plugin-version #{version}", {
27
- :verbose => @env.verbose, :capture => @env.quiet }
28
- end
24
+ return if vagrant_plugin_is_installed? plugin
25
+
26
+ @io.log "Installing #{plugin}"
27
+ @util.run "vagrant plugin install #{plugin} --plugin-version #{version}", {
28
+ :verbose => @env.verbose, :capture => @env.quiet }
29
29
  end
30
30
  end
31
31
  end
@@ -27,10 +27,11 @@ module ThemeJuice
27
27
  end
28
28
 
29
29
  def create_wp_cli_file
30
- unless wp_cli_is_setup?
31
- @io.log "Creating WP-CLI file"
32
- @util.create_file wp_cli_file, { :verbose => @env.verbose,
33
- :capture => @env.quiet } do
30
+ return if wp_cli_is_setup? || @project.no_wp
31
+
32
+ @io.log "Creating WP-CLI file"
33
+ @util.create_file wp_cli_file, { :verbose => @env.verbose,
34
+ :capture => @env.quiet } do
34
35
  %Q{require:
35
36
  - vendor/autoload.php
36
37
  ssh:
@@ -40,7 +41,6 @@ ssh:
40
41
  cmd: cd #{@env.vm_path} && vagrant ssh-config > /tmp/vagrant_ssh_config && ssh -q %pseudotty% -F /tmp/vagrant_ssh_config default %cmd%
41
42
 
42
43
  }
43
- end
44
44
  end
45
45
  end
46
46
 
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.16.2"
4
+ VERSION = "0.16.3"
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.16.2
4
+ version: 0.16.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: 2015-10-01 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor