with_uuid 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
  SHA1:
3
- metadata.gz: 19c9e7e525da30d46366e98a8eda4ed29dc08288
4
- data.tar.gz: ad4b419f33296bfc8f9b9cb390e7e878622e8b7f
3
+ metadata.gz: 7878dbaad2b0bbd3a7658d19a75b3980c37033c1
4
+ data.tar.gz: a693d102d2cbcda7f3a78e8c1ec13b4b137c2bc9
5
5
  SHA512:
6
- metadata.gz: 6e9749c08513f138f634a2075a09d6f3a153e09695e750da74ce6c5e547d05a86ede189e3723ee729a1218d1b2c54600738bea978d999fdcbc3af36c49cdcd26
7
- data.tar.gz: e71eb034ebe4875005e6d2d69e809ae4df821e5282bcd35f297f42dd1e5a83b30b145f242444c45ca4f1b4fd0947c01f798ed0f1ea31460350c00efc8ce2c2db
6
+ metadata.gz: 00bde0fd1b19e78be43e9a504d6d2492139d40ba546b96c45c1eb9850eaff85fc6659b2a7da40dcb53e8f110b59c8fd61b33dcecbfbfd87754d30c759cbc3af0
7
+ data.tar.gz: 9db2e2034d75d8232e3501c9b9d5fd7057b19964f3c876a733bf73a21fd4131681f4a5d7eede0d37962df85b94775217d3b14b49850690dc7e3d8d2d4951569e
@@ -14,12 +14,19 @@ module WithUuid
14
14
 
15
15
  end
16
16
 
17
+ protected
18
+
17
19
  def set_id
18
20
  return unless id.blank?
19
21
 
20
- # Assign generated COMBination GUID to #id
21
- write_attribute( :id, WithUuid::CombUuid.uuid.to_s )
22
+ uuid = WithUuid::CombUuid.uuid.to_s
23
+ before_set_id( uuid )
24
+ write_attribute( :id, uuid )
25
+ after_set_id( uuid )
22
26
  end
23
27
 
28
+ def before_set_id( uuid ); end
29
+ def after_set_id( uuid ); end
30
+
24
31
  end
25
32
  end
@@ -1,3 +1,3 @@
1
1
  module WithUuid
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: with_uuid
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
  - Jason Harrelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-21 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler