table_warnings 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module TableWarnings
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -5,7 +5,7 @@ module TableWarnings
5
5
 
6
6
  def messages
7
7
  if m = blk.call
8
- [m].flatten
8
+ [m].flatten.select(&:present?)
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,6 @@
1
+ require 'active_support'
2
+ require 'active_support/version'
3
+ require 'active_support/core_ext' if ::ActiveSupport::VERSION::MAJOR >= 3
1
4
  require 'active_record'
2
5
 
3
6
  module TableWarnings
@@ -20,9 +20,10 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ['lib']
21
21
 
22
22
  s.add_runtime_dependency 'activerecord'
23
+ s.add_runtime_dependency 'activesupport'
23
24
 
24
25
  s.add_development_dependency 'fastercsv'
25
26
  s.add_development_dependency 'rake'
26
- s.add_development_dependency 'mini_record'
27
+ s.add_development_dependency 'mini_record-compat'
27
28
  s.add_development_dependency 'sqlite3'
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_warnings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-22 00:00:00.000000000Z
12
+ date: 2011-10-04 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &2154426760 !ruby/object:Gem::Requirement
16
+ requirement: &2154337840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2154426760
24
+ version_requirements: *2154337840
25
+ - !ruby/object:Gem::Dependency
26
+ name: activesupport
27
+ requirement: &2154337420 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2154337420
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: fastercsv
27
- requirement: &2154426340 !ruby/object:Gem::Requirement
38
+ requirement: &2154337000 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '0'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *2154426340
46
+ version_requirements: *2154337000
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rake
38
- requirement: &2154425920 !ruby/object:Gem::Requirement
49
+ requirement: &2154336580 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *2154425920
57
+ version_requirements: *2154336580
47
58
  - !ruby/object:Gem::Dependency
48
- name: mini_record
49
- requirement: &2154425500 !ruby/object:Gem::Requirement
59
+ name: mini_record-compat
60
+ requirement: &2154336160 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *2154425500
68
+ version_requirements: *2154336160
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: sqlite3
60
- requirement: &2154425080 !ruby/object:Gem::Requirement
71
+ requirement: &2154335740 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,7 +76,7 @@ dependencies:
65
76
  version: '0'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *2154425080
79
+ version_requirements: *2154335740
69
80
  description: Validate an entire [ActiveRecord] table, checking for things like blank
70
81
  rows or total number of rows
71
82
  email: