Empact-sexy_pg_constraints 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +10 -0
- data/Empact-sexy_pg_constraints.gemspec +11 -37
- data/Gemfile +2 -4
- data/Gemfile.lock +30 -23
- data/Rakefile +1 -8
- data/VERSION +1 -1
- data/lib/sexy_pg_constraints/constrainer.rb +6 -8
- data/lib/sexy_pg_constraints/constraints.rb +32 -1
- data/test/not_blank_test.rb +15 -21
- data/test/support/assert_prohibits_allows.rb +1 -1
- data/test/trimmed_test.rb +104 -0
- metadata +54 -99
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 0.3.0 - 05.02.2012
|
2
|
+
|
3
|
+
* Added stripped and alias trimmed constraint to enforce trimmed status
|
4
|
+
* Added not_only constraint as a keyed equivalent to not_blank
|
5
|
+
* Added present constraint as an alias for not_blank
|
6
|
+
|
7
|
+
=== 0.2.3 - 05.25.2011
|
8
|
+
|
9
|
+
* Added greater_than, less_than contraints and their _or_equal_to variants
|
10
|
+
|
1
11
|
=== 0.1.3 - 01.19.2009
|
2
12
|
|
3
13
|
* Bugfix: positive constraint fixed from >0 to >=0. Deconstrain and constrain to reapply.
|
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = "Empact-sexy_pg_constraints"
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Maxim Chernyak", "Ben Woosley"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2012-05-03"
|
13
|
+
s.description = "Use migrations and simple syntax to manage constraints in PostgreSQL DB."
|
14
|
+
s.email = "ben.woosley@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.rdoc"
|
@@ -50,35 +50,15 @@ Gem::Specification.new do |s|
|
|
50
50
|
"test/support/database.yml.example",
|
51
51
|
"test/support/models.rb",
|
52
52
|
"test/test_helper.rb",
|
53
|
+
"test/trimmed_test.rb",
|
53
54
|
"test/whitelist_test.rb",
|
54
55
|
"test/within_test.rb",
|
55
56
|
"test/xor_test.rb"
|
56
57
|
]
|
57
|
-
s.homepage =
|
58
|
+
s.homepage = "http://github.com/maxim/sexy_pg_constraints"
|
58
59
|
s.require_paths = ["lib"]
|
59
|
-
s.rubygems_version =
|
60
|
+
s.rubygems_version = "1.8.11"
|
60
61
|
s.summary = nil
|
61
|
-
s.test_files = [
|
62
|
-
"test/alphanumeric_test.rb",
|
63
|
-
"test/blacklist_test.rb",
|
64
|
-
"test/email_test.rb",
|
65
|
-
"test/exact_length_test.rb",
|
66
|
-
"test/format_test.rb",
|
67
|
-
"test/general_test.rb",
|
68
|
-
"test/greater_less_than_test.rb",
|
69
|
-
"test/length_within_test.rb",
|
70
|
-
"test/lowercase_test.rb",
|
71
|
-
"test/not_blank_test.rb",
|
72
|
-
"test/odd_event_test.rb",
|
73
|
-
"test/positive_test.rb",
|
74
|
-
"test/reference_test.rb",
|
75
|
-
"test/support/assert_prohibits_allows.rb",
|
76
|
-
"test/support/models.rb",
|
77
|
-
"test/test_helper.rb",
|
78
|
-
"test/whitelist_test.rb",
|
79
|
-
"test/within_test.rb",
|
80
|
-
"test/xor_test.rb"
|
81
|
-
]
|
82
62
|
|
83
63
|
if s.respond_to? :specification_version then
|
84
64
|
s.specification_version = 3
|
@@ -87,24 +67,18 @@ Gem::Specification.new do |s|
|
|
87
67
|
s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0"])
|
88
68
|
s.add_runtime_dependency(%q<pg>, [">= 0"])
|
89
69
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
90
|
-
s.add_development_dependency(%q<
|
91
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
92
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
70
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
93
71
|
else
|
94
72
|
s.add_dependency(%q<activerecord>, [">= 3.0.0"])
|
95
73
|
s.add_dependency(%q<pg>, [">= 0"])
|
96
74
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
97
|
-
s.add_dependency(%q<
|
98
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
99
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
75
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
100
76
|
end
|
101
77
|
else
|
102
78
|
s.add_dependency(%q<activerecord>, [">= 3.0.0"])
|
103
79
|
s.add_dependency(%q<pg>, [">= 0"])
|
104
80
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
105
|
-
s.add_dependency(%q<
|
106
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
107
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
81
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
108
82
|
end
|
109
83
|
end
|
110
84
|
|
data/Gemfile
CHANGED
@@ -7,8 +7,6 @@ gem "pg"
|
|
7
7
|
# Add dependencies to develop your gem here.
|
8
8
|
# Include everything needed to run rake, tests, features, etc.
|
9
9
|
group :development do
|
10
|
-
gem "shoulda"
|
11
|
-
gem "
|
12
|
-
gem "jeweler", "~> 1.5.2"
|
13
|
-
gem "rcov", ">= 0"
|
10
|
+
gem "shoulda"
|
11
|
+
gem "jeweler"
|
14
12
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,37 +1,44 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activemodel (3.
|
5
|
-
activesupport (= 3.
|
6
|
-
builder (~>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
activemodel (3.2.3)
|
5
|
+
activesupport (= 3.2.3)
|
6
|
+
builder (~> 3.0.0)
|
7
|
+
activerecord (3.2.3)
|
8
|
+
activemodel (= 3.2.3)
|
9
|
+
activesupport (= 3.2.3)
|
10
|
+
arel (~> 3.0.2)
|
11
|
+
tzinfo (~> 0.3.29)
|
12
|
+
activesupport (3.2.3)
|
13
|
+
i18n (~> 0.6)
|
14
|
+
multi_json (~> 1.0)
|
15
|
+
arel (3.0.2)
|
16
|
+
builder (3.0.0)
|
16
17
|
git (1.2.5)
|
17
|
-
i18n (0.
|
18
|
-
jeweler (1.
|
19
|
-
bundler (~> 1.0
|
18
|
+
i18n (0.6.0)
|
19
|
+
jeweler (1.8.3)
|
20
|
+
bundler (~> 1.0)
|
20
21
|
git (>= 1.2.5)
|
21
22
|
rake
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
rdoc
|
24
|
+
json (1.7.0)
|
25
|
+
multi_json (1.3.4)
|
26
|
+
pg (0.13.2)
|
27
|
+
rake (0.9.2.2)
|
28
|
+
rdoc (3.12)
|
29
|
+
json (~> 1.4)
|
30
|
+
shoulda (3.0.1)
|
31
|
+
shoulda-context (~> 1.0.0)
|
32
|
+
shoulda-matchers (~> 1.0.0)
|
33
|
+
shoulda-context (1.0.0)
|
34
|
+
shoulda-matchers (1.0.0)
|
35
|
+
tzinfo (0.3.33)
|
27
36
|
|
28
37
|
PLATFORMS
|
29
38
|
ruby
|
30
39
|
|
31
40
|
DEPENDENCIES
|
32
41
|
activerecord (>= 3.0.0)
|
33
|
-
|
34
|
-
jeweler (~> 1.5.2)
|
42
|
+
jeweler
|
35
43
|
pg
|
36
|
-
rcov
|
37
44
|
shoulda
|
data/Rakefile
CHANGED
@@ -31,16 +31,9 @@ Rake::TestTask.new(:test) do |test|
|
|
31
31
|
test.verbose = true
|
32
32
|
end
|
33
33
|
|
34
|
-
require 'rcov/rcovtask'
|
35
|
-
Rcov::RcovTask.new do |test|
|
36
|
-
test.libs << 'test'
|
37
|
-
test.pattern = 'test/**/test_*.rb'
|
38
|
-
test.verbose = true
|
39
|
-
end
|
40
|
-
|
41
34
|
task :default => :test
|
42
35
|
|
43
|
-
require '
|
36
|
+
require 'rdoc/task'
|
44
37
|
Rake::RDocTask.new do |rdoc|
|
45
38
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
39
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module SexyPgConstraints
|
2
2
|
class Constrainer
|
3
3
|
include SexyPgConstraints::Helpers
|
4
|
-
|
4
|
+
|
5
5
|
def initialize(table, columns = [])
|
6
6
|
@table = table.to_s
|
7
7
|
@columns = columns
|
@@ -10,23 +10,21 @@ module SexyPgConstraints
|
|
10
10
|
def method_missing(column, constraints)
|
11
11
|
self.class.add_constraints(@table, column.to_s, constraints)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def [](*columns)
|
15
15
|
@columns = columns.map{|c| c.to_s}
|
16
16
|
self
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def all(constraints)
|
20
20
|
self.class.add_constraints(@table, @columns, constraints)
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
class << self
|
24
24
|
def add_constraints(table, column, constraints)
|
25
25
|
constraints.each_pair do |type, options|
|
26
|
-
|
27
|
-
SexyPgConstraints::Constraints.send(type, table, column, options) + ';'
|
28
|
-
|
29
|
-
execute sql
|
26
|
+
execute "alter table #{table} add constraint #{make_title(table, column, type)} " \
|
27
|
+
+ SexyPgConstraints::Constraints.send(type, table, column, options) + ';'
|
30
28
|
end
|
31
29
|
end
|
32
30
|
end
|
@@ -29,8 +29,39 @@ module SexyPgConstraints
|
|
29
29
|
# constrain :books, :title, :not_blank => true
|
30
30
|
#
|
31
31
|
def not_blank(table, column, options)
|
32
|
-
"check ( length(
|
32
|
+
"check ( length(btrim(#{table}.#{column})) > 0 )"
|
33
33
|
end
|
34
|
+
alias_method :present, :not_blank
|
35
|
+
module_function :present
|
36
|
+
|
37
|
+
##
|
38
|
+
# The value must have characters other than those listed in the option string.
|
39
|
+
#
|
40
|
+
# Example:
|
41
|
+
# constrain :books, :title, :not_only => 'abcd'
|
42
|
+
#
|
43
|
+
def not_only(table, column, options)
|
44
|
+
"check ( length(btrim(#{table}.#{column}, E'#{options}')) > 0 )"
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# The value must not have leading or trailing spaces.
|
49
|
+
#
|
50
|
+
# You can pass a string as an option to indicate what characters are trimmed.
|
51
|
+
#
|
52
|
+
# Example:
|
53
|
+
# constrain :books, :title, :trimmed => true
|
54
|
+
# constrain :books, :title, :trimmed => "abc"
|
55
|
+
#
|
56
|
+
def trimmed(table, column, options)
|
57
|
+
if options == true
|
58
|
+
"check (length(#{table}.#{column}) = length(btrim(#{table}.#{column})))"
|
59
|
+
else
|
60
|
+
"check (length(#{table}.#{column}) = length(btrim(#{table}.#{column}, E'#{options}')))"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
alias_method :stripped, :trimmed
|
64
|
+
module_function :stripped
|
34
65
|
|
35
66
|
##
|
36
67
|
# The numeric value must be within given range.
|
data/test/not_blank_test.rb
CHANGED
@@ -1,39 +1,33 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class NotBlankTest < SexyPgConstraintsTest
|
4
|
-
def
|
5
|
-
ActiveRecord::Migration.constrain :books,
|
4
|
+
def assert_protects_from_blank(column, contraint)
|
5
|
+
ActiveRecord::Migration.constrain :books, column, contraint => true
|
6
6
|
|
7
|
-
assert_prohibits Book,
|
8
|
-
book.
|
7
|
+
assert_prohibits Book, column, contraint do |book|
|
8
|
+
book.send("#{column}=", ' ')
|
9
9
|
end
|
10
10
|
|
11
11
|
assert_allows Book do |book|
|
12
|
-
book.
|
12
|
+
book.send("#{column}=", 'foo')
|
13
13
|
end
|
14
14
|
|
15
|
-
ActiveRecord::Migration.deconstrain :books,
|
15
|
+
ActiveRecord::Migration.deconstrain :books, column, contraint
|
16
16
|
|
17
17
|
assert_allows Book do |book|
|
18
|
-
book.
|
18
|
+
book.send("#{column}=", ' ')
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
25
|
-
assert_prohibits Book, :as, :not_blank do |book|
|
26
|
-
book.as = ' '
|
27
|
-
end
|
28
|
-
|
29
|
-
assert_allows Book do |book|
|
30
|
-
book.as = 'foo'
|
31
|
-
end
|
22
|
+
def test_not_blank
|
23
|
+
assert_protects_from_blank(:author, :not_blank)
|
24
|
+
end
|
32
25
|
|
33
|
-
|
26
|
+
def test_present
|
27
|
+
assert_protects_from_blank(:author, :present)
|
28
|
+
end
|
34
29
|
|
35
|
-
|
36
|
-
|
37
|
-
end
|
30
|
+
def test_not_blank_on_a_column_whose_name_is_a_sql_keyword
|
31
|
+
assert_protects_from_blank(:as, :not_blank)
|
38
32
|
end
|
39
33
|
end
|
@@ -8,7 +8,7 @@ module AssertProhibitsAllows
|
|
8
8
|
error = assert_raise exception_type do
|
9
9
|
book.save
|
10
10
|
end
|
11
|
-
assert_match /
|
11
|
+
assert_match /PG::Error: ERROR:/, error.message
|
12
12
|
assert_match /violates #{constraint_type} constraint/, error.message
|
13
13
|
assert_match /"#{model.table_name}_#{column}_(#{Array(constraint).map {|c| c.to_s }.join('|')})"/, error.message if constraint_type == 'check'
|
14
14
|
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TrimmedTest < SexyPgConstraintsTest
|
4
|
+
DEFAULT_PROHIBITED = [' foo', 'foo ', ' foo ']
|
5
|
+
CONFIGURABLE_PROHIBITED = ["foo \t", "\t foo"]
|
6
|
+
DEFAULT_ALLOWED = ['foo', 'foo \t']
|
7
|
+
|
8
|
+
def test_trimmed
|
9
|
+
ActiveRecord::Migration.constrain :books, :author, :trimmed => true
|
10
|
+
|
11
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
12
|
+
assert_prohibits Book, :author, :trimmed do |book|
|
13
|
+
book.author = prohibited
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
DEFAULT_ALLOWED + CONFIGURABLE_PROHIBITED.each do |allowed|
|
18
|
+
assert_allows Book do |book|
|
19
|
+
book.author = allowed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
ActiveRecord::Migration.deconstrain :books, :author, :trimmed
|
24
|
+
|
25
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
26
|
+
assert_allows Book do |book|
|
27
|
+
book.author = prohibited
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_stripped
|
33
|
+
ActiveRecord::Migration.constrain :books, :author, :stripped => true
|
34
|
+
|
35
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
36
|
+
assert_prohibits Book, :author, :stripped do |book|
|
37
|
+
book.author = prohibited
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
DEFAULT_ALLOWED + CONFIGURABLE_PROHIBITED.each do |allowed|
|
42
|
+
assert_allows Book do |book|
|
43
|
+
book.author = allowed
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
ActiveRecord::Migration.deconstrain :books, :author, :stripped
|
48
|
+
|
49
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
50
|
+
assert_allows Book do |book|
|
51
|
+
book.author = prohibited
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_trimmed_on_a_column_whose_name_is_a_sql_keyword
|
57
|
+
ActiveRecord::Migration.constrain :books, :as, :trimmed => true
|
58
|
+
|
59
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
60
|
+
assert_prohibits Book, :as, :trimmed do |book|
|
61
|
+
book.as = prohibited
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
DEFAULT_ALLOWED + CONFIGURABLE_PROHIBITED.each do |allowed|
|
66
|
+
assert_allows Book do |book|
|
67
|
+
book.as = allowed
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
ActiveRecord::Migration.deconstrain :books, :as, :trimmed
|
72
|
+
|
73
|
+
DEFAULT_PROHIBITED.each do |prohibited|
|
74
|
+
assert_allows Book do |book|
|
75
|
+
book.as = prohibited
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_trimmed_with_a_character_list
|
81
|
+
ActiveRecord::Migration.constrain :books, :as, :trimmed => '\t '
|
82
|
+
|
83
|
+
DEFAULT_PROHIBITED + CONFIGURABLE_PROHIBITED.each do |prohibited|
|
84
|
+
p prohibited
|
85
|
+
assert_prohibits Book, :as, :trimmed do |book|
|
86
|
+
book.as = prohibited
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
DEFAULT_ALLOWED.each do |allowed|
|
91
|
+
assert_allows Book do |book|
|
92
|
+
book.as = allowed
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
ActiveRecord::Migration.deconstrain :books, :as, :trimmed
|
97
|
+
|
98
|
+
DEFAULT_PROHIBITED + CONFIGURABLE_PROHIBITED.each do |prohibited|
|
99
|
+
assert_allows Book do |book|
|
100
|
+
book.as = prohibited
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
metadata
CHANGED
@@ -1,94 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: Empact-sexy_pg_constraints
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Maxim Chernyak
|
9
9
|
- Ben Woosley
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-05-03 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
17
16
|
name: activerecord
|
18
|
-
requirement: &
|
17
|
+
requirement: &70318625008440 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
23
22
|
version: 3.0.0
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *70318625008440
|
26
|
+
- !ruby/object:Gem::Dependency
|
28
27
|
name: pg
|
29
|
-
requirement: &
|
28
|
+
requirement: &70318625006460 !ruby/object:Gem::Requirement
|
30
29
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
35
34
|
type: :runtime
|
36
35
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *70318625006460
|
37
|
+
- !ruby/object:Gem::Dependency
|
39
38
|
name: shoulda
|
40
|
-
requirement: &
|
39
|
+
requirement: &70318625005160 !ruby/object:Gem::Requirement
|
41
40
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
46
45
|
type: :development
|
47
46
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: bundler
|
51
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
|
-
requirements:
|
54
|
-
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.0.0
|
57
|
-
type: :development
|
58
|
-
prerelease: false
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *70318625005160
|
48
|
+
- !ruby/object:Gem::Dependency
|
61
49
|
name: jeweler
|
62
|
-
requirement: &
|
50
|
+
requirement: &70318625003680 !ruby/object:Gem::Requirement
|
63
51
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version:
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
68
56
|
type: :development
|
69
57
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
|
72
|
-
|
73
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: "0"
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: *id006
|
82
|
-
description: Use migrations and simple syntax to manage constraints in PostgreSQL DB.
|
58
|
+
version_requirements: *70318625003680
|
59
|
+
description: Use migrations and simple syntax to manage constraints in PostgreSQL
|
60
|
+
DB.
|
83
61
|
email: ben.woosley@gmail.com
|
84
62
|
executables: []
|
85
|
-
|
86
63
|
extensions: []
|
87
|
-
|
88
|
-
extra_rdoc_files:
|
64
|
+
extra_rdoc_files:
|
89
65
|
- LICENSE.txt
|
90
66
|
- README.rdoc
|
91
|
-
files:
|
67
|
+
files:
|
92
68
|
- CHANGELOG.rdoc
|
93
69
|
- Empact-sexy_pg_constraints.gemspec
|
94
70
|
- Gemfile
|
@@ -122,56 +98,35 @@ files:
|
|
122
98
|
- test/support/database.yml.example
|
123
99
|
- test/support/models.rb
|
124
100
|
- test/test_helper.rb
|
101
|
+
- test/trimmed_test.rb
|
125
102
|
- test/whitelist_test.rb
|
126
103
|
- test/within_test.rb
|
127
104
|
- test/xor_test.rb
|
128
105
|
homepage: http://github.com/maxim/sexy_pg_constraints
|
129
106
|
licenses: []
|
130
|
-
|
131
107
|
post_install_message:
|
132
108
|
rdoc_options: []
|
133
|
-
|
134
|
-
require_paths:
|
109
|
+
require_paths:
|
135
110
|
- lib
|
136
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
112
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
segments:
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
segments:
|
143
118
|
- 0
|
144
|
-
|
145
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
hash: 1263929362253424615
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
121
|
none: false
|
147
|
-
requirements:
|
148
|
-
- -
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version:
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
151
126
|
requirements: []
|
152
|
-
|
153
127
|
rubyforge_project:
|
154
|
-
rubygems_version: 1.
|
128
|
+
rubygems_version: 1.8.11
|
155
129
|
signing_key:
|
156
130
|
specification_version: 3
|
157
|
-
summary:
|
158
|
-
test_files:
|
159
|
-
- test/alphanumeric_test.rb
|
160
|
-
- test/blacklist_test.rb
|
161
|
-
- test/email_test.rb
|
162
|
-
- test/exact_length_test.rb
|
163
|
-
- test/format_test.rb
|
164
|
-
- test/general_test.rb
|
165
|
-
- test/greater_less_than_test.rb
|
166
|
-
- test/length_within_test.rb
|
167
|
-
- test/lowercase_test.rb
|
168
|
-
- test/not_blank_test.rb
|
169
|
-
- test/odd_event_test.rb
|
170
|
-
- test/positive_test.rb
|
171
|
-
- test/reference_test.rb
|
172
|
-
- test/support/assert_prohibits_allows.rb
|
173
|
-
- test/support/models.rb
|
174
|
-
- test/test_helper.rb
|
175
|
-
- test/whitelist_test.rb
|
176
|
-
- test/within_test.rb
|
177
|
-
- test/xor_test.rb
|
131
|
+
summary: ''
|
132
|
+
test_files: []
|