activefacts-metamodel 1.9.19 → 1.9.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeb83d74101d461d8cf6f2c2bdf328f0360e9801
4
- data.tar.gz: 46578f35a2a40c566794efd96d0ce44b48ee3c1b
3
+ metadata.gz: 71dd29d7debbe4133a9425b5582555e6b881b0d5
4
+ data.tar.gz: ec5e5d777449f81589ffe5f1210680ff44466a32
5
5
  SHA512:
6
- metadata.gz: df0dd4afd63eb21922ad711eb859cf39e7f79e8c2169563a2ca70b6283ca7340e2c9bf64032868060a88c277cf73a92553df31bfcd4c02cc26a1addf947af3a4
7
- data.tar.gz: cd90076037d3854b08623c431c609456bb1d4bbdc8381e0ba3b5ffafa502e711981a185fd239473107f88ff3484bab3b621c1da36e0db31dc4fbe87701b0785e
6
+ metadata.gz: 4914c1693e41cc07db38f6c6b343783e8c60dc684ece547fe72163d107d5bf47bff0764dd89aea6335544db3e99736d52dc08ae683c35debb15bfa57208582e3
7
+ data.tar.gz: 4fe9146122f4b9ba8067a19f95e71ba06fcbfdceb6cfa86ac897ccbc82738585a97073683a67f7279c4ba96b4b77f70f741fc806fb821fd16d6a461be1d597ba
@@ -70,7 +70,9 @@ module ActiveFacts
70
70
  end
71
71
 
72
72
  def choose_integer_type min, max
73
- integer_ranges.detect{|type_name, vmin, vmax, bits| min >= vmin && max <= vmax}
73
+ integer_ranges.
74
+ select{|type_name, vmin, vmax| min >= vmin && max <= vmax}.
75
+ sort_by{|type_name, vmin, vmax| vmax-vmin}[0] # Choose the smallest range
74
76
  end
75
77
 
76
78
  def boolean_type
@@ -78,9 +80,6 @@ module ActiveFacts
78
80
 
79
81
  def surrogate_type
80
82
  end
81
-
82
- def valid_from_type
83
- end
84
83
  end
85
84
 
86
85
  class DefaultContext < Context
@@ -121,10 +120,6 @@ module ActiveFacts
121
120
  def surrogate_type
122
121
  'BIGINT'
123
122
  end
124
-
125
- def valid_from_type
126
- 'TIMESTAMP'
127
- end
128
123
  end
129
124
 
130
125
  def self.normalise type_name
@@ -203,7 +198,7 @@ module ActiveFacts
203
198
  ]
204
199
 
205
200
  when ValidFrom
206
- context.valid_from_type
201
+ object_type.name
207
202
 
208
203
  when ValueField, Absorption
209
204
  # Walk up the entity type identifiers (must be single-part) to a value type:
@@ -1,5 +1,5 @@
1
1
  module ActiveFacts
2
2
  module Metamodel
3
- VERSION = "1.9.19"
3
+ VERSION = "1.9.20"
4
4
  end
5
5
  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.19
4
+ version: 1.9.20
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-09 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler