declarative 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/declarative/definitions.rb +1 -0
- data/lib/declarative/schema.rb +10 -6
- data/lib/declarative/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fdc4811d1bc11bebe8a39516580f1e7e5969212
|
4
|
+
data.tar.gz: f12960019b725cf6337073927796867987030e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bf1836d15d1a5953b37d299e40f8213a1b774f4026d87b28ed0a37eb05e3c325f81aa543d2de607569578ce215a53b680c1a27420eed5c3b752a4fb26afe8d0
|
7
|
+
data.tar.gz: 83bee84f05b7fe7331e7d745aecf124fbe8c152f480cd5c51698bc172c1f0fb8058833f6c1d1f6ff4fd2e593934a41d68feee6a36d20d8445c1e6a7c5c788925
|
data/CHANGES.md
CHANGED
data/lib/declarative/schema.rb
CHANGED
@@ -21,12 +21,7 @@ module Declarative
|
|
21
21
|
def property(name, options={}, &block)
|
22
22
|
heritage.record(:property, name, options, &block)
|
23
23
|
|
24
|
-
|
25
|
-
default_options[:_base] = default_nested_class
|
26
|
-
default_options[:_defaults] = _defaults
|
27
|
-
default_options[:_nested_builder] = nested_builder if block
|
28
|
-
|
29
|
-
definitions.add(name, default_options.merge(options), &block)
|
24
|
+
build_definition(name, options, &block)
|
30
25
|
end
|
31
26
|
|
32
27
|
def defaults(options={}, &block)
|
@@ -44,6 +39,15 @@ module Declarative
|
|
44
39
|
end
|
45
40
|
|
46
41
|
private
|
42
|
+
def build_definition(name, options={}, &block)
|
43
|
+
default_options = {}
|
44
|
+
default_options[:_base] = default_nested_class
|
45
|
+
default_options[:_defaults] = _defaults
|
46
|
+
default_options[:_nested_builder] = nested_builder if block
|
47
|
+
|
48
|
+
definitions.add(name, default_options.merge(options), &block)
|
49
|
+
end
|
50
|
+
|
47
51
|
def _defaults
|
48
52
|
@defaults ||= Declarative::Defaults.new
|
49
53
|
end
|
data/lib/declarative/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: declarative
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uber
|