ruby-google-suggest 0.0.2 → 0.0.3
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 +4 -4
- data/lib/ruby-google-suggest.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c23a49b3f59131887bbf7141c6aeb74670a0abc639006589a012eb35e2eb2085
|
4
|
+
data.tar.gz: d7d762c610cd829164166b6c2a7763b5fdbe490c734ed6cee64f49171c04bb45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5ec3404f35d807315ff25f00458d89b90d34eed3db94002bc3505554a227c57abc3d28cc740949425d57ca0eacf57511e95db42f6a49f4e83ebfcf6feb60c35
|
7
|
+
data.tar.gz: b21ff020a4325e89d0784c93b200ca9a6cbaef7531df96c1ff2c49add6979e8d84edfe00aaf750ec81cc42fed2fd97ac31f1f137ebf8909dd34422ca888440b9
|
data/lib/ruby-google-suggest.rb
CHANGED
@@ -19,7 +19,7 @@ DO = ["buy", "sale", "service", "consulting", "consulting", "discount", "promoti
|
|
19
19
|
module GoogleSuggest
|
20
20
|
|
21
21
|
# Deep search
|
22
|
-
def suggest_deep(query, country, language, negative_keywords)
|
22
|
+
def self.suggest_deep(query, country, language, negative_keywords)
|
23
23
|
deep_keywords = []
|
24
24
|
ALPHA.each do |letter|
|
25
25
|
puts "looking at '#{letter}' variations"
|
@@ -29,7 +29,7 @@ module GoogleSuggest
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# Search using question keywords
|
32
|
-
def suggest_with_questions(query, country, language, negative_keywords)
|
32
|
+
def self.suggest_with_questions(query, country, language, negative_keywords)
|
33
33
|
questions_keywords = []
|
34
34
|
QUESTIONS.each do |question|
|
35
35
|
puts "looking at '#{question}' variations"
|
@@ -39,7 +39,7 @@ module GoogleSuggest
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# Search using consideration keywords
|
42
|
-
def suggest_with_considerations(query, country, language, negative_keywords)
|
42
|
+
def self.suggest_with_considerations(query, country, language, negative_keywords)
|
43
43
|
considerations_keywords = []
|
44
44
|
CONSIDERATIONS.each do |consideration|
|
45
45
|
puts "looking at '#{consideration}' variations"
|
@@ -49,7 +49,7 @@ module GoogleSuggest
|
|
49
49
|
end
|
50
50
|
|
51
51
|
# Search using purchase / call-to-action keywords
|
52
|
-
def suggest_with_action(query, country, language, negative_keywords)
|
52
|
+
def self.suggest_with_action(query, country, language, negative_keywords)
|
53
53
|
do_keywords = []
|
54
54
|
DO.each do |do_keyword|
|
55
55
|
puts "looking at '#{do_keyword}' variations"
|
@@ -59,7 +59,7 @@ module GoogleSuggest
|
|
59
59
|
end
|
60
60
|
|
61
61
|
# Main search function
|
62
|
-
def suggest(query, country, language, negative_keywords=[])
|
62
|
+
def self.suggest(query, country, language, negative_keywords=[])
|
63
63
|
base_keywords = []
|
64
64
|
final_keywords = []
|
65
65
|
|
@@ -84,7 +84,4 @@ module GoogleSuggest
|
|
84
84
|
|
85
85
|
final_keywords
|
86
86
|
end
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
extend GoogleSuggest
|
87
|
+
end
|