market_bot 0.6.5 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.5
1
+ 0.7.0
@@ -6,7 +6,7 @@ module MarketBot
6
6
  :category, :installs, :size, :price, :content_rating, :description,
7
7
  :votes, :developer, :more_from_developer, :users_also_installed,
8
8
  :related, :banner_icon_url, :banner_image_url, :website_url, :email,
9
- :youtube_video_ids, :screenshot_urls, :whats_new]
9
+ :youtube_video_ids, :screenshot_urls, :whats_new, :permissions]
10
10
 
11
11
  attr_reader :app_id
12
12
  attr_reader *MARKET_ATTRIBUTES
@@ -118,6 +118,17 @@ module MarketBot
118
118
 
119
119
  result[:whats_new] = doc.css('.doc-whatsnew-container').inner_html
120
120
 
121
+ result[:permissions] = permissions = []
122
+ perm_types = ['dangerous', 'safe']
123
+ perm_types.each do |type|
124
+ doc.css("#doc-permissions-#{type} .doc-permission-group").each do |group_elem|
125
+ title = group_elem.css('.doc-permission-group-title').text
126
+ group_elem.css('.doc-permission-description').each do |desc_elem|
127
+ permissions << { :security => type, :group => title, :description => desc_elem.text }
128
+ end
129
+ end
130
+ end
131
+
121
132
  result
122
133
  end
123
134
 
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.6.5"
8
+ s.version = "0.7.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-07-12"
12
+ s.date = "2012-07-15"
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 = [
@@ -31,6 +31,7 @@ def check_getters(app)
31
31
  app.youtube_video_ids.should == []
32
32
  app.screenshot_urls.should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h230", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h230", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h230", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h230", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h230", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h230"]
33
33
  app.whats_new.should == "<div class=\"doc-permissions\">No recent changes.</div>"
34
+ app.permissions.should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access"}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity"}, {:security=>"safe", :group=>"Network communication", :description=>"view network state"}]
34
35
  end
35
36
  end
36
37
 
@@ -75,6 +76,7 @@ describe 'App' do
75
76
  result[:youtube_video_ids].should == []
76
77
  result[:screenshot_urls].should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h230", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h230", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h230", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h230", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h230", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h230"]
77
78
  result[:whats_new].should == "<div class=\"doc-permissions\">No recent changes.</div>"
79
+ result[:permissions].should == [{:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access"}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity"}, {:security=>"safe", :group=>"Network communication", :description=>"view network state"}]
78
80
 
79
81
  result
80
82
  end
@@ -102,6 +104,7 @@ describe 'App' do
102
104
  result[:youtube_video_ids].should == ['Ag_IGEgAa9M']
103
105
  result[:screenshot_urls].should == ["https://lh3.ggpht.com/Q_vPAtKVUefD3znGi_8AnK3FHDf8XsegMnVrX2sImaFLKXOC__MWKXW2WY1avhlvF_aK=h230", "https://lh6.ggpht.com/nbz5tSvuuydrcQ5kl2PpaFuPBrEgXRPaEXXecLMNXEGVblUlDoTXCRH22GrM2RYFcA=h230", "https://lh3.ggpht.com/Oi0lpkA23XsHjg_cXyXkOaRtNw84_OR_YtzhZUCe8VhWRej8oCT28I0VD8Z5ixSuCyM=h230", "https://lh4.ggpht.com/EfNdIkRr5T0JQQlvPICl6m3gHCDBEnsMxqZMrXb0qMW9xBQCN10PaPdrKVI-07XzsXs=h230", "https://lh4.ggpht.com/Q4BDQRkuvHMglh5I0aG56Yy_29NnBWxXWTqkv21onHM41pnrHoLnkacQFmqr6SVtuUR4=h230", "https://lh3.ggpht.com/Uf4MqnyMPVEFATlkutnXVyBtUQEkJbBLQREXbBI633wHAeBxhAc2-XSuysMM5ZFC7f7j=h230", "https://lh5.ggpht.com/TFSxb_0qi1RcDLI6ezzpB5yYfk8rqYWvDjmE30z6AGdmeVSsmomlmGAW0aT8yCA0jpk0=h230", "https://lh4.ggpht.com/Zeet2wggJms4BpDTglJP0jW9M3EAjpn0zUWNKZk6YKM9Id4SPBID5LtKJAgd-krtXZ8=h230"]
104
106
  result[:whats_new].should == "<p>What's in this version:</p>- Activate menu button in settings/other options. Use it to toggle the action bar.<br>- Performance improvement of list scrolling.<br>- Major other bug fixes and enhancements.<br>"
107
+ result[:permissions].should == [{:security=>"dangerous", :group=>"Hardware controls", :description=>"record audio"}, {:security=>"dangerous", :group=>"Hardware controls", :description=>"take pictures and videos"}, {:security=>"dangerous", :group=>"Your location", :description=>"coarse (network-based) location"}, {:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location"}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access"}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read contact data"}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read sensitive log data"}, {:security=>"dangerous", :group=>"Your personal information", :description=>"read calendar events plus confidential information"}, {:security=>"dangerous", :group=>"Phone calls", :description=>"read phone state and identity"}, {:security=>"dangerous", :group=>"Storage", :description=>"modify/delete USB storage contents modify/delete SD card contents"}, {:security=>"dangerous", :group=>"System tools", :description=>"prevent tablet from sleeping prevent phone from sleeping"}, {:security=>"safe", :group=>"Your accounts", :description=>"discover known accounts"}, {:security=>"safe", :group=>"Hardware controls", :description=>"control vibrator"}, {:security=>"safe", :group=>"Network communication", :description=>"view network state"}, {:security=>"safe", :group=>"Network communication", :description=>"view Wi-Fi state"}, {:security=>"safe", :group=>"Default", :description=>"Market billing service"}]
105
108
  end
106
109
 
107
110
  it 'should populate a hash with the correct keys/values' do
@@ -125,6 +128,7 @@ describe 'App' do
125
128
  result[:email].should == 'kooistar_solutions@hotmail.com'
126
129
  result[:youtube_video_ids].should == []
127
130
  result[:whats_new].should == "<p>What's in this version:</p>1.5.1: Bug fix: Exceptional case is catched now with an failure message + instruction.<br>1.5.2: Bug fix: Remove use of deprecated java funtion + catch null pointer -&gt; Better app<br>Thanks for reporting the bugs!<br>"
131
+ result[:permissions].should == [{:security=>"dangerous", :group=>"Your location", :description=>"fine (GPS) location"}, {:security=>"dangerous", :group=>"Network communication", :description=>"full Internet access"}, {:security=>"safe", :group=>"Network communication", :description=>"view network state"}]
128
132
  end
129
133
 
130
134
  it 'should populate the associated apps keys' do
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.6.5
4
+ version: 0.7.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-07-12 00:00:00.000000000 Z
12
+ date: 2012-07-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  segments:
242
242
  - 0
243
- hash: 765866222599710825
243
+ hash: -2745724380158873693
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  none: false
246
246
  requirements: