refer 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4e58649b749077a18161b08d1aa37957d51dbb7b9aa16e38adc1a20b9aa5877
4
- data.tar.gz: 88504a15fb41af9cb252672786cbfa3d98be7f6fdb11a7d1529d4ab87227f899
3
+ metadata.gz: 50ca34096a7a905dd43530303e7fec15fb2f15286dfeb233366c39dd5ea82804
4
+ data.tar.gz: 72b072e68a0d46d19bcb3541863e0b1c0344b73e4a2687dd59beb649448fb9e8
5
5
  SHA512:
6
- metadata.gz: 0ba2c413666a47f0ade8d7225447bc8b9a1860a19d430cebabf14cda312644636831131e1e27f296c06b22348a62242e8f6c17fb4edbe666070387c484d7c4df
7
- data.tar.gz: 695b3b72061510117c98e9b5781a02d27f8f58cc10f8818e3eebb23ad8e215d9a7a54ff20bc86bd034a9ea7ef6c73f6fb14923b3dda8ff756b3d6a94a16076a1
6
+ metadata.gz: ad12178a8266cd2b5a979a57d9c210712972a01c092a92fd2e5aafb089550f9004dbaca9237bde9b473cefe758a9eec5bbc8398ecc6129fabf806ae44886bf4c
7
+ data.tar.gz: 1d95e4601ff92a4207254998ad5aacb6720759f5acae1e41cef1b7dae8fee28b5f07fe12241a46dc929416a50c37751695df1cff8b5973eb9f72f7254f1e7567
data/README.md CHANGED
@@ -176,6 +176,25 @@ To provide a reward X days after a successful referral, you can use a schedule j
176
176
 
177
177
  We recommend keeping records for each reward given to a referral so you can limit rewards.
178
178
 
179
+ ## Customizing Models
180
+
181
+ You can add features to Refer's models by using lazy load hooks.
182
+
183
+ ```ruby
184
+ # config/initializers/refer.rb
185
+ ActiveSupport.on_load :refer_referral do
186
+ # Add features to Refer::Referral model
187
+ end
188
+
189
+ ActiveSupport.on_load :refer_referral_code do
190
+ # Add features to Refer::ReferralCode model
191
+ end
192
+
193
+ ActiveSupport.on_load :refer_visit do
194
+ # Add features to Refer::Visit model
195
+ end
196
+ ```
197
+
179
198
  ## 🙏 Contributing
180
199
  If you have an issue you'd like to submit, please do so using the issue tracker in GitHub. In order for us to help you in the best way possible, please be as detailed as you can.
181
200
 
@@ -24,3 +24,5 @@ module Refer
24
24
  end
25
25
  end
26
26
  end
27
+
28
+ ActiveSupport.run_load_hooks :refer_referral, Refer::Referral
@@ -19,3 +19,5 @@ module Refer
19
19
  end
20
20
  end
21
21
  end
22
+
23
+ ActiveSupport.run_load_hooks :refer_referral_code, Refer::ReferralCode
@@ -14,3 +14,5 @@ module Refer
14
14
  end
15
15
  end
16
16
  end
17
+
18
+ ActiveSupport.run_load_hooks :refer_visit, Refer::Visit
data/lib/refer/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Refer
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -60,7 +59,6 @@ metadata:
60
59
  homepage_uri: https://github.com/excid3/refer
61
60
  source_code_uri: https://github.com/excid3/refer
62
61
  changelog_uri: https://github.com/excid3/refer/blob/main/CHANGELOG.md
63
- post_install_message:
64
62
  rdoc_options: []
65
63
  require_paths:
66
64
  - lib
@@ -75,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  - !ruby/object:Gem::Version
76
74
  version: '0'
77
75
  requirements: []
78
- rubygems_version: 3.5.23
79
- signing_key:
76
+ rubygems_version: 3.6.8
80
77
  specification_version: 4
81
78
  summary: Referral codes & affiliate links for Ruby on Rails apps
82
79
  test_files: []