rpaste 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,9 @@
1
- == 0.1.0 / 2008-01-15
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
@@ -1,4 +1,5 @@
1
- == 0.1.0
1
+ == 0.1.1
2
2
 
3
3
  * Add more examples to README.txt.
4
+ * Add support for pastebin.ca.
4
5
 
@@ -28,7 +28,7 @@ module RPaste
28
28
  len = len.to_i
29
29
  end
30
30
 
31
- page = RPaste.open_page(URL,options))
31
+ page = RPaste.open_page(URL,options)
32
32
  rows = page.search('#menu/ul/li')[0...len]
33
33
 
34
34
  metadata = rows.map do |row|
@@ -77,17 +77,17 @@ module RPaste
77
77
  def RPaste.open_uri(uri,options={})
78
78
  headers = {}
79
79
 
80
- if opts[:user_agent_alias]
81
- headers['User-Agent'] = WWW::Mechanize::AGENT_ALIASES[opts[:user_agent_alias]]
82
- elsif opts[:user_agent]
83
- headers['User-Agent'] = opts[: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] || GScraper.proxy)
88
+ proxy = (options[:proxy] || RPaste.proxy)
89
89
  if proxy[:host]
90
- headers[:proxy] = GScraper.proxy_uri(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 opts[:user_agent_alias]
124
- agent.user_agent_alias = opts[: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 = opts[: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] || GScraper.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
@@ -1,3 +1,3 @@
1
1
  module RPaste
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-03-15 00:00:00 -07:00
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.0.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