theme-juice 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0e8e49ed6690203699cd75872e527f2172b537b
4
- data.tar.gz: 377ba96a2c4063cbaeabceac6d1dc0b42233989d
3
+ metadata.gz: 79c12bdbd0ca6886ac67ce005433fc8a463112b6
4
+ data.tar.gz: 7e67b5a12c39127a3050ab17572c4e344c6ab444
5
5
  SHA512:
6
- metadata.gz: 0ea2fd878b16908385cbb19280471de4451b3cf172fea0b7aed822e7b2782871768a016af70b37955e28bb84426d8dfa8bc5b1165527520067d1d8bd5e425107
7
- data.tar.gz: 5ac5d180650ebfa92052a92c797e5100a12ad85f8612cc12217f4ae67850ea2b9a2e3a6cbaba91213105fab351bfbf17be564aaf3350a65a5799b28d6d221930
6
+ metadata.gz: e0b1b5c0b15a19298f23b30fa2702478148ba1a536ceab07597d5e58f2af187b2d650b47f78c5c6acdaf39d868a6996acc85a5c1bcb0afc24b4f7d5c3141970b
7
+ data.tar.gz: 7ac5accc6f39612b0609d2801f4c1c3460af762a7330ceec7f694ddcf814b9413ab3c7750a71791f6109432fac31165b87bb81b164f4519bb536b6af050148ed
data/lib/theme-juice.rb CHANGED
@@ -15,13 +15,13 @@ require_relative "theme-juice/version"
15
15
  require_relative "theme-juice/environment"
16
16
  require_relative "theme-juice/interaction"
17
17
  require_relative "theme-juice/interactions/teejay"
18
- require_relative "theme-juice/interactions/create_site_options"
19
- require_relative "theme-juice/interactions/delete_site_options"
18
+ require_relative "theme-juice/interactions/create_options"
19
+ require_relative "theme-juice/interactions/delete_options"
20
20
  require_relative "theme-juice/service"
21
- require_relative "theme-juice/services/config_file"
22
- require_relative "theme-juice/services/create_site"
23
- require_relative "theme-juice/services/delete_site"
24
- require_relative "theme-juice/services/list_sites"
21
+ require_relative "theme-juice/services/config"
22
+ require_relative "theme-juice/services/create"
23
+ require_relative "theme-juice/services/delete"
24
+ require_relative "theme-juice/services/list"
25
25
  require_relative "theme-juice/command"
26
26
  require_relative "theme-juice/commands/install"
27
27
  require_relative "theme-juice/commands/create"
@@ -11,7 +11,7 @@ module ThemeJuice
11
11
  def initialize(opts = {})
12
12
  super
13
13
 
14
- ::ThemeJuice::Service::CreateSite.new(@opts).create
14
+ ::ThemeJuice::Service::Create.new(@opts).create
15
15
  end
16
16
  end
17
17
  end
@@ -11,7 +11,7 @@ module ThemeJuice
11
11
  def initialize(opts = {})
12
12
  super
13
13
 
14
- ::ThemeJuice::Service::DeleteSite.new(@opts).delete
14
+ ::ThemeJuice::Service::Delete.new(@opts).delete
15
15
  end
16
16
  end
17
17
  end
@@ -11,7 +11,7 @@ module ThemeJuice
11
11
  def initialize(opts = {})
12
12
  super
13
13
 
14
- ::ThemeJuice::Service::ConfigFile.new.install
14
+ ::ThemeJuice::Service::Config.new.install
15
15
  end
16
16
  end
17
17
  end
@@ -11,7 +11,7 @@ module ThemeJuice
11
11
  def initialize(opts = {})
12
12
  super
13
13
 
14
- ::ThemeJuice::Service::ListSites.new.list
14
+ ::ThemeJuice::Service::List.new.list
15
15
  end
16
16
  end
17
17
  end
@@ -11,7 +11,7 @@ module ThemeJuice
11
11
  def initialize(opts = {})
12
12
  super
13
13
 
14
- ::ThemeJuice::Service::ConfigFile.new.subcommand @opts[:subcommand], @opts[:commands]
14
+ ::ThemeJuice::Service::Config.new.subcommand @opts[:subcommand], @opts[:commands]
15
15
  end
16
16
  end
17
17
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Interaction::CreateSiteOptions
4
+ class Interaction::CreateOptions
5
5
 
6
6
  #
7
7
  # Set up interactions and environment
@@ -105,7 +105,7 @@ module ThemeJuice
105
105
  if @opts[:use_defaults]
106
106
  location = File.expand_path(path)
107
107
  else
108
- location = File.expand_path(@interaction.prompt "Where do you want to setup the site?", default: path, path: true)
108
+ location = File.expand_path(@interaction.prompt "Where do you want to setup the site?", :default => path, :path => true)
109
109
  end
110
110
 
111
111
  location
@@ -123,7 +123,7 @@ module ThemeJuice
123
123
  themes = {
124
124
  "theme-juice/theme-juice-starter" => "https://github.com/ezekg/theme-juice-starter.git",
125
125
  "other" => nil,
126
- "none" => false
126
+ "none" => false
127
127
  }
128
128
 
129
129
  if @opts[:use_defaults]
@@ -136,7 +136,7 @@ module ThemeJuice
136
136
  when "theme-juice/theme-juice-starter"
137
137
  @interaction.success "Awesome choice!"
138
138
  when "other"
139
- themes[choice] = @interaction.prompt "What is the repository URL for the starter theme you would like to clone?"
139
+ themes[choice] = @interaction.prompt "What is the repository URL for the starter theme that you would like to clone?"
140
140
  when "none"
141
141
  @interaction.notice "Next time you need to create a site without a starter theme, you can just run the 'setup' command instead."
142
142
  @opts[:site_bare] = true
@@ -166,7 +166,7 @@ module ThemeJuice
166
166
  if @opts[:use_defaults]
167
167
  url = "#{@opts[:site_name]}.dev"
168
168
  else
169
- url = @interaction.prompt "What do you want the development url to be? (this should end in '.dev')", default: "#{@opts[:site_name]}.dev"
169
+ url = @interaction.prompt "What do you want the development url to be? (this should end in '.dev')", :default => "#{@opts[:site_name]}.dev"
170
170
  end
171
171
 
172
172
  validate_site_dev_url url
@@ -184,7 +184,7 @@ module ThemeJuice
184
184
  repo = false
185
185
  else
186
186
  if @interaction.agree? "Would you like to initialize a new Git repository?"
187
- repo = @interaction.prompt "What is the repository's URL?", indent: 2
187
+ repo = @interaction.prompt "What is the repository's URL?", :indent => 2
188
188
  else
189
189
  repo = false
190
190
  end
@@ -202,7 +202,7 @@ module ThemeJuice
202
202
  if @opts[:use_defaults] || @opts[:skip_db]
203
203
  db_host = "vvv"
204
204
  else
205
- db_host = @interaction.prompt "Database host", default: "vvv"
205
+ db_host = @interaction.prompt "Database host", :default => "vvv"
206
206
  end
207
207
 
208
208
  db_host
@@ -217,7 +217,7 @@ module ThemeJuice
217
217
  if @opts[:use_defaults] || @opts[:skip_db]
218
218
  db_name = "#{@opts[:site_name_clean]}_db"
219
219
  else
220
- db_name = @interaction.prompt "Database name", default: "#{@opts[:site_name_clean]}_db"
220
+ db_name = @interaction.prompt "Database name", :default => "#{@opts[:site_name_clean]}_db"
221
221
  end
222
222
 
223
223
  db_name
@@ -232,7 +232,7 @@ module ThemeJuice
232
232
  if @opts[:use_defaults] || @opts[:skip_db]
233
233
  db_user = "#{@opts[:site_name_clean]}_user"
234
234
  else
235
- db_user = @interaction.prompt "Database username", default: "#{@opts[:site_name_clean]}_user"
235
+ db_user = @interaction.prompt "Database username", :default => "#{@opts[:site_name_clean]}_user"
236
236
  end
237
237
 
238
238
  db_user
@@ -244,12 +244,12 @@ module ThemeJuice
244
244
  # @return {String}
245
245
  #
246
246
  def setup_site_db_pass
247
- pass = Faker::Internet.password 16
247
+ pass = Faker::Internet.password 24
248
248
 
249
249
  if @opts[:use_defaults] || @opts[:skip_db]
250
250
  db_pass = pass
251
251
  else
252
- db_pass = @interaction.prompt "Database password", default: pass
252
+ db_pass = @interaction.prompt "Database password", :default => pass
253
253
  end
254
254
 
255
255
  db_pass
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Interaction::DeleteSiteOptions
4
+ class Interaction::DeleteOptions
5
5
 
6
6
  #
7
7
  # Set up interactions and environment
@@ -43,7 +43,7 @@ module ThemeJuice
43
43
  # @return {String}
44
44
  #
45
45
  def get_site_name
46
- name = @interaction.choose "Which site would you like to delete?", :red, ::ThemeJuice::Service::ListSites.new.get_sites
46
+ name = @interaction.choose "Which site would you like to delete?", :red, ::ThemeJuice::Service::List.new.get_sites
47
47
  end
48
48
 
49
49
  #
@@ -1,6 +1,16 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Interaction::TeeJay# < ::ThemeJuice::Interaction
4
+ class Interaction::TeeJay
5
+
6
+ #
7
+ # Set up interactions and environment
8
+ #
9
+ # @return {Void}
10
+ #
11
+ def initialize
12
+ @environment = ::ThemeJuice::Environment
13
+ @interaction = ::ThemeJuice::Interaction
14
+ end
5
15
  end
6
16
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Service::ConfigFile < ::ThemeJuice::Service
4
+ class Service::Config < ::ThemeJuice::Service
5
5
 
6
6
  #
7
7
  # @param {Hash} opts
@@ -1,13 +1,13 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Service::CreateSite < ::ThemeJuice::Service
4
+ class Service::Create < ::ThemeJuice::Service
5
5
 
6
6
  #
7
7
  # @param {Hash} opts
8
8
  #
9
9
  def initialize(opts = {})
10
- opts = ::ThemeJuice::Interaction::CreateSiteOptions.new.setup_site_options(opts)
10
+ opts = ::ThemeJuice::Interaction::CreateOptions.new.setup_site_options(opts)
11
11
 
12
12
  super
13
13
  end
@@ -20,18 +20,18 @@ module ThemeJuice
20
20
  def create
21
21
  @interaction.notice "Running setup for '#{@opts[:site_name]}'"
22
22
 
23
- setup_project_dir unless project_dir_is_setup?
24
- setup_starter_theme unless starter_theme_is_setup?
25
- setup_vvv unless vvv_is_setup?
26
- setup_wildcard_subdomains unless wildcard_subdomains_is_setup?
27
- setup_hosts unless hosts_is_setup?
28
- setup_database unless database_is_setup?
29
- setup_nginx unless nginx_is_setup?
30
- setup_dev_site unless dev_site_is_setup?
31
- setup_env unless env_is_setup?
32
- setup_synced_folder unless synced_folder_is_setup?
33
- setup_wpcli unless wpcli_is_setup?
34
- setup_repo if using_repo?
23
+ setup_project_dir unless project_dir_is_setup?
24
+ setup_starter_theme unless starter_theme_is_setup?
25
+ setup_vvv unless vvv_is_setup?
26
+ setup_wildcard_subdomains unless wildcard_subdomains_is_setup?
27
+ setup_hosts unless hosts_is_setup?
28
+ setup_database unless database_is_setup?
29
+ setup_nginx unless nginx_is_setup?
30
+ setup_dev_site unless dev_site_is_setup?
31
+ setup_env unless env_is_setup?
32
+ setup_synced_folder unless synced_folder_is_setup?
33
+ setup_wpcli unless wpcli_is_setup?
34
+ setup_repo if using_repo?
35
35
 
36
36
  if setup_was_successful?
37
37
  @interaction.success "Setup complete!"
@@ -41,7 +41,7 @@ module ThemeJuice
41
41
  :row => true
42
42
  }
43
43
 
44
- if @interaction.agree? "", { simple: true }
44
+ if @interaction.agree? "", { :simple => true }
45
45
 
46
46
  if restart_vagrant
47
47
  @interaction.success "Success!"
@@ -75,7 +75,7 @@ module ThemeJuice
75
75
  end
76
76
  else
77
77
  @interaction.error "Setup failed. Running cleanup" do
78
- ::ThemeJuice::Service::Delete.new({ site_name: @opts[:site_name], restart: false }).delete
78
+ ::ThemeJuice::Service::Delete.new({ site_name: @opts[:site_name], :restart => false }).delete
79
79
  end
80
80
  end
81
81
  end
@@ -158,10 +158,10 @@ module ThemeJuice
158
158
  def setup_config
159
159
  @interaction.log "Creating config"
160
160
 
161
- watch = @interaction.prompt "Watch command to use", indent: 2, default: "bundle exec guard"
162
- server = @interaction.prompt "Deployment command to use", indent: 2, default: "bundle exec cap"
163
- vendor = @interaction.prompt "Vendor command to use", indent: 2, default: "composer"
164
- install = @interaction.prompt "Commands to run on theme install (comma-delimited)", indent: 2, default: "composer install"
161
+ watch = @interaction.prompt "Watch command to use", :indent => 2, :default => "bundle exec guard"
162
+ server = @interaction.prompt "Deployment command to use", :indent => 2, :default => "bundle exec cap"
163
+ vendor = @interaction.prompt "Vendor command to use", :indent => 2, :default => "composer"
164
+ install = @interaction.prompt "Commands to run on theme install (comma-delimited)", :indent => 2, :default => "composer install"
165
165
 
166
166
  File.open "#{@config_path}/tj.yml", "wb" do |file|
167
167
  file.puts "commands:"
@@ -1,13 +1,13 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Service::DeleteSite < ::ThemeJuice::Service
4
+ class Service::Delete < ::ThemeJuice::Service
5
5
 
6
6
  #
7
7
  # @param {Hash} opts
8
8
  #
9
9
  def initialize(opts)
10
- opts = ThemeJuice::Interaction::DeleteSiteOptions.new.get_site_options(opts)
10
+ opts = ThemeJuice::Interaction::DeleteOptions.new.get_site_options(opts)
11
11
 
12
12
  super
13
13
  end
@@ -24,7 +24,7 @@ module ThemeJuice
24
24
  :row => true
25
25
  }
26
26
 
27
- if @interaction.agree? "", { color: :red, simple: true }
27
+ if @interaction.agree? "", { :color => :red, :simple => true }
28
28
 
29
29
  remove_dev_site if dev_site_is_setup?
30
30
  remove_database if database_is_setup?
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- class Service::ListSites < ::ThemeJuice::Service
4
+ class Service::List < ::ThemeJuice::Service
5
5
 
6
6
  def initialize(opts = {})
7
7
  super
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.6.6"
4
+ VERSION = "0.6.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme-juice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse
@@ -70,14 +70,14 @@ files:
70
70
  - lib/theme-juice/commands/subcommand.rb
71
71
  - lib/theme-juice/environment.rb
72
72
  - lib/theme-juice/interaction.rb
73
- - lib/theme-juice/interactions/create_site_options.rb
74
- - lib/theme-juice/interactions/delete_site_options.rb
73
+ - lib/theme-juice/interactions/create_options.rb
74
+ - lib/theme-juice/interactions/delete_options.rb
75
75
  - lib/theme-juice/interactions/teejay.rb
76
76
  - lib/theme-juice/service.rb
77
- - lib/theme-juice/services/config_file.rb
78
- - lib/theme-juice/services/create_site.rb
79
- - lib/theme-juice/services/delete_site.rb
80
- - lib/theme-juice/services/list_sites.rb
77
+ - lib/theme-juice/services/config.rb
78
+ - lib/theme-juice/services/create.rb
79
+ - lib/theme-juice/services/delete.rb
80
+ - lib/theme-juice/services/list.rb
81
81
  - lib/theme-juice/version.rb
82
82
  - lib/theme-juice.rb
83
83
  - LICENSE