rpush_webui 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rpush_webui +1 -1
- data/lib/models/notifications.rb +3 -3
- data/lib/rpush_webui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cfa262d5a7e0dd4280c2aabd48dbbf87a2dbfb6
|
4
|
+
data.tar.gz: 916ba67878020e414c788b5c24d81dfdccdb8681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90ce4b94ec65c79a3c55f607daf0198d2c21ca7f12e904d6325c66c1faae46cd795a6dbb7f5fba83a1ca09270db72eff85d62b28e9ef630484616dec83d66082
|
7
|
+
data.tar.gz: 66f0dbf6f1c72a71693d136d6f4cf748d71284995857397a9d5a05b434769afd8c3331d33b47918cd3cfaa8eaaac8b000156d1ba6aeaf082a4d67d1d62cbc3f5
|
data/bin/rpush_webui
CHANGED
data/lib/models/notifications.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rpush'
|
2
|
-
|
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
|
data/lib/rpush_webui/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|