rpaste 0.1.0 → 0.1.1
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/History.txt +6 -1
- data/TODO.txt +2 -1
- data/lib/rpaste/pastebin/recent.rb +1 -1
- data/lib/rpaste/rpaste.rb +10 -10
- data/lib/rpaste/version.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
== 0.1.
|
1
|
+
== 0.1.1 / 2008-04-21
|
2
|
+
|
3
|
+
* Fixed typo in rpaste/pastebin.rb.
|
4
|
+
* Fixed typos in rpaste/rpaste.rb
|
5
|
+
|
6
|
+
== 0.1.0 / 2008-03-15
|
2
7
|
|
3
8
|
* Renamed RPaste.http_agent to RPaste.web_agent.
|
4
9
|
* Added RPaste.proxy to provide proxy settings for RPaste.open_uri and
|
data/TODO.txt
CHANGED
data/lib/rpaste/rpaste.rb
CHANGED
@@ -77,17 +77,17 @@ module RPaste
|
|
77
77
|
def RPaste.open_uri(uri,options={})
|
78
78
|
headers = {}
|
79
79
|
|
80
|
-
if
|
81
|
-
headers['User-Agent'] =
|
82
|
-
elsif
|
83
|
-
headers['User-Agent'] =
|
80
|
+
if options[:user_agent_alias]
|
81
|
+
headers['User-Agent'] = RPaste.user_agent_aliases[options[:user_agent_alias]]
|
82
|
+
elsif options[:user_agent]
|
83
|
+
headers['User-Agent'] = options[:user_agent]
|
84
84
|
elsif RPaste.user_agent
|
85
85
|
headers['User-Agent'] = RPaste.user_agent
|
86
86
|
end
|
87
87
|
|
88
|
-
proxy = (options[:proxy] ||
|
88
|
+
proxy = (options[:proxy] || RPaste.proxy)
|
89
89
|
if proxy[:host]
|
90
|
-
headers[:proxy] =
|
90
|
+
headers[:proxy] = RPaste.proxy_uri(proxy)
|
91
91
|
end
|
92
92
|
|
93
93
|
return Kernel.open(uri,headers)
|
@@ -120,15 +120,15 @@ module RPaste
|
|
120
120
|
def RPaste.web_agent(options={})
|
121
121
|
agent = WWW::Mechanize.new
|
122
122
|
|
123
|
-
if
|
124
|
-
agent.user_agent_alias =
|
123
|
+
if options[:user_agent_alias]
|
124
|
+
agent.user_agent_alias = options[:user_agent_alias]
|
125
125
|
elsif opts[:user_agent]
|
126
|
-
agent.user_agent =
|
126
|
+
agent.user_agent = options[:user_agent]
|
127
127
|
elsif RPaste.user_agent
|
128
128
|
agent.user_agent = RPaste.user_agent
|
129
129
|
end
|
130
130
|
|
131
|
-
proxy = (options[:proxy] ||
|
131
|
+
proxy = (options[:proxy] || RPaste.proxy)
|
132
132
|
if proxy[:host]
|
133
133
|
agent.set_proxy(proxy[:host],proxy[:port],proxy[:user],proxy[:password])
|
134
134
|
end
|
data/lib/rpaste/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpaste
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern Modulus III
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-04-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements: []
|
101
101
|
|
102
102
|
rubyforge_project: rpaste
|
103
|
-
rubygems_version: 1.
|
103
|
+
rubygems_version: 1.1.1
|
104
104
|
signing_key:
|
105
105
|
specification_version: 2
|
106
106
|
summary: RPaste provides access to many of the online paste services
|