frozen_record 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/lib/frozen_record/base.rb +1 -5
- data/lib/frozen_record/version.rb +1 -1
- 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: dbd18f511d8e1c4d74d1a6b3ca092e0b88875952
|
4
|
+
data.tar.gz: 294012724b6be40e9cf6315228cadd5608f0528a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6375c4aebad69d87aaed28115e5198dcfa750fb0ed9d43c9b8fd0cc17c1021cd39c0a90bb6bd02fff979d21b846fb3db63a101b80e01fbd9f364de1c371ea30c
|
7
|
+
data.tar.gz: b25b20a098416977d776b5b00e5cd4f4936efd277172d0b6ace8291da094a11f9fcb2753faedd53eea1407b84a4ebc4403b80d347c4a2876f86f7b4de274412a
|
data/README.md
CHANGED
@@ -56,18 +56,18 @@ end
|
|
56
56
|
|
57
57
|
### Custom backends
|
58
58
|
|
59
|
-
A
|
59
|
+
A custom backend must implement the methods `filename` and `load` as follows:
|
60
60
|
|
61
61
|
```ruby
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
62
|
+
module MyCustomBackend
|
63
|
+
extend self
|
64
|
+
|
65
|
+
def filename(model_name)
|
66
|
+
# Returns the file name as a String
|
67
|
+
end
|
68
|
+
|
69
|
+
def load(file_path)
|
70
|
+
# Reads file and returns records as an Array of Hash objects
|
71
71
|
end
|
72
72
|
end
|
73
73
|
```
|
data/lib/frozen_record/base.rb
CHANGED
@@ -79,11 +79,7 @@ module FrozenRecord
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def eager_load!
|
82
|
-
if auto_reloading
|
83
|
-
raise RuntimeError, "There is no point eager loading a FrozenRecord if auto_reloading is enabled!"
|
84
|
-
end
|
85
|
-
|
86
|
-
return if abstract_class?
|
82
|
+
return if auto_reloading || abstract_class?
|
87
83
|
|
88
84
|
load_records
|
89
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frozen_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|