wpcli 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 560f99a2ca9a0c5b2045fa77d4bf89853802c9b5
4
- data.tar.gz: 44257dfbf43d531180b5149ace6f2728d1304947
3
+ metadata.gz: 0ce24df930d87040a80ebd47cf87a6ffc619ffea
4
+ data.tar.gz: 70d2f96dde56374ad25976b8a50d71554ae1fc8f
5
5
  SHA512:
6
- metadata.gz: f73bcc7de07cba8cd5df628b7a989d5583009fc989c929922aab4437a31c545fe7416c0987f700a577b64c745d9c0352c1327bd68ecbed337aa17225ef786679
7
- data.tar.gz: 0ed2030655252ca8972364cfee879cd9c81d5116723ecb4fff73f84bebe67d2e5ec284fd347bcba510fdd36ca7fc7215f9b8089daafe12071e094b9a17929e6a
6
+ metadata.gz: c5e4892fa95ad67baaea12f48a3bd28769eac1c886d60987183b13c9cae6f51eb02979d9fb4c2e0fb928d70bf3bf861e2f3cf90ee40ed8374182fd772d9a33af
7
+ data.tar.gz: e35d004fb86183eb6d1a712ca0a65b630fece5942c9b26992622641414774cb2cc3aeb80e4389f0462f7b78a1e84d02bb90c351578972d42da10468bcff15ba4
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.1.2"
11
+ gem 'wpcli', "~> 0.1.3"
12
12
 
13
13
  And then execute:
14
14
 
@@ -40,6 +40,10 @@ And then you can use client with key:
40
40
 
41
41
  users = wpcli(:key_for_installation).run "user list"
42
42
 
43
+
44
+ You can check if there is any apps in config with
45
+ wp_apps?
46
+
43
47
  ## Alternative way
44
48
 
45
49
  If you like to use client for example in command line, you can create instance with path of wordpress installation
@@ -54,3 +58,5 @@ If you like to use client for example in command line, you can create instance w
54
58
  3. Commit your changes (`git commit -am 'Add some feature'`)
55
59
  4. Push to the branch (`git push origin my-new-feature`)
56
60
  5. Create new Pull Request
61
+
62
+ [![Gem Version](https://badge.fury.io/rb/wpcli.png)](http://badge.fury.io/rb/wpcli)
data/lib/wpcli/rails.rb CHANGED
@@ -4,6 +4,11 @@ module Wpcli
4
4
  @apps[key]
5
5
  end
6
6
 
7
+ def wp_apps?
8
+ load_apps if @apps.nil?
9
+ !@apps.empty?
10
+ end
11
+
7
12
  private
8
13
 
9
14
  def load_apps
@@ -15,4 +20,6 @@ module Wpcli
15
20
  @apps[key.to_sym] = Client.new path
16
21
  end
17
22
  end
23
+
24
+
18
25
  end
data/lib/wpcli/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wpcli
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.1.2
4
+ version: 0.1.3
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-01-07 00:00:00.000000000 Z
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.2.1
97
+ rubygems_version: 2.2.0
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Simple wrapper for wp-cli (http://wp-cli.org/)