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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50ea0ab82ff4f54ea0a877f85d2077f8e735da22b607d191dee6dad31a592a5c
4
- data.tar.gz: d9a28e40ed1b61915e77d80e544aab33f9acf934c941a6fee3a38d08429928a4
3
+ metadata.gz: 7765ca1ef981febac5cb796f25203655e7bc65db3318ecab7e7c9138ea370d4e
4
+ data.tar.gz: b5c1ab022c1365735a330badabba5210f0257e01b36f8cdcb6cee27b2608b7a5
5
5
  SHA512:
6
- metadata.gz: b1d370cfea855f1144e77ef2baacb4fcff519a00455e865b6beb6d8a280534e59f075b947c2775859a0f3d50d70d8c812463c4ce3d31857a00918a3c0f0c7072
7
- data.tar.gz: 35c957d7a2e7f2a1075e375ca75d9ed2266b399d0c24d7ea83a9248f1ba40fe3f68e2cabd3901d92e302f92987e289c96ebe851672d143eeeb3f369e54908b76
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 @fetching
54
+ instance.fetch if fetching
59
55
  end
60
56
 
61
57
  def fresh
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RemoteRecord
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
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.2.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-15 00:00:00.000000000 Z
12
+ date: 2020-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord