market_bot 0.8.1 → 0.8.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.
- data/VERSION +1 -1
- data/lib/market_bot/android/app.rb +4 -3
- data/lib/market_bot/android/developer.rb +1 -1
- data/lib/market_bot/android/leaderboard.rb +6 -5
- data/lib/market_bot/android/search_query.rb +1 -1
- data/market_bot.gemspec +3 -3
- data/spec/market_bot/android/app_spec.rb +8 -8
- data/spec/market_bot/android/data/app_1.txt +23 -23
- data/spec/market_bot/android/data/app_2.txt +23 -23
- data/spec/market_bot/android/data/app_3.txt +23 -23
- data/spec/market_bot/android/data/leaderboard-apps_editors_choice.txt +23 -23
- data/spec/market_bot/android/data/leaderboard-apps_topselling_paid-page1.txt +25 -30
- data/spec/market_bot/android/data/leaderboard-apps_topselling_paid-page2.txt +32 -25
- data/spec/market_bot/android/data/leaderboard-apps_topselling_paid-page3.txt +23 -26
- data/spec/market_bot/android/data/leaderboard-apps_topselling_paid-page4.txt +27 -27
- data/spec/market_bot/android/leaderboard_spec.rb +12 -12
- metadata +4 -4
@@ -15,14 +15,14 @@ def stub_hydra(hydra)
|
|
15
15
|
(0...4).each do |i|
|
16
16
|
start = i * 24
|
17
17
|
response = Typhoeus::Response.new(:code => 200, :headers => '', :body => test_src_pages[i + 1])
|
18
|
-
url = "https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=#{start}&num=24"
|
18
|
+
url = "https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=#{start}&num=24&hl=en"
|
19
19
|
hydra.stub(:get, url).and_return(response)
|
20
20
|
end
|
21
21
|
|
22
22
|
test_src_editors_choice = read_file(File.dirname(__FILE__), 'data', "leaderboard-apps_editors_choice.txt")
|
23
23
|
|
24
24
|
response = Typhoeus::Response.new(:code => 200, :headers => '', :body => test_src_editors_choice)
|
25
|
-
url = "https://play.google.com/store/apps/collection/editors_choice"
|
25
|
+
url = "https://play.google.com/store/apps/collection/editors_choice?hl=en"
|
26
26
|
hydra.stub(:get, url).and_return(response)
|
27
27
|
end
|
28
28
|
|
@@ -39,12 +39,12 @@ def check_results(results)
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'should have the top ranking app with valid details' do
|
42
|
-
results.first[:developer].should == '
|
43
|
-
results.first[:market_id].should == 'com.
|
44
|
-
results.first[:market_url].should == 'https://play.google.com/store/apps/details?id=com.
|
45
|
-
results.first[:price_usd].should == '$
|
46
|
-
results.first[:stars].should == '4.
|
47
|
-
results.first[:title].should == "
|
42
|
+
results.first[:developer].should == 'LevelUp Studio'
|
43
|
+
results.first[:market_id].should == 'com.levelup.beautifulwidgets'
|
44
|
+
results.first[:market_url].should == 'https://play.google.com/store/apps/details?id=com.levelup.beautifulwidgets&hl=en'
|
45
|
+
results.first[:price_usd].should == '$2.79'
|
46
|
+
results.first[:stars].should == '4.4'
|
47
|
+
results.first[:title].should == "Beautiful Widgets"
|
48
48
|
end
|
49
49
|
|
50
50
|
end
|
@@ -74,9 +74,9 @@ describe 'Leaderboard' do
|
|
74
74
|
lb = Leaderboard.new(test_id, test_category)
|
75
75
|
urls = lb.market_urls(:min_page => 1, :max_page => 3)
|
76
76
|
urls.should == [
|
77
|
-
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=0&num=24',
|
78
|
-
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=24&num=24',
|
79
|
-
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=48&num=24'
|
77
|
+
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=0&num=24&hl=en',
|
78
|
+
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=24&num=24&hl=en',
|
79
|
+
'https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=48&num=24&hl=en'
|
80
80
|
]
|
81
81
|
end
|
82
82
|
|
@@ -123,7 +123,7 @@ describe 'Leaderboard' do
|
|
123
123
|
app[:price_usd].should == nil
|
124
124
|
app[:developer].should == 'Vector Unit'
|
125
125
|
app[:market_id].should == 'com.vectorunit.blue'
|
126
|
-
app[:market_url].should == 'https://play.google.com/store/apps/details?id=com.vectorunit.blue'
|
126
|
+
app[:market_url].should == 'https://play.google.com/store/apps/details?id=com.vectorunit.blue&hl=en'
|
127
127
|
end
|
128
128
|
end
|
129
129
|
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.8.
|
4
|
+
version: 0.8.2
|
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-
|
12
|
+
date: 2012-08-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
@@ -241,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
segments:
|
243
243
|
- 0
|
244
|
-
hash:
|
244
|
+
hash: -1852717487623223623
|
245
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
246
|
none: false
|
247
247
|
requirements:
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubyforge_project:
|
253
|
-
rubygems_version: 1.8.
|
253
|
+
rubygems_version: 1.8.24
|
254
254
|
signing_key:
|
255
255
|
specification_version: 3
|
256
256
|
summary: ! 'Market Bot: High performance Ruby scraper for Google''s Android Market'
|