market_bot 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +59 -29
- data/README.markdown +9 -0
- data/VERSION +1 -1
- data/lib/market_bot/android/app.rb +74 -97
- data/lib/market_bot/android/leaderboard.rb +11 -2
- data/lib/market_bot/android/search_query.rb +1 -1
- data/market_bot.gemspec +13 -13
- data/spec/market_bot/android/app_spec.rb +66 -57
- data/spec/market_bot/android/data/app_1.txt +134 -45
- data/spec/market_bot/android/data/app_2.txt +134 -45
- data/spec/market_bot/android/data/app_3.txt +130 -44
- metadata +26 -53
@@ -10,29 +10,32 @@ test_src_data3 = read_file(File.dirname(__FILE__), 'data', 'app_3.txt')
|
|
10
10
|
def check_getters(app)
|
11
11
|
it 'should populate the getters' do
|
12
12
|
app.title.should == 'Pop Dat'
|
13
|
-
app.rating.should == '4.
|
14
|
-
app.updated.should == 'August
|
13
|
+
app.rating.should == '4.6'
|
14
|
+
app.updated.should == 'August 26, 2011'
|
15
15
|
app.current_version.should == '1.0'
|
16
16
|
app.requires_android.should == '2.2 and up'
|
17
17
|
app.category.should == 'Arcade & Action'
|
18
|
-
app.installs.should == '
|
18
|
+
app.installs.should == '500 - 1,000'
|
19
19
|
app.size.should == '9.0M'
|
20
20
|
app.price.should == 'Free'
|
21
21
|
app.content_rating.should == 'Everyone'
|
22
|
-
app.description.should =~
|
23
|
-
app.votes.should == '
|
22
|
+
app.description.should =~ /^<div>An action-packed blend of split-second skill and luck-based gameplay!/
|
23
|
+
app.votes.should == '7'
|
24
24
|
app.more_from_developer.should == [{:app_id=>"com.bluefroggaming.ghost_chicken"}]
|
25
|
-
app.users_also_installed.should == [{:app_id=>"com.
|
26
|
-
app.related.should == [{:app_id=>"com.
|
27
|
-
app.banner_icon_url.should == 'https://lh3.ggpht.com/e6QqjMM9K__moeCm2C5HRb0SmGX0XqzhnhiE1MUx8MdNVdQbQW9rhFX_qmtbtBxHAa0=
|
28
|
-
app.banner_image_url.should == 'https://
|
25
|
+
app.users_also_installed.should == [{:app_id=>"com.coldbeamgames.beathazardultragooglefull"}, {:app_id=>"net.hexage.radiant.hd"}, {:app_id=>"net.hexage.radiant"}, {:app_id=>"com.androkera.brokenscreen"}, {:app_id=>"com.ninjakiwi.bloonstd5"}, {:app_id=>"com.lsgvgames.slideandflyfull"}, {:app_id=>"com.metamoki.Aquapop"}, {:app_id=>"org.lukeallen.bomberfull"}, {:app_id=>"com.fungamesforfree.snipershooter.free"}, {:app_id=>"com.rubicon.dev.glwg"}, {:app_id=>"net.hexage.defense"}, {:app_id=>"com.rubicon.dev.gbwg"}, {:app_id=>"com.ArtInGames.AirAttackHDPart2"}, {:app_id=>"net.hexage.radiant.lite"}, {:app_id=>"com.ecogame.eggshoot"}, {:app_id=>"com.yoyogames.droidtntbf"}]
|
26
|
+
app.related.should == [{:app_id=>"com.coldbeamgames.beathazardultragooglefull"}, {:app_id=>"net.hexage.radiant.hd"}, {:app_id=>"net.hexage.radiant"}, {:app_id=>"com.androkera.brokenscreen"}, {:app_id=>"com.ninjakiwi.bloonstd5"}, {:app_id=>"com.lsgvgames.slideandflyfull"}, {:app_id=>"com.metamoki.Aquapop"}, {:app_id=>"org.lukeallen.bomberfull"}, {:app_id=>"com.fungamesforfree.snipershooter.free"}, {:app_id=>"com.rubicon.dev.glwg"}, {:app_id=>"net.hexage.defense"}, {:app_id=>"com.rubicon.dev.gbwg"}, {:app_id=>"com.ArtInGames.AirAttackHDPart2"}, {:app_id=>"net.hexage.radiant.lite"}, {:app_id=>"com.ecogame.eggshoot"}, {:app_id=>"com.yoyogames.droidtntbf"}]
|
27
|
+
app.banner_icon_url.should == 'https://lh3.ggpht.com/e6QqjMM9K__moeCm2C5HRb0SmGX0XqzhnhiE1MUx8MdNVdQbQW9rhFX_qmtbtBxHAa0=w300'
|
28
|
+
app.banner_image_url.should == 'https://lh3.ggpht.com/e6QqjMM9K__moeCm2C5HRb0SmGX0XqzhnhiE1MUx8MdNVdQbQW9rhFX_qmtbtBxHAa0=w300'
|
29
29
|
app.website_url.should == 'http://bluefroggaming.com'
|
30
30
|
app.email.should == 'support@hdgames.zendesk.com'
|
31
31
|
app.youtube_video_ids.should == []
|
32
|
-
app.screenshot_urls.should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=
|
33
|
-
app.whats_new.should ==
|
34
|
-
app.permissions.should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
35
|
-
|
32
|
+
app.screenshot_urls.should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h310", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h310", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h310", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h310", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h310", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h310"]
|
33
|
+
app.whats_new.should == nil
|
34
|
+
#app.permissions.should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
35
|
+
# Stubbing out for now, can't find them in the redesigned page.
|
36
|
+
app.permissions.should == []
|
37
|
+
|
38
|
+
app.rating_distribution.should == {5=>6, 4=>0, 3=>0, 2=>1, 1=>0}
|
36
39
|
app.html.class.should == String
|
37
40
|
end
|
38
41
|
end
|
@@ -60,26 +63,28 @@ describe 'App' do
|
|
60
63
|
result = App.parse(test_src_data)
|
61
64
|
|
62
65
|
result[:title].should == 'Pop Dat'
|
63
|
-
result[:rating].should == '4.
|
64
|
-
result[:updated].should == 'August
|
66
|
+
result[:rating].should == '4.6'
|
67
|
+
result[:updated].should == 'August 26, 2011'
|
65
68
|
result[:current_version].should == '1.0'
|
66
69
|
result[:requires_android].should == '2.2 and up'
|
67
70
|
result[:category].should == 'Arcade & Action'
|
68
|
-
result[:installs].should == '
|
71
|
+
result[:installs].should == '500 - 1,000'
|
69
72
|
result[:size].should == '9.0M'
|
70
73
|
result[:price].should == 'Free'
|
71
74
|
result[:content_rating].should == 'Everyone'
|
72
|
-
result[:description].should =~
|
73
|
-
result[:votes].should == '
|
75
|
+
result[:description].should =~ /An action-packed blend of split-second/
|
76
|
+
result[:votes].should == '7'
|
74
77
|
result[:developer].should == 'Blue Frog Gaming'
|
75
|
-
result[:banner_icon_url].should == 'https://lh3.ggpht.com/e6QqjMM9K__moeCm2C5HRb0SmGX0XqzhnhiE1MUx8MdNVdQbQW9rhFX_qmtbtBxHAa0=
|
78
|
+
result[:banner_icon_url].should == 'https://lh3.ggpht.com/e6QqjMM9K__moeCm2C5HRb0SmGX0XqzhnhiE1MUx8MdNVdQbQW9rhFX_qmtbtBxHAa0=w300'
|
76
79
|
result[:website_url].should == 'http://bluefroggaming.com'
|
77
80
|
result[:email].should == 'support@hdgames.zendesk.com'
|
78
81
|
result[:youtube_video_ids].should == []
|
79
|
-
result[:screenshot_urls].should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=
|
80
|
-
result[:whats_new].should ==
|
81
|
-
result[:permissions].should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
82
|
-
|
82
|
+
result[:screenshot_urls].should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h310", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h310", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h310", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h310", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h310", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h310"]
|
83
|
+
result[:whats_new].should == nil
|
84
|
+
#result[:permissions].should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
85
|
+
# Stubbing out for now, can't find them in the redesigned page.
|
86
|
+
result[:permissions].should == []
|
87
|
+
result[:rating_distribution].should == {5=>6, 4=>0, 3=>0, 2=>1, 1=>0}
|
83
88
|
result[:html].should == test_src_data
|
84
89
|
|
85
90
|
result
|
@@ -90,52 +95,56 @@ describe 'App' do
|
|
90
95
|
|
91
96
|
result[:title].should == 'Evernote'
|
92
97
|
result[:rating].should == '4.7'
|
93
|
-
result[:updated].should == 'July
|
94
|
-
result[:current_version].should == '
|
95
|
-
result[:requires_android].should == '
|
98
|
+
result[:updated].should == 'July 17, 2013'
|
99
|
+
result[:current_version].should == 'Varies with device'
|
100
|
+
result[:requires_android].should == 'Varies with device'
|
96
101
|
result[:category].should == 'Productivity'
|
97
|
-
result[:size].should == '
|
102
|
+
result[:size].should == 'Varies with device'
|
98
103
|
result[:price].should == 'Free'
|
99
104
|
result[:content_rating].should == 'Low Maturity'
|
100
|
-
result[:description].should =~
|
101
|
-
result[:votes].should == '
|
102
|
-
result[:developer].should == 'Evernote
|
105
|
+
result[:description].should =~ /New York Times/
|
106
|
+
result[:votes].should == '630682'
|
107
|
+
result[:developer].should == 'Evernote Corporation'
|
103
108
|
result[:installs].should == '10,000,000 - 50,000,000'
|
104
|
-
result[:banner_icon_url].should == 'https://
|
105
|
-
result[:banner_image_url].should == 'https://
|
106
|
-
result[:website_url].should == 'http://
|
109
|
+
result[:banner_icon_url].should == 'https://lh3.ggpht.com/si0cgkp2rkVX5JhhBYrtZ4cy2I1hZcrx8aiz-v8MjvPykfhT7-YAM2B8MNi0OCF9AQ=w300'
|
110
|
+
result[:banner_image_url].should == 'https://lh3.ggpht.com/si0cgkp2rkVX5JhhBYrtZ4cy2I1hZcrx8aiz-v8MjvPykfhT7-YAM2B8MNi0OCF9AQ=w300'
|
111
|
+
result[:website_url].should == 'http://evernote.com/privacy/'
|
107
112
|
result[:email].should == nil
|
108
113
|
result[:youtube_video_ids].should == ['Ag_IGEgAa9M']
|
109
|
-
result[:screenshot_urls].should == ["https://lh3.ggpht.com/
|
110
|
-
result[:whats_new].should == "<
|
111
|
-
result[:permissions].should == [{:security=>"dangerous", :group=>"Hardware controls", :description=>"record audio", :description_full=>"Allows the app to access the audio record path."}, {:security=>"dangerous", :group=>"Hardware controls", :description=>"take pictures and videos", :description_full=>"Allows the app to take pictures and videos with the camera. This allows the app at any time to collect images the camera is seeing."}, {:security=>"dangerous", :group=>"Your location", :description=>"coarse (network-based) location", :description_full=>"Access coarse location sources such as the cellular network database to determine an approximate tablet location, where available. Malicious apps may use this to determine approximately where you are. Access coarse location sources such as the cellular network database to determine an approximate phone location, where available. Malicious apps may use this to determine approximately where you are."}, {:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location", :description_full=>"Access fine location sources such as the Global Positioning System on the tablet, where available. Malicious apps may use this to determine where you are, and may consume additional battery power. Access fine location sources such as the Global Positioning System on the phone, where available. Malicious apps may use this to determine where you are, and may consume additional battery power."}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read contact data", :description_full=>"Allows the app to read all of the contact (address) data stored on your tablet. Malicious apps may use this to send your data to other people. Allows the app to read all of the contact (address) data stored on your phone. Malicious apps may use this to send your data to other people."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read sensitive log data", :description_full=>"Allows the app to read from the system's various log files. This allows it to discover general information about what you are doing with the tablet, potentially including personal or private information. Allows the app to read from the system's various log files. This allows it to discover general information about what you are doing with the phone, potentially including personal or private information."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read calendar events plus confidential information", :description_full=>"Allows the app to read all calendar events stored on your tablet, including those of friends or coworkers. Malicious apps may extract personal information from these calendars without the owners' knowledge. Allows the app to read all calendar events stored on your phone, including those of friends or coworkers. Malicious apps may extract personal information from these calendars without the owners' knowledge."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"dangerous", :group=>"Storage", :description=>"modify/delete USB storage contents modify/delete SD card contents", :description_full=>"Allows the app to write to the USB storage. Allows the app to write to the SD card."}, {:security=>"dangerous", :group=>"System tools", :description=>"prevent tablet from sleeping prevent phone from sleeping", :description_full=>"Allows the app to prevent the tablet from going to sleep. Allows the app to prevent the phone from going to sleep."}, {:security=>"safe", :group=>"Your accounts", :description=>"discover known accounts", :description_full=>"Allows the app to get the list of accounts known by the tablet. Allows the app to get the list of accounts known by the phone."}, {:security=>"safe", :group=>"Hardware controls", :description=>"control vibrator", :description_full=>"Allows the app to control the vibrator."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}, {:security=>"safe", :group=>"Network communication", :description=>"view Wi-Fi state", :description_full=>"Allows the app to view the information about the state of Wi-Fi."}, {:security=>"safe", :group=>"Default", :description=>"Market billing service", :description_full=>"Allows the user to purchase items through Market from within this application"}]
|
112
|
-
|
114
|
+
result[:screenshot_urls].should == ["https://lh3.ggpht.com/54lY5NF-Af-oOCyW2JYhysfcFHiaXEgD6vj4PaaMMN9qopDKtgxD5R1Pufp7HErUBw=h310", "https://lh6.ggpht.com/jeIvDqZYde02771R9NHnEoNeNe0ulVk1oBlxCr5ksYx_KRKnhAUbeM1Sg22Wihx6xA=h310", "https://lh3.ggpht.com/YayoH5bQhg1Podr15Uv68daoM2u0v41VNF9LHVDNQ9cyPjUDBcO8byQ-m3jLfXOOdPY=h310", "https://lh5.ggpht.com/_nFgawWYq1g7Ohx88pv5zJCRNVjbw03sS7xgnodYPoyu-dQUTkre1X_kNJuQCdMG7wTt=h310", "https://lh4.ggpht.com/dIckq3oKvXckucvsb4UevalNvZIn19UM7kYT3_7kA7Vz-TTVQDIcN7TxR4GSxdVUmA=h310", "https://lh3.ggpht.com/NIm-_fgTbZJHV6ZN6BXkXBJEceUq98qxJEjeEt-3YXYrDcRmnsZ7v2p9wHFdqxCmdNk=h310", "https://lh6.ggpht.com/DaaxjGhsewYZYys5a4sCLmxQmCmpGlZH37GsUYVjgboCyTBarzhV2nrGbjBIo3jJxOS5=h310", "https://lh3.ggpht.com/fLSWe0AY9ERoT8RIjqnLi_oMX7QWheQ5mlNFX10R4_1nXfNhrniMMKwaOgzQXKKgUQ=h310"]
|
115
|
+
result[:whats_new].should == "<div class=\"details-section-contents show-more-container\"> <div class=\"heading\"> What's New </div> <div class=\"recent-change\">New in Evernote</div>\n<div class=\"recent-change\">- Edit documents saved in Evernote using the OfficeSuite app</div>\n<div class=\"recent-change\">- Mark up attached PDFs with Skitch (Premium feature)</div>\n<div class=\"recent-change\">- Add a new Reminder right from the Reminders list</div>\n<div class=\"recent-change\">- Numerous performance and stability improvements</div>\n<div class=\"recent-change\">This update requires Android version 2.2 or newer</div>\n<div class=\"recent-change\">New in the Evernote Widget</div>\n<div class=\"recent-change\">- View notes in a list</div>\n<div class=\"recent-change\">- View and add Reminders</div>\n<div class=\"recent-change\">- Improved scaling for different screen heights</div>\n<div class=\"recent-change\">- Supports lock screen on Jelly Bean</div>\n<div class=\"recent-change\">This update requires Android version 3.0 or newer</div> <div class=\"show-more-end\"></div> <div> <div class=\"play-button show-more small\"> Read more </div> <div class=\"play-button expand-close\"> <div class=\"close-image\"> </div> </div> </div> </div> <div class=\"details-section-divider\"></div>"
|
116
|
+
#result[:permissions].should == [{:security=>"dangerous", :group=>"Hardware controls", :description=>"record audio", :description_full=>"Allows the app to access the audio record path."}, {:security=>"dangerous", :group=>"Hardware controls", :description=>"take pictures and videos", :description_full=>"Allows the app to take pictures and videos with the camera. This allows the app at any time to collect images the camera is seeing."}, {:security=>"dangerous", :group=>"Your location", :description=>"coarse (network-based) location", :description_full=>"Access coarse location sources such as the cellular network database to determine an approximate tablet location, where available. Malicious apps may use this to determine approximately where you are. Access coarse location sources such as the cellular network database to determine an approximate phone location, where available. Malicious apps may use this to determine approximately where you are."}, {:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location", :description_full=>"Access fine location sources such as the Global Positioning System on the tablet, where available. Malicious apps may use this to determine where you are, and may consume additional battery power. Access fine location sources such as the Global Positioning System on the phone, where available. Malicious apps may use this to determine where you are, and may consume additional battery power."}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read contact data", :description_full=>"Allows the app to read all of the contact (address) data stored on your tablet. Malicious apps may use this to send your data to other people. Allows the app to read all of the contact (address) data stored on your phone. Malicious apps may use this to send your data to other people."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read sensitive log data", :description_full=>"Allows the app to read from the system's various log files. This allows it to discover general information about what you are doing with the tablet, potentially including personal or private information. Allows the app to read from the system's various log files. This allows it to discover general information about what you are doing with the phone, potentially including personal or private information."}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read calendar events plus confidential information", :description_full=>"Allows the app to read all calendar events stored on your tablet, including those of friends or coworkers. Malicious apps may extract personal information from these calendars without the owners' knowledge. Allows the app to read all calendar events stored on your phone, including those of friends or coworkers. Malicious apps may extract personal information from these calendars without the owners' knowledge."}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity", :description_full=>"Allows the app to access the phone features of the device. An app with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like."}, {:security=>"dangerous", :group=>"Storage", :description=>"modify/delete USB storage contents modify/delete SD card contents", :description_full=>"Allows the app to write to the USB storage. Allows the app to write to the SD card."}, {:security=>"dangerous", :group=>"System tools", :description=>"prevent tablet from sleeping prevent phone from sleeping", :description_full=>"Allows the app to prevent the tablet from going to sleep. Allows the app to prevent the phone from going to sleep."}, {:security=>"safe", :group=>"Your accounts", :description=>"discover known accounts", :description_full=>"Allows the app to get the list of accounts known by the tablet. Allows the app to get the list of accounts known by the phone."}, {:security=>"safe", :group=>"Hardware controls", :description=>"control vibrator", :description_full=>"Allows the app to control the vibrator."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}, {:security=>"safe", :group=>"Network communication", :description=>"view Wi-Fi state", :description_full=>"Allows the app to view the information about the state of Wi-Fi."}, {:security=>"safe", :group=>"Default", :description=>"Market billing service", :description_full=>"Allows the user to purchase items through Market from within this application"}]
|
117
|
+
# Stubbing out for now, can't find them in the redesigned page.
|
118
|
+
result[:permissions].should == []
|
119
|
+
result[:rating_distribution].should == {5=>477, 4=>126, 3=>15, 2=>3, 1=>7}
|
113
120
|
result[:html].should == test_src_data2
|
114
121
|
end
|
115
122
|
|
116
123
|
it 'should populate a hash with the correct keys/values' do
|
117
124
|
result = App.parse(test_src_data3)
|
118
125
|
|
119
|
-
result[:title].should == '
|
120
|
-
result[:updated].should == '
|
121
|
-
result[:current_version].should == '
|
122
|
-
result[:requires_android].should == '2.
|
126
|
+
result[:title].should == 'WeatherPro'
|
127
|
+
result[:updated].should == 'June 27, 2013'
|
128
|
+
result[:current_version].should == '2.5'
|
129
|
+
result[:requires_android].should == '2.1 and up'
|
123
130
|
result[:category].should == 'Weather'
|
124
|
-
result[:size].should == '
|
125
|
-
result[:price].should == '$
|
131
|
+
result[:size].should == '5.4M'
|
132
|
+
result[:price].should == '$2.99'
|
126
133
|
result[:content_rating].should == 'Low Maturity'
|
127
|
-
result[:description].should =~
|
128
|
-
result[:developer].should == '
|
129
|
-
result[:rating].should ==
|
130
|
-
result[:votes].should ==
|
131
|
-
result[:banner_icon_url].should == 'https://
|
132
|
-
result[:banner_image_url].should ==
|
133
|
-
result[:website_url].should == 'http://www.
|
134
|
-
result[:email].should == '
|
134
|
+
result[:description].should =~ /^<div>\"WeatherPro answers the question - what's the best Android Weather/
|
135
|
+
result[:developer].should == 'MeteoGroup'
|
136
|
+
result[:rating].should == "4.4"
|
137
|
+
result[:votes].should == "17504"
|
138
|
+
result[:banner_icon_url].should == 'https://lh4.ggpht.com/kYFmcFWBWg_XfhKTk7WaXk9y4JNO2mIe3TkT6MqR-mjoiNgy8zj-EZY6ADjJBKKA=w300-rw'
|
139
|
+
result[:banner_image_url].should == 'https://lh4.ggpht.com/kYFmcFWBWg_XfhKTk7WaXk9y4JNO2mIe3TkT6MqR-mjoiNgy8zj-EZY6ADjJBKKA=w300-rw'
|
140
|
+
result[:website_url].should == 'http://www.weatherpro.eu/privacy-policy.html'
|
141
|
+
result[:email].should == 'support@android.weatherpro.de'
|
135
142
|
result[:youtube_video_ids].should == []
|
136
|
-
result[:whats_new].should
|
137
|
-
result[:permissions].should == [{:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location", :description_full=>"Access fine location sources such as the Global Positioning System on the tablet, where available. Malicious apps may use this to determine where you are, and may consume additional battery power. Access fine location sources such as the Global Positioning System on the phone, where available. Malicious apps may use this to determine where you are, and may consume additional battery power."}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
138
|
-
|
143
|
+
result[:whats_new].should =~ /Connect to MeteoEarth/
|
144
|
+
#result[:permissions].should == [{:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location", :description_full=>"Access fine location sources such as the Global Positioning System on the tablet, where available. Malicious apps may use this to determine where you are, and may consume additional battery power. Access fine location sources such as the Global Positioning System on the phone, where available. Malicious apps may use this to determine where you are, and may consume additional battery power."}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access", :description_full=>"Allows the app to create network sockets."}, {:security=>"safe", :group=>"Network communication", :description=>"view network state", :description_full=>"Allows the app to view the state of all networks."}]
|
145
|
+
# Stubbing out for now, can't find them in the redesigned page.
|
146
|
+
result[:permissions].should == []
|
147
|
+
result[:rating_distribution].should == {1=>782, 2=>361, 3=>893, 4=>4, 5=>10}
|
139
148
|
result[:html].should == test_src_data3
|
140
149
|
end
|
141
150
|
|
@@ -146,9 +155,9 @@ describe 'App' do
|
|
146
155
|
result[:users_also_installed].should be_a(Array)
|
147
156
|
result[:more_from_developer].should be_a(Array)
|
148
157
|
|
149
|
-
result[:related].first[:app_id].should == 'com.
|
150
|
-
result[:users_also_installed].first[:app_id].should == 'com.
|
151
|
-
result[:more_from_developer].first[:app_id].should == 'com.evernote.
|
158
|
+
result[:related].first[:app_id].should == 'com.evernote.world'
|
159
|
+
result[:users_also_installed].first[:app_id].should == 'com.evernote.world'
|
160
|
+
result[:more_from_developer].first[:app_id].should == 'com.evernote.widget'
|
152
161
|
end
|
153
162
|
end
|
154
163
|
|