activeuuid 0.1.1 → 0.2.0

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.
data/README.mkd CHANGED
@@ -129,4 +129,6 @@ Patterson introduced in Rails 3.1.
129
129
  I'm using JRuby 1.9 (1.6.3) but this should work under MRI (YMMV).
130
130
 
131
131
  ## Author
132
+
132
133
  Nate Murray <nate@xcombinator.com>
134
+
@@ -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.xcombinator.com"
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
 
@@ -1,6 +1,6 @@
1
1
  require "activeuuid/version"
2
2
 
3
3
  module ActiveUUID
4
- require 'activeuuid/railtie' if defined?(Rails)
4
+ require 'activeuuid/railtie' if defined?(Rails::Railtie)
5
5
  require 'activeuuid/uuid'
6
6
  end
@@ -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 TableDefinition
9
+ class Table
11
10
  def uuid (*args)
12
11
  options = args.extract_options!
13
12
  column_names = args
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Activeuuid
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.1
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: 2011-09-14 00:00:00.000000000Z
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: &2153393400 !ruby/object:Gem::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: *2153393400
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.xcombinator.com
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.6
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: