market_bot 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,19 +1,16 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
1
+ source 'http://rubygems.org'
5
2
 
6
- gem "typhoeus"
7
- gem "nokogiri"
3
+ gem 'typhoeus'
4
+ gem 'nokogiri'
8
5
 
9
- # Add dependencies to develop your gem here.
10
- # Include everything needed to run rake, tests, features, etc.
11
6
  group :development do
12
- gem "rspec", "~> 2.8.0"
13
- gem "bundler", "~> 1.1.0"
14
- gem "jeweler", "~> 1.6.4"
15
- gem "simplecov", ">= 0"
16
- gem "ZenTest", "~> 4.6.2"
17
- gem "rdoc", ">= 3.9.4"
18
- gem "debugger"
7
+ gem 'rspec', '~> 2.8.0'
8
+ gem 'bundler', '~> 1.1.0'
9
+ gem 'jeweler', '~> 1.6.4'
10
+ gem 'simplecov', '>= 0'
11
+ gem 'rdoc', '>= 3.9.4'
12
+ gem 'guard', '~> 1.2.3'
13
+ gem 'guard-rspec', '~> 1.1.0'
14
+ gem 'growl'
15
+ platform(:ruby) { gem 'debugger' }
19
16
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,6 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- ZenTest (4.6.2)
5
4
  columnize (0.3.6)
6
5
  debugger (1.1.4)
7
6
  columnize (>= 0.3.1)
@@ -13,15 +12,30 @@ GEM
13
12
  diff-lcs (1.1.3)
14
13
  ffi (1.0.11)
15
14
  git (1.2.5)
15
+ growl (1.0.3)
16
+ guard (1.2.3)
17
+ listen (>= 0.4.2)
18
+ thor (>= 0.14.6)
19
+ guard-rspec (1.1.0)
20
+ guard (>= 1.1)
16
21
  jeweler (1.6.4)
17
22
  bundler (~> 1.0)
18
23
  git (>= 1.2.5)
19
24
  rake
20
25
  json (1.7.3)
26
+ listen (0.4.7)
27
+ rb-fchange (~> 0.0.5)
28
+ rb-fsevent (~> 0.9.1)
29
+ rb-inotify (~> 0.8.8)
21
30
  mime-types (1.18)
22
31
  multi_json (1.3.6)
23
32
  nokogiri (1.5.4)
24
33
  rake (0.9.2.2)
34
+ rb-fchange (0.0.5)
35
+ ffi
36
+ rb-fsevent (0.9.1)
37
+ rb-inotify (0.8.8)
38
+ ffi (>= 0.5.0)
25
39
  rdoc (3.12)
26
40
  json (~> 1.4)
27
41
  rspec (2.8.0)
@@ -36,6 +50,7 @@ GEM
36
50
  multi_json (~> 1.0)
37
51
  simplecov-html (~> 0.5.3)
38
52
  simplecov-html (0.5.3)
53
+ thor (0.15.4)
39
54
  typhoeus (0.4.2)
40
55
  ffi (~> 1.0)
41
56
  mime-types (~> 1.18)
@@ -44,9 +59,11 @@ PLATFORMS
44
59
  ruby
45
60
 
46
61
  DEPENDENCIES
47
- ZenTest (~> 4.6.2)
48
62
  bundler (~> 1.1.0)
49
63
  debugger
64
+ growl
65
+ guard (~> 1.2.3)
66
+ guard-rspec (~> 1.1.0)
50
67
  jeweler (~> 1.6.4)
51
68
  nokogiri
52
69
  rdoc (>= 3.9.4)
data/Guardfile ADDED
@@ -0,0 +1,5 @@
1
+ guard :rspec, :version => 2 do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| r = "spec/lib/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
data/README.markdown CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Market Bot is a high performance Ruby scraper for Google's Android Market with a simple to use API.
4
4
  It is built on top of Nokogiri and Typhoeus.
5
- Used in production to power [www.droidmeter.com](http://www.droidmeter.com).
5
+ Used in production to power [www.droidmeter.com](http://www.droidmeter.com/?t=github).
6
6
 
7
7
  ## Dependencies
8
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.6.0
data/lib/market_bot.rb CHANGED
@@ -1,7 +1,10 @@
1
+ require 'uri'
2
+
1
3
  require 'typhoeus'
2
4
  require 'nokogiri'
3
5
 
4
6
  require 'market_bot/android/app'
5
7
  require 'market_bot/android/leaderboard/constants'
6
8
  require 'market_bot/android/leaderboard'
9
+ require 'market_bot/android/search_query'
7
10
 
@@ -0,0 +1,29 @@
1
+ module MarketBot
2
+ module Android
3
+
4
+ # Search query pages are extremely similar to leaderboard pages.
5
+ # Amazingly, this inheritence hack works!
6
+ class SearchQuery < MarketBot::Android::Leaderboard
7
+ def market_urls(options={})
8
+ results = []
9
+
10
+ min_page = options[:min_page] || 1
11
+ max_page = options[:max_page] || 25
12
+
13
+ (min_page..max_page).each do |page|
14
+ start_val = (page - 1) * 24
15
+
16
+ url = "https://play.google.com/store/search?"
17
+ url << "q=#{URI.escape(identifier)}&"
18
+ url << "c=apps&start=#{start_val}&"
19
+ url << "num=24"
20
+
21
+ results << url
22
+ end
23
+
24
+ results
25
+ end
26
+ end
27
+
28
+ end
29
+ end
data/market_bot.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "market_bot"
8
- s.version = "0.5.1"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chad Remesch"]
12
- s.date = "2012-06-14"
12
+ s.date = "2012-07-08"
13
13
  s.description = "Market Bot is a high performance Ruby scraper for Google's Android Market with a simple to use API. It is built on top of Nokogiri and Typhoeus."
14
14
  s.email = "chad@remesch.com"
15
15
  s.extra_rdoc_files = [
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  ".rspec",
22
22
  "Gemfile",
23
23
  "Gemfile.lock",
24
+ "Guardfile",
24
25
  "LICENSE.txt",
25
26
  "NOTES.txt",
26
27
  "README.markdown",
@@ -30,6 +31,7 @@ Gem::Specification.new do |s|
30
31
  "lib/market_bot/android/app.rb",
31
32
  "lib/market_bot/android/leaderboard.rb",
32
33
  "lib/market_bot/android/leaderboard/constants.rb",
34
+ "lib/market_bot/android/search_query.rb",
33
35
  "market_bot.gemspec",
34
36
  "spec/market_bot/android/app_spec.rb",
35
37
  "spec/market_bot/android/data/app_1.txt",
@@ -41,6 +43,7 @@ Gem::Specification.new do |s|
41
43
  "spec/market_bot/android/data/leaderboard-apps_topselling_paid-page3.txt",
42
44
  "spec/market_bot/android/data/leaderboard-apps_topselling_paid-page4.txt",
43
45
  "spec/market_bot/android/leaderboard_spec.rb",
46
+ "spec/market_bot/android/search_query_spec.rb",
44
47
  "spec/market_bot_spec.rb",
45
48
  "spec/spec_helper.rb"
46
49
  ]
@@ -60,8 +63,10 @@ Gem::Specification.new do |s|
60
63
  s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
61
64
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
62
65
  s.add_development_dependency(%q<simplecov>, [">= 0"])
63
- s.add_development_dependency(%q<ZenTest>, ["~> 4.6.2"])
64
66
  s.add_development_dependency(%q<rdoc>, [">= 3.9.4"])
67
+ s.add_development_dependency(%q<guard>, ["~> 1.2.3"])
68
+ s.add_development_dependency(%q<guard-rspec>, ["~> 1.1.0"])
69
+ s.add_development_dependency(%q<growl>, [">= 0"])
65
70
  s.add_development_dependency(%q<debugger>, [">= 0"])
66
71
  else
67
72
  s.add_dependency(%q<typhoeus>, [">= 0"])
@@ -70,8 +75,10 @@ Gem::Specification.new do |s|
70
75
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
71
76
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
72
77
  s.add_dependency(%q<simplecov>, [">= 0"])
73
- s.add_dependency(%q<ZenTest>, ["~> 4.6.2"])
74
78
  s.add_dependency(%q<rdoc>, [">= 3.9.4"])
79
+ s.add_dependency(%q<guard>, ["~> 1.2.3"])
80
+ s.add_dependency(%q<guard-rspec>, ["~> 1.1.0"])
81
+ s.add_dependency(%q<growl>, [">= 0"])
75
82
  s.add_dependency(%q<debugger>, [">= 0"])
76
83
  end
77
84
  else
@@ -81,8 +88,10 @@ Gem::Specification.new do |s|
81
88
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
82
89
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
83
90
  s.add_dependency(%q<simplecov>, [">= 0"])
84
- s.add_dependency(%q<ZenTest>, ["~> 4.6.2"])
85
91
  s.add_dependency(%q<rdoc>, [">= 3.9.4"])
92
+ s.add_dependency(%q<guard>, ["~> 1.2.3"])
93
+ s.add_dependency(%q<guard-rspec>, ["~> 1.1.0"])
94
+ s.add_dependency(%q<growl>, [">= 0"])
86
95
  s.add_dependency(%q<debugger>, [">= 0"])
87
96
  end
88
97
  end
@@ -0,0 +1,6 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
2
+
3
+ include MarketBot::Android
4
+
5
+ describe SearchQuery do
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: market_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-14 00:00:00.000000000 Z
12
+ date: 2012-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -108,13 +108,29 @@ dependencies:
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  - !ruby/object:Gem::Dependency
111
- name: ZenTest
111
+ name: rdoc
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 3.9.4
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 3.9.4
126
+ - !ruby/object:Gem::Dependency
127
+ name: guard
112
128
  requirement: !ruby/object:Gem::Requirement
113
129
  none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
117
- version: 4.6.2
133
+ version: 1.2.3
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,15 +138,31 @@ dependencies:
122
138
  requirements:
123
139
  - - ~>
124
140
  - !ruby/object:Gem::Version
125
- version: 4.6.2
141
+ version: 1.2.3
126
142
  - !ruby/object:Gem::Dependency
127
- name: rdoc
143
+ name: guard-rspec
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: 1.1.0
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 1.1.0
158
+ - !ruby/object:Gem::Dependency
159
+ name: growl
128
160
  requirement: !ruby/object:Gem::Requirement
129
161
  none: false
130
162
  requirements:
131
163
  - - ! '>='
132
164
  - !ruby/object:Gem::Version
133
- version: 3.9.4
165
+ version: '0'
134
166
  type: :development
135
167
  prerelease: false
136
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +170,7 @@ dependencies:
138
170
  requirements:
139
171
  - - ! '>='
140
172
  - !ruby/object:Gem::Version
141
- version: 3.9.4
173
+ version: '0'
142
174
  - !ruby/object:Gem::Dependency
143
175
  name: debugger
144
176
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +200,7 @@ files:
168
200
  - .rspec
169
201
  - Gemfile
170
202
  - Gemfile.lock
203
+ - Guardfile
171
204
  - LICENSE.txt
172
205
  - NOTES.txt
173
206
  - README.markdown
@@ -177,6 +210,7 @@ files:
177
210
  - lib/market_bot/android/app.rb
178
211
  - lib/market_bot/android/leaderboard.rb
179
212
  - lib/market_bot/android/leaderboard/constants.rb
213
+ - lib/market_bot/android/search_query.rb
180
214
  - market_bot.gemspec
181
215
  - spec/market_bot/android/app_spec.rb
182
216
  - spec/market_bot/android/data/app_1.txt
@@ -188,6 +222,7 @@ files:
188
222
  - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page3.txt
189
223
  - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page4.txt
190
224
  - spec/market_bot/android/leaderboard_spec.rb
225
+ - spec/market_bot/android/search_query_spec.rb
191
226
  - spec/market_bot_spec.rb
192
227
  - spec/spec_helper.rb
193
228
  homepage: http://github.com/chadrem/market_bot
@@ -205,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
240
  version: '0'
206
241
  segments:
207
242
  - 0
208
- hash: -2224645919315098821
243
+ hash: -476793173009451018
209
244
  required_rubygems_version: !ruby/object:Gem::Requirement
210
245
  none: false
211
246
  requirements: