validation_reflection 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ == 0.3.6 2010-02-14
2
+ * Enhancement from skoppensboer:
3
+ ** Changes Jeweler spec to reflect only Gemcutter
4
+ * Enhancement from duritong:
5
+ ** fix remembering of attributes defined as an array
6
+
7
+ == 0.3.5, 2009-10-09
8
+ * version bump
9
+
1
10
  == 0.3.4, 2009-10-09
2
11
  * Enhancements from Jonas Grimfelt
3
12
  ** Don't include instead of explicit namespaces to make the code much DRY:er and readable
data/README CHANGED
@@ -1,7 +1,7 @@
1
1
  Validation Reflection
2
2
  =====================
3
3
 
4
- Version 0.3.1, 2008-01-03
4
+ Version 0.3.6, 2010-02-14
5
5
 
6
6
  This plugin adds reflective access to validations
7
7
 
data/Rakefile CHANGED
@@ -23,12 +23,7 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
23
23
  end
24
24
 
25
25
  begin
26
- begin
27
- require 'jeweler'
28
- rescue LoadError
29
- gem 'technicalpickles-jeweler', '>= 1.0.0'
30
- require 'jeweler'
31
- end
26
+ require 'jeweler'
32
27
  Jeweler::Tasks.new do |gemspec|
33
28
  gemspec.name = "validation_reflection"
34
29
  gemspec.summary = "Adds reflective access to validations"
@@ -37,6 +32,7 @@ begin
37
32
  gemspec.homepage = "http://github.com/redinger/validation_reflection"
38
33
  gemspec.authors = ["Christopher Redinger"]
39
34
  end
35
+ Jeweler::RubyforgeTasks.new
40
36
  rescue LoadError
41
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
37
+ puts "Jeweler not available. Install it with: sudo gem install jeweler"
42
38
  end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 5
4
+ :patch: 6
@@ -121,7 +121,7 @@ module ActiveRecordExtensions # :nodoc:
121
121
  #
122
122
  def remember_validation_metadata(validation_type, *attr_names)
123
123
  configuration = attr_names.last.is_a?(::Hash) ? attr_names.pop : {}
124
- attr_names.each do |attr_name|
124
+ attr_names.flatten.each do |attr_name|
125
125
  self.write_inheritable_array :validations,
126
126
  [::ActiveRecord::Reflection::MacroReflection.new(validation_type, attr_name.to_sym, configuration, self)]
127
127
  end
@@ -42,6 +42,8 @@ class ValidationReflectionTest < Test::Unit::TestCase
42
42
  [
43
43
  create_fake_column('col0'),
44
44
  create_fake_column('col1'),
45
+ create_fake_column('col1a'),
46
+ create_fake_column('col1b'),
45
47
  create_fake_column('col2', false, 100),
46
48
  create_fake_column('col3'),
47
49
  create_fake_column('col4'),
@@ -55,6 +57,7 @@ class ValidationReflectionTest < Test::Unit::TestCase
55
57
  has_one :nothing
56
58
 
57
59
  validates_presence_of :col1
60
+ validates_presence_of [ :col1a, :col1b ]
58
61
  validates_length_of :col2, :maximum => 100
59
62
  validates_format_of :col3, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
60
63
  validates_numericality_of :col4, :only_integer => true
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{validation_reflection}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christopher Redinger"]
12
- s.date = %q{2009-10-09}
12
+ s.date = %q{2010-02-14}
13
13
  s.description = %q{Adds reflective access to validations}
14
14
  s.email = %q{redinger@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -50,3 +50,4 @@ Gem::Specification.new do |s|
50
50
  else
51
51
  end
52
52
  end
53
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_reflection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Redinger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-09 00:00:00 -04:00
12
+ date: 2010-02-14 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15