wpcli 0.2.5 → 0.2.6

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: acb5cb25a119cbb29ebdbb67b245653e3f1e5309
4
- data.tar.gz: 4174773947f88a6f88fcf8229ecdc95b85ac147c
3
+ metadata.gz: 7814f79614d1d4afc430dedb1ea644143ad08909
4
+ data.tar.gz: d3e16bf8a536e93c5c3b3610232bdf0cfad80106
5
5
  SHA512:
6
- metadata.gz: 007727bc10b30012b643e5d2ee8debb05ccc54883c66854bc1fc2bbdbd4f3659a293c6af0afda095d63e0f8b39ec8b0809b404814b73262bcfe3de77821e30f9
7
- data.tar.gz: e44669d702c08e09fc1a7ab21764b5aedeebb47ecc43916043f03e8df728160fd1014447665256af1f3ac0debe8ad523f8299bb26b5a03c657458323b6edb197
6
+ metadata.gz: 307303ea986e3838c693bc3872e96f164b48a4f74285204694ee9d9f69d2b6cca748384f736420a809cab620f8a43c903b0c0bc512866a42cc0e3ea384783fa0
7
+ data.tar.gz: b6be0a1fe3bd1802f23e5834d0bb7303cdfe9d4ad28a7a5df1067b7280e86c22b39e84ffaf935ddb9841bac9fc942be07540b286ef46d47c27f8aa00b6474591
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.5"
11
+ gem 'wpcli', "~> 0.2.6"
12
12
 
13
13
  And then execute:
14
14
 
data/lib/wpcli/client.rb CHANGED
@@ -14,7 +14,7 @@ module Wpcli
14
14
  first_data_row = starts_with_plus?(text) ? 3 : 1
15
15
  rows = []
16
16
  text.split("\n").each_with_index do |line, index|
17
- unless line.blank? || starts_with_plus?(line)
17
+ unless is_blank?(line) || starts_with_plus?(line)
18
18
  separator = line.include?('|') ? '|' : "\t"
19
19
  if index < first_data_row
20
20
  @columns = parse_header line, separator
@@ -35,6 +35,10 @@ module Wpcli
35
35
  rows
36
36
  end
37
37
 
38
+ def is_blank? string
39
+ string == nil || string.empty?
40
+ end
41
+
38
42
  def parse_header line, separator
39
43
  columns = []
40
44
  line.split(separator).each_with_index do |column, index|
data/lib/wpcli/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wpcli
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
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.2.5
4
+ version: 0.2.6
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-28 00:00:00.000000000 Z
11
+ date: 2014-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler