vbulletin 0.0.5 → 0.0.6

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/Rakefile CHANGED
@@ -10,7 +10,7 @@ begin
10
10
  gem.email = "lloydpick@gmail.com"
11
11
  gem.homepage = "http://github.com/lloydpick/vbulletin"
12
12
  gem.authors = ["Lloyd Pick"]
13
- gem.version = '0.0.5'
13
+ gem.version = '0.0.6'
14
14
  gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
15
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
16
  gem.add_dependency('mechanize', '1.0.0')
@@ -6,8 +6,9 @@ module VBulletin
6
6
  @debug = options[:debug] || false
7
7
  end
8
8
 
9
- def find_posts_by_user_id(user_id)
10
- parse_index(@api.construct_full_url("search.php", { 'do' => 'finduser', 'u' => user_id }))
9
+ def find_posts_by_user_id(user_id, options = {})
10
+ @perpage = options[:perpage] || 10
11
+ parse_index(@api.construct_full_url("search.php", { 'do' => 'finduser', 'u' => user_id }), @perpage)
11
12
  end
12
13
 
13
14
  def find_thread_by_post_id(post_id)
@@ -26,9 +27,9 @@ module VBulletin
26
27
  end
27
28
 
28
29
  private
29
- def parse_index(url)
30
+ def parse_index(url, perpage)
30
31
  if (result = @api.mechanize.get(url))
31
- if (result = @api.mechanize.get(result.uri.to_s + "&perpage=2"))
32
+ if (result = @api.mechanize.get(result.uri.to_s + "&perpage=" + perpage.to_s))
32
33
  parse_search_results(result)
33
34
  end
34
35
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{vbulletin}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lloyd Pick"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vbulletin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lloyd Pick