dbee 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +0 -2
- data/Rakefile +3 -1
- data/dbee.gemspec +1 -1
- data/lib/dbee/base.rb +6 -6
- data/lib/dbee/model/columns/boolean.rb +4 -6
- data/lib/dbee/model.rb +2 -0
- data/lib/dbee/query/key_path.rb +2 -0
- data/lib/dbee/query.rb +1 -4
- data/lib/dbee/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fecdbe7976189c6a9b9831e20218d6bca1c194f76db554972ead718cc2a26d36
|
4
|
+
data.tar.gz: 6ebbac4f006d91085cc048803c0f683eafcce313cba70e2de8fa744b4d99f981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acf29c44149ff9d77b66c248518e5f6bd2cdc0efd3ba3e8f831042557e63ed9512a163478669d7b5563fcb23c9de14e7afa28cc2b64369d18a35a5b0b5a25dd6
|
7
|
+
data.tar.gz: 489890fdb0c75e76030bb01274c7178f2b132c587b7f19361ace87c7517ed5079003e4c36df4366a6b04c641827c7cb9b411211213c9e45cfffa0c21b2272208
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
data/dbee.gemspec
CHANGED
data/lib/dbee/base.rb
CHANGED
@@ -36,7 +36,7 @@ module Dbee
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def table_name
|
39
|
-
@table_name
|
39
|
+
@table_name || ''
|
40
40
|
end
|
41
41
|
|
42
42
|
def columns_by_name
|
@@ -47,12 +47,12 @@ module Dbee
|
|
47
47
|
@associations_by_name ||= {}
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
51
|
-
|
52
|
-
|
53
|
-
end
|
50
|
+
def table_name?
|
51
|
+
!table_name.empty?
|
52
|
+
end
|
54
53
|
|
55
|
-
|
54
|
+
def inherited_table_name
|
55
|
+
subclasses.find(&:table_name?)&.table_name || ''
|
56
56
|
end
|
57
57
|
|
58
58
|
def inherited_columns_by_name
|
@@ -12,8 +12,8 @@ require_relative 'undefined'
|
|
12
12
|
module Dbee
|
13
13
|
class Model
|
14
14
|
class Columns
|
15
|
-
# Describes a boolean column
|
16
|
-
#
|
15
|
+
# Describes a boolean column that can accept a wide range of values and still resolves to
|
16
|
+
# a boolean, such as: true, t, yes, y, 1, false, f, n, 0, nil, null.
|
17
17
|
class Boolean < Undefined
|
18
18
|
attr_reader :nullable
|
19
19
|
|
@@ -48,15 +48,13 @@ module Dbee
|
|
48
48
|
val.nil? || val.to_s.empty?
|
49
49
|
end
|
50
50
|
|
51
|
-
# rubocop:disable Style/DoubleNegation
|
52
51
|
def nully?(val)
|
53
|
-
null_or_empty?(val) ||
|
52
|
+
null_or_empty?(val) || val.to_s.match?(/\A(nil|null)$\z/i)
|
54
53
|
end
|
55
54
|
|
56
55
|
def truthy?(val)
|
57
|
-
|
56
|
+
val.to_s.match?(/\A(true|t|yes|y|1)$\z/i)
|
58
57
|
end
|
59
|
-
# rubocop:enable Style/DoubleNegation
|
60
58
|
end
|
61
59
|
end
|
62
60
|
end
|
data/lib/dbee/model.rb
CHANGED
data/lib/dbee/query/key_path.rb
CHANGED
data/lib/dbee/query.rb
CHANGED
data/lib/dbee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.alpha.
|
4
|
+
version: 1.0.0.pre.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_hashable
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
requirements:
|
214
214
|
- - ">="
|
215
215
|
- !ruby/object:Gem::Version
|
216
|
-
version: 2.3
|
216
|
+
version: 2.5.3
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
219
|
- - ">"
|