activefacts-metamodel 1.9.17 → 1.9.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activefacts/metamodel/datatypes.rb +5 -7
- data/lib/activefacts/metamodel/version.rb +1 -1
- data/lib/activefacts/support.rb +11 -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: 1a9c5fec87ace6e0757e0266aa42d21ec7208d78
|
4
|
+
data.tar.gz: 432d7942772ab7c7eda0a4c93e9369e3f9ef044a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8876140eafbbd5eb1f67653cab2c5b0233acd1d8f3cae8e79bb6f766085664349f0cc1fcd730adfa5059889b2ded423d3dd686b5e7039ca4e176039211c8b366
|
7
|
+
data.tar.gz: 4dd4b1fad6303b5d98abbb703bde756ecdcd756d7b00edf5c76c9d7afec108ad5db569f3bdfcf6129f894ad449f1a39b6f1e0aabc3d11f5c7337b00d5853a48c
|
@@ -196,12 +196,10 @@ module ActiveFacts
|
|
196
196
|
|
197
197
|
when SurrogateKey
|
198
198
|
[ context.surrogate_type,
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
end.
|
204
|
-
merge!({mandatory: path_mandatory})
|
199
|
+
{
|
200
|
+
auto_assign: ((in_primary_index && !in_foreign_key) ? "commit" : nil),
|
201
|
+
mandatory: path_mandatory
|
202
|
+
}
|
205
203
|
]
|
206
204
|
|
207
205
|
when ValidFrom
|
@@ -240,7 +238,7 @@ module ActiveFacts
|
|
240
238
|
[ vt.name,
|
241
239
|
(length ? {length: length} : {}).
|
242
240
|
merge!(scale ? {scale: scale} : {}).
|
243
|
-
merge!({ auto_assign: (in_primary_index and !in_foreign_key
|
241
|
+
merge!(is_auto_assigned ? { auto_assign: (in_primary_index and !in_foreign_key)} : {}).
|
244
242
|
merge!({mandatory: path_mandatory}).
|
245
243
|
merge!(value_constraint ? {value_constraint: value_constraint} : {})
|
246
244
|
]
|
data/lib/activefacts/support.rb
CHANGED
@@ -89,7 +89,7 @@ class String
|
|
89
89
|
count = 0
|
90
90
|
map do |word|
|
91
91
|
if (count += 1) == 1
|
92
|
-
word
|
92
|
+
word.downcase # The camel has his head down
|
93
93
|
else
|
94
94
|
word[0].upcase+word[1..-1].downcase
|
95
95
|
end
|
@@ -110,6 +110,16 @@ class String
|
|
110
110
|
snakewords.join(joiner)
|
111
111
|
end
|
112
112
|
|
113
|
+
def shoutwords
|
114
|
+
map do |word|
|
115
|
+
word.upcase
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def shoutcase joiner = '_'
|
120
|
+
shoutwords.join(joiner)
|
121
|
+
end
|
122
|
+
|
113
123
|
def to_a
|
114
124
|
self
|
115
125
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts-metamodel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|