repsheet_visualizer 0.1.2 → 0.1.3

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.
@@ -38,6 +38,10 @@ class RepsheetVisualizer < Sinatra::Base
38
38
  defined?(settings.mount) ? (settings.mount + "/") : "/"
39
39
  end
40
40
 
41
+ def redis_expiry
42
+ defined?(settings.redis_expiry) ? (settings.redis_expiry) : (24 * 60 * 60)
43
+ end
44
+
41
45
  # TODO: These methods should get moved out to another place
42
46
  def summary(connection)
43
47
  suspects = {}
@@ -124,6 +128,7 @@ class RepsheetVisualizer < Sinatra::Base
124
128
  connection.set("#{params[:ip]}:repsheet:blacklist", "false")
125
129
  else
126
130
  connection.set("#{params[:ip]}:repsheet:blacklist", "true")
131
+ connection.expire("#{params[:ip]}:repsheet:blacklist", redis_expiry)
127
132
  end
128
133
  redirect back
129
134
  end
@@ -1,3 +1,3 @@
1
1
  module RepsheetVisualizer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repsheet_visualizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-12 00:00:00.000000000 Z
12
+ date: 2013-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: geoip