truthy_date 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/truthy_date.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4acd79eb13e2dd83372bd5e84c9c108d1e875190
|
4
|
+
data.tar.gz: 520c0d9be14115df4e9b6171b2ce46c99204726a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2abb0560b92e69544baac75fc2f9544b0bec0377ea7074a6cd422abbb1c6bf588a86563f5d6a0f02ac75f0829bdf5fb33016b3140ca8d8ca0568137b5d3995c
|
7
|
+
data.tar.gz: 047b7f9a00ff7f8f36ea3d097c5f297c6d7342e802a92fa4c30c6a39f61b5a0c1e383f35502023a6d225974376e29733a56451424266a3511c3068038019c956
|
data/lib/truthy_date.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module TruthyDate
|
2
2
|
def truthy_date(attribute, options)
|
3
|
-
raise ArgumentError, "missing :as for
|
3
|
+
raise ArgumentError, "missing :as for truthy_date" unless options[:as]
|
4
4
|
|
5
5
|
define_method("#{options[:as]}=") do |value|
|
6
6
|
self.send("#{attribute}=", ActiveRecord::ConnectionAdapters::Column.value_to_boolean(value) ? Time.now : nil)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: truthy_date
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Connor
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-02-05 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: Provides getters/setters for when datetimes should also act like booleans
|
14
28
|
email: danconn@danconnor.com
|
15
29
|
executables: []
|