refer 0.5.2 → 0.5.3

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: fe5b190436ed75e3b12069591ee8f8342cee2fdfbfe70e2babeb46b5d0fdac06
4
- data.tar.gz: fcee40d122046e1d10bb971c13dd8bf545d2e451420b9491b2bd491df177244b
3
+ metadata.gz: df22afceb80a13a9fa4f04bea4107628f39dc91a2d2d952f1aef86fe20196555
4
+ data.tar.gz: a2c77cbb2c59568fc7df60a0383f0daf0d7276869bda44b64cbf7be21b8f2649
5
5
  SHA512:
6
- metadata.gz: bfd83cbe5bd79a76bb35b04aa1e2a6b6a142014eb1a8d1dd345d2235202a425efb41a82aff46b05d6dec906f63cc9f1220338714144909869a0563046e62ea2e
7
- data.tar.gz: 2fbbf930f66c5e68b629eb8d5153e10e00766acc1e9ada8ba09d201a0127fb447f2c95bc228062fc5d422c67ed76e9d62f34a7c20a18d3c7c6da1c538e08fa4c
6
+ metadata.gz: fd600da5fe3d3809e23444f5ffc839c337ce84cb1fd7495664660f257a4389b9f57344144059406b83c99906b9bf6c70b47b4eb4a393799b185bb3c8cde3ef17
7
+ data.tar.gz: 4750eaca271ed54939b0de254fbae45b8ee74ff967d32f907aca52064cb7508e1a9b4ccf91d2ac8a595b86b63e3585508e7a7403f58ee4ff2b8a72ce65e623fe
@@ -6,7 +6,7 @@ module Refer
6
6
 
7
7
  validates :code, presence: true, uniqueness: true
8
8
 
9
- before_validation if: -> { Refer.code_generator } do
9
+ before_validation if: -> { !code? && Refer.code_generator } do
10
10
  self.code = Refer.code_generator.call(referrer)
11
11
  end
12
12
 
data/lib/refer/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Refer
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver