google_custom_search_api 1.0.0 → 2.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile.lock +35 -21
- data/README.md +180 -37
- data/lib/google_custom_search_api.rb +84 -33
- data/lib/version.rb +1 -1
- metadata +90 -97
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 228c6676867465f4a11356a89dd36130f926f38d
|
4
|
+
data.tar.gz: 9aca83a6a4cc013be2d2bfac1c1928add7104a88
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 76fc199878f446ef2ba231c8ca3a3a29034debe1ea9943f2a1d30e00c99984926bcddc2f230e6b088af55d38053178f2e075d77be69b5b87218f22d4ebedf56d
|
7
|
+
data.tar.gz: 825d19ec8e359ea688cc72ff321eae2c791b7f043a801e081b6867ae45df914a8655cf1b60ca6a2da3111687933da6212309ead48f8c13b3c06352f1d64e2089
|
data/Gemfile.lock
CHANGED
@@ -1,32 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
google_custom_search_api (0.0
|
4
|
+
google_custom_search_api (2.0.0)
|
5
|
+
addressable
|
5
6
|
httparty
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: http://rubygems.org/
|
9
10
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
crack (0.3
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
rspec-
|
22
|
-
rspec-
|
23
|
-
|
24
|
-
rspec-
|
25
|
-
|
26
|
-
rspec-
|
27
|
-
|
28
|
-
|
29
|
-
|
11
|
+
addressable (2.3.8)
|
12
|
+
crack (0.4.3)
|
13
|
+
safe_yaml (~> 1.0.0)
|
14
|
+
diff-lcs (1.2.5)
|
15
|
+
hashdiff (0.2.3)
|
16
|
+
httparty (0.13.7)
|
17
|
+
json (~> 1.8)
|
18
|
+
multi_xml (>= 0.5.2)
|
19
|
+
json (1.8.3)
|
20
|
+
multi_xml (0.5.5)
|
21
|
+
rspec (3.4.0)
|
22
|
+
rspec-core (~> 3.4.0)
|
23
|
+
rspec-expectations (~> 3.4.0)
|
24
|
+
rspec-mocks (~> 3.4.0)
|
25
|
+
rspec-core (3.4.1)
|
26
|
+
rspec-support (~> 3.4.0)
|
27
|
+
rspec-expectations (3.4.0)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.4.0)
|
30
|
+
rspec-mocks (3.4.0)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.4.0)
|
33
|
+
rspec-support (3.4.1)
|
34
|
+
safe_yaml (1.0.4)
|
35
|
+
vcr (3.0.1)
|
36
|
+
webmock (1.22.5)
|
37
|
+
addressable (< 2.4.0)
|
38
|
+
crack (>= 0.3.2)
|
39
|
+
hashdiff
|
30
40
|
|
31
41
|
PLATFORMS
|
32
42
|
ruby
|
@@ -35,4 +45,8 @@ DEPENDENCIES
|
|
35
45
|
google_custom_search_api!
|
36
46
|
json
|
37
47
|
rspec
|
48
|
+
vcr
|
38
49
|
webmock
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
1.10.6
|
data/README.md
CHANGED
@@ -22,19 +22,30 @@ You need to configure ```GOOGLE_SEARCH_CX``` and ```GOOGLE_API_KEY``` to ```conf
|
|
22
22
|
GOOGLE_API_KEY = "..."
|
23
23
|
GOOGLE_SEARCH_CX = "..."
|
24
24
|
```
|
25
|
-
You can get your ```GOOGLE_API_KEY``` from https://code.google.com/apis/console/b/0/?pli=1 - There are many choices - Simple API Access is probably what you want. There are more elaborate authorization schemes available for Google services but those aren't currently implemented.
|
26
25
|
|
27
|
-
|
26
|
+
Google's API management is confusing at best. At the time of this writing you codes like so:
|
28
27
|
|
29
|
-
###
|
28
|
+
### GOOGLE_API_KEY
|
30
29
|
|
31
|
-
|
30
|
+
* Go to [Google Projects](https://console.developers.google.com/project)
|
31
|
+
* Create a project, open it
|
32
|
+
* Under `Explore other services` choose `Enable APIs and get credentials like keys`
|
33
|
+
* Search for `custom search` and click on it
|
34
|
+
* In the left column click on `Credentials`
|
35
|
+
* Under `API keys` grab your key. This is your `GOOGLE_API_KEY`
|
32
36
|
|
33
|
-
|
34
|
-
|
37
|
+
### GOOGLE_SEARCH_CX
|
38
|
+
|
39
|
+
* Go to [Google CSE](https://cse.google.com/cse)
|
40
|
+
* Create a search engine and click on it
|
41
|
+
* Under `Setup > Tabs > Basic` find `Details` and click `Search engine ID`
|
42
|
+
* This is your GOOGLE_SEARCH_CX
|
43
|
+
* Make sure to add a site under `Sites to search`
|
35
44
|
|
36
45
|
## Use
|
37
46
|
|
47
|
+
### Search
|
48
|
+
|
38
49
|
To perform a search:
|
39
50
|
|
40
51
|
```
|
@@ -58,49 +69,189 @@ or
|
|
58
69
|
end
|
59
70
|
```
|
60
71
|
|
61
|
-
|
72
|
+
### Paging
|
73
|
+
|
74
|
+
Google only returns 10 results at a time and a maximum of 100 results. The easiest way to page through results if to use `:page`. Paging is 1 based (1-10). The default page is 1
|
62
75
|
|
63
76
|
```
|
64
|
-
results =
|
65
|
-
results.
|
66
|
-
results.
|
77
|
+
results = GoogleCustomerSearchApi.search("poker", page: 2)
|
78
|
+
results.pages == 10
|
79
|
+
results.current_page == 2
|
80
|
+
results.next_page == 3
|
81
|
+
results.previous_page == 1
|
82
|
+
|
83
|
+
results = GoogleCustomerSearchApi.search("poker", page: 1)
|
84
|
+
results.pages == 10
|
85
|
+
results.current_page == 1
|
86
|
+
results.next_page == 2
|
87
|
+
results.previous_page == nil
|
88
|
+
|
89
|
+
results = GoogleCustomerSearchApi.search("poker", page: 10)
|
90
|
+
results.pages == 10
|
91
|
+
results.current_page == 10
|
92
|
+
results.next_page == nil
|
93
|
+
results.previous_page == 9
|
67
94
|
```
|
68
95
|
|
69
|
-
|
96
|
+
You can also use `:start` - which can be any number between 1 and 99. The `:page` helpers won't be accurate with `:start`
|
97
|
+
|
98
|
+
Example: get results 13-23
|
70
99
|
|
71
100
|
```
|
72
|
-
|
73
|
-
results.items.size == 10
|
74
|
-
end
|
101
|
+
results = GoogleCustomerSearchApi.search('poker', start: 13)
|
75
102
|
```
|
76
103
|
|
77
104
|
See [Custom Search](http://code.google.com/apis/customsearch/v1/using_rest.html) documentation for an explanation of all fields available.
|
78
105
|
|
79
|
-
###
|
106
|
+
### Search and return all results
|
107
|
+
|
108
|
+
This method isn't so useful because it's pretty slow (do to fetching up to 10 pages from Google). Helpful for testing sometimes.
|
109
|
+
|
110
|
+
```
|
111
|
+
results = search_and_return_all_results('poker')
|
112
|
+
results.first.items.size # == 10
|
113
|
+
|
114
|
+
search_and_resturn_all_results('poker') do |results|
|
115
|
+
results.items.size # == 10 10 times
|
116
|
+
end
|
117
|
+
|
118
|
+
search_and_return_all_results(
|
119
|
+
'"California cult winery known for its Rhône"') do |results|
|
120
|
+
results.items.size # == 3 1 time
|
121
|
+
end
|
122
|
+
```
|
123
|
+
|
124
|
+
### Errors
|
125
|
+
|
126
|
+
Custom Search only returns a maximum of 100 results so - if you try something like
|
127
|
+
|
128
|
+
```
|
129
|
+
results = GoogleCustomSearchApi.search('poker', start: 101)
|
130
|
+
```
|
131
|
+
You get error and empty items.
|
132
|
+
|
133
|
+
```
|
134
|
+
{
|
135
|
+
"error"=> {
|
136
|
+
"errors"=> [
|
137
|
+
{
|
138
|
+
"domain"=>"global",
|
139
|
+
"reason"=>"invalid",
|
140
|
+
"message"=>"Invalid Value"
|
141
|
+
}
|
142
|
+
],
|
143
|
+
"code"=>400,
|
144
|
+
"message"=>"Invalid Value"
|
145
|
+
},
|
146
|
+
"items"=>[]
|
147
|
+
}
|
148
|
+
```
|
149
|
+
|
150
|
+
So check for:
|
151
|
+
|
152
|
+
```
|
153
|
+
if results.try(:error) || results.items.empty?
|
154
|
+
```
|
155
|
+
### Rails example
|
156
|
+
|
157
|
+
In **Gemfile**
|
158
|
+
|
159
|
+
```
|
160
|
+
gem "google_custom_search_api"
|
161
|
+
```
|
162
|
+
|
163
|
+
In **config/initializers/google_search.rb**
|
80
164
|
|
81
|
-
|
165
|
+
```
|
166
|
+
GOOGLE_API_KEY = '...'
|
167
|
+
GOOGLE_SEARCH_CX = '...'
|
168
|
+
```
|
82
169
|
|
83
|
-
|
170
|
+
In **config/routes.rb**
|
84
171
|
|
85
172
|
```
|
86
|
-
|
173
|
+
get '/search' => 'search#index'
|
87
174
|
```
|
88
175
|
|
89
|
-
|
176
|
+
In **app/controllers/search_controller.rb** you'd have something like this:
|
90
177
|
|
91
178
|
```
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
179
|
+
class SearchController < ApplicationController
|
180
|
+
def index
|
181
|
+
if params[:q]
|
182
|
+
page = params[:page] || 1
|
183
|
+
@results = GoogleCustomSearchApi.search(params[:q],
|
184
|
+
page: page)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
101
188
|
```
|
102
189
|
|
103
|
-
|
190
|
+
And a simple view might look like this **app/search/index.html.erb** (this is using bootstrap styling)
|
191
|
+
|
192
|
+
```
|
193
|
+
<section class='search-section'>
|
194
|
+
<div class='text-center titles-with-yellow'>
|
195
|
+
<h1>Search/h1>
|
196
|
+
</div>
|
197
|
+
<div class='container'>
|
198
|
+
<div class='text-center search-bar'>
|
199
|
+
<%= form_tag search_path, method: :get do %>
|
200
|
+
<div class="inner-addon right-addon">
|
201
|
+
<i class="glyphicon glyphicon-search"></i>
|
202
|
+
<%= text_field_tag :q, params[:q], class: 'form-control' %>
|
203
|
+
</div>
|
204
|
+
<% end %>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
<% if @results && !@results.items.empty? %>
|
209
|
+
<div class='container'>
|
210
|
+
<% @results.items.each do |item| %>
|
211
|
+
<div class='row'>
|
212
|
+
<h4><%= link_to item.htmlTitle.html_safe, item.link %></h4>
|
213
|
+
<div>
|
214
|
+
<% if item['pagemap'] &&
|
215
|
+
item['pagemap']['cse_thumbnail'] &&
|
216
|
+
img = item.pagemap.cse_thumbnail.first %>
|
217
|
+
<div class='col-sm-2'>
|
218
|
+
<%= image_tag(img.src, width: '200px') %>
|
219
|
+
</div>
|
220
|
+
<div class='col-sm-10'>
|
221
|
+
<%= item.htmlSnippet.html_safe %>
|
222
|
+
</div>
|
223
|
+
<% else %>
|
224
|
+
<%= item.htmlSnippet.html_safe %>
|
225
|
+
<% end %>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
<% end %>
|
229
|
+
</div>
|
230
|
+
<div class='container search-prev-next'>
|
231
|
+
<div class='row text-center'>
|
232
|
+
<% if @results.previous_page %>
|
233
|
+
<%= link_to '<< Previous',
|
234
|
+
search_path(q: params[:q], page: @results.previous_page),
|
235
|
+
class: 'btn' %>
|
236
|
+
<% end %>
|
237
|
+
<% @results.pages.times do |i| %>
|
238
|
+
<%= link_to i + 1,
|
239
|
+
search_path(q: params[:q], page: i+1),
|
240
|
+
class: 'btn btn-page' %>
|
241
|
+
<% end %>
|
242
|
+
<% if @results.next_page %>
|
243
|
+
<%= link_to 'Next >>',
|
244
|
+
search_path(q: params[:q],
|
245
|
+
page: @results.next_page),
|
246
|
+
class: 'btn' %>
|
247
|
+
<% end %>
|
248
|
+
</div>
|
249
|
+
</div>
|
250
|
+
<% else %>
|
251
|
+
<h4>No results</h4>
|
252
|
+
<% end %>
|
253
|
+
</section>
|
254
|
+
```
|
104
255
|
|
105
256
|
### Encoding issues
|
106
257
|
|
@@ -131,12 +282,4 @@ To run tests
|
|
131
282
|
* Awesome ResponseData class from https://github.com/mikedemers/rbing
|
132
283
|
* Work done while working on a project for the company http://reInteractive.net in sunny Sydney. A great ruby shop should you need help with something.
|
133
284
|
|
134
|
-
## TODO
|
135
|
-
* pretty light on the tests
|
136
|
-
|
137
|
-
## Sample results
|
138
|
-
|
139
|
-
See spec/fixtures/*.json for examples of data returned
|
140
|
-
|
141
|
-
|
142
285
|
Copyright (c) 2012 Ben Wiseley, released under the MIT license
|
@@ -8,38 +8,83 @@ require 'addressable/uri'
|
|
8
8
|
|
9
9
|
module GoogleCustomSearchApi
|
10
10
|
extend self
|
11
|
-
|
11
|
+
|
12
12
|
##
|
13
13
|
# Search the site.
|
14
14
|
#
|
15
|
-
# opts
|
16
|
-
# see list here for valid options
|
15
|
+
# opts
|
16
|
+
# see list here for valid options
|
17
|
+
# http://code.google.com/apis/customsearch/v1/using_rest.html#query-params
|
17
18
|
def search(query, opts = {})
|
19
|
+
opts[:start] ||= 1
|
20
|
+
|
21
|
+
if (page = opts.delete(:page))
|
22
|
+
page = page.to_i
|
23
|
+
opts[:start] = (page - 1).abs * 10 + 1
|
24
|
+
else
|
25
|
+
page = (opts[:start].to_i / 10) + 1
|
26
|
+
end
|
27
|
+
page = 10 if page > 10
|
28
|
+
|
18
29
|
# Get and parse results.
|
19
30
|
url = url(query, opts)
|
20
|
-
# puts url
|
21
31
|
return nil unless results = fetch(url)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
32
|
+
|
33
|
+
results['items'] ||= []
|
34
|
+
|
35
|
+
# paging
|
36
|
+
if results.keys.include?('queries')
|
37
|
+
data = results['queries']['request'].first
|
38
|
+
results['pages'] = data['totalResults'].to_i / 10
|
39
|
+
results['pages'] = 10 if results['pages'] > 10
|
40
|
+
results['current_page'] = page.to_i
|
41
|
+
|
42
|
+
results['next_page'] = nil
|
43
|
+
results['previous_page'] = nil
|
44
|
+
|
45
|
+
if results['queries'].include?('nextPage') && page < 10
|
46
|
+
results['next_page'] = results['current_page'] + 1
|
47
|
+
end
|
48
|
+
|
49
|
+
if page > 1
|
50
|
+
results['previous_page'] = page - 1
|
51
|
+
end
|
31
52
|
end
|
32
53
|
|
33
54
|
ResponseData.new(results)
|
34
55
|
end
|
35
|
-
|
56
|
+
|
57
|
+
##
|
58
|
+
# Search the site for all available results (max 100)
|
59
|
+
#
|
60
|
+
# This isn't so useful because it's quite slow
|
61
|
+
#
|
62
|
+
# Returns an array of up to 10 search(query) results
|
63
|
+
#
|
64
|
+
# examples:
|
65
|
+
#
|
66
|
+
# results = search_and_return_all_results('poker')
|
67
|
+
# results.first.items.size # == 10
|
68
|
+
#
|
69
|
+
# search_and_resturn_all_results('poker') do |results|
|
70
|
+
# results.items.size # == 10 10 times
|
71
|
+
# end
|
72
|
+
#
|
73
|
+
# search_and_return_all_results(
|
74
|
+
# '"California cult winery known for its Rhône"') do |results|
|
75
|
+
# results.items.size # == 3 1 time
|
76
|
+
# end
|
77
|
+
#
|
78
|
+
# opts
|
79
|
+
# see list here for valid options
|
80
|
+
# http://code.google.com/apis/customsearch/v1/using_rest.html#query-params
|
36
81
|
def search_and_return_all_results(query, opts = {})
|
37
82
|
res = []
|
38
83
|
opts[:start] ||= 1
|
39
84
|
begin
|
40
|
-
results = GoogleCustomSearchApi.search(query,opts)
|
41
|
-
|
42
|
-
yield results
|
85
|
+
results = GoogleCustomSearchApi.search(query, opts)
|
86
|
+
return res unless results.keys.include?('queries')
|
87
|
+
yield results if block_given?
|
43
88
|
res << results
|
44
89
|
if results.queries.keys.include?("nextPage")
|
45
90
|
opts[:start] = results.queries.nextPage.first.startIndex
|
@@ -49,11 +94,7 @@ module GoogleCustomSearchApi
|
|
49
94
|
end while opts[:start].nil? == false
|
50
95
|
return res
|
51
96
|
end
|
52
|
-
|
53
|
-
# def read_search_data(fname)
|
54
|
-
# JSON.parse(File.read("/Users/wiseleyb/dev/rubyx/icm/spec/fixtures/searches/#{fname}.json"))
|
55
|
-
# end
|
56
|
-
|
97
|
+
|
57
98
|
# Convenience wrapper for the response Hash.
|
58
99
|
# Converts keys to Strings. Crawls through all
|
59
100
|
# member data and converts any other Hashes it
|
@@ -62,8 +103,11 @@ module GoogleCustomSearchApi
|
|
62
103
|
# to camel case.
|
63
104
|
#
|
64
105
|
# Usage:
|
65
|
-
#
|
66
|
-
# rd = ResponseData.new("AlphaBeta" => 1,
|
106
|
+
#
|
107
|
+
# rd = ResponseData.new("AlphaBeta" => 1,
|
108
|
+
# "Results" => {
|
109
|
+
# "Gamma" => 2,
|
110
|
+
# "delta" => [3, 4]})
|
67
111
|
# puts rd.alpha_beta
|
68
112
|
# => 1
|
69
113
|
# puts rd.alpha_beta.results.gamma
|
@@ -76,6 +120,7 @@ module GoogleCustomSearchApi
|
|
76
120
|
def initialize(data={})
|
77
121
|
data.each_pair {|k,v| self[k.to_s] = deep_parse(v) }
|
78
122
|
end
|
123
|
+
|
79
124
|
def deep_parse(data)
|
80
125
|
case data
|
81
126
|
when Hash
|
@@ -86,10 +131,15 @@ module GoogleCustomSearchApi
|
|
86
131
|
data
|
87
132
|
end
|
88
133
|
end
|
134
|
+
|
89
135
|
def method_missing(*args)
|
90
136
|
name = args[0].to_s
|
91
137
|
return self[name] if has_key? name
|
92
|
-
|
138
|
+
|
139
|
+
camelname = name.split('_').map do |w|
|
140
|
+
"#{w[0,1].upcase}#{w[1..-1]}"
|
141
|
+
end.join("")
|
142
|
+
|
93
143
|
if has_key? camelname
|
94
144
|
self[camelname]
|
95
145
|
else
|
@@ -97,14 +147,15 @@ module GoogleCustomSearchApi
|
|
97
147
|
end
|
98
148
|
end
|
99
149
|
end
|
100
|
-
|
101
|
-
|
102
|
-
private
|
103
|
-
|
150
|
+
|
151
|
+
|
152
|
+
private
|
153
|
+
|
104
154
|
##
|
105
155
|
# Build search request URL.
|
106
156
|
#
|
107
|
-
# see list here for valid options
|
157
|
+
# see list here for valid options
|
158
|
+
# http://code.google.com/apis/customsearch/v1/using_rest.html#query-params
|
108
159
|
def url(query, opts = {})
|
109
160
|
opts[:q] = query
|
110
161
|
opts[:alt] ||= "json"
|
@@ -114,14 +165,14 @@ module GoogleCustomSearchApi
|
|
114
165
|
params.merge!(GOOGLE_SEARCH_PARAMS)
|
115
166
|
rescue NameError
|
116
167
|
end
|
117
|
-
"https://www.googleapis.com/customsearch/v1?
|
168
|
+
"https://www.googleapis.com/customsearch/v1?" \
|
169
|
+
"key=#{GOOGLE_API_KEY}&cx=#{GOOGLE_SEARCH_CX}&#{uri.query}"
|
118
170
|
end
|
119
|
-
|
171
|
+
|
120
172
|
##
|
121
173
|
# Query Google, and make sure it responds.
|
122
174
|
#
|
123
175
|
def fetch(url)
|
124
176
|
return HTTParty.get(url)
|
125
177
|
end
|
126
|
-
|
127
178
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,143 +1,136 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_custom_search_api
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 1.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Ben Wiseley
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: httparty
|
22
|
-
|
23
|
-
|
24
|
-
none: false
|
25
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
26
17
|
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
32
20
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: addressable
|
36
21
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: addressable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
40
31
|
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
46
34
|
type: :runtime
|
47
|
-
|
48
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
49
42
|
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
50
49
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
54
59
|
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
60
62
|
type: :development
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: webmock
|
64
63
|
prerelease: false
|
65
|
-
|
66
|
-
|
67
|
-
requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
68
66
|
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
74
76
|
type: :development
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: json
|
78
77
|
prerelease: false
|
79
|
-
|
80
|
-
|
81
|
-
requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
82
80
|
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: json
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
88
90
|
type: :development
|
89
|
-
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
90
97
|
description: Ruby lib for Google's Custom Search Api.
|
91
|
-
email:
|
98
|
+
email:
|
92
99
|
- wiseleyb@gmail.com
|
93
100
|
executables: []
|
94
|
-
|
95
101
|
extensions: []
|
96
|
-
|
97
102
|
extra_rdoc_files: []
|
98
|
-
|
99
|
-
files:
|
103
|
+
files:
|
100
104
|
- CHANGELOG.rdoc
|
101
105
|
- Gemfile
|
102
106
|
- Gemfile.lock
|
103
|
-
- init.rb
|
104
107
|
- LICENSE
|
105
|
-
- Rakefile
|
106
108
|
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- init.rb
|
107
111
|
- lib/google_custom_search_api.rb
|
108
112
|
- lib/version.rb
|
109
113
|
homepage: http://github.com/wiseleyb/google_custom_search_api
|
110
114
|
licenses: []
|
111
|
-
|
115
|
+
metadata: {}
|
112
116
|
post_install_message:
|
113
117
|
rdoc_options: []
|
114
|
-
|
115
|
-
require_paths:
|
118
|
+
require_paths:
|
116
119
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
-
|
119
|
-
requirements:
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
120
122
|
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
version: "0"
|
126
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
|
-
requirements:
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
129
127
|
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
132
|
-
segments:
|
133
|
-
- 0
|
134
|
-
version: "0"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
135
130
|
requirements: []
|
136
|
-
|
137
131
|
rubyforge_project:
|
138
|
-
rubygems_version:
|
132
|
+
rubygems_version: 2.4.5.1
|
139
133
|
signing_key:
|
140
|
-
specification_version:
|
134
|
+
specification_version: 4
|
141
135
|
summary: Ruby lib for Google's Custom Search Api.
|
142
136
|
test_files: []
|
143
|
-
|