seria 1.0.1 → 1.0.2
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 +8 -8
- data/README.md +2 -0
- data/Rakefile +5 -0
- data/lib/seria/version.rb +1 -1
- data/spec/converters_spec.rb +3 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZDZiZWQwY2Q5ODg5ZWZiMWQ5ZjdmZTE1YTZjYTc5NjY3YjM5MTk3Mg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ODRmMGRjOGVjYTI2ZGY5ZGZlOGE1MjFiMjViOTA4YTJhYzQ1NGM3OQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YWU4NzljNzg3NGJlMmMzYzQ1ZTc2ODdhOTEyZWIwMDY3NDgxY2VmM2U1MTY2
|
|
10
|
+
Njc1ZWY2NjAwY2Y2NzZiNzg4YTE1OTFhNzhlNTM4NTBiY2ZkN2NkZDA4Nzcy
|
|
11
|
+
ZjMzOGU1NGY1YWE2NGM1NzY0NDlhZGU3ZWFlMDEzNWI4ZTQ3NzQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NGY5MmU5MTBhM2Q1MjY5MGM1MGI5MDYzZTM3NzUyY2E2NWYyNDI5ZmE0ZTVj
|
|
14
|
+
NjY2MmRhMWY4N2RlMGRhNTAxYTFmMWM5NDI0NmI5ZDAxNGU5MjBhNzg4Mjgz
|
|
15
|
+
NDk0MGIxMTIyZGQxY2IyMDdlMGFlMTMzOGIzNzY4YWM5YzQ5MGI=
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Seria
|
|
2
2
|
|
|
3
|
+
[](http://badge.fury.io/rb/seria)
|
|
4
|
+
|
|
3
5
|
I wrote this gem because I needed to be able to load my ARs with key-value attributes without running migrations,
|
|
4
6
|
in a similar way to [dynamic_attributes](https://github.com/moiristo/dynamic_attributes) gem.
|
|
5
7
|
But I also needed to be able to query the data, so storing it in a JSON wasn't a good enough solution.
|
data/Rakefile
CHANGED
data/lib/seria/version.rb
CHANGED
data/spec/converters_spec.rb
CHANGED
|
@@ -9,9 +9,6 @@ ActiveRecord::Base.establish_connection(
|
|
|
9
9
|
encoding: 'utf8',
|
|
10
10
|
database: ":memory:")
|
|
11
11
|
|
|
12
|
-
class User < ActiveRecord::Base
|
|
13
|
-
include Seria::InfoTableOwner
|
|
14
|
-
end
|
|
15
12
|
Time.zone = "Berlin"
|
|
16
13
|
describe Seria::DefaultConverter do
|
|
17
14
|
|
|
@@ -24,9 +21,9 @@ describe Seria::DefaultConverter do
|
|
|
24
21
|
nil => NilClass,
|
|
25
22
|
"cool" => String,
|
|
26
23
|
Date.yesterday => Date,
|
|
27
|
-
Time.now => Time,
|
|
28
|
-
|
|
29
|
-
Time.zone.now => ActiveSupport::TimeWithZone
|
|
24
|
+
Time.now.round => Time,
|
|
25
|
+
Time.now.round.to_datetime => DateTime,
|
|
26
|
+
#Time.zone.at(Time.now.to_i) => ActiveSupport::TimeWithZone
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
examples.each do |value, klass|
|