dm-validations 1.0.2 → 1.1.0.rc1
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/Gemfile +25 -94
- data/LICENSE +1 -1
- data/Rakefile +2 -7
- data/VERSION +1 -1
- data/dm-validations.gemspec +281 -270
- data/lib/dm-validations.rb +36 -35
- data/lib/dm-validations/auto_validate.rb +10 -5
- data/lib/dm-validations/contextual_validators.rb +41 -4
- data/lib/dm-validations/formats/email.rb +12 -8
- data/lib/dm-validations/validation_errors.rb +4 -0
- data/lib/dm-validations/validators/acceptance_validator.rb +4 -0
- data/lib/dm-validations/validators/format_validator.rb +3 -3
- data/lib/dm-validations/validators/generic_validator.rb +8 -20
- data/lib/dm-validations/validators/length_validator.rb +7 -1
- data/lib/dm-validations/validators/uniqueness_validator.rb +8 -2
- data/spec/fixtures/mittelschnauzer.rb +1 -0
- data/spec/integration/automatic_validation/inferred_boolean_properties_validation_spec.rb +20 -24
- data/spec/integration/automatic_validation/inferred_float_property_validation_spec.rb +11 -3
- data/spec/integration/automatic_validation/inferred_integer_properties_validation_spec.rb +9 -14
- data/spec/integration/automatic_validation/inferred_length_validation_spec.rb +9 -0
- data/spec/integration/automatic_validation/inferred_uniqueness_validation_spec.rb +48 -0
- data/spec/integration/automatic_validation/spec_helper.rb +2 -19
- data/spec/integration/format_validator/email_format_validator_spec.rb +15 -1
- data/spec/unit/generic_validator/optional_spec.rb +54 -0
- data/spec/unit/validation_errors/respond_to_spec.rb +15 -0
- data/tasks/spec.rake +0 -3
- metadata +69 -42
- data/.gitignore +0 -37
- data/tasks/ci.rake +0 -1
- data/tasks/local_gemfile.rake +0 -16
- data/tasks/metrics.rake +0 -36
data/Gemfile
CHANGED
@@ -1,112 +1,43 @@
|
|
1
|
-
|
2
|
-
# recommended to create a local Gemfile and use this instead of the git
|
3
|
-
# sources. This will make sure that you are developing against your
|
4
|
-
# other local datamapper sources that you currently work on. Gemfile.local
|
5
|
-
# will behave identically to the standard Gemfile apart from the fact that
|
6
|
-
# it fetches the datamapper gems from local paths. This means that you can use
|
7
|
-
# the same environment variables, like ADAPTER(S) or PLUGIN(S) when running
|
8
|
-
# bundle commands. Gemfile.local is added to .gitignore, so you don't need to
|
9
|
-
# worry about accidentally checking local development paths into git.
|
10
|
-
# In order to create a local Gemfile, all you need to do is run:
|
11
|
-
#
|
12
|
-
# bundle exec rake local_gemfile
|
13
|
-
#
|
14
|
-
# This will give you a Gemfile.local file that points to your local clones of
|
15
|
-
# the various datamapper gems. It's assumed that all datamapper repo clones
|
16
|
-
# reside in the same directory. You can use the Gemfile.local like so for
|
17
|
-
# running any bundle command:
|
18
|
-
#
|
19
|
-
# BUNDLE_GEMFILE=Gemfile.local bundle foo
|
20
|
-
#
|
21
|
-
# You can also specify which adapter(s) should be part of the bundle by setting
|
22
|
-
# an environment variable. This of course also works when using the Gemfile.local
|
23
|
-
#
|
24
|
-
# bundle foo # dm-sqlite-adapter
|
25
|
-
# ADAPTER=mysql bundle foo # dm-mysql-adapter
|
26
|
-
# ADAPTERS=sqlite,mysql bundle foo # dm-sqlite-adapter and dm-mysql-adapter
|
27
|
-
#
|
28
|
-
# Of course you can also use the ADAPTER(S) variable when using the Gemfile.local
|
29
|
-
# and running specs against selected adapters.
|
30
|
-
#
|
31
|
-
# For easily working with adapters supported on your machine, it's recommended
|
32
|
-
# that you first install all adapters that you are planning to use or work on
|
33
|
-
# by doing something like
|
34
|
-
#
|
35
|
-
# ADAPTERS=sqlite,mysql,postgres bundle install
|
36
|
-
#
|
37
|
-
# This will clone the various repositories and make them available to bundler.
|
38
|
-
# Once you have them installed you can easily switch between adapters for the
|
39
|
-
# various development tasks. Running something like
|
40
|
-
#
|
41
|
-
# ADAPTER=mysql bundle exec rake spec
|
42
|
-
#
|
43
|
-
# will make sure that the dm-mysql-adapter is part of the bundle, and will be used
|
44
|
-
# when running the specs.
|
45
|
-
#
|
46
|
-
# You can also specify which plugin(s) should be part of the bundle by setting
|
47
|
-
# an environment variable. This also works when using the Gemfile.local
|
48
|
-
#
|
49
|
-
# bundle foo # dm-migrations
|
50
|
-
# PLUGINS=dm-validations bundle foo # dm-migrations and dm-validations
|
51
|
-
# PLUGINS=dm-validations,dm-types bundle foo # dm-migrations, dm-validations and dm-types
|
52
|
-
#
|
53
|
-
# Of course you can combine the PLUGIN(S) and ADAPTER(S) env vars to run specs
|
54
|
-
# for certain adapter/plugin combinations.
|
55
|
-
#
|
56
|
-
# Finally, to speed up running specs and other tasks, it's recommended to run
|
57
|
-
#
|
58
|
-
# bundle lock
|
59
|
-
#
|
60
|
-
# after running 'bundle install' for the first time. This will make 'bundle exec' run
|
61
|
-
# a lot faster compared to the unlocked version. With an unlocked bundle you would
|
62
|
-
# typically just run 'bundle install' from time to time to fetch the latest sources from
|
63
|
-
# upstream. When you locked your bundle, you need to run
|
64
|
-
#
|
65
|
-
# bundle install --relock
|
66
|
-
#
|
67
|
-
# to make sure to fetch the latest updates and then lock the bundle again. Gemfile.lock
|
68
|
-
# is added to the .gitignore file, so you don't need to worry about accidentally checking
|
69
|
-
# it into version control.
|
1
|
+
require 'pathname'
|
70
2
|
|
71
3
|
source 'http://rubygems.org'
|
72
4
|
|
73
|
-
|
74
|
-
|
5
|
+
SOURCE = ENV.fetch('SOURCE', :git).to_sym
|
6
|
+
REPO_POSTFIX = SOURCE == :path ? '' : '.git'
|
7
|
+
DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
|
8
|
+
DM_VERSION = '~> 1.1.0.rc1'
|
75
9
|
|
76
|
-
group :runtime do
|
10
|
+
group :runtime do
|
77
11
|
|
78
12
|
if ENV['EXTLIB']
|
79
|
-
gem 'extlib',
|
13
|
+
gem 'extlib', '~> 0.9.15', SOURCE => "#{DATAMAPPER}/extlib#{REPO_POSTFIX}", :require => nil
|
80
14
|
else
|
81
|
-
gem 'activesupport', '~> 3.0.
|
15
|
+
gem 'activesupport', '~> 3.0.4', :require => nil
|
16
|
+
gem 'i18n', '~> 0.5.0'
|
82
17
|
end
|
83
18
|
|
84
|
-
gem 'dm-core',
|
19
|
+
gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
|
85
20
|
|
86
21
|
end
|
87
22
|
|
88
|
-
group
|
23
|
+
group :development do
|
89
24
|
|
90
|
-
gem 'dm-types',
|
91
|
-
|
92
|
-
gem 'rake',
|
93
|
-
gem 'rspec',
|
94
|
-
gem 'jeweler', '~> 1.4'
|
25
|
+
gem 'dm-types', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-types#{REPO_POSTFIX}"
|
26
|
+
gem 'jeweler', '~> 1.5.2'
|
27
|
+
gem 'rake', '~> 0.8.7'
|
28
|
+
gem 'rspec', '~> 1.3.1'
|
95
29
|
|
96
30
|
end
|
97
31
|
|
98
|
-
group :quality do
|
32
|
+
group :quality do
|
99
33
|
|
100
|
-
gem '
|
101
|
-
gem '
|
102
|
-
gem '
|
103
|
-
gem 'roodi', '~> 2.1'
|
104
|
-
gem 'yard', '~> 0.5'
|
105
|
-
gem 'yardstick', '~> 0.1'
|
34
|
+
gem 'rcov', '~> 0.9.9', :platforms => :mri_18
|
35
|
+
gem 'yard', '~> 0.6'
|
36
|
+
gem 'yardstick', '~> 0.2'
|
106
37
|
|
107
38
|
end
|
108
39
|
|
109
|
-
group :datamapper do
|
40
|
+
group :datamapper do
|
110
41
|
|
111
42
|
adapters = ENV['ADAPTER'] || ENV['ADAPTERS']
|
112
43
|
adapters = adapters.to_s.tr(',', ' ').split.uniq - %w[ in_memory ]
|
@@ -116,27 +47,27 @@ group :datamapper do # We need this because we want to pin these dependencies to
|
|
116
47
|
|
117
48
|
if (do_adapters = DM_DO_ADAPTERS & adapters).any?
|
118
49
|
options = {}
|
119
|
-
options[:git] = "#{DATAMAPPER}/do
|
50
|
+
options[:git] = "#{DATAMAPPER}/do#{REPO_POSTFIX}" if ENV['DO_GIT'] == 'true'
|
120
51
|
|
121
|
-
gem 'data_objects',
|
52
|
+
gem 'data_objects', DO_VERSION, options.dup
|
122
53
|
|
123
54
|
do_adapters.each do |adapter|
|
124
55
|
adapter = 'sqlite3' if adapter == 'sqlite'
|
125
56
|
gem "do_#{adapter}", DO_VERSION, options.dup
|
126
57
|
end
|
127
58
|
|
128
|
-
gem 'dm-do-adapter', DM_VERSION,
|
59
|
+
gem 'dm-do-adapter', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}"
|
129
60
|
end
|
130
61
|
|
131
62
|
adapters.each do |adapter|
|
132
|
-
gem "dm-#{adapter}-adapter", DM_VERSION,
|
63
|
+
gem "dm-#{adapter}-adapter", DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}"
|
133
64
|
end
|
134
65
|
|
135
66
|
plugins = ENV['PLUGINS'] || ENV['PLUGIN']
|
136
67
|
plugins = plugins.to_s.tr(',', ' ').split.push('dm-migrations').uniq
|
137
68
|
|
138
69
|
plugins.each do |plugin|
|
139
|
-
gem plugin, DM_VERSION,
|
70
|
+
gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}"
|
140
71
|
end
|
141
72
|
|
142
73
|
end
|
data/LICENSE
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Copyright (c) 2007 Guy van den Berg
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2011 DataMapper development team
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining
|
5
5
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
begin
|
5
|
-
gem 'jeweler', '~> 1.
|
5
|
+
gem 'jeweler', '~> 1.5.2'
|
6
6
|
require 'jeweler'
|
7
7
|
|
8
8
|
Jeweler::Tasks.new do |gem|
|
@@ -15,16 +15,11 @@ begin
|
|
15
15
|
gem.has_rdoc = 'yard'
|
16
16
|
|
17
17
|
gem.rubyforge_project = 'datamapper'
|
18
|
-
|
19
|
-
gem.add_dependency 'dm-core', '~> 1.0.2'
|
20
|
-
|
21
|
-
gem.add_development_dependency 'rspec', '~> 1.3'
|
22
|
-
gem.add_development_dependency 'dm-types', '~> 1.0.2'
|
23
18
|
end
|
24
19
|
|
25
20
|
Jeweler::GemcutterTasks.new
|
26
21
|
|
27
22
|
FileList['tasks/**/*.rake'].each { |task| import task }
|
28
23
|
rescue LoadError
|
29
|
-
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
24
|
+
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler -v 1.5.2'
|
30
25
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.1.0.rc1
|
data/dm-validations.gemspec
CHANGED
@@ -1,303 +1,314 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-validations}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.1.0.rc1"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Guy van den Berg"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-02-28}
|
13
13
|
s.description = %q{Library for performing validations on DM models and pure Ruby object}
|
14
14
|
s.email = %q{vandenberg.guy [a] gmail [d] com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
"tasks/yardstick.rake"
|
20
|
+
"Gemfile",
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"dm-validations.gemspec",
|
26
|
+
"lib/dm-validations.rb",
|
27
|
+
"lib/dm-validations/auto_validate.rb",
|
28
|
+
"lib/dm-validations/contextual_validators.rb",
|
29
|
+
"lib/dm-validations/exceptions.rb",
|
30
|
+
"lib/dm-validations/formats/email.rb",
|
31
|
+
"lib/dm-validations/formats/url.rb",
|
32
|
+
"lib/dm-validations/support/context.rb",
|
33
|
+
"lib/dm-validations/support/object.rb",
|
34
|
+
"lib/dm-validations/validation_errors.rb",
|
35
|
+
"lib/dm-validations/validators/absent_field_validator.rb",
|
36
|
+
"lib/dm-validations/validators/acceptance_validator.rb",
|
37
|
+
"lib/dm-validations/validators/block_validator.rb",
|
38
|
+
"lib/dm-validations/validators/confirmation_validator.rb",
|
39
|
+
"lib/dm-validations/validators/format_validator.rb",
|
40
|
+
"lib/dm-validations/validators/generic_validator.rb",
|
41
|
+
"lib/dm-validations/validators/length_validator.rb",
|
42
|
+
"lib/dm-validations/validators/method_validator.rb",
|
43
|
+
"lib/dm-validations/validators/numeric_validator.rb",
|
44
|
+
"lib/dm-validations/validators/primitive_validator.rb",
|
45
|
+
"lib/dm-validations/validators/required_field_validator.rb",
|
46
|
+
"lib/dm-validations/validators/uniqueness_validator.rb",
|
47
|
+
"lib/dm-validations/validators/within_validator.rb",
|
48
|
+
"spec/fixtures/barcode.rb",
|
49
|
+
"spec/fixtures/basketball_court.rb",
|
50
|
+
"spec/fixtures/basketball_player.rb",
|
51
|
+
"spec/fixtures/beta_tester_account.rb",
|
52
|
+
"spec/fixtures/bill_of_landing.rb",
|
53
|
+
"spec/fixtures/boat_dock.rb",
|
54
|
+
"spec/fixtures/city.rb",
|
55
|
+
"spec/fixtures/company.rb",
|
56
|
+
"spec/fixtures/corporate_world.rb",
|
57
|
+
"spec/fixtures/country.rb",
|
58
|
+
"spec/fixtures/ethernet_frame.rb",
|
59
|
+
"spec/fixtures/event.rb",
|
60
|
+
"spec/fixtures/g3_concert.rb",
|
61
|
+
"spec/fixtures/jabberwock.rb",
|
62
|
+
"spec/fixtures/kayak.rb",
|
63
|
+
"spec/fixtures/lernean_hydra.rb",
|
64
|
+
"spec/fixtures/mathematical_function.rb",
|
65
|
+
"spec/fixtures/memory_object.rb",
|
66
|
+
"spec/fixtures/mittelschnauzer.rb",
|
67
|
+
"spec/fixtures/motor_launch.rb",
|
68
|
+
"spec/fixtures/multibyte.rb",
|
69
|
+
"spec/fixtures/page.rb",
|
70
|
+
"spec/fixtures/phone_number.rb",
|
71
|
+
"spec/fixtures/pirogue.rb",
|
72
|
+
"spec/fixtures/programming_language.rb",
|
73
|
+
"spec/fixtures/reservation.rb",
|
74
|
+
"spec/fixtures/scm_operation.rb",
|
75
|
+
"spec/fixtures/sms_message.rb",
|
76
|
+
"spec/fixtures/udp_packet.rb",
|
77
|
+
"spec/integration/absent_field_validator/absent_field_validator_spec.rb",
|
78
|
+
"spec/integration/absent_field_validator/spec_helper.rb",
|
79
|
+
"spec/integration/acceptance_validator/acceptance_validator_spec.rb",
|
80
|
+
"spec/integration/acceptance_validator/spec_helper.rb",
|
81
|
+
"spec/integration/automatic_validation/custom_messages_for_inferred_validation_spec.rb",
|
82
|
+
"spec/integration/automatic_validation/disabling_inferred_validation_spec.rb",
|
83
|
+
"spec/integration/automatic_validation/inferred_boolean_properties_validation_spec.rb",
|
84
|
+
"spec/integration/automatic_validation/inferred_float_property_validation_spec.rb",
|
85
|
+
"spec/integration/automatic_validation/inferred_format_validation_spec.rb",
|
86
|
+
"spec/integration/automatic_validation/inferred_integer_properties_validation_spec.rb",
|
87
|
+
"spec/integration/automatic_validation/inferred_length_validation_spec.rb",
|
88
|
+
"spec/integration/automatic_validation/inferred_presence_validation_spec.rb",
|
89
|
+
"spec/integration/automatic_validation/inferred_primitive_validation_spec.rb",
|
90
|
+
"spec/integration/automatic_validation/inferred_uniqueness_validation_spec.rb",
|
91
|
+
"spec/integration/automatic_validation/inferred_within_validation_spec.rb",
|
92
|
+
"spec/integration/automatic_validation/spec_helper.rb",
|
93
|
+
"spec/integration/block_validator/block_validator_spec.rb",
|
94
|
+
"spec/integration/block_validator/spec_helper.rb",
|
95
|
+
"spec/integration/conditional_validation/if_condition_spec.rb",
|
96
|
+
"spec/integration/conditional_validation/spec_helper.rb",
|
97
|
+
"spec/integration/confirmation_validator/confirmation_validator_spec.rb",
|
98
|
+
"spec/integration/confirmation_validator/spec_helper.rb",
|
99
|
+
"spec/integration/datamapper_models/association_validation_spec.rb",
|
100
|
+
"spec/integration/datamapper_models/inheritance_spec.rb",
|
101
|
+
"spec/integration/duplicated_validations/duplicated_validations_spec.rb",
|
102
|
+
"spec/integration/duplicated_validations/spec_helper.rb",
|
103
|
+
"spec/integration/format_validator/email_format_validator_spec.rb",
|
104
|
+
"spec/integration/format_validator/format_validator_spec.rb",
|
105
|
+
"spec/integration/format_validator/regexp_validator_spec.rb",
|
106
|
+
"spec/integration/format_validator/spec_helper.rb",
|
107
|
+
"spec/integration/format_validator/url_format_validator_spec.rb",
|
108
|
+
"spec/integration/length_validator/default_value_spec.rb",
|
109
|
+
"spec/integration/length_validator/equality_spec.rb",
|
110
|
+
"spec/integration/length_validator/error_message_spec.rb",
|
111
|
+
"spec/integration/length_validator/maximum_spec.rb",
|
112
|
+
"spec/integration/length_validator/minimum_spec.rb",
|
113
|
+
"spec/integration/length_validator/range_spec.rb",
|
114
|
+
"spec/integration/length_validator/spec_helper.rb",
|
115
|
+
"spec/integration/method_validator/method_validator_spec.rb",
|
116
|
+
"spec/integration/method_validator/spec_helper.rb",
|
117
|
+
"spec/integration/numeric_validator/equality_with_float_type_spec.rb",
|
118
|
+
"spec/integration/numeric_validator/equality_with_integer_type_spec.rb",
|
119
|
+
"spec/integration/numeric_validator/float_type_spec.rb",
|
120
|
+
"spec/integration/numeric_validator/gt_with_float_type_spec.rb",
|
121
|
+
"spec/integration/numeric_validator/gte_with_float_type_spec.rb",
|
122
|
+
"spec/integration/numeric_validator/integer_only_true_spec.rb",
|
123
|
+
"spec/integration/numeric_validator/integer_type_spec.rb",
|
124
|
+
"spec/integration/numeric_validator/lt_with_float_type_spec.rb",
|
125
|
+
"spec/integration/numeric_validator/lte_with_float_type_spec.rb",
|
126
|
+
"spec/integration/numeric_validator/spec_helper.rb",
|
127
|
+
"spec/integration/primitive_validator/primitive_validator_spec.rb",
|
128
|
+
"spec/integration/primitive_validator/spec_helper.rb",
|
129
|
+
"spec/integration/pure_ruby_objects/plain_old_ruby_object_validation_spec.rb",
|
130
|
+
"spec/integration/required_field_validator/association_spec.rb",
|
131
|
+
"spec/integration/required_field_validator/boolean_type_value_spec.rb",
|
132
|
+
"spec/integration/required_field_validator/date_type_value_spec.rb",
|
133
|
+
"spec/integration/required_field_validator/datetime_type_value_spec.rb",
|
134
|
+
"spec/integration/required_field_validator/float_type_value_spec.rb",
|
135
|
+
"spec/integration/required_field_validator/integer_type_value_spec.rb",
|
136
|
+
"spec/integration/required_field_validator/plain_old_ruby_object_spec.rb",
|
137
|
+
"spec/integration/required_field_validator/shared_examples.rb",
|
138
|
+
"spec/integration/required_field_validator/spec_helper.rb",
|
139
|
+
"spec/integration/required_field_validator/string_type_value_spec.rb",
|
140
|
+
"spec/integration/required_field_validator/text_type_value_spec.rb",
|
141
|
+
"spec/integration/shared/default_validation_context.rb",
|
142
|
+
"spec/integration/shared/valid_and_invalid_model.rb",
|
143
|
+
"spec/integration/uniqueness_validator/spec_helper.rb",
|
144
|
+
"spec/integration/uniqueness_validator/uniqueness_validator_spec.rb",
|
145
|
+
"spec/integration/within_validator/spec_helper.rb",
|
146
|
+
"spec/integration/within_validator/within_validator_spec.rb",
|
147
|
+
"spec/public/resource_spec.rb",
|
148
|
+
"spec/rcov.opts",
|
149
|
+
"spec/spec.opts",
|
150
|
+
"spec/spec_helper.rb",
|
151
|
+
"spec/unit/contextual_validators/emptiness_spec.rb",
|
152
|
+
"spec/unit/contextual_validators/execution_spec.rb",
|
153
|
+
"spec/unit/contextual_validators/spec_helper.rb",
|
154
|
+
"spec/unit/generic_validator/equality_operator_spec.rb",
|
155
|
+
"spec/unit/generic_validator/optional_spec.rb",
|
156
|
+
"spec/unit/validation_errors/adding_spec.rb",
|
157
|
+
"spec/unit/validation_errors/emptiness_spec.rb",
|
158
|
+
"spec/unit/validation_errors/enumerable_spec.rb",
|
159
|
+
"spec/unit/validation_errors/reading_spec.rb",
|
160
|
+
"spec/unit/validation_errors/respond_to_spec.rb",
|
161
|
+
"tasks/spec.rake",
|
162
|
+
"tasks/yard.rake",
|
163
|
+
"tasks/yardstick.rake"
|
165
164
|
]
|
166
|
-
s.has_rdoc = %q{yard}
|
167
165
|
s.homepage = %q{http://github.com/datamapper/dm-validations}
|
168
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
169
166
|
s.require_paths = ["lib"]
|
170
167
|
s.rubyforge_project = %q{datamapper}
|
171
|
-
s.rubygems_version = %q{1.
|
168
|
+
s.rubygems_version = %q{1.5.2}
|
172
169
|
s.summary = %q{Library for performing validations on DM models and pure Ruby object}
|
173
170
|
s.test_files = [
|
174
171
|
"spec/fixtures/barcode.rb",
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
172
|
+
"spec/fixtures/basketball_court.rb",
|
173
|
+
"spec/fixtures/basketball_player.rb",
|
174
|
+
"spec/fixtures/beta_tester_account.rb",
|
175
|
+
"spec/fixtures/bill_of_landing.rb",
|
176
|
+
"spec/fixtures/boat_dock.rb",
|
177
|
+
"spec/fixtures/city.rb",
|
178
|
+
"spec/fixtures/company.rb",
|
179
|
+
"spec/fixtures/corporate_world.rb",
|
180
|
+
"spec/fixtures/country.rb",
|
181
|
+
"spec/fixtures/ethernet_frame.rb",
|
182
|
+
"spec/fixtures/event.rb",
|
183
|
+
"spec/fixtures/g3_concert.rb",
|
184
|
+
"spec/fixtures/jabberwock.rb",
|
185
|
+
"spec/fixtures/kayak.rb",
|
186
|
+
"spec/fixtures/lernean_hydra.rb",
|
187
|
+
"spec/fixtures/mathematical_function.rb",
|
188
|
+
"spec/fixtures/memory_object.rb",
|
189
|
+
"spec/fixtures/mittelschnauzer.rb",
|
190
|
+
"spec/fixtures/motor_launch.rb",
|
191
|
+
"spec/fixtures/multibyte.rb",
|
192
|
+
"spec/fixtures/page.rb",
|
193
|
+
"spec/fixtures/phone_number.rb",
|
194
|
+
"spec/fixtures/pirogue.rb",
|
195
|
+
"spec/fixtures/programming_language.rb",
|
196
|
+
"spec/fixtures/reservation.rb",
|
197
|
+
"spec/fixtures/scm_operation.rb",
|
198
|
+
"spec/fixtures/sms_message.rb",
|
199
|
+
"spec/fixtures/udp_packet.rb",
|
200
|
+
"spec/integration/absent_field_validator/absent_field_validator_spec.rb",
|
201
|
+
"spec/integration/absent_field_validator/spec_helper.rb",
|
202
|
+
"spec/integration/acceptance_validator/acceptance_validator_spec.rb",
|
203
|
+
"spec/integration/acceptance_validator/spec_helper.rb",
|
204
|
+
"spec/integration/automatic_validation/custom_messages_for_inferred_validation_spec.rb",
|
205
|
+
"spec/integration/automatic_validation/disabling_inferred_validation_spec.rb",
|
206
|
+
"spec/integration/automatic_validation/inferred_boolean_properties_validation_spec.rb",
|
207
|
+
"spec/integration/automatic_validation/inferred_float_property_validation_spec.rb",
|
208
|
+
"spec/integration/automatic_validation/inferred_format_validation_spec.rb",
|
209
|
+
"spec/integration/automatic_validation/inferred_integer_properties_validation_spec.rb",
|
210
|
+
"spec/integration/automatic_validation/inferred_length_validation_spec.rb",
|
211
|
+
"spec/integration/automatic_validation/inferred_presence_validation_spec.rb",
|
212
|
+
"spec/integration/automatic_validation/inferred_primitive_validation_spec.rb",
|
213
|
+
"spec/integration/automatic_validation/inferred_uniqueness_validation_spec.rb",
|
214
|
+
"spec/integration/automatic_validation/inferred_within_validation_spec.rb",
|
215
|
+
"spec/integration/automatic_validation/spec_helper.rb",
|
216
|
+
"spec/integration/block_validator/block_validator_spec.rb",
|
217
|
+
"spec/integration/block_validator/spec_helper.rb",
|
218
|
+
"spec/integration/conditional_validation/if_condition_spec.rb",
|
219
|
+
"spec/integration/conditional_validation/spec_helper.rb",
|
220
|
+
"spec/integration/confirmation_validator/confirmation_validator_spec.rb",
|
221
|
+
"spec/integration/confirmation_validator/spec_helper.rb",
|
222
|
+
"spec/integration/datamapper_models/association_validation_spec.rb",
|
223
|
+
"spec/integration/datamapper_models/inheritance_spec.rb",
|
224
|
+
"spec/integration/duplicated_validations/duplicated_validations_spec.rb",
|
225
|
+
"spec/integration/duplicated_validations/spec_helper.rb",
|
226
|
+
"spec/integration/format_validator/email_format_validator_spec.rb",
|
227
|
+
"spec/integration/format_validator/format_validator_spec.rb",
|
228
|
+
"spec/integration/format_validator/regexp_validator_spec.rb",
|
229
|
+
"spec/integration/format_validator/spec_helper.rb",
|
230
|
+
"spec/integration/format_validator/url_format_validator_spec.rb",
|
231
|
+
"spec/integration/length_validator/default_value_spec.rb",
|
232
|
+
"spec/integration/length_validator/equality_spec.rb",
|
233
|
+
"spec/integration/length_validator/error_message_spec.rb",
|
234
|
+
"spec/integration/length_validator/maximum_spec.rb",
|
235
|
+
"spec/integration/length_validator/minimum_spec.rb",
|
236
|
+
"spec/integration/length_validator/range_spec.rb",
|
237
|
+
"spec/integration/length_validator/spec_helper.rb",
|
238
|
+
"spec/integration/method_validator/method_validator_spec.rb",
|
239
|
+
"spec/integration/method_validator/spec_helper.rb",
|
240
|
+
"spec/integration/numeric_validator/equality_with_float_type_spec.rb",
|
241
|
+
"spec/integration/numeric_validator/equality_with_integer_type_spec.rb",
|
242
|
+
"spec/integration/numeric_validator/float_type_spec.rb",
|
243
|
+
"spec/integration/numeric_validator/gt_with_float_type_spec.rb",
|
244
|
+
"spec/integration/numeric_validator/gte_with_float_type_spec.rb",
|
245
|
+
"spec/integration/numeric_validator/integer_only_true_spec.rb",
|
246
|
+
"spec/integration/numeric_validator/integer_type_spec.rb",
|
247
|
+
"spec/integration/numeric_validator/lt_with_float_type_spec.rb",
|
248
|
+
"spec/integration/numeric_validator/lte_with_float_type_spec.rb",
|
249
|
+
"spec/integration/numeric_validator/spec_helper.rb",
|
250
|
+
"spec/integration/primitive_validator/primitive_validator_spec.rb",
|
251
|
+
"spec/integration/primitive_validator/spec_helper.rb",
|
252
|
+
"spec/integration/pure_ruby_objects/plain_old_ruby_object_validation_spec.rb",
|
253
|
+
"spec/integration/required_field_validator/association_spec.rb",
|
254
|
+
"spec/integration/required_field_validator/boolean_type_value_spec.rb",
|
255
|
+
"spec/integration/required_field_validator/date_type_value_spec.rb",
|
256
|
+
"spec/integration/required_field_validator/datetime_type_value_spec.rb",
|
257
|
+
"spec/integration/required_field_validator/float_type_value_spec.rb",
|
258
|
+
"spec/integration/required_field_validator/integer_type_value_spec.rb",
|
259
|
+
"spec/integration/required_field_validator/plain_old_ruby_object_spec.rb",
|
260
|
+
"spec/integration/required_field_validator/shared_examples.rb",
|
261
|
+
"spec/integration/required_field_validator/spec_helper.rb",
|
262
|
+
"spec/integration/required_field_validator/string_type_value_spec.rb",
|
263
|
+
"spec/integration/required_field_validator/text_type_value_spec.rb",
|
264
|
+
"spec/integration/shared/default_validation_context.rb",
|
265
|
+
"spec/integration/shared/valid_and_invalid_model.rb",
|
266
|
+
"spec/integration/uniqueness_validator/spec_helper.rb",
|
267
|
+
"spec/integration/uniqueness_validator/uniqueness_validator_spec.rb",
|
268
|
+
"spec/integration/within_validator/spec_helper.rb",
|
269
|
+
"spec/integration/within_validator/within_validator_spec.rb",
|
270
|
+
"spec/public/resource_spec.rb",
|
271
|
+
"spec/spec_helper.rb",
|
272
|
+
"spec/unit/contextual_validators/emptiness_spec.rb",
|
273
|
+
"spec/unit/contextual_validators/execution_spec.rb",
|
274
|
+
"spec/unit/contextual_validators/spec_helper.rb",
|
275
|
+
"spec/unit/generic_validator/equality_operator_spec.rb",
|
276
|
+
"spec/unit/generic_validator/optional_spec.rb",
|
277
|
+
"spec/unit/validation_errors/adding_spec.rb",
|
278
|
+
"spec/unit/validation_errors/emptiness_spec.rb",
|
279
|
+
"spec/unit/validation_errors/enumerable_spec.rb",
|
280
|
+
"spec/unit/validation_errors/reading_spec.rb",
|
281
|
+
"spec/unit/validation_errors/respond_to_spec.rb"
|
282
282
|
]
|
283
283
|
|
284
284
|
if s.respond_to? :specification_version then
|
285
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
286
285
|
s.specification_version = 3
|
287
286
|
|
288
287
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
289
|
-
s.add_runtime_dependency(%q<
|
290
|
-
s.
|
291
|
-
s.
|
288
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.4"])
|
289
|
+
s.add_runtime_dependency(%q<i18n>, ["~> 0.5.0"])
|
290
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0.rc1"])
|
291
|
+
s.add_development_dependency(%q<dm-types>, ["~> 1.1.0.rc1"])
|
292
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
293
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
294
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
|
292
295
|
else
|
293
|
-
s.add_dependency(%q<
|
294
|
-
s.add_dependency(%q<
|
295
|
-
s.add_dependency(%q<dm-
|
296
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.4"])
|
297
|
+
s.add_dependency(%q<i18n>, ["~> 0.5.0"])
|
298
|
+
s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc1"])
|
299
|
+
s.add_dependency(%q<dm-types>, ["~> 1.1.0.rc1"])
|
300
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
301
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
302
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
296
303
|
end
|
297
304
|
else
|
298
|
-
s.add_dependency(%q<
|
299
|
-
s.add_dependency(%q<
|
300
|
-
s.add_dependency(%q<dm-
|
305
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.4"])
|
306
|
+
s.add_dependency(%q<i18n>, ["~> 0.5.0"])
|
307
|
+
s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc1"])
|
308
|
+
s.add_dependency(%q<dm-types>, ["~> 1.1.0.rc1"])
|
309
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
310
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
311
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
301
312
|
end
|
302
313
|
end
|
303
314
|
|