frozen_record 0.27.2 → 0.27.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/frozen_record/base.rb +5 -14
- data/lib/frozen_record/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47909eff31da52e0bf2da2699be17ce81f1aaf6f76bf3f662a63838549153561
|
4
|
+
data.tar.gz: 7878df0dabb556e1820141ffde68bd5ca335665ac2796450563088c3010a1cf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1e7763e9119e0b174f326bf123e9d85114b6e2ec785897bcf07f65c54aaaa87c9f515364d505e2045f400b81fa68ba2d146529388fba1103eff4f47eac73beb
|
7
|
+
data.tar.gz: 86c377e682706a4e39149e90adf47e932e1313b22d632cfcc003d7c3fc8dfad7e155aa2440f60053ee8c48f25ab6fb1e4baae5d331813a148a540c37da7a22a1
|
data/CHANGELOG.md
CHANGED
data/lib/frozen_record/base.rb
CHANGED
@@ -80,13 +80,6 @@ module FrozenRecord
|
|
80
80
|
set_primary_key(-primary_key.to_s)
|
81
81
|
end
|
82
82
|
|
83
|
-
alias_method :set_base_path, :base_path=
|
84
|
-
private :set_base_path
|
85
|
-
def base_path=(base_path)
|
86
|
-
@file_path = nil
|
87
|
-
set_base_path(base_path)
|
88
|
-
end
|
89
|
-
|
90
83
|
attr_accessor :abstract_class
|
91
84
|
|
92
85
|
def attributes
|
@@ -115,13 +108,11 @@ module FrozenRecord
|
|
115
108
|
|
116
109
|
def file_path
|
117
110
|
raise ArgumentError, "You must define `#{name}.base_path`" unless base_path
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
file_path
|
124
|
-
end
|
111
|
+
file_path = File.join(base_path, backend.filename(name))
|
112
|
+
if !File.exist?(file_path) && File.exist?("#{file_path}.erb")
|
113
|
+
"#{file_path}.erb"
|
114
|
+
else
|
115
|
+
file_path
|
125
116
|
end
|
126
117
|
end
|
127
118
|
|
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.27.
|
4
|
+
version: 0.27.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.5.
|
128
|
+
rubygems_version: 3.5.17
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: ActiveRecord like interface to read only access and query static YAML files
|