couchbase-id 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 +4 -4
- data/lib/couchbase-id/generator.rb +6 -6
- data/lib/couchbase-id/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ad6585c5467f6033260f1ec187e753ecc91208f
|
|
4
|
+
data.tar.gz: 68f6f9aa0fd6d3241b14a500455fb42463ade10c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 960510c878e491bb88f1035ca7e06d01517284bf347362b030082850feee1bc71bec5a85fcabc5b5d4914883f279df882b21a256cf53f064c87628268a29fc1f
|
|
7
|
+
data.tar.gz: 959d532e9d72242eb036a39eed10f147cc19dd3b02ef44fa8affba4f41d4bcf47cfe2ddbc5edbcae7b36f381ad0223f849d96f47c6ee0309ede20ca333499693
|
|
@@ -89,7 +89,7 @@ module CouchbaseId
|
|
|
89
89
|
|
|
90
90
|
def self.default_class_id_generator(overflow, count)
|
|
91
91
|
id = Radix.convert([overflow, CLUSTER_ID].join.to_i, B10, B65) + Radix.convert(count, B10, B65)
|
|
92
|
-
"#{
|
|
92
|
+
"#{@__class_name__}-#{id}"
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
#
|
|
@@ -97,15 +97,15 @@ module CouchbaseId
|
|
|
97
97
|
#
|
|
98
98
|
def self.set_class_id_generator(callback = nil, &block)
|
|
99
99
|
callback ||= block
|
|
100
|
-
|
|
100
|
+
@__class_id_generator__ = callback
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
#
|
|
104
104
|
# Configure class level variables
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
@__overflow__ = nil
|
|
106
|
+
@__class_id_generator__ = method(:default_class_id_generator)
|
|
107
|
+
@__class_name__ = self.name.underscore.gsub(/\/|_/, '-') # The included classes name
|
|
108
108
|
end
|
|
109
109
|
end
|
|
110
110
|
end # END:: Generator
|
|
111
|
-
end
|
|
111
|
+
end
|
data/lib/couchbase-id/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: couchbase-id
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen von Takach
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: couchbase-model
|