mv-mysql 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Valeriy Prokopchuk
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,162 @@
1
+ = Introduction
2
+
3
+ mv-mysql is the MySQL driver for Migration Validators project (details here: https://github.com/vprokopchuk256/mv-core)
4
+
5
+ = Validators
6
+
7
+ === uniqueness
8
+
9
+ Value uniqueness validation
10
+
11
+ Usage:
12
+
13
+ validate_column :table_name, :column_name, :uniqueness => true
14
+ validate_column :table_name, :column_name, :uniqueness => {:message => 'Error message', :as => :trigger}
15
+ validate_column :table_name, :column_name, :uniqueness => {:as => :index}
16
+
17
+ create_table :table_name do |t|
18
+ t.string :column_name, :validates => {uniqueness => true}
19
+ end
20
+
21
+ Options:
22
+
23
+ message: text of the error message that will be shown if constraint violated. Ignored unless :as == :trigger
24
+ index_name: name of the index that will be created for validator. Ignored unless :as == :index
25
+ on: validation event. Possible values [:save, :update, :create]. Ignored unless :as == :trigger. Default value :save
26
+ create_tigger_name: Name of the 'before insert' trigger that will be created if :as == :trigger && :on in [:save, :create]
27
+ update_tigger_name: Name of the 'before update' trigger that will be created if :as == :trigger && :on in [:save, :update]
28
+ allow_nil: ignore validation for nil values. Ignored unless :as == :trigger. Default value: false
29
+ allow_blank: ignore validation for blank values. Ignored unless :as == :trigger. Default value: false
30
+ as: defines the way how constraint will be implemented. Possible values: [:index, :trigger]. Default value: :index
31
+
32
+ === length
33
+
34
+ Value length validation
35
+
36
+ Usage:
37
+
38
+ validate_column :table_name, :column_name, :length => {:in => 5..8, :message => "Wrong length message"}
39
+ validate_column :table_name, :column_name, :length => {:is => 3, :allow_nil => true}
40
+ validate_column :table_name, :column_name, :length => {:maximum => 3, :too_long => "Value is longer than 3 symbols"}
41
+
42
+ Options:
43
+
44
+ in: range or array that length of the value should be contained in.
45
+ within: synonym of :in
46
+ is: exact length of the value
47
+ maximum: maximum allowed length
48
+ minimum: minimum allowed length
49
+ message: message that should be shown if validation failed and specific message is not defined
50
+ too_long: message that will be shown if value longer than allowed. Ignored unless maximum value is defined
51
+ too_short: message that will be shown if value shorter than allowed. Ignored unless minimum value is defined
52
+ on: validation event. Possible values [:save, :update, :create]. Default value: :save
53
+ create_tigger_name: Name of the 'before insert' trigger
54
+ update_tigger_name: Name of the 'before update' trigger
55
+ allow_nil: ignore validation for nil values. Default value: false
56
+ allow_blank: ignore validation for blank values. Default value: false
57
+ as: defines the way how constraint will be implemented. Possible values: [:trigger]
58
+
59
+ === inclusion
60
+
61
+ Value inclusion validation
62
+
63
+ Usage:
64
+
65
+ validate_column :table_name, :column_name, :inclusion => {:in => [1, 2, 3]}
66
+ validate_column :table_name, :column_name, :inclusion => {:in => [1, 2, 3], :message => "Column 'column_name' should be equal to 1 or 2 or 3"}
67
+ validate_column :table_name, :column_name, :inclusion => {:in => [1, 2, 3], :on => :update, :as => :check}
68
+ validate_column :table_name, :column_name, :inclusion => {:in => 1..3, :on => :create, :as => :trigger}
69
+
70
+ Options:
71
+
72
+ in: range or array that column value should be contained in.
73
+ message: message that should be shown if validation failed
74
+ on: validation event. Possible values [:save, :update, :create]. Default value: :save
75
+ create_tigger_name: Name of the 'before insert' trigger
76
+ update_tigger_name: Name of the 'before update' trigger
77
+ allow_nil: ignore validation for nil values. Default value: false
78
+ allow_blank: ignore validation for blank values. Default value: false
79
+ as: defines the way how constraint will be implemented. Possible values: [:trigger]
80
+
81
+
82
+ === exclusion
83
+
84
+ Value exclusion validation
85
+
86
+ Usage:
87
+
88
+ validate_column :table_name, :column_name, :exclusion => {:in => [1, 2, 3]}
89
+ validate_column :table_name, :column_name, :exclusion => {:in => [1, 2, 3], :message => "Column 'column_name' should not be equal to 1 or 2 or 3"}
90
+ validate_column :table_name, :column_name, :exclusion => {:in => [1, 2, 3], :on => :update, :as => :check}
91
+ validate_column :table_name, :column_name, :exclusion => {:in => 1..3, :on => :create, :as => :trigger}
92
+
93
+ Options:
94
+
95
+ in: range or array that column value should NOT be contained in.
96
+ message: message that should be shown if validation failed
97
+ on: validation event. Possible values [:save, :update, :create]. Default value: :save
98
+ create_tigger_name: Name of the 'before insert' trigger
99
+ update_tigger_name: Name of the 'before update' trigger
100
+ allow_nil: ignore validation for nil values. Default value: false
101
+ allow_blank: ignore validation for blank values. Default value: false
102
+ as: defines the way how constraint will be implemented. Possible values: [:trigger]
103
+
104
+ === presense
105
+
106
+ Value presense validation
107
+
108
+ Usage:
109
+
110
+ validate_column :table_name, :column_name, :presense => true
111
+ validate_column :table_name, :column_name, :presense => {:message => "value should not be empty"}
112
+ validate_column :table_name, :column_name, :presense => {:message => "value should not be empty", :as=> :trigger}
113
+ validate_column :table_name, :column_name, :presense => {:message => "value should not be empty", :as=> :trigger, :on => :create}
114
+
115
+
116
+ Options:
117
+
118
+ message: message that should be shown if validation failed
119
+ on: validation event. Possible values [:save, :update, :create]. Default value: :save
120
+ create_tigger_name: Name of the 'before insert' trigger
121
+ update_tigger_name: Name of the 'before update' trigger
122
+ allow_nil: ignore validation for nil values. Default value: false
123
+ allow_blank: ignore validation for blank values. Default value: false
124
+ as: defines the way how constraint will be implemented. Possible values: [:trigger]
125
+
126
+ === format
127
+
128
+ Allows to define regular expression that column value will be mathed with
129
+
130
+ Usage:
131
+
132
+ validate_column :table_name, :column_name, :format => {:with => /word/}
133
+ validate_column :table_name, :column_name, :format => {:with => /word/, :messsage => "Column_name value should contain start word"}
134
+ validate_column :table_name, :column_name, :format => {:with => /word/, :messsage => "Column_name value should contain start word", :as => :trigger}
135
+
136
+
137
+ Options:
138
+
139
+ with: regular expression that column value should be matched to
140
+ message: message that should be shown if validation failed
141
+ on: validation event. Possible values [:save, :update, :create]. Default value: :save
142
+ create_tigger_name: Name of the 'before insert' trigger
143
+ update_tigger_name: Name of the 'before update' trigger
144
+ allow_nil: ignore validation for nil values. Default value: false
145
+ allow_blank: ignore validation for blank values. Default value: false
146
+ as: defines the way how constraint will be implemented. Possible values: [:trigger]
147
+
148
+ == Contributing to mv-mysql
149
+
150
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
151
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
152
+ * Fork the project
153
+ * Start a feature/bugfix branch
154
+ * Commit and push until you are happy with your contribution
155
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
156
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
157
+
158
+ == Copyright
159
+
160
+ Copyright (c) 2011 Valeriy Prokopchuk. See LICENSE.txt for
161
+ further details.
162
+
@@ -0,0 +1,102 @@
1
+ module MigrationValidators
2
+ module Adapters
3
+ class Mysql < MigrationValidators::Adapters::Base
4
+ def name
5
+ "Mysql Migration Validators Adapter"
6
+ end
7
+
8
+ define_base_syntax
9
+ define_base_validators
10
+ define_base_containers
11
+
12
+ container :insert_trigger do
13
+ operation :create do |stmt, trigger_name, group_name|
14
+ "CREATE TRIGGER #{trigger_name} BEFORE INSERT ON #{group_name.first} FOR EACH ROW
15
+ BEGIN
16
+ DECLARE var INT;
17
+
18
+ #{stmt};
19
+ END;"
20
+ end
21
+
22
+ operation :db_value do |value|
23
+ case value.class.name
24
+ when "String" then "'#{value}'"
25
+ when "Date" then "DATE('#{value.strftime('%Y-%m-%d')}')"
26
+ when "DateTime" then "TIMESTAMP('#{value.strftime('%Y-%m-%d %H:%M:%S')}')"
27
+ when "Time" then "TIME('#{value.strftime('%Y-%m-%d %H:%M:%S')}')"
28
+ when "Regexp" then "'#{value.source}'"
29
+ else value.to_s
30
+ end
31
+ end
32
+
33
+ operation :bind_to_error do |stmt, error_message|
34
+ "IF NOT(#{stmt}) THEN
35
+ SET var = (SELECT MAX(1) FROM `#{error_message}`);
36
+ END IF"
37
+ end
38
+ end
39
+
40
+ container :update_trigger do
41
+ operation :create do |stmt, trigger_name, group_name|
42
+ "CREATE TRIGGER #{trigger_name} BEFORE UPDATE ON #{group_name.first} FOR EACH ROW
43
+ BEGIN
44
+ DECLARE var INT;
45
+
46
+ #{stmt};
47
+ END;"
48
+ end
49
+
50
+ operation :db_value do |value|
51
+ case value.class.name
52
+ when "String" then "'#{value}'"
53
+ when "Date" then "DATE('#{value.strftime('%Y-%m-%d')}')"
54
+ when "DateTime" then "TIMESTAMP('#{value.strftime('%Y-%m-%d %H:%M:%S')}')"
55
+ when "Time" then "TIME('#{value.strftime('%Y-%m-%d %H:%M:%S')}')"
56
+ when "Regexp" then "'#{value.source}'"
57
+ else value.to_s
58
+ end
59
+ end
60
+
61
+ operation :bind_to_error do |stmt, error_message|
62
+ "IF NOT(#{stmt}) THEN
63
+ SET var = (SELECT MAX(1) FROM `#{error_message}`);
64
+ END IF"
65
+ end
66
+ end
67
+
68
+
69
+ route :presense, :trigger, :default => true do
70
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
71
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
72
+ end
73
+
74
+ route :inclusion, :trigger, :default => true do
75
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
76
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
77
+ end
78
+
79
+ route :exclusion, :trigger, :default => true do
80
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
81
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
82
+ end
83
+
84
+ route :length, :trigger, :default => true do
85
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
86
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
87
+ end
88
+
89
+ route :format, :trigger, :default => true do
90
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
91
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
92
+ end
93
+
94
+ route :uniqueness, :trigger do
95
+ to :insert_trigger, :if => {:on => [:save, :create, nil]}
96
+ to :update_trigger, :if => {:on => [:save, :update, nil]}
97
+ end
98
+ end
99
+
100
+ MigrationValidators.register_adapter! "mysql", Mysql
101
+ end
102
+ end
data/lib/mv-mysql.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'mv-core'
2
+
3
+ require File.expand_path(File.dirname(__FILE__)) + '/migration_validators/adapters/mysql'
4
+
@@ -0,0 +1,926 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe MigrationValidators::Adapters::Mysql, :type => :mv_test do
4
+ before :all do
5
+ Driver = Class.new(MigrationValidators::Adapters::Base)
6
+ use_db :adapter => "mysql",
7
+ :pool => 5,
8
+ :timeout => 5000,
9
+ :database => "validation_migration_test_db",
10
+ :host => "localhost",
11
+ :username => "root",
12
+ :password => "root",
13
+ :socket => "/tmp/mysql.sock"
14
+
15
+ db.initialize_schema_migrations_table
16
+ ::ActiveRecord::Migration.verbose = false
17
+ end
18
+
19
+ before :each do
20
+ MigrationValidators::Core::DbValidator.clear_all
21
+ end
22
+
23
+ for_test_table do
24
+
25
+ #integer
26
+ for_integer_column do
27
+ with_validator :presense do
28
+ with_option :as => :trigger do
29
+ it { should allow(5) }
30
+ it { should deny(nil).with_initial(5) }
31
+ end
32
+
33
+ with_option :allow_blank => true do
34
+ it { should allow(nil) }
35
+ end
36
+
37
+ with_option :allow_nil => true do
38
+ it { should allow(nil) }
39
+ end
40
+
41
+ with_option :on => :update do
42
+ it { should allow.insert(nil) }
43
+ end
44
+
45
+ with_option :on => :create do
46
+ it { should allow.update(nil).with_initial(5) }
47
+ end
48
+ end
49
+
50
+ with_validator :inclusion do
51
+ with_option :as => :trigger do
52
+ #closed integer interval
53
+ with_options :in => 1..9 do
54
+ it { should allow(1,4,9) }
55
+ it { should deny(0, 10).with_initial(1) }
56
+ end
57
+
58
+ #open integer interval
59
+ with_options :in => 1...9 do
60
+ it { should allow(1,4) }
61
+ it { should deny(0, 9, 10).with_initial(1) }
62
+ end
63
+
64
+ #single value
65
+ with_options :in => 9 do
66
+ it { should allow(9) }
67
+ it { should deny(8, 10).with_initial(9) }
68
+ end
69
+
70
+ #array
71
+ with_options :in => [1, 9] do
72
+ it { should allow(1, 9) }
73
+ it { should deny(0, 3, 10).with_initial(1) }
74
+ end
75
+
76
+ with_options :in => 9, :message => "Some error message" do
77
+ it { should deny(8, 10).with_initial(9).and_message(/Some error message/) }
78
+
79
+ with_option :on => :update do
80
+ it { should allow.insert(8, 10) }
81
+ end
82
+
83
+ with_option :on => :create do
84
+ it { should allow.update(8, 10).with_initial(9) }
85
+ end
86
+ end
87
+ end
88
+ end
89
+
90
+ with_validator :exclusion do
91
+ with_option :as => :trigger do
92
+ #closed integer interval
93
+ with_options :in => 1..9 do
94
+ it { should allow(0, 10) }
95
+ it { should deny(1,4,9).with_initial(0) }
96
+ end
97
+
98
+ #open integer intervalw
99
+ with_options :in => 1...9 do
100
+ it { should allow(0, 9, 10) }
101
+ it { should deny(1,4).with_initial(0) }
102
+ end
103
+
104
+ #single value
105
+ with_options :in => 9 do
106
+ it { should allow(8, 10) }
107
+ it { should deny(9).with_initial(0) }
108
+ end
109
+
110
+ #array
111
+ with_options :in => [1, 9] do
112
+ it { should allow(0, 3, 10) }
113
+ it { should deny(1, 9).with_initial(0) }
114
+ end
115
+
116
+ with_options :in => 9, :message => "Some error message" do
117
+ it { should deny(9).with_initial(8).and_message(/Some error message/) }
118
+
119
+ with_option :on => :update do
120
+ it { should allow.insert(9) }
121
+ end
122
+
123
+ with_option :on => :create do
124
+ it { should allow.update(9).with_initial(8) }
125
+ end
126
+ end
127
+
128
+ end
129
+ end
130
+
131
+ with_validator :uniqueness do
132
+ with_option :as => :trigger do
133
+ it { should deny.insert.at_least_one(1,1)}
134
+ it { should deny.update(1).with_initial(1,2)}
135
+ it { should allow.insert(1,2,3) }
136
+
137
+ with_option :message => "Some error message" do
138
+ it { should deny.at_least_one(1,1).with_initial(1).and_message(/Some error message/) }
139
+ end
140
+ end
141
+
142
+ with_option :as => :index do
143
+ it { should deny.insert.at_least_one(1,1).with_message(/Duplicate entry/) }
144
+ it { should deny.update(1).with_initial(1,2).and_message(/Duplicate entry/) }
145
+ it { should allow.insert(1,2,3) }
146
+ it { should allow.update(1).with_initial(2) }
147
+ end
148
+ end
149
+ end
150
+
151
+ for_integer_column :validates => {:uniqueness => {:as => :index, :message => "Some error message"}, :inclusion => {:in => 1..9, :as => :trigger, :message => "Some error message"}} do
152
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
153
+ it { should deny(10).with_initial(8).and_message(/Some error message/) }
154
+
155
+ with_change :inclusion => false do
156
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
157
+ it { should allow(10) }
158
+ end
159
+
160
+ with_change :inclusion => {:in => 1..9} do
161
+ with_change :inclusion => false do
162
+ it { should allow(10) }
163
+ end
164
+ end
165
+ end
166
+
167
+ for_integer_column :validates => {:uniqueness => {:as => :index, :message => "Some error message"}, :exclusion => {:in => 4..9, :as => :trigger, :message => "Some error message"}} do
168
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
169
+ it { should deny(9).with_initial(10).and_message(/Some error message/) }
170
+
171
+ with_change :exclusion => false do
172
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
173
+ it { should allow(9) }
174
+ end
175
+
176
+ with_change :exclusion => {:in => 4..9} do
177
+ with_change :exclusion => false do
178
+ it { should allow(9) }
179
+ end
180
+ end
181
+ end
182
+
183
+ for_integer_column :validates => {:uniqueness => {:as => :index, :message => "Some error message"}, :presense => {:as => :trigger, :message => "Some error message"}} do
184
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
185
+ it { should deny(nil).with_initial(10).and_message(/Some error message/) }
186
+
187
+ with_change :presense => false do
188
+ it { should deny.at_least_one(1,1).with_initial(1, 2).and_message(/Duplicate entry/) }
189
+ it { should allow(nil) }
190
+ end
191
+
192
+ with_change :presense => true do
193
+ with_change :presense => false do
194
+ it { should allow(nil) }
195
+ end
196
+ end
197
+ end
198
+
199
+
200
+ #float
201
+ for_decimal_column :precision => 8, :scale => 5 do
202
+
203
+ with_validator :presense do
204
+ with_option :as => :trigger do
205
+ it { should allow(1.1) }
206
+ it { should deny(nil).with_initial(1.1) }
207
+ end
208
+
209
+ with_option :allow_blank => true do
210
+ it { should allow(nil) }
211
+ end
212
+
213
+ with_option :allow_nil => true do
214
+ it { should allow(nil) }
215
+ end
216
+
217
+ with_option :on => :update do
218
+ it { should allow.insert(nil) }
219
+ end
220
+
221
+ with_option :on => :create do
222
+ it { should allow.update(nil).with_initial(1.1) }
223
+ end
224
+ end
225
+
226
+ with_validator :inclusion do
227
+ with_option :as => :trigger do
228
+ #closed integer interval
229
+ with_options :in => 1.1..9.1 do
230
+ it { should allow(1.1, 9.1) }
231
+ it { should deny(1.0, 9.2).with_initial(1.1) }
232
+ end
233
+
234
+ #open integer interval
235
+ with_options :in => 1.1...9.1 do
236
+ it { should allow(1.1, 9) }
237
+ it { should deny(1.0, 9.1, 9.2).with_initial(1.1) }
238
+ end
239
+
240
+ #single value
241
+ with_options :in => 9.1 do
242
+ it { should allow(9.1) }
243
+ it { should deny(8.1, 10.1).with_initial(9.1) }
244
+ end
245
+
246
+ #array
247
+ with_options :in => [1.1, 9.1] do
248
+ it { should allow(1.1, 9.1) }
249
+ it { should deny(0.1, 3.1, 10.1).with_initial(1.1) }
250
+ end
251
+
252
+ with_options :in => 9.1, :message => "Some error message" do
253
+ it { should deny(8.1, 10.1).with_initial(9.1).and_message(/Some error message/) }
254
+ end
255
+ end
256
+ end
257
+
258
+ with_validator :exclusion do
259
+ with_option :as => :trigger do
260
+ #closed integer interval
261
+ with_options :in => 1.1..9.1 do
262
+ it { should allow(1.0, 9.2) }
263
+ it { should deny(1.1, 9.1).with_initial(1.0) }
264
+ end
265
+
266
+ #open integer interval
267
+ with_options :in => 1.1...9.1 do
268
+ it { should allow(1.0, 9.1, 9.2) }
269
+ it { should deny(1.1, 9).with_initial(1.0) }
270
+ end
271
+
272
+ #single value
273
+ with_options :in => 9.1 do
274
+ it { should deny(9.1).with_initial(9.0) }
275
+ it { should allow(8.1, 10.1) }
276
+ end
277
+
278
+ #array
279
+ with_options :in => [1.1, 9.1] do
280
+ it { should deny(1.1, 9.1).with_initial(1.0) }
281
+ it { should allow(0.1, 3.1, 10.1) }
282
+ end
283
+
284
+ with_options :in => 9.1, :message => "Some error message" do
285
+ it { should deny(9.1).with_initial(9.0).and_message(/Some error message/) }
286
+ end
287
+ end
288
+ end
289
+ end
290
+
291
+ #string
292
+ for_string_column do
293
+ with_validator :format do
294
+ with_option :as => :trigger do
295
+ with_option :with => /^start/ do
296
+ it { should allow('start stop') }
297
+ it { should deny('stop start').with_initial('start') }
298
+ it { should deny('stop').with_initial('start') }
299
+
300
+ with_option :on => :update do
301
+ it { should allow.insert('stop')}
302
+ end
303
+
304
+ with_option :on => :create do
305
+ it { should allow.update('stop').with_initial('start')}
306
+ end
307
+
308
+ with_option :message => "Some error message" do
309
+ it { should deny('stop').with_initial('start').and_message(/Some error message/) }
310
+ end
311
+ end
312
+ end
313
+ end
314
+
315
+ with_validator :presense do
316
+ with_option :as => :trigger do
317
+ it { should allow('b') }
318
+ it { should deny(nil).with_initial('b') }
319
+ end
320
+
321
+ with_option :allow_blank => true do
322
+ it { should allow(nil) }
323
+ end
324
+
325
+ with_option :allow_nil => true do
326
+ it { should allow(nil) }
327
+ end
328
+
329
+ with_option :on => :update do
330
+ it { should allow.insert(nil) }
331
+ end
332
+
333
+ with_option :on => :create do
334
+ it { should allow.update(nil).with_initial('b') }
335
+ end
336
+ end
337
+
338
+ with_validator :uniqueness do
339
+ with_option :as => :trigger do
340
+ it { should deny.at_least_one(' ', ' ').with_initial(' ', 'a') }
341
+
342
+ with_option :allow_blank => true do
343
+ it { should allow(' ', ' ') }
344
+ end
345
+ end
346
+ end
347
+
348
+ with_validator :inclusion do
349
+ with_option :as => :trigger do
350
+ #closed string interval
351
+ with_options :in => 'b'..'e' do
352
+ it { should allow('b', 'd', 'e') }
353
+ it { should deny('a', 'f').with_initial('b') }
354
+ it { should deny(' ').with_initial('b') }
355
+ it { should deny(nil).with_initial('b') }
356
+
357
+ with_option :allow_blank => true do
358
+ it { should allow(' ') }
359
+ end
360
+
361
+ with_option :allow_nil => true do
362
+ it { should allow(nil) }
363
+ end
364
+ end
365
+
366
+ #open string interval
367
+ with_options :in => 'b'...'e' do
368
+ it { should allow('b', 'd') }
369
+ it { should deny('a', 'e', 'f').with_initial('b') }
370
+ it { should deny(' ').with_initial('b') }
371
+ it { should deny(nil).with_initial('b') }
372
+
373
+ with_option :allow_blank => true do
374
+ it { should allow(' ') }
375
+ end
376
+
377
+ with_option :allow_nil => true do
378
+ it { should allow(nil) }
379
+ end
380
+ end
381
+
382
+ #single string value
383
+ with_options :in => 'b' do
384
+ it { should allow('b') }
385
+ it { should deny('a', 'c').with_initial('b') }
386
+ it { should deny(' ').with_initial('b') }
387
+ it { should deny(nil).with_initial('b') }
388
+
389
+ with_option :allow_blank => true do
390
+ it { should allow(' ') }
391
+ end
392
+
393
+ with_option :allow_nil => true do
394
+ it { should allow(nil) }
395
+ end
396
+ end
397
+
398
+ #array
399
+ with_options :in => ['b', 'e'] do
400
+ it { should allow('b', 'e') }
401
+ it { should deny('a', 'c', 'f').with_initial('b') }
402
+ it { should deny(' ').with_initial('b') }
403
+ it { should deny(nil).with_initial('b') }
404
+
405
+ with_option :allow_blank => true do
406
+ it { should allow(' ') }
407
+ end
408
+
409
+ with_option :allow_nil => true do
410
+ it { should allow(nil) }
411
+ end
412
+ end
413
+
414
+ with_options :in => 'b' do
415
+ it { should allow('b') }
416
+
417
+ with_option :message => "Some error message" do
418
+ it { should deny('c').with_initial('b').with_message(/Some error message/) }
419
+ end
420
+
421
+ it { should deny(' ').with_initial('b') }
422
+
423
+ with_option :allow_blank => true do
424
+ it { should allow(' ') }
425
+ end
426
+ end
427
+ end
428
+ end
429
+
430
+ with_validator :exclusion do
431
+ with_option :as => :trigger do
432
+ #closed string interval
433
+ with_options :in => 'b'..'e' do
434
+ it { should allow('a', 'f') }
435
+ it { should deny('b', 'd', 'e').with_initial('a') }
436
+ it { should allow(nil) }
437
+ end
438
+
439
+ #open string interval
440
+ with_options :in => 'b'...'e' do
441
+ it { should deny('b', 'd').with_initial('a') }
442
+ it { should allow('a', 'e', 'f') }
443
+ it { should allow(nil) }
444
+ end
445
+
446
+ #single string value
447
+ with_options :in => 'b' do
448
+ it { should deny('b').with_initial('a') }
449
+ it { should allow('a', 'c') }
450
+ it { should allow(nil) }
451
+ end
452
+
453
+ #array
454
+ with_options :in => ['b', 'e', ' '] do
455
+ it { should deny('b', 'e').with_initial('a') }
456
+ it { should allow('a', 'c', 'f') }
457
+ it { should deny(' ').with_initial('a') }
458
+ it { should allow(nil) }
459
+
460
+ with_option :allow_blank => true do
461
+ it { should allow(' ') }
462
+ end
463
+ end
464
+
465
+ with_options :in => 'b', :message => "Some error message" do
466
+ it { should deny('b').with_initial('a').with_message(/Some error message/) }
467
+ end
468
+ end
469
+ end
470
+
471
+ with_validator :length do
472
+ with_option :as => :trigger do
473
+ with_option :is => 5 do
474
+ it {should allow('12345') }
475
+ it {should deny('1234', '123456').with_initial('12345') }
476
+
477
+ with_option :message => "Some error message" do
478
+ it {should deny('123456').with_initial('12345').with_message("Some error message") }
479
+
480
+ with_option :wrong_length => "Some specific error message" do
481
+ it {should deny('123456').with_initial('12345').with_message("Some specific error message") }
482
+ end
483
+ end
484
+
485
+ with_option :on => :create do
486
+ it {should deny.insert('1234', '123456') }
487
+ it {should allow.update('1234', '123456').with_initial('12345') }
488
+ end
489
+
490
+ with_option :on => :update do
491
+ it {should allow.insert('1234', '123456') }
492
+ it {should deny.update('1234', '123456').with_initial('12345') }
493
+ end
494
+
495
+ it {should deny(' ', nil).with_initial('12345') }
496
+
497
+ with_option :allow_blank => true do
498
+ it { should allow.insert(' ') }
499
+ end
500
+
501
+ with_option :allow_nil => true do
502
+ it { should allow.insert(nil) }
503
+ end
504
+ end
505
+
506
+ with_option :is => 0 do
507
+ it { should allow(nil) }
508
+ end
509
+
510
+
511
+ with_option :maximum => 5 do
512
+ it {should allow('1234', '12345') }
513
+ it {should deny('123456').with_initial('12345') }
514
+
515
+ with_option :message => "Some error message" do
516
+ it {should deny('123456').with_initial('12345').with_message("Some error message") }
517
+
518
+ with_option :too_long => "Some specific error message" do
519
+ it {should deny('123456').with_initial('12345').with_message("Some specific error message") }
520
+ end
521
+ end
522
+
523
+ it { should allow(' ', nil) }
524
+ end
525
+
526
+ with_option :minimum => 5 do
527
+ it {should allow('12345', '123456') }
528
+ it {should deny('1234').with_initial('12345') }
529
+
530
+ with_option :message => "Some error message" do
531
+ it {should deny('1234').with_initial('12345').with_message("Some error message") }
532
+
533
+ with_option :too_short => "Some specific error message" do
534
+ it {should deny('1234').with_initial('12345').with_message("Some specific error message") }
535
+ end
536
+ end
537
+
538
+ it {should deny(' ', nil).with_initial('12345') }
539
+
540
+ with_option :allow_blank => true do
541
+ it { should allow.insert(' ') }
542
+ end
543
+
544
+ with_option :allow_nil => true do
545
+ it { should allow.insert(nil) }
546
+ end
547
+ end
548
+
549
+ with_option :minimum => 0 do
550
+ it { should allow(' ', nil) }
551
+ end
552
+
553
+ with_option :in => 2..5 do
554
+ it {should allow('12', '123', '12345') }
555
+ it {should deny('1', '123456').with_initial('12') }
556
+
557
+ with_option :message => "Some error message" do
558
+ it {should deny('1').with_initial('12').with_message("Some error message") }
559
+ end
560
+
561
+ it {should deny(' ', nil).with_initial('12') }
562
+
563
+ with_option :allow_blank => true do
564
+ it { should allow.insert(' ') }
565
+ end
566
+
567
+ with_option :allow_nil => true do
568
+ it { should allow.insert(nil) }
569
+ end
570
+ end
571
+
572
+ with_option :in => 0..1 do
573
+ it { should allow(' ', nil) }
574
+ end
575
+
576
+ with_option :in => 2...5 do
577
+ it {should allow('12', '123') }
578
+ it {should deny('1', '12345', '123456').with_initial('12') }
579
+
580
+ with_option :message => "Some error message" do
581
+ it {should deny('1').with_initial('12').with_message("Some error message") }
582
+ end
583
+
584
+ it {should deny(' ', nil).with_initial('12') }
585
+
586
+ with_option :allow_blank => true do
587
+ it { should allow.insert(' ') }
588
+ end
589
+
590
+ with_option :allow_nil => true do
591
+ it { should allow.insert(nil) }
592
+ end
593
+ end
594
+
595
+ with_option :in => 0...2 do
596
+ it { should allow(' ', nil) }
597
+ end
598
+
599
+ with_option :in => [2, 3, 5] do
600
+ it {should allow('12', '123', '12345') }
601
+ it {should deny('1', '1234', '123456').with_initial('12') }
602
+
603
+ with_option :message => "Some error message" do
604
+ it {should deny('1').with_initial('12').with_message("Some error message") }
605
+ end
606
+
607
+ it {should deny(' ', nil).with_initial('12') }
608
+
609
+ with_option :allow_blank => true do
610
+ it { should allow.insert(' ') }
611
+ end
612
+
613
+ with_option :allow_nil => true do
614
+ it { should allow.insert(nil) }
615
+ end
616
+ end
617
+
618
+ with_option :in => [0, 1] do
619
+ it { should allow(' ', nil) }
620
+ end
621
+
622
+ with_option :in => 5 do
623
+ it {should allow('12345') }
624
+ it {should deny('1234', '123456').with_initial('12345') }
625
+ end
626
+
627
+ with_option :within => 2..5 do
628
+ it {should allow('12', '123', '12345') }
629
+ it {should deny('1', '123456').with_initial('12') }
630
+
631
+ with_option :message => "Some error message" do
632
+ it {should deny('1').with_initial('12').with_message("Some error message") }
633
+ end
634
+
635
+ it {should deny(' ', nil).with_initial('12') }
636
+
637
+ with_option :allow_blank => true do
638
+ it { should allow.insert(' ') }
639
+ end
640
+
641
+ with_option :allow_nil => true do
642
+ it { should allow.insert(nil) }
643
+ end
644
+ end
645
+
646
+ with_option :within => 0..1 do
647
+ it { should allow(' ', nil) }
648
+ end
649
+
650
+ with_option :within => 2...5 do
651
+ it {should allow('12', '123') }
652
+ it {should deny('1', '12345', '123456').with_initial('12') }
653
+
654
+ with_option :message => "Some error message" do
655
+ it {should deny('1').with_initial('12').with_message("Some error message") }
656
+ end
657
+
658
+ it {should deny(' ', nil).with_initial('12') }
659
+
660
+ with_option :allow_blank => true do
661
+ it { should allow.insert(' ') }
662
+ end
663
+
664
+ with_option :allow_nil => true do
665
+ it { should allow.insert(nil) }
666
+ end
667
+ end
668
+
669
+ with_option :within => 0...2 do
670
+ it { should allow(' ', nil) }
671
+ end
672
+
673
+ with_option :within => [2, 3, 5] do
674
+ it {should allow('12', '123', '12345') }
675
+ it {should deny('1', '1234', '123456').with_initial('12') }
676
+
677
+ with_option :message => "Some error message" do
678
+ it {should deny('1').with_initial('12').with_message("Some error message") }
679
+ end
680
+
681
+ it {should deny(' ', nil).with_initial('12') }
682
+
683
+ with_option :allow_blank => true do
684
+ it { should allow.insert(' ') }
685
+ end
686
+
687
+ with_option :allow_nil => true do
688
+ it { should allow.insert(nil) }
689
+ end
690
+ end
691
+
692
+ with_option :within => [0, 1] do
693
+ it { should allow(' ', nil) }
694
+ end
695
+
696
+ with_option :within => 5 do
697
+ it {should allow('12345') }
698
+ it {should deny('1234', '123456').with_initial('12345') }
699
+ end
700
+ end
701
+ end
702
+ end
703
+
704
+ for_string_column :validates => {:uniqueness => {:as => :index, :message => "Some error message"}, :length => {:in => 4..9, :as => :trigger, :message => "Some error message"}} do
705
+ it { should deny.at_least_one('1234','1234').with_initial('1234', '12345').and_message(/Duplicate entry/) }
706
+ it { should deny('123').with_initial('1234').and_message(/Some error message/) }
707
+
708
+ with_change :length => false do
709
+ it { should deny.at_least_one('1234','1234').with_initial('1234', '12345').and_message(/Duplicate entry/) }
710
+ it { should allow('123') }
711
+ end
712
+
713
+ with_change :length => {:in => 4..9} do
714
+ with_change :length => false do
715
+ it { should allow('123') }
716
+ end
717
+ end
718
+ end
719
+
720
+ for_string_column :validates => {:uniqueness => {:as => :index, :message => "Some error message"}, :format => {:with => /^start/, :as => :trigger, :message => "Some error message"}} do
721
+ it { should deny.at_least_one('start','start').with_initial('start', 'start1').and_message(/Duplicate entry/) }
722
+ it { should deny('stop').with_initial('start').and_message(/Some error message/) }
723
+
724
+ with_change :format => false do
725
+ it { should deny.at_least_one('start','start').with_initial('start', 'start1').and_message(/Duplicate entry/) }
726
+ it { should allow('stop') }
727
+ end
728
+
729
+ with_change :format => {:with => /^start/} do
730
+ with_change :format => false do
731
+ it { should allow('stop') }
732
+ end
733
+ end
734
+ end
735
+
736
+ #date
737
+ for_date_column do
738
+ startDate = Date.today - 5
739
+ endDate = Date.today
740
+
741
+ with_validator :presense do
742
+ with_option :as => :trigger do
743
+ it { should allow(startDate) }
744
+ it { should deny(nil).with_initial(startDate) }
745
+ end
746
+
747
+ with_option :allow_blank => true do
748
+ it { should allow(nil) }
749
+ end
750
+
751
+ with_option :allow_nil => true do
752
+ it { should allow(nil) }
753
+ end
754
+
755
+ with_option :on => :update do
756
+ it { should allow.insert(nil) }
757
+ end
758
+
759
+ with_option :on => :create do
760
+ it { should allow.update(nil).with_initial(startDate) }
761
+ end
762
+ end
763
+
764
+ with_validator :inclusion do
765
+ with_option :as => :trigger do
766
+
767
+ #closed date interval
768
+ with_options :in => startDate..endDate do
769
+ it { should allow(startDate, endDate - 3, endDate) }
770
+ it { should deny(startDate - 1, endDate + 1).with_initial(endDate - 1) }
771
+ end
772
+
773
+ #open date interval
774
+ with_options :in => startDate...endDate do
775
+ it { should allow(startDate, endDate - 3) }
776
+ it { should deny(startDate - 1, endDate, endDate + 1).with_initial(endDate - 1) }
777
+ end
778
+
779
+ #single date value
780
+ with_options :in => endDate do
781
+ it { should allow(endDate) }
782
+ it { should deny(endDate - 1, endDate + 1).with_initial(endDate) }
783
+ end
784
+
785
+ #array
786
+ with_options :in => [startDate, endDate] do
787
+ it { should allow(startDate, endDate) }
788
+ it { should deny(startDate - 1, endDate - 1, endDate + 1).with_initial(endDate) }
789
+ end
790
+
791
+ with_options :in => endDate, :message => "Some error message" do
792
+ it { should deny(endDate + 1).with_initial(endDate).with_message(/Some error message/) }
793
+ end
794
+ end
795
+ end
796
+
797
+ with_validator :exclusion do
798
+ with_option :as => :trigger do
799
+
800
+ #closed date interval
801
+ with_options :in => startDate..endDate do
802
+ it { should deny(startDate, endDate - 3, endDate).with_initial(startDate - 1) }
803
+ it { should allow(startDate - 1, endDate + 1) }
804
+ end
805
+
806
+ #open date interval
807
+ with_options :in => startDate...endDate do
808
+ it { should deny(startDate, endDate - 3).with_initial(startDate - 1) }
809
+ it { should allow(startDate - 1, endDate, endDate + 1) }
810
+ end
811
+
812
+ #single date value
813
+ with_options :in => endDate do
814
+ it { should deny(endDate).with_initial(endDate - 1) }
815
+ it { should allow(endDate - 1, endDate + 1) }
816
+ end
817
+
818
+ #array
819
+ with_options :in => [startDate, endDate] do
820
+ it { should deny(startDate, endDate).with_initial(startDate - 1) }
821
+ it { should allow(startDate - 1, endDate - 1, endDate + 1) }
822
+ end
823
+
824
+ with_options :in => endDate, :message => "Some error message" do
825
+ it { should deny(endDate).with_initial(endDate - 1).with_message(/Some error message/) }
826
+ end
827
+ end
828
+ end
829
+ end
830
+
831
+ #time
832
+ for_time_column do
833
+ startTime = Time.now - 10
834
+ endTime = Time.now
835
+
836
+ with_validator :presense do
837
+ with_option :as => :trigger do
838
+ it { should allow(startTime) }
839
+ it { should deny(nil).with_initial(startTime) }
840
+ end
841
+
842
+ with_option :allow_blank => true do
843
+ it { should allow(nil) }
844
+ end
845
+
846
+ with_option :allow_nil => true do
847
+ it { should allow(nil) }
848
+ end
849
+
850
+ with_option :on => :update do
851
+ it { should allow.insert(nil) }
852
+ end
853
+
854
+ with_option :on => :create do
855
+ it { should allow.update(nil).with_initial(startTime) }
856
+ end
857
+ end
858
+
859
+ with_validator :inclusion do
860
+ with_option :as => :trigger do
861
+
862
+ #closed time interval
863
+ with_options :in => startTime..endTime do
864
+ it { should allow(startTime, startTime + 1, endTime) }
865
+ it { should deny(startTime - 1, endTime + 1).with_initial(startTime) }
866
+ end
867
+
868
+ #open time interval
869
+ with_options :in => startTime...endTime do
870
+ it { should allow(startTime, startTime + 1, endTime - 1) }
871
+ it { should deny(startTime - 1, endTime).with_initial(startTime) }
872
+ end
873
+
874
+ #single time value
875
+ with_options :in => startTime do
876
+ it { should allow(startTime) }
877
+ it { should deny(startTime - 1, endTime).with_initial(startTime) }
878
+ end
879
+
880
+ #array
881
+ with_options :in => [startTime, endTime] do
882
+ it { should allow(startTime, endTime) }
883
+ it { should deny(startTime - 1, startTime + 1, endTime + 1).with_initial(startTime) }
884
+ end
885
+
886
+ with_options :in => startTime, :message => "Some error message" do
887
+ it { should deny(startTime + 1).with_initial(startTime).with_message(/Some error message/) }
888
+ end
889
+ end
890
+ end
891
+
892
+ with_validator :exclusion do
893
+ with_option :as => :trigger do
894
+
895
+ #closed time interval
896
+ with_options :in => startTime..endTime do
897
+ it { should deny(startTime, startTime + 1, endTime).with_initial(startTime - 1) }
898
+ it { should allow(startTime - 1, endTime + 1) }
899
+ end
900
+
901
+ #open time interval
902
+ with_options :in => startTime...endTime do
903
+ it { should deny(startTime, startTime + 1, endTime - 1).with_initial(startTime - 1) }
904
+ it { should allow(startTime - 1, endTime) }
905
+ end
906
+
907
+ #single time value
908
+ with_options :in => startTime do
909
+ it { should deny(startTime).with_initial(startTime - 1) }
910
+ it { should allow(startTime - 1, endTime) }
911
+ end
912
+
913
+ #array
914
+ with_options :in => [startTime, endTime] do
915
+ it { should deny(startTime, endTime).with_initial(startTime - 1) }
916
+ it { should allow(startTime - 1, startTime + 1, endTime + 1)}
917
+ end
918
+
919
+ with_options :in => startTime, :message => "Some error message" do
920
+ it { should deny(startTime).with_initial(startTime - 1).with_message(/Some error message/) }
921
+ end
922
+ end
923
+ end
924
+ end
925
+ end
926
+ end
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "MvMysql" do
4
+ end
@@ -0,0 +1,15 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'mv-test'
5
+ require 'mv-mysql'
6
+ require 'shoulda'
7
+ require 'factory_girl'
8
+
9
+ # Requires supporting files with custom matchers and macros, etc,
10
+ # in ./support/ and its subdirectories.
11
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
12
+
13
+ RSpec.configure do |config|
14
+
15
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mv-mysql
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Valeriy Prokopchuk
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-03-22 00:00:00 +02:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: mysql
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: mv-core
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: bundler
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
46
+ type: :development
47
+ prerelease: false
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: jeweler
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: 1.5.2
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rcov
62
+ requirement: &id005 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: *id005
71
+ description: Migration Validators project mysql driver
72
+ email: vprokopchuk@gmail.com
73
+ executables: []
74
+
75
+ extensions: []
76
+
77
+ extra_rdoc_files:
78
+ - LICENSE.txt
79
+ - README.rdoc
80
+ files:
81
+ - lib/migration_validators/adapters/mysql.rb
82
+ - lib/mv-mysql.rb
83
+ - LICENSE.txt
84
+ - README.rdoc
85
+ - spec/migration_validators/adapters/mysql_spec.rb
86
+ - spec/mv-mysql_spec.rb
87
+ - spec/spec_helper.rb
88
+ has_rdoc: true
89
+ homepage: http://github.com/vprokochuk256/mv-mysql
90
+ licenses:
91
+ - MIT
92
+ post_install_message:
93
+ rdoc_options: []
94
+
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: -1816609039285938262
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: "0"
112
+ requirements: []
113
+
114
+ rubyforge_project:
115
+ rubygems_version: 1.6.2
116
+ signing_key:
117
+ specification_version: 3
118
+ summary: Migration Validators project mysql driver
119
+ test_files:
120
+ - spec/migration_validators/adapters/mysql_spec.rb
121
+ - spec/mv-mysql_spec.rb
122
+ - spec/spec_helper.rb