package-report 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 683331e40635dcf4c56ba611a6a576b2322a9be1
4
- data.tar.gz: 9a4f5d8def1fbaedc3ba9881f0b8cc62958edfae
3
+ metadata.gz: 5746a3ad415ea46c368b62fe1ef694132b930487
4
+ data.tar.gz: c5fcf47b6e23d31d0588ad181ae90e96a95ab6c1
5
5
  SHA512:
6
- metadata.gz: c0396c455faf0f89a46d94c64a5932764acb9a4a7a5b5041e2787648a9d1bfd6dc43f0f9fdb6bc4eea91907288bbf300e6f8de6dc35770b64d0f911f958b06b5
7
- data.tar.gz: 33db5ae183bdf2997f3b15c89520909ceb03b063c401e880c8c35b0d4b740044c8e95563efe13991c3ed669fba1ed0dd644142eb3ec2fe93c2b3189ca3f4c534
6
+ metadata.gz: dca4826d5549c13865237032a99f06ebcacd60cdad560f9c9cb0be854d4829f8a7ac13ea01da8a45a70b7ec897486526c5cea0dc14591ac42cf1844c5b635d24
7
+ data.tar.gz: 6c2e4499a9d477446b0dba6bb9299b195e5ebcde4ccfae61e9770180c14f61a947f9e3d7d7bc447a5e032d9deeadaa876174b1af823808264d283575c3521a60
@@ -32,7 +32,7 @@ module PackageReport
32
32
  key: ENV["AWS_S3_BUCKET"]
33
33
  })
34
34
  dir.files.create(
35
- key: Time.now.strftime("%Y-%m-%d") + "/" + `hostname`.strip + ".json",
35
+ key: "package-report/" + Time.now.strftime("%Y-%m-%d") + "/" + `hostname`.strip + ".json",
36
36
  body: json
37
37
  )
38
38
  end
@@ -62,7 +62,7 @@ module PackageReport
62
62
 
63
63
  instances = {}
64
64
  dir.files.each do |file|
65
- next unless file.key =~ /#{Time.now.strftime("%Y-%m-%d")}/
65
+ next unless file.key =~ /package-report\/#{Time.now.strftime("%Y-%m-%d")}/
66
66
  next unless file.key =~ /json$/
67
67
  instances[file.key] = JSON.parse file.body
68
68
  end
@@ -72,7 +72,7 @@ module PackageReport
72
72
  html = ERB.new(template_string).result(binding)
73
73
 
74
74
  dir.files.create(
75
- key: "#{Time.now.strftime("%Y-%m-%d")}/index.html",
75
+ key: "package-report/#{Time.now.strftime("%Y-%m-%d")}/index.html",
76
76
  body: html,
77
77
  public: true
78
78
  )
@@ -1,4 +1,4 @@
1
1
  module PackageReport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
4
4
 
@@ -10,8 +10,9 @@
10
10
  font-family: 'Ubuntu', sans-serif;
11
11
  }
12
12
  h2 {
13
+ font-size: 32px;
13
14
  margin-bottom: 5px;
14
- border-bottom: 5px solid #f8f8f8;
15
+ border-bottom: 1px dotted #e0e0e0;
15
16
  }
16
17
  pre {
17
18
  font-family: 'Ubuntu Mono', ;
@@ -19,13 +20,15 @@
19
20
 
20
21
  strong.underline {
21
22
  display: block;
22
- border-bottom: 1px solid #ccc;
23
+ border-bottom: 1px solid #f1f1f1;
23
24
  }
24
25
 
25
26
  .changelog-expand {
26
27
  cursor: pointer;
28
+ color: #cdcdcd;
27
29
  }
28
30
  .urgency-low {
31
+ color: #cecece;
29
32
  }
30
33
  .urgency-medium {
31
34
  color: #e8ca71;
@@ -33,18 +36,34 @@
33
36
  .urgency-high, .urgency-emergency, .urgency-critical {
34
37
  color: #c63617;
35
38
  }
39
+ .current-version {
40
+ float: right;
41
+ font-size: 12px;
42
+ color: #cecece;
43
+ padding-top: 3px;
44
+ }
45
+
46
+ #legend {
47
+ position: absolute;
48
+ top: 3px;
49
+ right: 3px;
50
+ }
36
51
  </style>
37
52
  </head>
38
53
  <body>
54
+ <div id="legend">
55
+ <strong>legend:</strong>
56
+ <i class="fa fa-plus-circle urgency-low"></i> low priority <i class="fa fa-plus-circle urgency-medium"></i> medium priority <i class="fa fa-plus-circle urgency-high"></i> high priority
57
+ </div>
39
58
  <% instances.each do |instance_id, packages| %>
40
- <h2><%= instance_id.sub(".json", "") %></h2>
59
+ <h2><%= instance_id.sub(".json", "").split(/\//).last %></h2>
41
60
  <% packages.each do |pkg_name, pkg_info| %>
42
61
  <div>
43
62
  <strong class="underline">
44
63
  <% unless pkg_info["changelog"].empty? %>
45
64
  <i class="fa fa-plus-circle changelog-expand urgency-<%= pkg_info["changelog"].join.match(/urgency=(\w+)/)[1] %>"></i>
46
65
  <% end %>
47
- <%= pkg_name %>
66
+ <%= pkg_name %> <span class="current-version"><%= pkg_info["current_version"] %> -> <%= pkg_info["latest_version"] %></span>
48
67
  </strong>
49
68
  <pre style="display: none;"><%= pkg_info["changelog"].join.gsub("\n", "<br>") %></pre>
50
69
  </div>
@@ -56,6 +75,8 @@
56
75
  $(".changelog-expand").click(function(e) {
57
76
  var self = $(this);
58
77
  self.parent().parent().find("pre").toggle();
78
+ self.toggleClass("fa-plus-circle");
79
+ self.toggleClass("fa-minus-circle");
59
80
  });
60
81
  });
61
82
  </script>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: package-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Racer