active_regulation 2.2.6 → 2.3.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 +4 -4
- data/lib/active_regulation/expiration.rb +2 -2
- data/lib/active_regulation/version.rb +1 -1
- data/lib/active_regulation.rb +5 -5
- 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: 961ecf4fb714b58775b45d5475d51ebf69bafb12
|
|
4
|
+
data.tar.gz: 98714d22389a98ec1936343a7c427b6292ab02ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc28effffb1cc3423ee1eb3e4a7451ca102c20a0990cfa33f83d84cb4b10bbb58750905db212275ba1d356ac80339708c9bacfe6a103fabef78cf2126421d66c
|
|
7
|
+
data.tar.gz: d3a9203148888f84b303ef725fc7928f4df117b8cba8322d7305ec3e85db29d89b9f18136b2f7b0f94209eb7e7f9d8ff6aaeae8b684be59ba8141beb685a453e
|
|
@@ -5,8 +5,8 @@ module ActiveRegulation
|
|
|
5
5
|
extend ActiveSupport::Concern
|
|
6
6
|
|
|
7
7
|
included do
|
|
8
|
-
scope :expired, -> { where("expires_at IS NULL OR expires_at < ?", Time.now) }
|
|
9
|
-
scope :unexpired, -> { where("expires_at IS NOT NULL AND expires_at >= ?", Time.now) }
|
|
8
|
+
scope :expired, -> { where("expires_at IS NULL OR expires_at < ?".freeze, Time.now) }
|
|
9
|
+
scope :unexpired, -> { where("expires_at IS NOT NULL AND expires_at >= ?".freeze, Time.now) }
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def expire!
|
data/lib/active_regulation.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
3
|
-
require
|
|
4
|
-
require
|
|
5
|
-
require
|
|
1
|
+
require 'active_regulation/version'
|
|
2
|
+
require 'active_regulation/activation'
|
|
3
|
+
require 'active_regulation/containment'
|
|
4
|
+
require 'active_regulation/expiration'
|
|
5
|
+
require 'active_regulation/visibility'
|
|
6
6
|
|
|
7
7
|
if defined?(Rails)
|
|
8
8
|
require 'rails'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_regulation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|