google 1.0.5 → 1.0.6

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.
data/README.md CHANGED
@@ -9,7 +9,7 @@ The CLI displays results from the [Google Web Search API](https://developers.goo
9
9
 
10
10
  ## Installation
11
11
 
12
- gem install google # Requires Ruby :)
12
+ gem install google # Requires Ruby 1.9
13
13
 
14
14
  ## Usage Examples
15
15
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "google"
3
- s.version = "1.0.5"
3
+ s.version = "1.0.6"
4
4
  s.executables << 'google'
5
5
  s.add_runtime_dependency "json", ["~> 1"]
6
6
  s.add_runtime_dependency "htmlentities", ["~> 4"]
@@ -8,7 +8,7 @@ require_relative 'google/grab'
8
8
  require_relative 'google/pipe-view'
9
9
 
10
10
  opts = Trollop::options do
11
- version "google v1.0.5 (c) 2012 Kerrick Long http://kerrick.github.com/google"
11
+ version "google v1.0.6 (c) 2012 Kerrick Long http://kerrick.github.com/google"
12
12
  banner <<-EOM
13
13
  The google gem is a simple tool to search Gooogle with via a CLI.
14
14
  Usage:
@@ -36,7 +36,7 @@ class ReverseMarkdown
36
36
  # To garantuee well-formed xml for REXML a <root> element will be added, but has no effect.
37
37
  # After parsing all elements, the 'reference style'-links will be inserted.
38
38
  def parse_string(string)
39
- doc = Document.new("<root>\n"+string+"\n</root>")
39
+ doc = Document.new("<root>\n"+string.encode("UTF-8")+"\n</root>")
40
40
  parse_element(doc.root, :none)
41
41
  insert_links()
42
42
  @output
@@ -57,7 +57,7 @@ class ReverseMarkdown
57
57
 
58
58
  # 3a.
59
59
  if (element.has_text? and element.children.size < 2)
60
- @output << text_node(element, parent)
60
+ @output << (text_node(element, parent) || '')
61
61
  end
62
62
 
63
63
  # 3b.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: