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 +1 -1
- data/lib/vbulletin/search.rb +5 -4
- data/vbulletin.gemspec +1 -1
- metadata +3 -3
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.
|
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')
|
data/lib/vbulletin/search.rb
CHANGED
@@ -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
|
-
|
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=
|
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
|
data/vbulletin.gemspec
CHANGED
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lloyd Pick
|