aptible-rails 0.7.2 → 0.7.3

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: 4ab64a587b3019a9a2cc4aeb8b9c3a27c9952af8
4
- data.tar.gz: c8abbf13ccc72e9cc554afe3f9e42df9336d4da1
3
+ metadata.gz: b0e55195c88c1668fcd44eb7dc1c1fc0cbd23640
4
+ data.tar.gz: 90ee8d7061e80ac3ed29aee01e5e4bc3c1eeec57
5
5
  SHA512:
6
- metadata.gz: 0247572f5d6a0fe5e0e20b8f5d42b2a1b27ce28f669f7f57f828d1c308d9229b28c48eb41c7f6175a13e17d4755bc9aeab881983765462ef453f486d4d7a608e
7
- data.tar.gz: fdb45642f3596d12d1338b9c8c2747a5695b8b9c04a7ab0e4de4dbe3e46a1a789173b59d793630b8f7d9e43c588109427c15ad8e54a306e5b73b61ed3802fc29
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
- object.documents.map { |d| d.links['user'].href }.uniq.count
40
+ valid_documents.map { |d| d.links['user'].href }.uniq.count
41
41
  end
42
42
 
43
43
  def unique_app_count
44
- object.documents.map { |d| d.links['app'].href }.uniq.count
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
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Rails
3
- VERSION = '0.7.2'
3
+ VERSION = '0.7.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery