market_bot 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,6 @@ include MarketBot::Android
5
5
  test_id = :topselling_paid
6
6
  test_category = :arcade
7
7
 
8
-
9
8
  def stub_hydra(hydra)
10
9
  test_src_pages = []
11
10
  (1..4).each do |page|
@@ -16,14 +15,14 @@ def stub_hydra(hydra)
16
15
  start = i * 24
17
16
  response = Typhoeus::Response.new(:code => 200, :headers => '', :body => test_src_pages[i + 1])
18
17
  url = "https://play.google.com/store/apps/category/ARCADE/collection/topselling_paid?start=#{start}&num=24&hl=en"
19
- hydra.stub(:get, url).and_return(response)
18
+ Typhoeus.stub(url).and_return(response)
20
19
  end
21
20
 
22
21
  test_src_editors_choice = read_file(File.dirname(__FILE__), 'data', "leaderboard-apps_editors_choice.txt")
23
22
 
24
23
  response = Typhoeus::Response.new(:code => 200, :headers => '', :body => test_src_editors_choice)
25
24
  url = "https://play.google.com/store/apps/collection/editors_choice?hl=en"
26
- hydra.stub(:get, url).and_return(response)
25
+ Typhoeus.stub(url).and_return(response)
27
26
  end
28
27
 
29
28
  def check_results(results)
@@ -39,12 +38,12 @@ def check_results(results)
39
38
  end
40
39
 
41
40
  it 'should have the top ranking app with valid details' do
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"
41
+ results.first[:developer].should == 'Mojang'
42
+ results.first[:market_id].should == 'com.mojang.minecraftpe'
43
+ results.first[:market_url].should == 'https://play.google.com/store/apps/details?id=com.mojang.minecraftpe&hl=en'
44
+ results.first[:price_usd].should == '$6.99'
45
+ results.first[:stars].should == '4.5'
46
+ results.first[:title].should == "Minecraft - Pocket Edition"
48
47
  end
49
48
 
50
49
  end
@@ -115,15 +114,15 @@ describe 'Leaderboard' do
115
114
  lb = Leaderboard.new('editors_choice', nil, :hydra => hydra)
116
115
  lb.update
117
116
 
118
- lb.results.count.should == 42
117
+ lb.results.count.should == 45
119
118
 
120
119
  app = lb.results.last
121
120
 
122
- app[:title].should == 'Riptide GP'
123
- app[:price_usd].should == nil
124
- app[:developer].should == 'Vector Unit'
125
- app[:market_id].should == 'com.vectorunit.blue'
126
- app[:market_url].should == 'https://play.google.com/store/apps/details?id=com.vectorunit.blue&hl=en'
121
+ app[:title].should == 'Kingdom Rush'
122
+ app[:price_usd].should == "$1.99"
123
+ app[:developer].should == 'Ironhide Game Studio'
124
+ app[:market_id].should == 'com.ironhidegames.android.kingdomrush'
125
+ app[:market_url].should == 'https://play.google.com/store/apps/details?id=com.ironhidegames.android.kingdomrush&hl=en'
127
126
  end
128
127
  end
129
128
  end
data/spec/spec_helper.rb CHANGED
@@ -7,8 +7,11 @@ begin
7
7
  rescue Exception => e
8
8
  end
9
9
 
10
- require 'simplecov'
11
- SimpleCov.start
10
+ begin
11
+ require 'simplecov'
12
+ SimpleCov.start
13
+ rescue Exception => e
14
+ end
12
15
 
13
16
  require 'market_bot'
14
17
 
@@ -16,10 +19,7 @@ require 'market_bot'
16
19
  # in ./support/ and its subdirectories.
17
20
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
18
21
 
19
- Typhoeus::Hydra.allow_net_connect = false
20
-
21
22
  RSpec.configure do |config|
22
-
23
23
  end
24
24
 
25
25
  def read_file(*path)
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: market_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Remesch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-19 00:00:00.000000000 Z
11
+ date: 2013-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.2
19
+ version: 0.6.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.2
26
+ version: 0.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,153 +42,40 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.8.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.8.0
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 1.3.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: 1.3.0
69
- - !ruby/object:Gem::Dependency
70
- name: jeweler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: 1.8.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ~>
81
- - !ruby/object:Gem::Version
82
- version: 1.8.0
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rdoc
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
102
- - !ruby/object:Gem::Version
103
- version: 3.9.4
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '>='
109
- - !ruby/object:Gem::Version
110
- version: 3.9.4
111
- - !ruby/object:Gem::Dependency
112
- name: guard
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: 1.2.3
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ~>
123
- - !ruby/object:Gem::Version
124
- version: 1.2.3
125
- - !ruby/object:Gem::Dependency
126
- name: guard-rspec
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ~>
130
- - !ruby/object:Gem::Version
131
- version: 1.1.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ~>
137
- - !ruby/object:Gem::Version
138
- version: 1.1.0
139
- - !ruby/object:Gem::Dependency
140
- name: growl
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '>='
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '>='
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: debugger
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - '>='
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - '>='
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
55
  description: Market Bot is a high performance Ruby scraper for Google's Android Market
168
56
  with a simple to use API. It is built on top of Nokogiri and Typhoeus.
169
- email: chad@remesch.com
57
+ email:
58
+ - chad@remesch.com
170
59
  executables: []
171
60
  extensions: []
172
- extra_rdoc_files:
173
- - LICENSE.txt
174
- - README.markdown
61
+ extra_rdoc_files: []
175
62
  files:
176
- - .document
63
+ - .gitignore
177
64
  - .rspec
65
+ - .ruby-version
178
66
  - Gemfile
179
67
  - Gemfile.lock
180
- - Guardfile
181
68
  - LICENSE.txt
182
69
  - NOTES.txt
183
70
  - README.markdown
184
71
  - Rakefile
185
- - VERSION
186
72
  - lib/market_bot.rb
187
73
  - lib/market_bot/android/app.rb
188
74
  - lib/market_bot/android/developer.rb
189
75
  - lib/market_bot/android/leaderboard.rb
190
76
  - lib/market_bot/android/leaderboard/constants.rb
191
77
  - lib/market_bot/android/search_query.rb
78
+ - lib/market_bot/version.rb
192
79
  - market_bot.gemspec
193
80
  - spec/market_bot/android/app_spec.rb
194
81
  - spec/market_bot/android/data/app_1.txt
@@ -203,9 +90,8 @@ files:
203
90
  - spec/market_bot/android/search_query_spec.rb
204
91
  - spec/market_bot_spec.rb
205
92
  - spec/spec_helper.rb
206
- homepage: http://github.com/chadrem/market_bot
207
- licenses:
208
- - MIT
93
+ homepage: https://github.com/chadrem/market_bot
94
+ licenses: []
209
95
  metadata: {}
210
96
  post_install_message:
211
97
  rdoc_options: []
@@ -227,4 +113,17 @@ rubygems_version: 2.0.3
227
113
  signing_key:
228
114
  specification_version: 4
229
115
  summary: 'Market Bot: High performance Ruby scraper for Google''s Android Market'
230
- test_files: []
116
+ test_files:
117
+ - spec/market_bot/android/app_spec.rb
118
+ - spec/market_bot/android/data/app_1.txt
119
+ - spec/market_bot/android/data/app_2.txt
120
+ - spec/market_bot/android/data/app_3.txt
121
+ - spec/market_bot/android/data/leaderboard-apps_editors_choice.txt
122
+ - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page1.txt
123
+ - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page2.txt
124
+ - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page3.txt
125
+ - spec/market_bot/android/data/leaderboard-apps_topselling_paid-page4.txt
126
+ - spec/market_bot/android/leaderboard_spec.rb
127
+ - spec/market_bot/android/search_query_spec.rb
128
+ - spec/market_bot_spec.rb
129
+ - spec/spec_helper.rb
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/Guardfile DELETED
@@ -1,5 +0,0 @@
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/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.10.0