sequel_notnaughty 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +17 -0
- data/Rakefile +1 -2
- data/lib/sequel_notnaughty.rb +3 -3
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
= Ruby-Sequels adapter to NotNaughty - The Validation Framework
|
2
|
+
|
3
|
+
Validate all your Ruby Sequel models with NotNaughty:
|
4
|
+
|
5
|
+
class Sequel::Model
|
6
|
+
is :notnaughty
|
7
|
+
end
|
8
|
+
|
9
|
+
Validate just specific models:
|
10
|
+
|
11
|
+
class Item < Sequel::Model
|
12
|
+
is :notnaughty
|
13
|
+
|
14
|
+
validates_uniqueness_of :name, :in => category
|
15
|
+
end
|
16
|
+
|
17
|
+
For more examples see NotNaughty documentation.
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ include FileUtils
|
|
9
9
|
# Configuration
|
10
10
|
##############################################################################
|
11
11
|
NAME = "sequel_notnaughty"
|
12
|
-
VERS = "0.6.
|
12
|
+
VERS = "0.6.2"
|
13
13
|
CLEAN.include %w[ pkg doc coverage ]
|
14
14
|
RDOC_OPTS = [
|
15
15
|
"--quiet",
|
@@ -113,7 +113,6 @@ end
|
|
113
113
|
##############################################################################
|
114
114
|
task :release => [:package] do
|
115
115
|
sh %{rubyforge login}
|
116
|
-
sh %{rubyforge add_release not-naughty not-naughty #{VERS} pkg/#{NAME}-#{VERS}.tgz}
|
117
116
|
sh %{rubyforge add_file not-naughty not-naughty #{VERS} pkg/#{NAME}-#{VERS}.gem}
|
118
117
|
end
|
119
118
|
|
data/lib/sequel_notnaughty.rb
CHANGED
@@ -3,11 +3,11 @@ require 'rubygems'
|
|
3
3
|
gem 'sequel', '>= 2.5.0'
|
4
4
|
require 'sequel'
|
5
5
|
|
6
|
-
|
6
|
+
gem 'not-naughty', '= 0.6.2'
|
7
7
|
require 'not_naughty'
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
NotNaughty::Validation.load_paths << File.join(%W[#{ File.dirname __FILE__ } validations])
|
10
|
+
NotNaughty::Validation.load(:acceptance, :confirmation, :format, :length, :numericality, :presence, :uniqueness)
|
11
11
|
|
12
12
|
module Sequel #:nodoc:
|
13
13
|
module Plugins #:nodoc:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_notnaughty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Florian A\xC3\x9Fmann"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-31 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.6.
|
23
|
+
version: 0.6.2
|
24
24
|
version:
|
25
25
|
description: Gifts Ruby Sequel with heavily armed validations.
|
26
26
|
email: boof@monkey-patch.me
|