remote_record 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/remote_record/reference.rb +2 -6
- data/lib/remote_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7765ca1ef981febac5cb796f25203655e7bc65db3318ecab7e7c9138ea370d4e
|
4
|
+
data.tar.gz: b5c1ab022c1365735a330badabba5210f0257e01b36f8cdcb6cee27b2608b7a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d8d8b689a9aeedd624614b538f33f938ee781a9650c8b2f6398536e743d1d2a9cf9560c1ff9c42bfe99e94edb49cb12cf4f80e2d747ace4796cc2281dc22d4
|
7
|
+
data.tar.gz: dd15eabee7819098bd6633b08935793943b6336a9bf1d24c9a2f15ec40b884d97b946e4c00a9ec98c665e733dbc770c37b91486578921c03e5d7653eae8d5905
|
@@ -30,6 +30,7 @@ module RemoteRecord
|
|
30
30
|
attr_accessor :fetching
|
31
31
|
|
32
32
|
after_initialize do |reference|
|
33
|
+
reference.fetching = true if reference.fetching.nil?
|
33
34
|
config = reference.class.remote_record_class.default_config.merge(
|
34
35
|
reference.class.remote_record_config.to_h
|
35
36
|
)
|
@@ -49,13 +50,8 @@ module RemoteRecord
|
|
49
50
|
instance.respond_to?(method_name, false)
|
50
51
|
end
|
51
52
|
|
52
|
-
def initialize(fetching: true, **args)
|
53
|
-
@fetching = fetching
|
54
|
-
super
|
55
|
-
end
|
56
|
-
|
57
53
|
def fetch_remote_resource
|
58
|
-
instance.fetch if
|
54
|
+
instance.fetch if fetching
|
59
55
|
end
|
60
56
|
|
61
57
|
def fresh
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Fish
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-12-
|
12
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|