theme-juice 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +204 -204
  3. data/bin/tj +15 -15
  4. data/lib/theme-juice.rb +46 -46
  5. data/lib/theme-juice/cli.rb +248 -248
  6. data/lib/theme-juice/command.rb +20 -20
  7. data/lib/theme-juice/commands/create.rb +221 -221
  8. data/lib/theme-juice/commands/delete.rb +51 -51
  9. data/lib/theme-juice/commands/deploy.rb +20 -20
  10. data/lib/theme-juice/config.rb +68 -70
  11. data/lib/theme-juice/env.rb +25 -25
  12. data/lib/theme-juice/io.rb +323 -323
  13. data/lib/theme-juice/project.rb +35 -35
  14. data/lib/theme-juice/task.rb +42 -42
  15. data/lib/theme-juice/tasks/create_confirm.rb +33 -33
  16. data/lib/theme-juice/tasks/create_success.rb +42 -42
  17. data/lib/theme-juice/tasks/database.rb +50 -50
  18. data/lib/theme-juice/tasks/delete_confirm.rb +24 -24
  19. data/lib/theme-juice/tasks/delete_success.rb +31 -31
  20. data/lib/theme-juice/tasks/dns.rb +45 -45
  21. data/lib/theme-juice/tasks/dot_env.rb +53 -53
  22. data/lib/theme-juice/tasks/entry.rb +50 -50
  23. data/lib/theme-juice/tasks/hosts.rb +43 -43
  24. data/lib/theme-juice/tasks/import_database.rb +28 -28
  25. data/lib/theme-juice/tasks/landrush.rb +33 -33
  26. data/lib/theme-juice/tasks/list.rb +50 -50
  27. data/lib/theme-juice/tasks/location.rb +23 -23
  28. data/lib/theme-juice/tasks/nginx.rb +51 -51
  29. data/lib/theme-juice/tasks/repo.rb +49 -49
  30. data/lib/theme-juice/tasks/synced_folder.rb +30 -30
  31. data/lib/theme-juice/tasks/theme.rb +34 -34
  32. data/lib/theme-juice/tasks/vm.rb +30 -30
  33. data/lib/theme-juice/tasks/vm_customfile.rb +42 -42
  34. data/lib/theme-juice/tasks/vm_location.rb +32 -32
  35. data/lib/theme-juice/tasks/vm_plugins.rb +32 -32
  36. data/lib/theme-juice/tasks/vm_provision.rb +39 -39
  37. data/lib/theme-juice/tasks/vm_restart.rb +25 -25
  38. data/lib/theme-juice/tasks/wp_cli.rb +52 -52
  39. data/lib/theme-juice/util.rb +45 -45
  40. data/lib/theme-juice/version.rb +5 -5
  41. metadata +6 -7
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
- # encoding: UTF-8
2
-
3
- module ThemeJuice
4
- VERSION = "0.7.7"
5
- end
1
+ # encoding: UTF-8
2
+
3
+ module ThemeJuice
4
+ VERSION = "0.7.8"
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.7
4
+ version: 0.7.8
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-07 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -62,9 +62,6 @@ executables:
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - README.md
66
- - bin/tj
67
- - lib/theme-juice.rb
68
65
  - lib/theme-juice/cli.rb
69
66
  - lib/theme-juice/command.rb
70
67
  - lib/theme-juice/commands/create.rb
@@ -101,6 +98,9 @@ files:
101
98
  - lib/theme-juice/tasks/wp_cli.rb
102
99
  - lib/theme-juice/util.rb
103
100
  - lib/theme-juice/version.rb
101
+ - lib/theme-juice.rb
102
+ - README.md
103
+ - bin/tj
104
104
  homepage: https://themejuice.it
105
105
  licenses:
106
106
  - GNU
@@ -121,9 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.4.6
124
+ rubygems_version: 2.0.15
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Theme Juice - WordPress development made easy
128
128
  test_files: []
129
- has_rdoc: