goog 0.1.5 → 0.1.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.
Files changed (3) hide show
  1. data/bin/goog +9 -4
  2. data/lib/goog.rb +1 -1
  3. metadata +2 -2
data/bin/goog CHANGED
@@ -64,6 +64,14 @@ END
64
64
  puts "Done. Type goog -h for Vim commands."
65
65
  exit
66
66
  }
67
+ opts.on('--version', 'Show version') {|dr|
68
+ require 'goog'
69
+ puts <<END
70
+ goog #{Goog::VERSION}
71
+ http://github.com/danchoi/goog
72
+ Author: Daniel Choi <dhchoi@gmail.com>
73
+ END
74
+ }
67
75
  end.parse!
68
76
  query = ARGV.join(' ')
69
77
  unless query
@@ -71,9 +79,6 @@ unless query
71
79
  end
72
80
 
73
81
  $stdout.puts orig_query
74
- unless `which tidy` =~ /tidy/
75
- abort "No tidy found. Please install tidy."
76
- end
77
82
  if RUBY_VERSION !~ /^1.9/
78
83
  abort "Requires Ruby 1.9"
79
84
  end
@@ -86,7 +91,7 @@ end
86
91
  if query.nil?
87
92
  exit
88
93
  end
89
- curl = "curl -s -A Mozilla 'http://www.google.com#{query}' | tidy --wrap 0 -indent -ashtml --merge-divs yes 2>/dev/null"
94
+ curl = "curl -s -A Mozilla 'http://www.google.com#{query}'"
90
95
  resp = %x{#{curl}}
91
96
  doc = Nokogiri::HTML resp, nil, 'iso-8859-1'
92
97
  doc.search('ol li.g').each_with_index {|li, index|
data/lib/goog.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Goog
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -49,7 +49,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ! '>='
51
51
  - !ruby/object:Gem::Version
52
- version: 1.9.0
52
+ version: 1.8.7
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements: