apollo-crawler 0.0.42 → 0.0.43

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.
@@ -11,7 +11,23 @@ module Apollo
11
11
  end
12
12
 
13
13
  def self.format(obj)
14
- table = Terminal::Table.new :rows => obj[:data]
14
+ headings = []
15
+ if(obj[:data].length > 0)
16
+ headings = obj[:data][0].keys
17
+ end
18
+
19
+ rows = []
20
+ obj[:data].each do |line|
21
+ data = []
22
+ headings.each do |column|
23
+ data << line[column]
24
+ end
25
+
26
+ rows << data
27
+ end
28
+
29
+
30
+ table = Terminal::Table.new :headings => headings, :rows => rows
15
31
  return table
16
32
  end
17
33
  end
@@ -1,5 +1,5 @@
1
1
  module Apollo
2
2
  module Crawler
3
- VERSION = '0.0.42'
3
+ VERSION = '0.0.43'
4
4
  end # Crawler
5
5
  end # Apollo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo-crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.42
4
+ version: 0.0.43
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: