wpcli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/wpcli/rails.rb +18 -16
- data/lib/wpcli/version.rb +1 -1
- data/spec/spec_helper.rb +2 -11
- data/wpcli.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bce31a88598058efbab2fac04d858af2ea143da
|
4
|
+
data.tar.gz: 8f29072e069a89cc2854975b8a4f11df7a791d96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7865e76f6da19e776df1d941338a77668fe4584e29870e26781a4e62554f0132633bfd511ca53e735d04bc8c3b0a50754fe5521198a9e32309532ec285154eb8
|
7
|
+
data.tar.gz: 1177e7632ff0fb12efd50bfefe63971975e392fafcd9282baab69ee6da2fd053deb56e3b1bc444061e38e2e41552206beda8e97af23616e32646d1b035f559d9
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Just pass commands (http://wp-cli.org/commands/) to run method and use returned
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
gem 'wpcli', "~> 0.2.
|
11
|
+
gem 'wpcli', "~> 0.2.1"
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
@@ -60,4 +60,4 @@ If you like to use client for example in command line, you can create instance w
|
|
60
60
|
4. Push to the branch (`git push origin my-new-feature`)
|
61
61
|
5. Create new Pull Request
|
62
62
|
|
63
|
-
[](http://badge.fury.io/rb/wpcli) [](https://travis-ci.org/hasanen/wpcli)
|
63
|
+
[](http://badge.fury.io/rb/wpcli) [](https://travis-ci.org/hasanen/wpcli)[](https://coveralls.io/r/hasanen/wpcli?branch=master)
|
data/lib/wpcli/rails.rb
CHANGED
@@ -1,24 +1,26 @@
|
|
1
1
|
module Wpcli
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
module RailsExt
|
3
|
+
def wpcli key
|
4
|
+
load_apps if @apps.nil?
|
5
|
+
@apps[key]
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
def wp_apps?
|
9
|
+
load_apps if @apps.nil?
|
10
|
+
!@apps.empty?
|
11
|
+
end
|
11
12
|
|
12
|
-
|
13
|
+
private
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
def load_apps
|
16
|
+
file = File.read("#{Rails.root}/config/wpcli.yml")
|
17
|
+
config = YAML.load(file)
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
@apps = {}
|
20
|
+
if config.has_key?("apps") && !config["apps"].nil?
|
21
|
+
config["apps"].each do |key, path|
|
22
|
+
@apps[key.to_sym] = Client.new path
|
23
|
+
end
|
22
24
|
end
|
23
25
|
end
|
24
26
|
end
|
data/lib/wpcli/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
7
3
|
|
8
4
|
require_relative "../lib/wpcli"
|
9
5
|
|
@@ -11,10 +7,5 @@ RSpec.configure do |config|
|
|
11
7
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
12
8
|
config.run_all_when_everything_filtered = true
|
13
9
|
config.filter_run :focus
|
14
|
-
|
15
|
-
# Run specs in random order to surface order dependencies. If you find an
|
16
|
-
# order dependency and want to debug it, you can fix the order by providing
|
17
|
-
# the seed, which is printed after each run.
|
18
|
-
# --seed 1234
|
19
10
|
config.order = 'random'
|
20
11
|
end
|
data/wpcli.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wpcli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joni Hasanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.14.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.7.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.7.0
|
55
69
|
description: Simple wrapper for wp-cli (http://wp-cli.org/)
|
56
70
|
email:
|
57
71
|
- joni.hasanen@pieceofcode.net
|