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 +4 -4
- data/README.md +1 -1
- data/lib/wpcli/client.rb +5 -1
- data/lib/wpcli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7814f79614d1d4afc430dedb1ea644143ad08909
|
4
|
+
data.tar.gz: d3e16bf8a536e93c5c3b3610232bdf0cfad80106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 307303ea986e3838c693bc3872e96f164b48a4f74285204694ee9d9f69d2b6cca748384f736420a809cab620f8a43c903b0c0bc512866a42cc0e3ea384783fa0
|
7
|
+
data.tar.gz: b6be0a1fe3bd1802f23e5834d0bb7303cdfe9d4ad28a7a5df1067b7280e86c22b39e84ffaf935ddb9841bac9fc942be07540b286ef46d47c27f8aa00b6474591
|
data/README.md
CHANGED
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
|
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
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.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-
|
11
|
+
date: 2014-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|