rpush_webui 0.0.4 → 0.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 032fa026b8756383d13c6679b218f76c03982a18
4
- data.tar.gz: 1779473c22fe9cadfc998950d45da361d4a423b8
3
+ metadata.gz: 1cfa262d5a7e0dd4280c2aabd48dbbf87a2dbfb6
4
+ data.tar.gz: 916ba67878020e414c788b5c24d81dfdccdb8681
5
5
  SHA512:
6
- metadata.gz: 062a222ff5b02f53f6d0134c331905bcc6b11ef6b1c4413d5b942b9ead21d94705f6623264dc4dfe22a9cd2675ec4f4175c7e3560522e23bfccd20030afd3913
7
- data.tar.gz: 7bb9d552a09b0a50799416406eebcee3b4c4e93400e08e9a2b76320e4c173dddf14cf5e3ea27cbf1346a88c47a6ae8462ff577b07b83cc4986bac4c688b8de4d
6
+ metadata.gz: 90ce4b94ec65c79a3c55f607daf0198d2c21ca7f12e904d6325c66c1faae46cd795a6dbb7f5fba83a1ca09270db72eff85d62b28e9ef630484616dec83d66082
7
+ data.tar.gz: 66f0dbf6f1c72a71693d136d6f4cf748d71284995857397a9d5a05b434769afd8c3331d33b47918cd3cfaa8eaaac8b000156d1ba6aeaf082a4d67d1d62cbc3f5
data/bin/rpush_webui CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
3
  begin
4
- require 'rubygems'
5
4
  require 'webui.rb'
5
+ Sinatra::Application.run!
6
6
  end
@@ -1,5 +1,5 @@
1
1
  require 'rpush'
2
- load 'config/rpush.rb'
2
+ require_relative '../../config/rpush'
3
3
 
4
4
  class Hash
5
5
  def map_value
@@ -18,10 +18,10 @@ class Notifications
18
18
 
19
19
  def data
20
20
  fetch = -> a { a['delivered'] ? [true, a['delivered_at']] : [false, a['failed_at']] }
21
- @notifications
22
- .map(&:attributes)
21
+ @notifications.map(&:attributes)
23
22
  .map(&fetch)
24
23
  .select { |_,d| d.to_i >= @start_at.to_i && d.to_i <= @finish_at.to_i }
24
+ .sort_by(&:last)
25
25
  .group_by { |_,d| (d.to_i - @start_at.to_i) / @dt.to_i }
26
26
  .map_value { |g| {true => 0, false => 0}.merge g.group_by(&:first).map_value(&:size) }
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module RpushWebui
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpush_webui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolay Murzin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-18 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler