dm-validations 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -71,7 +71,7 @@
71
71
  source 'http://rubygems.org'
72
72
 
73
73
  DATAMAPPER = 'git://github.com/datamapper'
74
- DM_VERSION = '~> 1.0.1'
74
+ DM_VERSION = '~> 1.0.2'
75
75
 
76
76
  group :runtime do # Runtime dependencies (as in the gemspec)
77
77
 
data/Rakefile CHANGED
@@ -12,13 +12,14 @@ begin
12
12
  gem.email = 'vandenberg.guy [a] gmail [d] com'
13
13
  gem.homepage = 'http://github.com/datamapper/%s' % gem.name
14
14
  gem.authors = [ 'Guy van den Berg' ]
15
+ gem.has_rdoc = 'yard'
15
16
 
16
17
  gem.rubyforge_project = 'datamapper'
17
18
 
18
- gem.add_dependency 'dm-core', '~> 1.0.1'
19
+ gem.add_dependency 'dm-core', '~> 1.0.2'
19
20
 
20
21
  gem.add_development_dependency 'rspec', '~> 1.3'
21
- gem.add_development_dependency 'dm-types', '~> 1.0.1'
22
+ gem.add_development_dependency 'dm-types', '~> 1.0.2'
22
23
  end
23
24
 
24
25
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-validations}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Guy van den Berg"]
@@ -163,6 +163,7 @@ Gem::Specification.new do |s|
163
163
  "tasks/yard.rake",
164
164
  "tasks/yardstick.rake"
165
165
  ]
166
+ s.has_rdoc = %q{yard}
166
167
  s.homepage = %q{http://github.com/datamapper/dm-validations}
167
168
  s.rdoc_options = ["--charset=UTF-8"]
168
169
  s.require_paths = ["lib"]
@@ -285,18 +286,18 @@ Gem::Specification.new do |s|
285
286
  s.specification_version = 3
286
287
 
287
288
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
288
- s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.1"])
289
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.2"])
289
290
  s.add_development_dependency(%q<rspec>, ["~> 1.3"])
290
- s.add_development_dependency(%q<dm-types>, ["~> 1.0.1"])
291
+ s.add_development_dependency(%q<dm-types>, ["~> 1.0.2"])
291
292
  else
292
- s.add_dependency(%q<dm-core>, ["~> 1.0.1"])
293
+ s.add_dependency(%q<dm-core>, ["~> 1.0.2"])
293
294
  s.add_dependency(%q<rspec>, ["~> 1.3"])
294
- s.add_dependency(%q<dm-types>, ["~> 1.0.1"])
295
+ s.add_dependency(%q<dm-types>, ["~> 1.0.2"])
295
296
  end
296
297
  else
297
- s.add_dependency(%q<dm-core>, ["~> 1.0.1"])
298
+ s.add_dependency(%q<dm-core>, ["~> 1.0.2"])
298
299
  s.add_dependency(%q<rspec>, ["~> 1.3"])
299
- s.add_dependency(%q<dm-types>, ["~> 1.0.1"])
300
+ s.add_dependency(%q<dm-types>, ["~> 1.0.2"])
300
301
  end
301
302
  end
302
303
 
@@ -40,7 +40,9 @@ module DataMapper
40
40
  def self.new(model, name, options = {}, type = nil)
41
41
  property = super
42
42
  property.model.auto_generate_validations(property)
43
- property
43
+
44
+ # FIXME: explicit return needed for YARD to parse this properly
45
+ return property
44
46
  end
45
47
  end
46
48
  end
@@ -36,7 +36,6 @@ module DataMapper
36
36
  # Auto-generate validations for a given property. This will only occur
37
37
  # if the option :auto_validation is either true or left undefined.
38
38
  #
39
- # @details [Triggers]
40
39
  # Triggers that generate validator creation
41
40
  #
42
41
  # :required => true
@@ -112,7 +111,7 @@ module DataMapper
112
111
  @disable_auto_validations || false
113
112
  end
114
113
 
115
- alias auto_validations_disabled? disabled_auto_validations?
114
+ alias_method :auto_validations_disabled?, :disabled_auto_validations?
116
115
 
117
116
  # Checks whether or not property should be auto validated.
118
117
  # It is the case for properties with :auto_validation option
@@ -70,7 +70,6 @@ module DataMapper
70
70
  # @option :as<Format, Proc, Regexp> the pre-defined format, Proc or Regexp to validate against
71
71
  # @option :with<Format, Proc, Regexp> an alias for :as
72
72
  #
73
- # @details [Pre-defined Formats]
74
73
  # :email_address (format is specified in DataMapper::Validations::Format::Email)
75
74
  # :url (format is specified in DataMapper::Validations::Format::Url)
76
75
  #
@@ -130,7 +130,7 @@ module DataMapper
130
130
  # explicitly given validations with different option
131
131
  # (usually as Range vs. max limit for inferred validation)
132
132
  #
133
- # @semipublic
133
+ # @api semipublic
134
134
  def ==(other)
135
135
  self.class == other.class &&
136
136
  self.field_name == other.field_name &&
@@ -143,7 +143,7 @@ module DataMapper
143
143
  "<##{self.class.name} @field_name='#{@field_name}' @if_clause=#{@if_clause.inspect} @unless_clause=#{@unless_clause.inspect} @options=#{@options.inspect}>"
144
144
  end
145
145
 
146
- alias to_s inspect
146
+ alias_method :to_s, :inspect
147
147
  end # class GenericValidator
148
148
  end # module Validations
149
149
  end # module DataMapper
@@ -131,8 +131,6 @@ module DataMapper
131
131
 
132
132
  # Validate whether a field is numeric
133
133
  #
134
- # @details
135
- #
136
134
  # Options are:
137
135
  #
138
136
  # :allow_nil => true | false
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Guy van den Berg
@@ -28,8 +28,8 @@ dependencies:
28
28
  segments:
29
29
  - 1
30
30
  - 0
31
- - 1
32
- version: 1.0.1
31
+ - 2
32
+ version: 1.0.2
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
@@ -57,8 +57,8 @@ dependencies:
57
57
  segments:
58
58
  - 1
59
59
  - 0
60
- - 1
61
- version: 1.0.1
60
+ - 2
61
+ version: 1.0.2
62
62
  type: :development
63
63
  version_requirements: *id003
64
64
  description: Library for performing validations on DM models and pure Ruby object
@@ -216,7 +216,7 @@ files:
216
216
  - tasks/spec.rake
217
217
  - tasks/yard.rake
218
218
  - tasks/yardstick.rake
219
- has_rdoc: true
219
+ has_rdoc: yard
220
220
  homepage: http://github.com/datamapper/dm-validations
221
221
  licenses: []
222
222