1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 30_change_mechanize_modulepath.dpatch by Taku YASUI <tach@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Download/nicovideo.rb trunk/legacy_plugins/Download/nicovideo.rb
9
--- trunk~/legacy_plugins/Download/nicovideo.rb 2009-06-23 21:39:50.000000000 +0900
10
+++ trunk/legacy_plugins/Download/nicovideo.rb 2011-09-11 18:14:08.688832190 +0900
13
def nicovideo(config,data)
14
auth = YAML.load( File.read( config['authfile'] ) )
15
- agent = WWW::Mechanize.new
16
+ agent = Mechanize.new
18
page = agent.post("https://secure.nicovideo.jp/secure/login?site=niconico",
19
{"mail"=>auth["mail"],"password"=>auth["password"]})
20
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Filter/Translations/yahoo.rb trunk/legacy_plugins/Filter/Translations/yahoo.rb
21
--- trunk~/legacy_plugins/Filter/Translations/yahoo.rb 2009-06-23 21:39:50.000000000 +0900
22
+++ trunk/legacy_plugins/Filter/Translations/yahoo.rb 2011-09-11 18:14:08.688832190 +0900
27
- agent = WWW::Mechanize.new
28
+ agent = Mechanize.new
29
start = agent.get("http://honyaku.yahoo.co.jp/")
30
form = start.forms.last
32
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Publish/delicious.rb trunk/legacy_plugins/Publish/delicious.rb
33
--- trunk~/legacy_plugins/Publish/delicious.rb 2009-06-23 21:39:50.000000000 +0900
34
+++ trunk/legacy_plugins/Publish/delicious.rb 2011-09-11 18:14:08.688832190 +0900
36
def initialize username, password, proxy=nil
39
- @agent = WWW::Mechanize.new
40
+ @agent = Mechanize.new
41
@agent.basic_auth(@username, @password)
42
if proxy && proxy.is_a?(Hash) && proxy['proxy_addr'] && proxy['proxy_port']
43
@agent.set_proxy(proxy['proxy_addr'], proxy['proxy_port'],
44
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Publish/hatena_diary_writer.rb trunk/legacy_plugins/Publish/hatena_diary_writer.rb
45
--- trunk~/legacy_plugins/Publish/hatena_diary_writer.rb 2009-06-23 21:39:50.000000000 +0900
46
+++ trunk/legacy_plugins/Publish/hatena_diary_writer.rb 2011-09-11 18:14:08.688832190 +0900
48
def initialize(id,password)
51
- @agent = WWW::Mechanize.new
52
+ @agent = Mechanize.new
53
if proxy = ENV['HTTP_PROXY']
54
proxy = URI.parse(proxy)
55
@agent.set_proxy(proxy.host, proxy.port)
56
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Publish/mixi_diary_writer.rb trunk/legacy_plugins/Publish/mixi_diary_writer.rb
57
--- trunk~/legacy_plugins/Publish/mixi_diary_writer.rb 2009-06-23 21:39:50.000000000 +0900
58
+++ trunk/legacy_plugins/Publish/mixi_diary_writer.rb 2011-09-11 18:14:08.688832190 +0900
63
- @agent = WWW::Mechanize.new
64
+ @agent = Mechanize.new
67
def login username=@username, password=@password
68
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/legacy_plugins/Publish/scuttle.rb trunk/legacy_plugins/Publish/scuttle.rb
69
--- trunk~/legacy_plugins/Publish/scuttle.rb 2009-06-23 21:39:50.000000000 +0900
70
+++ trunk/legacy_plugins/Publish/scuttle.rb 2011-09-11 18:14:08.688832190 +0900
72
@post_url = url + 'api/posts/add?'
75
- @agent = WWW::Mechanize.new
76
+ @agent = Mechanize.new
77
@agent.basic_auth(@username, @password)
78
if proxy && proxy.is_a?(Hash) && proxy['proxy_addr'] && proxy['proxy_port']
79
@agent.set_proxy(proxy['proxy_addr'], proxy['proxy_port'],
80
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/lib/yapra/plugin/mechanize_base.rb trunk/lib/yapra/plugin/mechanize_base.rb
81
--- trunk~/lib/yapra/plugin/mechanize_base.rb 2009-06-23 21:39:50.000000000 +0900
82
+++ trunk/lib/yapra/plugin/mechanize_base.rb 2011-09-11 18:14:08.692832251 +0900
85
class Yapra::Plugin::MechanizeBase < Yapra::Plugin::Base
87
- pipeline.context['mechanize_agent'] ||= WWW::Mechanize.new
88
+ pipeline.context['mechanize_agent'] ||= Mechanize.new
89
pipeline.context['mechanize_agent']