oldskool-gcse 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/oldskool/gcse_handler.rb +5 -5
- metadata +5 -5
@@ -1,7 +1,5 @@
|
|
1
1
|
module Oldskool
|
2
2
|
class GcseHandler
|
3
|
-
include Rack::Utils
|
4
|
-
|
5
3
|
def initialize(params, keyword, config)
|
6
4
|
@params = params
|
7
5
|
@keyword = keyword
|
@@ -26,9 +24,11 @@ module Oldskool
|
|
26
24
|
|
27
25
|
gcse.search @params[:q], args
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
escaped = URI.escape((query || keyword))
|
28
|
+
|
29
|
+
sidemenu = [{:title => "Google", :url => "http://google.com/search?q=#{escaped}",
|
30
|
+
{:title => "Images", :url => "http://google.com/search?q=#{escaped}&tbm=isch",
|
31
|
+
{:title => "Videos", :url => "http://google.com/search?q=#{escaped}&tbm=vid"}]
|
32
32
|
|
33
33
|
{:template => plugin_template(:gcse), :gcse => gcse, :sidemenu => sidemenu}
|
34
34
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oldskool-gcse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- R.I.Pienaar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-01-
|
18
|
+
date: 2012-01-30 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -41,9 +41,9 @@ extensions: []
|
|
41
41
|
extra_rdoc_files: []
|
42
42
|
|
43
43
|
files:
|
44
|
+
- lib/oldskool-gcse.rb
|
44
45
|
- lib/oldskool/gcse.rb
|
45
46
|
- lib/oldskool/gcse_handler.rb
|
46
|
-
- lib/oldskool-gcse.rb
|
47
47
|
- views/gcse.erb
|
48
48
|
has_rdoc: true
|
49
49
|
homepage: http://devco.net/
|