aptible-rails 0.7.2 → 0.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0e55195c88c1668fcd44eb7dc1c1fc0cbd23640
|
4
|
+
data.tar.gz: 90ee8d7061e80ac3ed29aee01e5e4bc3c1eeec57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eee81ccc250b09530d88bb866a11f849b69b4c8b46b149e1588efd2ffe82c3daba8c72cd9e7da8bece5e71006ebbd674adf77e07a0d3085ca3d1b5df72fc830
|
7
|
+
data.tar.gz: 5e8b6e3e3ed4e3f972378ee64c1649186158c4faebd03a25163e9f99e5ce42ec1ff9faf466118080eb2d8fc3b0e17e6bdcfba8c5e2c007ad48165cb8c0682e6c
|
@@ -37,11 +37,15 @@ class CriterionDecorator < ApplicationDecorator
|
|
37
37
|
# rubocop:enable MethodLength
|
38
38
|
|
39
39
|
def unique_user_count
|
40
|
-
|
40
|
+
valid_documents.map { |d| d.links['user'].href }.uniq.count
|
41
41
|
end
|
42
42
|
|
43
43
|
def unique_app_count
|
44
|
-
|
44
|
+
valid_documents.map { |d| d.links['app'].href }.uniq.count
|
45
|
+
end
|
46
|
+
|
47
|
+
def valid_documents
|
48
|
+
object.documents.select { |d| d.expires_at.nil? || d.expires_at > Time.now }
|
45
49
|
end
|
46
50
|
|
47
51
|
def current_document
|