honeypot 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/honeypot.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{honeypot}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Seamus Abshere"]
12
- s.date = %q{2010-05-13}
12
+ s.date = %q{2010-05-27}
13
13
  s.description = %q{Catch bad guys when they stick their hands in the honey.}
14
14
  s.email = %q{seamus@abshere.net}
15
15
  s.extra_rdoc_files = [
data/lib/honeypot/rack.rb CHANGED
@@ -8,9 +8,10 @@ module Honeypot
8
8
  end
9
9
 
10
10
  def call(env)
11
- session = env['rack.session']
12
- remote_ip = IPAddr.new env['action_dispatch.remote_ip'].to_s
13
- session['honeypot.last_known_remote_ip'] = remote_ip.to_s if remote_ip.public?
11
+ if session = env['rack.session'] and raw_remote_ip = env['action_dispatch.remote_ip']
12
+ remote_ip = IPAddr.new raw_remote_ip.to_s
13
+ session['honeypot.last_known_remote_ip'] = remote_ip.to_s if remote_ip.public?
14
+ end
14
15
  @app.call env
15
16
  end
16
17
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Seamus Abshere
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-13 00:00:00 -04:00
17
+ date: 2010-05-27 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency