theme-juice 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +216 -204
- data/bin/tj +15 -15
- data/lib/theme-juice.rb +46 -46
- data/lib/theme-juice/cli.rb +248 -248
- data/lib/theme-juice/command.rb +20 -20
- data/lib/theme-juice/commands/create.rb +220 -221
- data/lib/theme-juice/commands/delete.rb +51 -51
- data/lib/theme-juice/commands/deploy.rb +20 -20
- data/lib/theme-juice/config.rb +68 -68
- data/lib/theme-juice/env.rb +25 -25
- data/lib/theme-juice/io.rb +295 -323
- data/lib/theme-juice/project.rb +35 -35
- data/lib/theme-juice/task.rb +43 -42
- data/lib/theme-juice/tasks/create_confirm.rb +33 -33
- data/lib/theme-juice/tasks/create_success.rb +42 -42
- data/lib/theme-juice/tasks/database.rb +50 -50
- data/lib/theme-juice/tasks/delete_confirm.rb +24 -24
- data/lib/theme-juice/tasks/delete_success.rb +31 -31
- data/lib/theme-juice/tasks/dns.rb +45 -45
- data/lib/theme-juice/tasks/dot_env.rb +53 -53
- data/lib/theme-juice/tasks/entry.rb +50 -50
- data/lib/theme-juice/tasks/hosts.rb +43 -43
- data/lib/theme-juice/tasks/import_database.rb +28 -28
- data/lib/theme-juice/tasks/landrush.rb +33 -33
- data/lib/theme-juice/tasks/list.rb +50 -50
- data/lib/theme-juice/tasks/location.rb +23 -23
- data/lib/theme-juice/tasks/nginx.rb +51 -51
- data/lib/theme-juice/tasks/repo.rb +49 -49
- data/lib/theme-juice/tasks/synced_folder.rb +30 -30
- data/lib/theme-juice/tasks/theme.rb +34 -34
- data/lib/theme-juice/tasks/vm.rb +30 -30
- data/lib/theme-juice/tasks/vm_customfile.rb +42 -42
- data/lib/theme-juice/tasks/vm_location.rb +32 -32
- data/lib/theme-juice/tasks/vm_plugins.rb +32 -32
- data/lib/theme-juice/tasks/vm_provision.rb +39 -39
- data/lib/theme-juice/tasks/vm_restart.rb +25 -25
- data/lib/theme-juice/tasks/wp_cli.rb +52 -52
- data/lib/theme-juice/util.rb +45 -45
- data/lib/theme-juice/version.rb +5 -5
- metadata +63 -6
@@ -1,25 +1,25 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
module ThemeJuice
|
4
|
-
module Tasks
|
5
|
-
class VMRestart < Task
|
6
|
-
|
7
|
-
def initialize(opts = {})
|
8
|
-
super
|
9
|
-
end
|
10
|
-
|
11
|
-
def execute
|
12
|
-
restart
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def restart
|
18
|
-
@io.log "Restarting VM"
|
19
|
-
@util.inside @env.vm_path do
|
20
|
-
@util.run "vagrant reload", :verbose => @env.verbose
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module ThemeJuice
|
4
|
+
module Tasks
|
5
|
+
class VMRestart < Task
|
6
|
+
|
7
|
+
def initialize(opts = {})
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute
|
12
|
+
restart
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def restart
|
18
|
+
@io.log "Restarting VM"
|
19
|
+
@util.inside @env.vm_path do
|
20
|
+
@util.run "vagrant reload", :verbose => @env.verbose
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,52 +1,52 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
module ThemeJuice
|
4
|
-
module Tasks
|
5
|
-
class WPCLI < Task
|
6
|
-
|
7
|
-
def initialize(opts = {})
|
8
|
-
super
|
9
|
-
end
|
10
|
-
|
11
|
-
def execute
|
12
|
-
create_wp_cli_file
|
13
|
-
end
|
14
|
-
|
15
|
-
def unexecute
|
16
|
-
remove_wp_cli_file
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def wp_cli_file
|
22
|
-
"#{@project.location}/wp-cli.local.yml"
|
23
|
-
end
|
24
|
-
|
25
|
-
def wp_cli_is_setup?
|
26
|
-
File.exist? wp_cli_file
|
27
|
-
end
|
28
|
-
|
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 do
|
33
|
-
%Q{require:
|
34
|
-
- vendor/autoload.php
|
35
|
-
ssh:
|
36
|
-
vagrant:
|
37
|
-
url: #{@project.url}
|
38
|
-
path: #{@project.vm_srv}
|
39
|
-
cmd: cd #{@env.vm_path} && vagrant ssh-config > /tmp/vagrant_ssh_config && ssh -q %pseudotty% -F /tmp/vagrant_ssh_config default %cmd%
|
40
|
-
|
41
|
-
}
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def remove_wp_cli_file
|
47
|
-
@io.log "Removing WP-CLI file"
|
48
|
-
@util.remove_file wp_cli_file, :verbose => @env.verbose
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module ThemeJuice
|
4
|
+
module Tasks
|
5
|
+
class WPCLI < Task
|
6
|
+
|
7
|
+
def initialize(opts = {})
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute
|
12
|
+
create_wp_cli_file
|
13
|
+
end
|
14
|
+
|
15
|
+
def unexecute
|
16
|
+
remove_wp_cli_file
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def wp_cli_file
|
22
|
+
"#{@project.location}/wp-cli.local.yml"
|
23
|
+
end
|
24
|
+
|
25
|
+
def wp_cli_is_setup?
|
26
|
+
File.exist? wp_cli_file
|
27
|
+
end
|
28
|
+
|
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 do
|
33
|
+
%Q{require:
|
34
|
+
- vendor/autoload.php
|
35
|
+
ssh:
|
36
|
+
vagrant:
|
37
|
+
url: #{@project.url}
|
38
|
+
path: #{@project.vm_srv}
|
39
|
+
cmd: cd #{@env.vm_path} && vagrant ssh-config > /tmp/vagrant_ssh_config && ssh -q %pseudotty% -F /tmp/vagrant_ssh_config default %cmd%
|
40
|
+
|
41
|
+
}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def remove_wp_cli_file
|
47
|
+
@io.log "Removing WP-CLI file"
|
48
|
+
@util.remove_file wp_cli_file, :verbose => @env.verbose
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/theme-juice/util.rb
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
module ThemeJuice
|
4
|
-
class Util < Thor
|
5
|
-
include Thor::Actions
|
6
|
-
|
7
|
-
def initialize(args = [], options = {}, config = {})
|
8
|
-
@env = Env
|
9
|
-
@io = IO
|
10
|
-
@project = Project
|
11
|
-
|
12
|
-
options.merge! :pretend => @env.dryrun
|
13
|
-
|
14
|
-
super args, options, config
|
15
|
-
end
|
16
|
-
|
17
|
-
#
|
18
|
-
# Monkey patch some of Thor's default actions to add a little
|
19
|
-
# extra functionality
|
20
|
-
#
|
21
|
-
no_commands do
|
22
|
-
alias_method :_run, :run
|
23
|
-
|
24
|
-
def run(command, config = {}, &block)
|
25
|
-
if command.is_a? Array
|
26
|
-
yield command if block_given?
|
27
|
-
_run command.join("&&"), config
|
28
|
-
else
|
29
|
-
_run command, config
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def run_inside_vm(command, config = {}, &block)
|
34
|
-
inside @env.vm_path do
|
35
|
-
if command.is_a? Array
|
36
|
-
yield command if block_given?
|
37
|
-
_run %Q[vagrant ssh -c "#{command.join("&&")}"], config
|
38
|
-
else
|
39
|
-
_run %Q[vagrant ssh -c "#{command}"], config
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module ThemeJuice
|
4
|
+
class Util < Thor
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
def initialize(args = [], options = {}, config = {})
|
8
|
+
@env = Env
|
9
|
+
@io = IO
|
10
|
+
@project = Project
|
11
|
+
|
12
|
+
options.merge! :pretend => @env.dryrun
|
13
|
+
|
14
|
+
super args, options, config
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# Monkey patch some of Thor's default actions to add a little
|
19
|
+
# extra functionality
|
20
|
+
#
|
21
|
+
no_commands do
|
22
|
+
alias_method :_run, :run
|
23
|
+
|
24
|
+
def run(command, config = {}, &block)
|
25
|
+
if command.is_a? Array
|
26
|
+
yield command if block_given?
|
27
|
+
_run command.join("&&"), config
|
28
|
+
else
|
29
|
+
_run command, config
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def run_inside_vm(command, config = {}, &block)
|
34
|
+
inside @env.vm_path do
|
35
|
+
if command.is_a? Array
|
36
|
+
yield command if block_given?
|
37
|
+
_run %Q[vagrant ssh -c "#{command.join("&&")}"], config
|
38
|
+
else
|
39
|
+
_run %Q[vagrant ssh -c "#{command}"], config
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/theme-juice/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
module ThemeJuice
|
4
|
-
VERSION = "0.7.
|
5
|
-
end
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module ThemeJuice
|
4
|
+
VERSION = "0.7.9"
|
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.7.
|
4
|
+
version: 0.7.9
|
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-05-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,6 +52,62 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: fakefs
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.6'
|
55
111
|
description: Theme Juice is a WordPress development command line utility that allows
|
56
112
|
you to scaffold out entire Vagrant development environments in seconds, manage dependencies
|
57
113
|
and build tools, and even handle deployments.
|
@@ -62,6 +118,9 @@ executables:
|
|
62
118
|
extensions: []
|
63
119
|
extra_rdoc_files: []
|
64
120
|
files:
|
121
|
+
- README.md
|
122
|
+
- bin/tj
|
123
|
+
- lib/theme-juice.rb
|
65
124
|
- lib/theme-juice/cli.rb
|
66
125
|
- lib/theme-juice/command.rb
|
67
126
|
- lib/theme-juice/commands/create.rb
|
@@ -98,9 +157,6 @@ files:
|
|
98
157
|
- lib/theme-juice/tasks/wp_cli.rb
|
99
158
|
- lib/theme-juice/util.rb
|
100
159
|
- lib/theme-juice/version.rb
|
101
|
-
- lib/theme-juice.rb
|
102
|
-
- README.md
|
103
|
-
- bin/tj
|
104
160
|
homepage: https://themejuice.it
|
105
161
|
licenses:
|
106
162
|
- GNU
|
@@ -121,8 +177,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
177
|
version: '0'
|
122
178
|
requirements: []
|
123
179
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.4.6
|
125
181
|
signing_key:
|
126
182
|
specification_version: 4
|
127
183
|
summary: Theme Juice - WordPress development made easy
|
128
184
|
test_files: []
|
185
|
+
has_rdoc:
|