rwikibot 1.0.1 → 1.0.2
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/CHANGELOG +5 -0
- data/lib/rwikibot.rb +3 -3
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
RWikiBot ChangeLog
|
2
2
|
|
3
|
+
1.0.2
|
4
|
+
- Changed initialize to ask for a configuration to use, defaulting to 'default'
|
5
|
+
- Modified config.yaml to prompt for wikidbprefix, which is the cookie identifier.
|
6
|
+
- PATCH: Changed bake to search use wikidbprefix in cookie name.
|
7
|
+
|
3
8
|
1.0.1
|
4
9
|
- Added very basic error handing around the MAKE_REQUEST method since MediaWiki returns invalid YAML
|
5
10
|
- Fixed login method to accept domain value
|
data/lib/rwikibot.rb
CHANGED
@@ -26,7 +26,7 @@ class RWikiBot
|
|
26
26
|
# New bots hope for three attributes, but require none. The first is simply the name of the bot for logging purposes. The second is the debug level constant, and third is the logfile.
|
27
27
|
#
|
28
28
|
# Example: bot = RWikiBot.new("My Neat Bot", Logger::DEBUG, "./rwikibot.log")
|
29
|
-
def initialize (name = "Unnamed Bot", debuglevel = Logger::INFO, log_location = "./rwikibot.log" )
|
29
|
+
def initialize (name = "Unnamed Bot", config = 'default', debuglevel = Logger::INFO, log_location = "./rwikibot.log" )
|
30
30
|
|
31
31
|
@botname = name
|
32
32
|
|
@@ -41,7 +41,7 @@ class RWikiBot
|
|
41
41
|
# Load the configuration!! (saved the file based, because I liked it too much.)
|
42
42
|
@wikibotlogger.debug "Loading configuration..."
|
43
43
|
config_file = YAML.load_file('config.yaml')
|
44
|
-
use_config =
|
44
|
+
use_config = config
|
45
45
|
@wikibotlogger.debug "Config loaded. Using settings: #{use_config}"
|
46
46
|
|
47
47
|
#now, the hash that will hold the config options
|
@@ -497,7 +497,7 @@ class RWikiBot
|
|
497
497
|
# wikidb_wiki_UserID wikidb_wiki_UserName wikidb_wiki_Token
|
498
498
|
|
499
499
|
if cookie != nil
|
500
|
-
return "#{dough.fetch('
|
500
|
+
return "#{dough.fetch(@config.fetch('wikidbprefix')+'UserID')}; #{dough.fetch(@config.fetch('wikidbprefix')+'UserName')}; #{dough.fetch(@config.fetch('wikidbprefix')+'Token')}"
|
501
501
|
else
|
502
502
|
return ""
|
503
503
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rwikibot
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-02-
|
6
|
+
version: 1.0.2
|
7
|
+
date: 2007-02-28 00:00:00 -06:00
|
8
8
|
summary: A library for creating MediaWiki bots.
|
9
9
|
require_paths:
|
10
10
|
- lib
|