uuidify 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21698,3 +21698,199 @@ Connecting to database specified by database.yml
21698
21698
  Uuidify::Uuid Load (0.1ms) SELECT `uuidify_uuids`.* FROM `uuidify_uuids` WHERE `uuidify_uuids`.`model_uuid` = x'1264a79830f711e3968170cd60fffe2a' AND `uuidify_uuids`.`model_name` = 'Foo' LIMIT 1
21699
21699
  Foo Load (0.3ms) SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 19 LIMIT 1
21700
21700
   (0.8ms) ROLLBACK
21701
+ Connecting to database specified by database.yml
21702
+  (0.1ms) BEGIN
21703
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21704
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21705
+ ^
21706
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21707
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21708
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21709
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21710
+ WHERE a.attrelid = '"foos"'::regclass
21711
+ AND a.attnum > 0 AND NOT a.attisdropped
21712
+ ORDER BY a.attnum
21713
+
21714
+  (0.1ms) ROLLBACK
21715
+  (0.1ms) BEGIN
21716
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21717
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21718
+ ^
21719
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21720
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21721
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21722
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21723
+ WHERE a.attrelid = '"foos"'::regclass
21724
+ AND a.attnum > 0 AND NOT a.attisdropped
21725
+ ORDER BY a.attnum
21726
+
21727
+  (0.1ms) ROLLBACK
21728
+  (0.1ms) BEGIN
21729
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21730
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21731
+ ^
21732
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21733
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21734
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21735
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21736
+ WHERE a.attrelid = '"foos"'::regclass
21737
+ AND a.attnum > 0 AND NOT a.attisdropped
21738
+ ORDER BY a.attnum
21739
+
21740
+  (0.1ms) ROLLBACK
21741
+  (0.1ms) BEGIN
21742
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21743
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21744
+ ^
21745
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21746
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21747
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21748
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21749
+ WHERE a.attrelid = '"foos"'::regclass
21750
+ AND a.attnum > 0 AND NOT a.attisdropped
21751
+ ORDER BY a.attnum
21752
+
21753
+  (0.1ms) ROLLBACK
21754
+  (0.1ms) BEGIN
21755
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21756
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21757
+ ^
21758
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21759
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21760
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21761
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21762
+ WHERE a.attrelid = '"foos"'::regclass
21763
+ AND a.attnum > 0 AND NOT a.attisdropped
21764
+ ORDER BY a.attnum
21765
+
21766
+  (0.1ms) ROLLBACK
21767
+  (0.1ms) BEGIN
21768
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21769
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21770
+ ^
21771
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21772
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21773
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21774
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21775
+ WHERE a.attrelid = '"foos"'::regclass
21776
+ AND a.attnum > 0 AND NOT a.attisdropped
21777
+ ORDER BY a.attnum
21778
+
21779
+  (0.1ms) ROLLBACK
21780
+  (0.1ms) BEGIN
21781
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21782
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21783
+ ^
21784
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21785
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21786
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21787
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21788
+ WHERE a.attrelid = '"foos"'::regclass
21789
+ AND a.attnum > 0 AND NOT a.attisdropped
21790
+ ORDER BY a.attnum
21791
+
21792
+  (0.1ms) ROLLBACK
21793
+  (0.1ms) BEGIN
21794
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21795
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21796
+ ^
21797
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21798
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21799
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21800
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21801
+ WHERE a.attrelid = '"foos"'::regclass
21802
+ AND a.attnum > 0 AND NOT a.attisdropped
21803
+ ORDER BY a.attnum
21804
+
21805
+  (0.1ms) ROLLBACK
21806
+  (0.1ms) BEGIN
21807
+ PG::UndefinedTable: ERROR: relation "bars" does not exist
21808
+ LINE 5: WHERE a.attrelid = '"bars"'::regclass
21809
+ ^
21810
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21811
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21812
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21813
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21814
+ WHERE a.attrelid = '"bars"'::regclass
21815
+ AND a.attnum > 0 AND NOT a.attisdropped
21816
+ ORDER BY a.attnum
21817
+
21818
+  (0.1ms) ROLLBACK
21819
+  (0.1ms) BEGIN
21820
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21821
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21822
+ ^
21823
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21824
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21825
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21826
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21827
+ WHERE a.attrelid = '"foos"'::regclass
21828
+ AND a.attnum > 0 AND NOT a.attisdropped
21829
+ ORDER BY a.attnum
21830
+
21831
+  (0.1ms) ROLLBACK
21832
+  (0.1ms) BEGIN
21833
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21834
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21835
+ ^
21836
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21837
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21838
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21839
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21840
+ WHERE a.attrelid = '"foos"'::regclass
21841
+ AND a.attnum > 0 AND NOT a.attisdropped
21842
+ ORDER BY a.attnum
21843
+
21844
+  (0.1ms) ROLLBACK
21845
+  (0.1ms) BEGIN
21846
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21847
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21848
+ ^
21849
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21850
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21851
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21852
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21853
+ WHERE a.attrelid = '"foos"'::regclass
21854
+ AND a.attnum > 0 AND NOT a.attisdropped
21855
+ ORDER BY a.attnum
21856
+
21857
+  (0.1ms) ROLLBACK
21858
+  (0.1ms) BEGIN
21859
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21860
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21861
+ ^
21862
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21863
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21864
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21865
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21866
+ WHERE a.attrelid = '"foos"'::regclass
21867
+ AND a.attnum > 0 AND NOT a.attisdropped
21868
+ ORDER BY a.attnum
21869
+
21870
+  (0.1ms) ROLLBACK
21871
+  (0.1ms) BEGIN
21872
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21873
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21874
+ ^
21875
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21876
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21877
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21878
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21879
+ WHERE a.attrelid = '"foos"'::regclass
21880
+ AND a.attnum > 0 AND NOT a.attisdropped
21881
+ ORDER BY a.attnum
21882
+
21883
+  (0.1ms) ROLLBACK
21884
+  (0.1ms) BEGIN
21885
+ PG::UndefinedTable: ERROR: relation "foos" does not exist
21886
+ LINE 5: WHERE a.attrelid = '"foos"'::regclass
21887
+ ^
21888
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
21889
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
21890
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
21891
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
21892
+ WHERE a.attrelid = '"foos"'::regclass
21893
+ AND a.attnum > 0 AND NOT a.attisdropped
21894
+ ORDER BY a.attnum
21895
+
21896
+  (0.1ms) ROLLBACK
@@ -33,7 +33,9 @@ describe "uuidify" do
33
33
  it "doesn't find the wrong model" do
34
34
  foo = Foo.create
35
35
  bad_uuid = UUIDTools::UUID.timestamp_create
36
- Uuidify::Uuid.create(:model_name => "Baz", :model_id => foo.id, :model_uuid => bad_uuid)
36
+ Uuidify::Uuid.create(:model_name => "Baz",
37
+ :model_id => foo.id,
38
+ :model_uuid => Uuidify::Uuid.uuid_to_sql_string(bad_uuid))
37
39
  Foo.lookup_uuid(bad_uuid).should be_nil
38
40
  end
39
41
 
@@ -95,7 +97,10 @@ describe "uuidify" do
95
97
  it "has global gc that handles orphaned CLASSES" do
96
98
  foo1_uuid = foo1.uuid
97
99
 
98
- Uuidify::Uuid.create(:model_name => "NonexistantClass", :model_id => 1, :model_uuid => UUIDTools::UUID.timestamp_create)
100
+
101
+ Uuidify::Uuid.create(:model_name => "NonexistantClass",
102
+ :model_id => 1,
103
+ :model_uuid => Uuidify::Uuid.uuid_to_sql_string(UUIDTools::UUID.timestamp_create))
99
104
  Uuidify.garbage_collect_uuids
100
105
 
101
106
  Uuidify::Uuid.where(:model_name => "NonexistantClass").should be_empty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuidify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Olson
@@ -14,70 +14,84 @@ dependencies:
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.13
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.13
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: uuidtools
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.1.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mysql2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activerecord-postgresql-adapter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec-rails
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ~>
73
+ - - "~>"
60
74
  - !ruby/object:Gem::Version
61
75
  version: 2.13.0
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ~>
80
+ - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: 2.13.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: database_cleaner
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - '>='
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: '0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - '>='
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  description:
@@ -87,19 +101,21 @@ extensions: []
87
101
  extra_rdoc_files:
88
102
  - README.md
89
103
  files:
104
+ - LICENSE
105
+ - README.md
106
+ - Rakefile
90
107
  - app/models/uuidify/uuid.rb
91
108
  - db/migrate/20130612143347_create_uuidify_uuids.rb
92
109
  - lib/tasks/guidify_tasks.rake
110
+ - lib/uuidify.rb
111
+ - lib/uuidify.rb~
93
112
  - lib/uuidify/engine.rb
94
113
  - lib/uuidify/uuidify_concern.rb
95
114
  - lib/uuidify/uuidify_exception.rb
96
115
  - lib/uuidify/version.rb
97
116
  - lib/uuidify/version.rb~
98
- - lib/uuidify.rb
99
- - lib/uuidify.rb~
100
- - Rakefile
101
- - LICENSE
102
- - README.md
117
+ - spec/dummy/README.rdoc
118
+ - spec/dummy/Rakefile
103
119
  - spec/dummy/app/assets/javascripts/application.js
104
120
  - spec/dummy/app/assets/stylesheets/application.css
105
121
  - spec/dummy/app/controllers/application_controller.rb
@@ -107,10 +123,12 @@ files:
107
123
  - spec/dummy/app/models/bar.rb
108
124
  - spec/dummy/app/models/foo.rb
109
125
  - spec/dummy/app/views/layouts/application.html.erb
126
+ - spec/dummy/config.ru
110
127
  - spec/dummy/config/application.rb
111
128
  - spec/dummy/config/boot.rb
112
129
  - spec/dummy/config/database.yml
113
130
  - spec/dummy/config/database.yml.sample
131
+ - spec/dummy/config/database.yml~
114
132
  - spec/dummy/config/environment.rb
115
133
  - spec/dummy/config/environments/development.rb
116
134
  - spec/dummy/config/environments/production.rb
@@ -123,7 +141,6 @@ files:
123
141
  - spec/dummy/config/initializers/wrap_parameters.rb
124
142
  - spec/dummy/config/locales/en.yml
125
143
  - spec/dummy/config/routes.rb
126
- - spec/dummy/config.ru
127
144
  - spec/dummy/db/migrate/20130612135708_create_foos.rb
128
145
  - spec/dummy/db/migrate/20130613135222_create_bars.rb
129
146
  - spec/dummy/db/schema.rb
@@ -134,8 +151,6 @@ files:
134
151
  - spec/dummy/public/422.html
135
152
  - spec/dummy/public/500.html
136
153
  - spec/dummy/public/favicon.ico
137
- - spec/dummy/Rakefile
138
- - spec/dummy/README.rdoc
139
154
  - spec/dummy/script/rails
140
155
  - spec/spec_helper.rb
141
156
  - spec/uuidify_spec.rb
@@ -149,17 +164,17 @@ require_paths:
149
164
  - lib
150
165
  required_ruby_version: !ruby/object:Gem::Requirement
151
166
  requirements:
152
- - - '>='
167
+ - - ">="
153
168
  - !ruby/object:Gem::Version
154
169
  version: '0'
155
170
  required_rubygems_version: !ruby/object:Gem::Requirement
156
171
  requirements:
157
- - - '>='
172
+ - - ">="
158
173
  - !ruby/object:Gem::Version
159
174
  version: '0'
160
175
  requirements: []
161
176
  rubyforge_project:
162
- rubygems_version: 2.0.3
177
+ rubygems_version: 2.2.2
163
178
  signing_key:
164
179
  specification_version: 4
165
180
  summary: Generate uuids for models
@@ -175,6 +190,7 @@ test_files:
175
190
  - spec/dummy/config/boot.rb
176
191
  - spec/dummy/config/database.yml
177
192
  - spec/dummy/config/database.yml.sample
193
+ - spec/dummy/config/database.yml~
178
194
  - spec/dummy/config/environment.rb
179
195
  - spec/dummy/config/environments/development.rb
180
196
  - spec/dummy/config/environments/production.rb
metadata.gz.asc CHANGED
@@ -1,12 +1,12 @@
1
1
  -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
2
+ Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABCgAGBQJSqHy3AAoJEP5F5V2hilTWiMQH/jJIUmFA4kWUgRHMPzTEemEU
6
- O+vQg8iYQMuzMM9iQK1pTdy22xmFxMn0PW0N6aKZyptvilAjy8RRgIcxQV+/f/Sa
7
- f/aD/36WT+eHrpEPUMB/FYcFUK8sYPdlntPID1ARCyJOPO6/3bsE+ICr7jbqiqdu
8
- CxLsT1KYZmOgjHc1kjumy+sqrQ2nXT/oE7ghEE82UA9u941GpHN0+pM6hekaflLR
9
- BWxJwKbbPngKJj9POYrVmyTfJNh10Mvc5DtSHSh5ersA5ya4fM76Krx6sNmtfaZW
10
- VSWUHO2jMvLaze6qIpwwRxzpHR+n0nu6APdDUpV4wijj74ONUbu4vRZev8EVHvc=
11
- =Xbis
5
+ iQEcBAABCgAGBQJTFflsAAoJEP5F5V2hilTWkxgH/jBCQWmScmauQcQ6ordt8w35
6
+ vYdEs7SqvdcebvF4OYhkt1HtZppcANL+FuN3CBTdGIAEz3z5YimypNbE3bbWEhsl
7
+ COwDdqiZ43kvXP6Vu/ECkPWkLyygzSik8w0rjlkxRh+tGUNEKVToY/6Tc2T0PLn5
8
+ cYbQNurnR84mqcSLPyYCsi9ge1YZE0j3eVhEjkiTbVjlRl6VpGYWGgCIr5gyrpw8
9
+ K/HH7EuWZhK2YhPDkiyRlhcuXerHdy1GhNitceZ6mCRJMTasD76Idx/uCZrxN0zt
10
+ mKnBu3XMsHWHi89twT7zeoCfKJZzTbqIBHKELyKZ653akS8vscLeI6ntavwuQcU=
11
+ =ihGb
12
12
  -----END PGP SIGNATURE-----