repsheet_visualizer 0.0.4 → 0.0.5

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.
@@ -20,6 +20,10 @@ class RepsheetVisualizer < Sinatra::Base
20
20
  Redis.new(:host => host, :port => port)
21
21
  end
22
22
 
23
+ def mount
24
+ defined?(settings.mount) ? settings.mount : ""
25
+ end
26
+
23
27
  get '/' do
24
28
  redis = redis_connection
25
29
  data = redis.keys("*:requests").map {|d| d.split(":").first}.reject {|ip| ip.empty?}
@@ -30,6 +34,7 @@ class RepsheetVisualizer < Sinatra::Base
30
34
  @actors[actor][:blacklist] = redis.get("#{actor}:repsheet:blacklist")
31
35
  @actors[actor][:detected] = redis.smembers("#{actor}:detected").join(", ")
32
36
  end
37
+ @mount = mount
33
38
  erb :actors
34
39
  end
35
40
 
@@ -37,6 +42,7 @@ class RepsheetVisualizer < Sinatra::Base
37
42
  redis = redis_connection
38
43
  @ip = params[:ip]
39
44
  @activity = redis.lrange("#{@ip}:requests", 0, -1)
45
+ @mount = mount
40
46
  erb :activity
41
47
  end
42
48
 
@@ -47,6 +53,7 @@ class RepsheetVisualizer < Sinatra::Base
47
53
  else
48
54
  redis.set("#{params[:ip]}:repsheet:blacklist", "true")
49
55
  end
56
+ @mount = mount
50
57
  redirect back
51
58
  end
52
59
 
@@ -62,6 +69,7 @@ class RepsheetVisualizer < Sinatra::Base
62
69
  end
63
70
  @aggregate = Hash.new 0
64
71
  @data.each {|ip,data| data["totals"].each {|rule,count| @aggregate[rule] += count.to_i}}
72
+ @mount = mount
65
73
  erb :breakdown
66
74
  end
67
75
  end
@@ -7,10 +7,10 @@
7
7
  <meta name="description" content="">
8
8
  <meta name="author" content="Aaron Bedra">
9
9
 
10
- <link href="css/bootstrap.css" rel="stylesheet">
11
- <link href="css/bootstrap-responsive.css" rel="stylesheet">
10
+ <link href="<%= @mount %>/css/bootstrap.css" rel="stylesheet">
11
+ <link href="<%= @mount %>/css/bootstrap-responsive.css" rel="stylesheet">
12
12
 
13
- <link href="css/blue/style.css" rel="stylesheet">
13
+ <link href="<%= @mount %>/css/blue/style.css" rel="stylesheet">
14
14
  <style>
15
15
  body {
16
16
  padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
@@ -28,9 +28,9 @@
28
28
 
29
29
  <link rel="shortcut icon" href="/images/favicon.ico">
30
30
 
31
- <script src="/javascripts/jquery-latest.js" type="text/javascript"></script>
32
- <script src="/javascripts/jquery.tablesorter.min.js" type="text/javascript"></script>
33
- <script src="/javascripts/application.js" type="text/javascript"></script>
31
+ <script src="<%= @mount %>/javascripts/jquery-latest.js" type="text/javascript"></script>
32
+ <script src="<%= @mount %>/javascripts/jquery.tablesorter.min.js" type="text/javascript"></script>
33
+ <script src="<%= @mount %>/javascripts/application.js" type="text/javascript"></script>
34
34
  </head>
35
35
 
36
36
  <body>
@@ -1,3 +1,3 @@
1
1
  module RepsheetVisualizer
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
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.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: