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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69d17666ac957cc0d3b75d51f49692a41be67947
4
- data.tar.gz: 51214e7c50fae48f90a2bdf586cd351a266f028c
3
+ metadata.gz: dbd18f511d8e1c4d74d1a6b3ca092e0b88875952
4
+ data.tar.gz: 294012724b6be40e9cf6315228cadd5608f0528a
5
5
  SHA512:
6
- metadata.gz: b6ea860e92550663a785be7589fc4740d15ec86ff8b2a42aecdf7d026f76b5fd674993b91d459570458a87130b780a2e054a1a2668864d4b94d0035c52211a1a
7
- data.tar.gz: 5ff4a501f9996fdfc845a6cefad6571614c832fc865f70e5fc18ea4226a2d643aa73d4443c463f4b255f93da86125207ff345382ef571f7f1051d58e4b74123b
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 valid backend must implement two class methods, `filename` and `load`.
59
+ A custom backend must implement the methods `filename` and `load` as follows:
60
60
 
61
61
  ```ruby
62
- class MyCustomBackend
63
- class << self
64
- def filename(model_name)
65
- # Returns the file name as a String
66
- end
67
-
68
- def load(file_path)
69
- # Reads file and returns records as an Array of Hash objects
70
- end
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
  ```
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FrozenRecord
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0'
3
3
  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.10.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-03-26 00:00:00.000000000 Z
11
+ date: 2018-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel