theme-juice 0.6.18 → 0.7.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 +106 -75
- data/bin/tj +5 -5
- data/lib/theme-juice.rb +32 -16
- data/lib/theme-juice/cli.rb +191 -298
- data/lib/theme-juice/command.rb +14 -13
- data/lib/theme-juice/commands/create.rb +214 -9
- data/lib/theme-juice/commands/delete.rb +45 -10
- data/lib/theme-juice/commands/deploy.rb +20 -0
- data/lib/theme-juice/config.rb +43 -0
- data/lib/theme-juice/env.rb +25 -0
- data/lib/theme-juice/io.rb +323 -0
- data/lib/theme-juice/project.rb +35 -0
- data/lib/theme-juice/task.rb +42 -0
- data/lib/theme-juice/tasks/create_confirm.rb +33 -0
- data/lib/theme-juice/tasks/create_success.rb +42 -0
- data/lib/theme-juice/tasks/database.rb +50 -0
- data/lib/theme-juice/tasks/delete_confirm.rb +24 -0
- data/lib/theme-juice/tasks/delete_success.rb +31 -0
- data/lib/theme-juice/tasks/dns.rb +45 -0
- data/lib/theme-juice/tasks/dot_env.rb +53 -0
- data/lib/theme-juice/tasks/entry.rb +50 -0
- data/lib/theme-juice/tasks/hosts.rb +43 -0
- data/lib/theme-juice/tasks/import_database.rb +28 -0
- data/lib/theme-juice/tasks/landrush.rb +33 -0
- data/lib/theme-juice/tasks/list.rb +50 -0
- data/lib/theme-juice/tasks/location.rb +23 -0
- data/lib/theme-juice/tasks/nginx.rb +51 -0
- data/lib/theme-juice/tasks/repo.rb +49 -0
- data/lib/theme-juice/tasks/synced_folder.rb +30 -0
- data/lib/theme-juice/tasks/theme.rb +34 -0
- data/lib/theme-juice/tasks/vm.rb +30 -0
- data/lib/theme-juice/tasks/vm_customfile.rb +42 -0
- data/lib/theme-juice/tasks/vm_location.rb +32 -0
- data/lib/theme-juice/tasks/vm_plugins.rb +32 -0
- data/lib/theme-juice/tasks/vm_provision.rb +39 -0
- data/lib/theme-juice/tasks/vm_restart.rb +25 -0
- data/lib/theme-juice/tasks/wp_cli.rb +52 -0
- data/lib/theme-juice/util.rb +45 -0
- data/lib/theme-juice/version.rb +1 -1
- metadata +66 -34
- data/LICENSE +0 -339
- data/lib/theme-juice/commands/install.rb +0 -16
- data/lib/theme-juice/commands/list.rb +0 -16
- data/lib/theme-juice/commands/subcommand.rb +0 -16
- data/lib/theme-juice/environment.rb +0 -15
- data/lib/theme-juice/interaction.rb +0 -445
- data/lib/theme-juice/interactions/create.rb +0 -278
- data/lib/theme-juice/interactions/delete.rb +0 -48
- data/lib/theme-juice/interactions/teejay.rb +0 -12
- data/lib/theme-juice/service.rb +0 -224
- data/lib/theme-juice/services/config.rb +0 -44
- data/lib/theme-juice/services/create.rb +0 -376
- data/lib/theme-juice/services/delete.rb +0 -113
- data/lib/theme-juice/services/list.rb +0 -40
@@ -1,40 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
module ThemeJuice
|
4
|
-
class Service::List < ::ThemeJuice::Service
|
5
|
-
|
6
|
-
def initialize(opts = {})
|
7
|
-
super
|
8
|
-
end
|
9
|
-
|
10
|
-
#
|
11
|
-
# List all development sites
|
12
|
-
#
|
13
|
-
# @return {Void}
|
14
|
-
#
|
15
|
-
def list
|
16
|
-
sites = get_sites
|
17
|
-
|
18
|
-
if sites.empty?
|
19
|
-
@interaction.log "Nothing to list."
|
20
|
-
else
|
21
|
-
@interaction.list "Your sites :", :green, sites
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
#
|
26
|
-
# Get an array of development sites
|
27
|
-
#
|
28
|
-
# @return {Array}
|
29
|
-
#
|
30
|
-
def get_sites
|
31
|
-
sites = []
|
32
|
-
|
33
|
-
Dir.glob(File.expand_path("#{@environment.vvv_path}/www/*")).each do |f|
|
34
|
-
sites << File.basename(f).gsub(/(tj-)/, "") if File.directory?(f) && f.include?("tj-")
|
35
|
-
end
|
36
|
-
|
37
|
-
sites
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|