ploymorphic_wuid 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/lib/wuid/ploymorphic_module.rb +1 -1
- data/lib/wuid/wuid.rb +5 -3
- data/pkg/ploymorphic_wuid-0.5.1.gem +0 -0
- data/ploymorphic_wuid.gemspec +3 -3
- metadata +4 -4
- data/pkg/ploymorphic_wuid-0.5.0.gem +0 -0
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/wuid/wuid.rb
CHANGED
@@ -24,14 +24,16 @@ class Wuid < ActiveRecord::Base
|
|
24
24
|
return args.first if expects_array && args.first.empty?
|
25
25
|
case args.size
|
26
26
|
when 0
|
27
|
-
raise
|
27
|
+
raise "Couldn't find #{name} without an ID"
|
28
28
|
when 1
|
29
29
|
if args[0].is_a?(Integer) || (args[0].is_a?(String) && args[0] =~ /^\d{1,}$/)
|
30
|
-
|
30
|
+
raise "Don't support simple digest id any more"
|
31
|
+
#super
|
31
32
|
else
|
32
33
|
if args[0].is_a?(Array)
|
33
34
|
if args[0].all?{|i| i.is_a?(Integer)} || args[0].all?{|i| i=~ /^\d{1,}$/}
|
34
|
-
|
35
|
+
raise "Don't support simple digest id any more"
|
36
|
+
#super
|
35
37
|
else
|
36
38
|
origin_find(:all, :conditions => ["rand_token in (?)", args[0]])
|
37
39
|
end
|
Binary file
|
data/ploymorphic_wuid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ploymorphic_wuid}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["tim.teng"]
|
12
|
-
s.date = %q{2010-06-
|
12
|
+
s.date = %q{2010-06-25}
|
13
13
|
s.description = %q{ This is a gem to generate an unique id in your application world.}
|
14
14
|
s.email = %q{tim.rubist@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"lib/wuid/ploymorphic_module.rb",
|
27
27
|
"lib/wuid/rand_gen.rb",
|
28
28
|
"lib/wuid/wuid.rb",
|
29
|
-
"pkg/ploymorphic_wuid-0.5.
|
29
|
+
"pkg/ploymorphic_wuid-0.5.1.gem",
|
30
30
|
"ploymorphic_wuid.gemspec",
|
31
31
|
"test/helper.rb",
|
32
32
|
"test/test_ploymorphic_wuid.rb"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 1
|
9
|
+
version: 0.5.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- tim.teng
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-25 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- lib/wuid/ploymorphic_module.rb
|
38
38
|
- lib/wuid/rand_gen.rb
|
39
39
|
- lib/wuid/wuid.rb
|
40
|
-
- pkg/ploymorphic_wuid-0.5.
|
40
|
+
- pkg/ploymorphic_wuid-0.5.1.gem
|
41
41
|
- ploymorphic_wuid.gemspec
|
42
42
|
- test/helper.rb
|
43
43
|
- test/test_ploymorphic_wuid.rb
|
Binary file
|