wordpress_tools 1.1.3 → 1.2.0

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: 29edc9f9cea281c8e783dd3008bc75bda82e2c55
4
- data.tar.gz: 9cc0424f32eaab44e750cecaf04877f18f499ae2
3
+ metadata.gz: 22569dc71b2120bc5e0c4d0a7a69328154943fff
4
+ data.tar.gz: a4c01f215cb0224209bb1641594e2018780d1693
5
5
  SHA512:
6
- metadata.gz: 94b6807a09a4a8c67794152b09d6987ba00a99bb9b6645469baaabb3aece35afe436ee83d05befb5cfe15e07342b85a06af63152ae00b528493f6c0ca44a3eef
7
- data.tar.gz: ab904dda5f9ebc0b6ef89d9dce7bbfca79c7a28f76000ef261d1999c922b23520b9c24028e4eb06cae3ac03f5a2cc886058054a0c44aa3f4023822329c287048
6
+ metadata.gz: f795f8894eb00ae2709ddedea812da56a1f08be23a6e88ec5d37195cc096f2ed4d968b82fa3e111c779944cfeb3a94f3162557f2510c3d318818102c05c848de
7
+ data.tar.gz: d4714a290bf8c804bda2ce80d253b97d49a9d44a403dfdf3b6eaae980c3e44a884bb420b09b0a8f017a62896c1e6b43aa1c59543e37791f3520814628c9c6361
@@ -12,4 +12,3 @@ require "wordpress_tools/database"
12
12
  require "wordpress_tools/version"
13
13
  require "wordpress_tools/wordpress"
14
14
  require "wordpress_tools/wp_cli_core"
15
- require "wordpress_tools/wp_cli_server"
@@ -14,7 +14,6 @@ module WordPressTools
14
14
  info("Starting...")
15
15
 
16
16
  WPCLICore.new.invoke :install, [], options
17
- WPCLIServer.new.invoke :install, [], options
18
17
  Database.new.invoke :create, [dir_name], options
19
18
  WordPress.new.invoke :download, [dir_name], options
20
19
  WordPress.new.invoke :setup, [dir_name], options
@@ -5,8 +5,6 @@ module WordPressTools
5
5
  wp_cli_download_url: "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar",
6
6
  wp_cli_path: "/usr/local/bin/wp",
7
7
  wp_cli_config_path: "~/.wp-cli/config.yml",
8
- wp_server_download_url: "https://github.com/wp-cli/server-command/archive/master.zip",
9
- wp_server_directory: "~/.wp-cli/commands/server",
10
8
  admin_user: "admin",
11
9
  admin_email: "admin@example.com",
12
10
  admin_password: "password",
@@ -5,7 +5,7 @@ module WordPressTools
5
5
  class_methods do
6
6
  def shared_options
7
7
  [
8
- [:force, { type: :boolean, desc: "Overwrite existing WP-CLI / WP-CLI Server installation" }],
8
+ [:force, { type: :boolean, desc: "Overwrite existing WP-CLI installation" }],
9
9
  [:locale, { aliases: "-l", desc: "WordPress locale", default: Configuration.for(:locale) }],
10
10
  [:bare, { type: :boolean, aliases: "-b", desc: "Remove default themes and plugins" }],
11
11
  [:admin_user, { desc: "WordPress admin user", default: Configuration.for(:admin_user) }],
@@ -1,3 +1,3 @@
1
1
  module WordPressTools
2
- VERSION = "1.1.3"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "fakeweb", "~> 1.3"
30
30
  spec.add_development_dependency "pry-byebug", "~> 3.0"
31
31
  spec.add_development_dependency "priscilla", "~> 1.0"
32
+ spec.add_development_dependency "gem-release"
32
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordpress_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Étienne Després"
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2015-09-11 00:00:00.000000000 Z
16
+ date: 2016-05-10 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: thor
@@ -127,6 +127,20 @@ dependencies:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
129
  version: '1.0'
130
+ - !ruby/object:Gem::Dependency
131
+ name: gem-release
132
+ requirement: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ type: :development
138
+ prerelease: false
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
130
144
  description: Command line tool to manage WordPress installations.
131
145
  email:
132
146
  - etienne@molotov.ca
@@ -162,7 +176,6 @@ files:
162
176
  - lib/wordpress_tools/version.rb
163
177
  - lib/wordpress_tools/wordpress.rb
164
178
  - lib/wordpress_tools/wp_cli_core.rb
165
- - lib/wordpress_tools/wp_cli_server.rb
166
179
  - templates/wp_cli_config.yml
167
180
  - tmp/.keep
168
181
  - wordpress_tools.gemspec
@@ -1,67 +0,0 @@
1
- module WordPressTools
2
- class WPCLIServer < Thor
3
- include CLIHelper
4
- include SharedOptions
5
-
6
- desc "install", ""
7
- add_method_options(shared_options)
8
- def install
9
- return unless overwrite?
10
-
11
- remove_existing
12
- download
13
- configure
14
- end
15
-
16
- no_tasks do
17
- def overwrite?
18
- if installed? && options[:force] != true
19
- yes? "WP-CLI server command already installed [#{install_dir}]. Do you want to overwite it? [y]es, [N]o"
20
- else
21
- true
22
- end
23
- end
24
-
25
- def installed?
26
- File.exist?(File.join(install_dir, 'command.php'))
27
- end
28
-
29
- def remove_existing
30
- FileUtils.rm_rf([install_dir, wp_cli_config_path])
31
- end
32
-
33
- def download
34
- info("Installing WP-CLI server command...")
35
- get(download_url, download_path, verbose: false, force: true) || error("Cannot download WP-CLI server command")
36
-
37
- FileUtils.mkdir_p(install_dir)
38
- unzip(download_path, install_dir, "-j")
39
-
40
- success("Installed WP-CLI server command in '#{install_dir}'")
41
- end
42
-
43
- def configure
44
- info("Configuring WP-CLI server command...")
45
- FileUtils.mkdir_p(File.dirname(wp_cli_config_path))
46
- FileUtils.cp(File.expand_path("../../../templates/wp_cli_config.yml", __FILE__), wp_cli_config_path)
47
- success("WP-CLI server command configured")
48
- end
49
-
50
- def download_url
51
- Configuration.for(:wp_server_download_url)
52
- end
53
-
54
- def install_dir
55
- @install_dir ||= File.expand_path(Configuration.for(:wp_server_directory))
56
- end
57
-
58
- def download_path
59
- @download_path ||= Tempfile.new('wp_server').path
60
- end
61
-
62
- def wp_cli_config_path
63
- File.expand_path(Configuration.for(:wp_cli_config_path))
64
- end
65
- end
66
- end
67
- end