activeuuid 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mkd +2 -0
- data/activeuuid.gemspec +1 -1
- data/lib/activeuuid.rb +1 -1
- data/lib/activeuuid/railtie.rb +1 -2
- data/lib/activeuuid/uuid.rb +10 -0
- data/lib/activeuuid/version.rb +1 -1
- metadata +7 -6
data/README.mkd
CHANGED
data/activeuuid.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Activeuuid::VERSION
|
8
8
|
s.authors = ["Nate Murray"]
|
9
9
|
s.email = ["nate@natemurray.com"]
|
10
|
-
s.homepage = "http://www.
|
10
|
+
s.homepage = "http://www.eigenjoy.com"
|
11
11
|
s.summary = %q{Add binary UUIDs to ActiveRecord in MySQL}
|
12
12
|
s.description = %q{Add binary (not string) UUIDs to ActiveRecord in MySQL}
|
13
13
|
|
data/lib/activeuuid.rb
CHANGED
data/lib/activeuuid/railtie.rb
CHANGED
@@ -5,9 +5,8 @@ module ActiveUUID
|
|
5
5
|
class Railtie < Rails::Railtie
|
6
6
|
railtie_name :activeuuid
|
7
7
|
initializer "activeuuid.configure_rails_initialization" do
|
8
|
-
|
9
8
|
module ActiveRecord::ConnectionAdapters
|
10
|
-
class
|
9
|
+
class Table
|
11
10
|
def uuid (*args)
|
12
11
|
options = args.extract_options!
|
13
12
|
column_names = args
|
data/lib/activeuuid/uuid.rb
CHANGED
@@ -23,6 +23,12 @@ module Arel
|
|
23
23
|
o.quoted_id
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
class SQLite < Arel::Visitors::ToSql
|
28
|
+
def visit_UUIDTools_UUID(o)
|
29
|
+
o.quoted_id
|
30
|
+
end
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
28
34
|
|
@@ -53,6 +59,10 @@ module ActiveUUID
|
|
53
59
|
generate_uuid unless self.id
|
54
60
|
end
|
55
61
|
|
62
|
+
def to_param
|
63
|
+
id.to_param
|
64
|
+
end
|
65
|
+
|
56
66
|
def generate_uuid
|
57
67
|
if nka = self.class.natural_key_attributes
|
58
68
|
# TODO if all the attributes return nil you might want to warn about this
|
data/lib/activeuuid/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeuuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: uuidtools
|
16
|
-
requirement: &
|
16
|
+
requirement: &70350445311120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70350445311120
|
25
25
|
description: Add binary (not string) UUIDs to ActiveRecord in MySQL
|
26
26
|
email:
|
27
27
|
- nate@natemurray.com
|
@@ -38,7 +38,7 @@ files:
|
|
38
38
|
- lib/activeuuid/railtie.rb
|
39
39
|
- lib/activeuuid/uuid.rb
|
40
40
|
- lib/activeuuid/version.rb
|
41
|
-
homepage: http://www.
|
41
|
+
homepage: http://www.eigenjoy.com
|
42
42
|
licenses: []
|
43
43
|
post_install_message:
|
44
44
|
rdoc_options: []
|
@@ -58,8 +58,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.8.
|
61
|
+
rubygems_version: 1.8.17
|
62
62
|
signing_key:
|
63
63
|
specification_version: 3
|
64
64
|
summary: Add binary UUIDs to ActiveRecord in MySQL
|
65
65
|
test_files: []
|
66
|
+
has_rdoc:
|