google_search_cse 0.0.1 → 0.0.2
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 +5 -5
- data/README.md +35 -0
- data/google_search_cse.gemspec +18 -0
- data/lib/google_search_cse/version.rb +3 -0
- data/lib/google_search_cse.rb +2 -1
- metadata +31 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: deb77100144b19b6f48f79c928bd8daafa72cd634c2e902be3a5223d09682912
|
|
4
|
+
data.tar.gz: 9b486ea950bb63708344bc423658a39d0ff723054639fedbe083375a8737d636
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 417af47e75dfb65ab3145eaa382dded39eaa20d3f17d06305235bb49fd0434ab74e2b96800c140219aa590a7006dd9baef005958efad0cb4739fc37805119e15
|
|
7
|
+
data.tar.gz: 9456f750a867f440efabbb5f7682db7008cf8685eead53574d7336022b0bcbc0bc12d83c838dd65ba13bc3d045f351b6e3aa7adfdd757c88d9ab9582daa8713f
|
data/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# google_search_cse
|
|
2
|
+
|
|
3
|
+
A Ruby library to integrate [Google Custom Search Engine (CSE)](https://programmablesearchengine.google.com/) into Rails applications. Lets you add Google-powered search to your site using your own custom search engine ID.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your `Gemfile`:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'google_search_cse'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bundle install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
1. Create a Custom Search Engine at [programmablesearchengine.google.com](https://programmablesearchengine.google.com/)
|
|
22
|
+
2. Note your **Search Engine ID (cx)**
|
|
23
|
+
3. Enable the **Custom Search JSON API** in Google Cloud Console and grab an **API key**
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
search = GoogleSearchCse.new
|
|
29
|
+
results = search.query("YOUR_API_KEY", "YOUR_CX_ID", "ruby on rails")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Links
|
|
33
|
+
|
|
34
|
+
- [Google Custom Search JSON API docs](https://developers.google.com/custom-search/v1/overview)
|
|
35
|
+
- [Get an API key](https://console.cloud.google.com/)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require_relative "lib/google_search_cse/version"
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |spec|
|
|
4
|
+
spec.name = "google_search_cse"
|
|
5
|
+
spec.version = GoogleSearchCse::VERSION
|
|
6
|
+
spec.authors = ["Abhishek Sharma"]
|
|
7
|
+
spec.email = ["abhsss96@gmail.com"]
|
|
8
|
+
spec.summary = "A library to use Google Custom Search in Rails applications"
|
|
9
|
+
spec.description = "Provides a Ruby interface for the Google Custom Search JSON API."
|
|
10
|
+
spec.homepage = "https://github.com/abhsss96/google_search_cse"
|
|
11
|
+
spec.license = "MIT"
|
|
12
|
+
spec.required_ruby_version = ">= 2.7"
|
|
13
|
+
|
|
14
|
+
spec.files = Dir["lib/**/*", "README.md", "*.gemspec"]
|
|
15
|
+
spec.require_paths = ["lib"]
|
|
16
|
+
|
|
17
|
+
spec.add_development_dependency "rspec", "~> 3.12"
|
|
18
|
+
end
|
data/lib/google_search_cse.rb
CHANGED
metadata
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_search_cse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abhishek Sharma
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
date: 2026-05-31 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rspec
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3.12'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '3.12'
|
|
27
|
+
description: Provides a Ruby interface for the Google Custom Search JSON API.
|
|
28
|
+
email:
|
|
29
|
+
- abhsss96@gmail.com
|
|
15
30
|
executables: []
|
|
16
31
|
extensions: []
|
|
17
32
|
extra_rdoc_files: []
|
|
18
33
|
files:
|
|
34
|
+
- README.md
|
|
35
|
+
- google_search_cse.gemspec
|
|
19
36
|
- lib/google_search_cse.rb
|
|
20
|
-
|
|
37
|
+
- lib/google_search_cse/version.rb
|
|
38
|
+
homepage: https://github.com/abhsss96/google_search_cse
|
|
21
39
|
licenses:
|
|
22
|
-
-
|
|
40
|
+
- MIT
|
|
23
41
|
metadata: {}
|
|
24
|
-
post_install_message:
|
|
42
|
+
post_install_message:
|
|
25
43
|
rdoc_options: []
|
|
26
44
|
require_paths:
|
|
27
45
|
- lib
|
|
@@ -29,17 +47,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
29
47
|
requirements:
|
|
30
48
|
- - ">="
|
|
31
49
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
50
|
+
version: '2.7'
|
|
33
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
52
|
requirements:
|
|
35
53
|
- - ">="
|
|
36
54
|
- !ruby/object:Gem::Version
|
|
37
55
|
version: '0'
|
|
38
56
|
requirements: []
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
signing_key:
|
|
57
|
+
rubygems_version: 3.5.22
|
|
58
|
+
signing_key:
|
|
42
59
|
specification_version: 4
|
|
43
|
-
summary:
|
|
44
|
-
Provided by Google Custom Search V2 API.
|
|
60
|
+
summary: A library to use Google Custom Search in Rails applications
|
|
45
61
|
test_files: []
|