activefacts 0.8.13 → 0.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +6 -0
- data/Rakefile +68 -41
- data/TODO +308 -0
- data/lib/activefacts/cql/FactTypes.treetop +1 -1
- data/lib/activefacts/generate/dm.rb +273 -0
- data/lib/activefacts/generate/help.rb +45 -0
- data/lib/activefacts/generate/html/glossary.rb +209 -0
- data/lib/activefacts/generate/json.rb +334 -0
- data/lib/activefacts/generate/records.rb +45 -0
- data/lib/activefacts/generate/version.rb +25 -0
- data/lib/activefacts/version.rb +8 -1
- metadata +220 -36
- data/.gemtest +0 -0
- data/examples/CQL/MetamodelNext.cql +0 -477
@@ -0,0 +1,334 @@
|
|
1
|
+
#
|
2
|
+
# ActiveFacts Generators.
|
3
|
+
# Generate json output from a vocabulary, for loading into APRIMO
|
4
|
+
#
|
5
|
+
# Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
|
6
|
+
#
|
7
|
+
require 'json'
|
8
|
+
require 'digest/sha1'
|
9
|
+
|
10
|
+
module ActiveFacts
|
11
|
+
module Generate
|
12
|
+
# Generate json output from a vocabulary, for loading into APRIMO.
|
13
|
+
# Invoke as
|
14
|
+
# afgen --json <file>.cql=diagrams
|
15
|
+
class JSON
|
16
|
+
private
|
17
|
+
def initialize(vocabulary)
|
18
|
+
@vocabulary = vocabulary
|
19
|
+
@vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary
|
20
|
+
end
|
21
|
+
|
22
|
+
def puts(*a)
|
23
|
+
@out.puts *a
|
24
|
+
end
|
25
|
+
|
26
|
+
public
|
27
|
+
def generate(out = $>)
|
28
|
+
@out = out
|
29
|
+
uuids = {}
|
30
|
+
|
31
|
+
puts "{ model: '#{@vocabulary.name}',\n" +
|
32
|
+
"diagrams: [\n#{
|
33
|
+
@vocabulary.all_diagram.sort_by{|o| o.name.gsub(/ /,'')}.map do |d|
|
34
|
+
j = {:uuid => (uuids[d] ||= uuid_from_id(d)), :name => d.name}
|
35
|
+
" #{j.to_json}"
|
36
|
+
end*",\n"
|
37
|
+
}\n ],"
|
38
|
+
|
39
|
+
object_types = @vocabulary.all_object_type.sort_by{|o| o.name.gsub(/ /,'')}
|
40
|
+
puts " object_types: [\n#{
|
41
|
+
object_types.sort_by{|o|o.identifying_role_values.inspect}.map do |o|
|
42
|
+
uuids[o] ||= uuid_from_id(o)
|
43
|
+
ref_mode = nil
|
44
|
+
if o.is_a?(ActiveFacts::Metamodel::EntityType) and
|
45
|
+
p = o.preferred_identifier and
|
46
|
+
(rrs = p.role_sequence.all_role_ref).size == 1 and
|
47
|
+
(r = rrs.single.role).fact_type != o.fact_type and
|
48
|
+
r.object_type.is_a?(ActiveFacts::Metamodel::ValueType) and
|
49
|
+
!r.fact_type.is_a?(ActiveFacts::Metamodel::TypeInheritance)
|
50
|
+
ref_mode = "#{r.object_type.name}"
|
51
|
+
ref_mode.sub!(%r{#{o.name} *}, '.')
|
52
|
+
end
|
53
|
+
j = {
|
54
|
+
:uuid => uuids[o],
|
55
|
+
:name => o.name,
|
56
|
+
:shapes => o.all_object_type_shape.map do |shape|
|
57
|
+
x = { :diagram => uuids[shape.diagram],
|
58
|
+
:is_expanded => shape.is_expanded,
|
59
|
+
:uuid => uuid_from_id(shape),
|
60
|
+
:x => shape.position.x,
|
61
|
+
:y => shape.position.y
|
62
|
+
}
|
63
|
+
x[:is_expanded] = true if ref_mode && shape.is_expanded # Don't show the reference mode
|
64
|
+
x
|
65
|
+
end
|
66
|
+
}
|
67
|
+
j[:ref_mode] = ref_mode if ref_mode
|
68
|
+
j[:independent] = true if o.is_independent
|
69
|
+
|
70
|
+
if o.is_a?(ActiveFacts::Metamodel::EntityType)
|
71
|
+
# Entity Type may be objectified, and may have supertypes:
|
72
|
+
if o.fact_type
|
73
|
+
uuid = (uuids[o.fact_type] ||= uuid_from_id(o.fact_type))
|
74
|
+
j[:objectifies] = uuid
|
75
|
+
j[:implicit] = true if o.is_implied_by_objectification
|
76
|
+
end
|
77
|
+
if o.all_type_inheritance_as_subtype.size > 0
|
78
|
+
j[:supertypes] = o.
|
79
|
+
all_type_inheritance_as_subtype.
|
80
|
+
sort_by{|ti| ti.provides_identification ? 0 : 1}.
|
81
|
+
map{|ti|
|
82
|
+
[ uuids[ti.supertype] ||= uuid_from_id(ti.supertype),
|
83
|
+
uuids[ti.supertype_role] = uuid_from_id(ti.supertype_role)
|
84
|
+
]
|
85
|
+
}
|
86
|
+
end
|
87
|
+
else
|
88
|
+
# ValueType usually has a supertype:
|
89
|
+
if (o.supertype)
|
90
|
+
j[:supertype] = (uuids[o.supertype] ||= uuid_from_id(o.supertype))
|
91
|
+
end
|
92
|
+
end
|
93
|
+
# REVISIT: Place a ValueConstraint and shape
|
94
|
+
" #{j.to_json}"
|
95
|
+
end*",\n"
|
96
|
+
}\n ],"
|
97
|
+
|
98
|
+
fact_types = @vocabulary.constellation.
|
99
|
+
FactType.values.
|
100
|
+
reject{|ft|
|
101
|
+
ActiveFacts::Metamodel::ImplicitFactType === ft || ActiveFacts::Metamodel::TypeInheritance === ft
|
102
|
+
}
|
103
|
+
puts " fact_types: [\n#{
|
104
|
+
fact_types.sort_by{|f| f.identifying_role_values.inspect}.map do |f|
|
105
|
+
uuids[f] ||= uuid_from_id(f)
|
106
|
+
j = {:uuid => uuids[f]}
|
107
|
+
|
108
|
+
if f.entity_type
|
109
|
+
j[:objectified_as] = uuids[f.entity_type]
|
110
|
+
end
|
111
|
+
|
112
|
+
# Emit roles
|
113
|
+
roles = f.all_role.sort_by{|r| r.ordinal }
|
114
|
+
j[:roles] = roles.map do |role|
|
115
|
+
uuid = (uuids[role] ||= uuid_from_id(role))
|
116
|
+
# REVISIT: Internal Mandatory Constraints
|
117
|
+
# REVISIT: Place a ValueConstraint and shape
|
118
|
+
# REVISIT: Place a RoleName shape
|
119
|
+
{:uuid => uuid, :player => uuids[role.object_type]}
|
120
|
+
# N.B. The object_type shape to which this role is attached is not in the meta-model
|
121
|
+
# Attach to the closest instance on this diagram (if any)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Emit readings. Each is a [role_order, text] pair
|
125
|
+
j[:readings] = f.all_reading.map do |r|
|
126
|
+
role_refs = r.role_sequence.all_role_ref_in_order
|
127
|
+
[
|
128
|
+
role_order(uuids, role_refs.map{|rr| rr.role}, roles),
|
129
|
+
r.text.gsub(/\{([0-9])\}/) do |insert|
|
130
|
+
role_ref = role_refs[$1.to_i]
|
131
|
+
la = role_ref.leading_adjective
|
132
|
+
la = nil if la == ''
|
133
|
+
ta = role_ref.trailing_adjective
|
134
|
+
ta = nil if ta == ''
|
135
|
+
(la ? la+'-' : '') +
|
136
|
+
(la && la.index(' ') ? ' ' : '') +
|
137
|
+
insert +
|
138
|
+
(ta && ta.index(' ') ? ' ' : '') +
|
139
|
+
(ta ? '-'+ta : '')
|
140
|
+
end
|
141
|
+
]
|
142
|
+
end.sort_by{|(ro,text)| ro }.map do |(ro,text)|
|
143
|
+
[ ro, text ]
|
144
|
+
end
|
145
|
+
|
146
|
+
# Emit shapes
|
147
|
+
j[:shapes] = f.all_fact_type_shape.map do |shape|
|
148
|
+
sj = {
|
149
|
+
:diagram => uuids[shape.diagram],
|
150
|
+
:uuid => uuid_from_id(shape),
|
151
|
+
:x => shape.position.x,
|
152
|
+
:y => shape.position.y
|
153
|
+
}
|
154
|
+
|
155
|
+
# Add the role_order, if specified
|
156
|
+
if shape.all_role_display.size > 0
|
157
|
+
if shape.all_role_display.size != roles.size
|
158
|
+
raise "Invalid RoleDisplay for #{f.default_reading} in #{shape.diagram.name} diagram"
|
159
|
+
end
|
160
|
+
ro = role_order(
|
161
|
+
uuids,
|
162
|
+
shape.all_role_display.sort_by{|rd| rd.ordinal }.map{|rd| rd.role },
|
163
|
+
roles
|
164
|
+
)
|
165
|
+
sj[:role_order] = ro if ro
|
166
|
+
end
|
167
|
+
|
168
|
+
# REVISIT: Place the ReadingShape
|
169
|
+
|
170
|
+
# Emit the position of the name, if objectified
|
171
|
+
if n = shape.objectified_fact_type_name_shape
|
172
|
+
sj[:name_shape] = {:x => n.position.x, :y => n.position.y}
|
173
|
+
end
|
174
|
+
sj
|
175
|
+
end
|
176
|
+
|
177
|
+
# Emit Internal Presence Constraints
|
178
|
+
f.internal_presence_constraints.each do |ipc|
|
179
|
+
uuid = (uuids[ipc] ||= uuid_from_id(ipc))
|
180
|
+
|
181
|
+
constraint = {
|
182
|
+
:uuid => uuid,
|
183
|
+
:min => ipc.min_frequency,
|
184
|
+
:max => ipc.max_frequency,
|
185
|
+
:is_preferred => ipc.is_preferred_identifier,
|
186
|
+
:mandatory => ipc.is_mandatory
|
187
|
+
}
|
188
|
+
|
189
|
+
# Get the role (or excluded role, for a UC)
|
190
|
+
roles = ipc.role_sequence.all_role_ref_in_order.map{|r| r.role}
|
191
|
+
if roles.size > 1 || (!ipc.is_mandatory && ipc.max_frequency == 1)
|
192
|
+
# This can be only a uniqueness constraint. Record the missing role, if any
|
193
|
+
role = (f.all_role.to_a - roles)[0]
|
194
|
+
constraint[:uniqueExcept] = uuids[role]
|
195
|
+
else
|
196
|
+
# An internal mandatory or frequency constraint applies to only one role.
|
197
|
+
# If it's also unique (max == 1), that applies on the counterpart role.
|
198
|
+
# You can also have a mandatory frequency constraint, but that applies on this role.
|
199
|
+
constraint[:role] = uuids[roles[0]]
|
200
|
+
end
|
201
|
+
(j[:constraints] ||= []) << constraint
|
202
|
+
end
|
203
|
+
|
204
|
+
# Add ring constraints
|
205
|
+
f.all_role_in_order.
|
206
|
+
map{|r| r.all_ring_constraint.to_a+r.all_ring_constraint_as_other_role.to_a }.
|
207
|
+
flatten.uniq.each do |ring|
|
208
|
+
(j[:constraints] ||= []) << {
|
209
|
+
:uuid => (uuids[ring] ||= uuid_from_id(ring)),
|
210
|
+
:shapes => ring.all_constraint_shape.map do |shape|
|
211
|
+
{ :diagram => uuids[shape.diagram],
|
212
|
+
:uuid => uuid_from_id(shape),
|
213
|
+
:x => shape.position.x,
|
214
|
+
:y => shape.position.y
|
215
|
+
}
|
216
|
+
end,
|
217
|
+
:ringKind => ring.ring_type,
|
218
|
+
:roles => [uuids[ring.role], uuids[ring.other_role]]
|
219
|
+
# REVISIT: Deontic, enforcement
|
220
|
+
}
|
221
|
+
end
|
222
|
+
|
223
|
+
# REVISIT: RotationSetting
|
224
|
+
|
225
|
+
" #{j.to_json}"
|
226
|
+
end*",\n"
|
227
|
+
}\n ],"
|
228
|
+
|
229
|
+
constraints = @vocabulary.constellation.
|
230
|
+
Constraint.values
|
231
|
+
puts " constraints: [\n#{
|
232
|
+
constraints.sort_by{|c|c.identifying_role_values.inspect}.select{|c| !uuids[c]}.map do |c|
|
233
|
+
uuid = uuids[c] ||= uuid_from_id(c)
|
234
|
+
j = {
|
235
|
+
:uuid => uuid,
|
236
|
+
:type => c.class.basename,
|
237
|
+
:shapes => c.all_constraint_shape.map do |shape|
|
238
|
+
{ :diagram => uuids[shape.diagram],
|
239
|
+
:uuid => uuid_from_id(shape),
|
240
|
+
:x => shape.position.x,
|
241
|
+
:y => shape.position.y
|
242
|
+
}
|
243
|
+
end
|
244
|
+
}
|
245
|
+
|
246
|
+
if (c.enforcement)
|
247
|
+
# REVISIT: Deontic constraint
|
248
|
+
end
|
249
|
+
if (c.all_context_note.size > 0)
|
250
|
+
# REVISIT: Context Notes
|
251
|
+
end
|
252
|
+
|
253
|
+
case c
|
254
|
+
when ActiveFacts::Metamodel::PresenceConstraint
|
255
|
+
j[:min_frequency] = c.min_frequency
|
256
|
+
j[:max_frequency] = c.max_frequency
|
257
|
+
j[:is_mandatory] = c.is_mandatory
|
258
|
+
j[:is_preferred_identifier] = c.is_preferred_identifier
|
259
|
+
rss = [c.role_sequence.all_role_ref_in_order.map(&:role)]
|
260
|
+
|
261
|
+
# Ignore internal presence constraints on TypeInheritance fact types
|
262
|
+
next nil if !c.role_sequence.all_role_ref.
|
263
|
+
detect{|rr|
|
264
|
+
!rr.role.fact_type.is_a?(ActiveFacts::Metamodel::TypeInheritance)
|
265
|
+
}
|
266
|
+
|
267
|
+
when ActiveFacts::Metamodel::RingConstraint
|
268
|
+
next nil # These are emitted with the corresponding fact type
|
269
|
+
|
270
|
+
when ActiveFacts::Metamodel::SetComparisonConstraint
|
271
|
+
rss = c.
|
272
|
+
all_set_comparison_roles.sort_by{|scr| scr.ordinal}.
|
273
|
+
map{|scr| scr.role_sequence.all_role_ref_in_order.map(&:role) }
|
274
|
+
if (ActiveFacts::Metamodel::SetExclusionConstraint === c)
|
275
|
+
j[:is_mandatory] = c.is_mandatory
|
276
|
+
end
|
277
|
+
|
278
|
+
when ActiveFacts::Metamodel::SubsetConstraint
|
279
|
+
rss = [c.subset_role_sequence, c.superset_role_sequence].
|
280
|
+
map{|rs| rs.all_role_ref_in_order.map(&:role) }
|
281
|
+
|
282
|
+
when ActiveFacts::Metamodel::ValueConstraint
|
283
|
+
next nil # REVISIT: Should have been handled elsewhere
|
284
|
+
if (c.role)
|
285
|
+
# Should have been handled as role.role_value_constraint
|
286
|
+
elsif (c.value_type)
|
287
|
+
# Should have been handled as object_type.value_constraint
|
288
|
+
end
|
289
|
+
j[:allowed_ranges] = c.all_allowed_range.map{|ar|
|
290
|
+
[ ar.value_range.minimum_bound, ar.value_range.maximum_bound ].
|
291
|
+
map{|b| [b.value.literal, b.value.unit.name, b.is_inclusive] }
|
292
|
+
}
|
293
|
+
|
294
|
+
else
|
295
|
+
raise "REVISIT: Constraint type not yet dumped to JSON"
|
296
|
+
end
|
297
|
+
|
298
|
+
# rss contains the constrained role sequences; map to uuids
|
299
|
+
j[:role_sequences] = rss.map{|rs|
|
300
|
+
rs.map do |role|
|
301
|
+
uuids[role]
|
302
|
+
end
|
303
|
+
}
|
304
|
+
|
305
|
+
" #{j.to_json}"
|
306
|
+
end.compact*",\n"
|
307
|
+
}\n ]"
|
308
|
+
|
309
|
+
puts "}"
|
310
|
+
end
|
311
|
+
|
312
|
+
def role_order(uuids, roles, order)
|
313
|
+
if (roles.size > 9)
|
314
|
+
roles.map{|r| uuids[r] }
|
315
|
+
else
|
316
|
+
roles.map{|r| order.index(r).to_s }*''
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
def uuid_from_id o
|
321
|
+
irvs = o.identifying_role_values.inspect
|
322
|
+
d = Digest::SHA1.digest irvs
|
323
|
+
# $stderr.puts "#{o.class.basename}: #{irvs}"
|
324
|
+
d[0,4].unpack("H8")[0]+'-'+
|
325
|
+
d[4,2].unpack("H4")[0]+'-'+
|
326
|
+
d[6,2].unpack("H4")[0]+'-'+
|
327
|
+
d[8,2].unpack("H4")[0]+'-'+
|
328
|
+
d[10,6].unpack("H6")[0]
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#
|
2
|
+
# ActiveFacts Generators.
|
3
|
+
# Generate text output (verbalise the meta-vocabulary) for ActiveFacts vocabularies.
|
4
|
+
#
|
5
|
+
# Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
|
6
|
+
#
|
7
|
+
require 'activefacts/persistence'
|
8
|
+
|
9
|
+
module ActiveFacts
|
10
|
+
module Generate
|
11
|
+
# Generate a text verbalisation of the metamodel constellation created for an ActiveFacts vocabulary.
|
12
|
+
# Invoke as
|
13
|
+
# afgen --text <file>.cql
|
14
|
+
class RECORDS
|
15
|
+
private
|
16
|
+
def initialize(vocabulary)
|
17
|
+
@vocabulary = vocabulary
|
18
|
+
@vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary
|
19
|
+
end
|
20
|
+
|
21
|
+
public
|
22
|
+
def generate(out = $>)
|
23
|
+
# Extract the list of tables in the relational mapping of the metamodel
|
24
|
+
# We'll use the columns too.
|
25
|
+
@metamodel = ActiveFacts::CQL::Compiler.new.compile_file "examples/CQL/Metamodel.cql"
|
26
|
+
tables = @metamodel.tables.sort_by{|t| t.name}
|
27
|
+
|
28
|
+
class_names = tables.map{|t| t.name.gsub(/\s/,'')}
|
29
|
+
# map{|t| ActiveFacts::Metamodel.const_get(t.name.gsub(/\s/,''))}
|
30
|
+
|
31
|
+
tables.zip(class_names).each do |table, class_name|
|
32
|
+
instance_index = @vocabulary.constellation.send(class_name)
|
33
|
+
debugger
|
34
|
+
next if instance_index.empty?
|
35
|
+
out.puts "#{table.name}(#{table.columns.map{|c| c.name}*', '})"
|
36
|
+
debugger
|
37
|
+
instance_index.each do |key, value|
|
38
|
+
out.puts "\t"+value.verbalise
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# ActiveFacts Generators.
|
3
|
+
# Provides version number from the --version option
|
4
|
+
#
|
5
|
+
# Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
|
6
|
+
#
|
7
|
+
require 'activefacts/persistence'
|
8
|
+
|
9
|
+
module ActiveFacts
|
10
|
+
module Generate
|
11
|
+
# Generate nothing from an ActiveFacts vocabulary. This is useful to check the file can be read ok.
|
12
|
+
# Invoke as
|
13
|
+
# afgen --null <file>.cql
|
14
|
+
class VERSION
|
15
|
+
private
|
16
|
+
def initialize(vocabulary, *options)
|
17
|
+
puts ActiveFacts::VERSION
|
18
|
+
exit 0
|
19
|
+
end
|
20
|
+
|
21
|
+
public
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
data/lib/activefacts/version.rb
CHANGED
@@ -5,5 +5,12 @@
|
|
5
5
|
# Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
|
6
6
|
#
|
7
7
|
module ActiveFacts
|
8
|
-
|
8
|
+
module Version
|
9
|
+
MAJOR = 0
|
10
|
+
MINOR = 8
|
11
|
+
PATCH = 15
|
12
|
+
|
13
|
+
STRING = [MAJOR, MINOR, PATCH].compact.join('.')
|
14
|
+
end
|
15
|
+
VERSION = Version::STRING
|
9
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,16 +9,32 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activefacts-api
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.2
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.2
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: treetop
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|
17
33
|
none: false
|
18
34
|
requirements:
|
19
35
|
- - ! '>='
|
20
36
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0
|
37
|
+
version: '0'
|
22
38
|
type: :runtime
|
23
39
|
prerelease: false
|
24
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,15 +42,15 @@ dependencies:
|
|
26
42
|
requirements:
|
27
43
|
- - ! '>='
|
28
44
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0
|
45
|
+
version: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
47
|
+
name: nokogiri
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
33
49
|
none: false
|
34
50
|
requirements:
|
35
51
|
- - ! '>='
|
36
52
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
53
|
+
version: '0'
|
38
54
|
type: :runtime
|
39
55
|
prerelease: false
|
40
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +58,87 @@ dependencies:
|
|
42
58
|
requirements:
|
43
59
|
- - ! '>='
|
44
60
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: dm-core
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: dm-constraints
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: dm-migrations
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: jeweler
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rspec
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 2.11.0
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 2.11.0
|
46
142
|
- !ruby/object:Gem::Dependency
|
47
143
|
name: rake
|
48
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +146,39 @@ dependencies:
|
|
50
146
|
requirements:
|
51
147
|
- - ! '>='
|
52
148
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: activefacts-api
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ~>
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 0.9.1
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.9.1
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: treetop
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
54
182
|
type: :runtime
|
55
183
|
prerelease: false
|
56
184
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,31 +186,47 @@ dependencies:
|
|
58
186
|
requirements:
|
59
187
|
- - ! '>='
|
60
188
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
189
|
+
version: '0'
|
62
190
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
191
|
+
name: nokogiri
|
64
192
|
requirement: !ruby/object:Gem::Requirement
|
65
193
|
none: false
|
66
194
|
requirements:
|
67
195
|
- - ! '>='
|
68
196
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
type: :
|
197
|
+
version: '0'
|
198
|
+
type: :runtime
|
71
199
|
prerelease: false
|
72
200
|
version_requirements: !ruby/object:Gem::Requirement
|
73
201
|
none: false
|
74
202
|
requirements:
|
75
203
|
- - ! '>='
|
76
204
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
205
|
+
version: '0'
|
206
|
+
- !ruby/object:Gem::Dependency
|
207
|
+
name: rspec
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ~>
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: 2.3.0
|
214
|
+
type: :development
|
215
|
+
prerelease: false
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ~>
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 2.3.0
|
78
222
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
223
|
+
name: bundler
|
80
224
|
requirement: !ruby/object:Gem::Requirement
|
81
225
|
none: false
|
82
226
|
requirements:
|
83
227
|
- - ~>
|
84
228
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
229
|
+
version: 1.0.0
|
86
230
|
type: :development
|
87
231
|
prerelease: false
|
88
232
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,7 +234,39 @@ dependencies:
|
|
90
234
|
requirements:
|
91
235
|
- - ~>
|
92
236
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
237
|
+
version: 1.0.0
|
238
|
+
- !ruby/object:Gem::Dependency
|
239
|
+
name: jeweler
|
240
|
+
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ~>
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: 1.5.2
|
246
|
+
type: :development
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
250
|
+
requirements:
|
251
|
+
- - ~>
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: 1.5.2
|
254
|
+
- !ruby/object:Gem::Dependency
|
255
|
+
name: rdoc
|
256
|
+
requirement: !ruby/object:Gem::Requirement
|
257
|
+
none: false
|
258
|
+
requirements:
|
259
|
+
- - ! '>='
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: 2.4.2
|
262
|
+
type: :development
|
263
|
+
prerelease: false
|
264
|
+
version_requirements: !ruby/object:Gem::Requirement
|
265
|
+
none: false
|
266
|
+
requirements:
|
267
|
+
- - ! '>='
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
version: 2.4.2
|
94
270
|
description: ! '
|
95
271
|
|
96
272
|
ActiveFacts provides a semantic modeling language, the Constellation
|
@@ -104,17 +280,16 @@ description: ! '
|
|
104
280
|
and object models in SQL, Ruby and other languages.
|
105
281
|
|
106
282
|
'
|
107
|
-
email:
|
108
|
-
- cjh@dataconstellation.org
|
283
|
+
email: cjh@dataconstellation.com
|
109
284
|
executables:
|
110
285
|
- afgen
|
111
286
|
- cql
|
112
287
|
extensions:
|
113
288
|
- lib/activefacts/cql/Rakefile
|
114
289
|
extra_rdoc_files:
|
115
|
-
-
|
116
|
-
- Manifest.txt
|
290
|
+
- LICENSE
|
117
291
|
- README.rdoc
|
292
|
+
- TODO
|
118
293
|
files:
|
119
294
|
- History.txt
|
120
295
|
- LICENSE
|
@@ -139,7 +314,6 @@ files:
|
|
139
314
|
- examples/CQL/JoinEquality.cql
|
140
315
|
- examples/CQL/Marriage.cql
|
141
316
|
- examples/CQL/Metamodel.cql
|
142
|
-
- examples/CQL/MetamodelNext.cql
|
143
317
|
- examples/CQL/Monogamy.cql
|
144
318
|
- examples/CQL/MonthInSeason.cql
|
145
319
|
- examples/CQL/Moon.cql
|
@@ -192,13 +366,19 @@ files:
|
|
192
366
|
- lib/activefacts/cql/parser.rb
|
193
367
|
- lib/activefacts/generate/absorption.rb
|
194
368
|
- lib/activefacts/generate/cql.rb
|
369
|
+
- lib/activefacts/generate/dm.rb
|
370
|
+
- lib/activefacts/generate/help.rb
|
371
|
+
- lib/activefacts/generate/html/glossary.rb
|
372
|
+
- lib/activefacts/generate/json.rb
|
195
373
|
- lib/activefacts/generate/null.rb
|
196
374
|
- lib/activefacts/generate/oo.rb
|
197
375
|
- lib/activefacts/generate/ordered.rb
|
376
|
+
- lib/activefacts/generate/records.rb
|
198
377
|
- lib/activefacts/generate/ruby.rb
|
199
378
|
- lib/activefacts/generate/sql/mysql.rb
|
200
379
|
- lib/activefacts/generate/sql/server.rb
|
201
380
|
- lib/activefacts/generate/text.rb
|
381
|
+
- lib/activefacts/generate/version.rb
|
202
382
|
- lib/activefacts/input/cql.rb
|
203
383
|
- lib/activefacts/input/orm.rb
|
204
384
|
- lib/activefacts/persistence.rb
|
@@ -215,17 +395,15 @@ files:
|
|
215
395
|
- lib/activefacts/vocabulary/metamodel.rb
|
216
396
|
- lib/activefacts/vocabulary/verbaliser.rb
|
217
397
|
- script/txt2html
|
398
|
+
- spec/absorption_spec.rb
|
218
399
|
- spec/cql/comparison_spec.rb
|
400
|
+
- spec/cql/context_spec.rb
|
219
401
|
- spec/cql/contractions_spec.rb
|
402
|
+
- spec/cql/deontic_spec.rb
|
220
403
|
- spec/cql/entity_type_spec.rb
|
221
404
|
- spec/cql/expressions_spec.rb
|
222
|
-
- spec/cql/french_spec.rb
|
223
|
-
- spec/cql/role_matching_spec.rb
|
224
|
-
- spec/ruby_api_spec.rb
|
225
|
-
- spec/absorption_spec.rb
|
226
|
-
- spec/cql/context_spec.rb
|
227
|
-
- spec/cql/deontic_spec.rb
|
228
405
|
- spec/cql/fact_type_matching_spec.rb
|
406
|
+
- spec/cql/french_spec.rb
|
229
407
|
- spec/cql/parser/bad_literals_spec.rb
|
230
408
|
- spec/cql/parser/constraints_spec.rb
|
231
409
|
- spec/cql/parser/entity_types_spec.rb
|
@@ -234,6 +412,7 @@ files:
|
|
234
412
|
- spec/cql/parser/literals_spec.rb
|
235
413
|
- spec/cql/parser/pragmas_spec.rb
|
236
414
|
- spec/cql/parser/value_types_spec.rb
|
415
|
+
- spec/cql/role_matching_spec.rb
|
237
416
|
- spec/cql/samples_spec.rb
|
238
417
|
- spec/cql_cql_spec.rb
|
239
418
|
- spec/cql_dm_spec.rb
|
@@ -243,11 +422,6 @@ files:
|
|
243
422
|
- spec/cql_sql_spec.rb
|
244
423
|
- spec/cql_symbol_tables_spec.rb
|
245
424
|
- spec/cqldump_spec.rb
|
246
|
-
- spec/norma_cql_spec.rb
|
247
|
-
- spec/norma_ruby_spec.rb
|
248
|
-
- spec/norma_ruby_sql_spec.rb
|
249
|
-
- spec/norma_sql_spec.rb
|
250
|
-
- spec/norma_tables_spec.rb
|
251
425
|
- spec/helpers/array_matcher.rb
|
252
426
|
- spec/helpers/ctrl_c_support.rb
|
253
427
|
- spec/helpers/diff_matcher.rb
|
@@ -255,12 +429,19 @@ files:
|
|
255
429
|
- spec/helpers/parse_to_ast_matcher.rb
|
256
430
|
- spec/helpers/string_matcher.rb
|
257
431
|
- spec/helpers/test_parser.rb
|
432
|
+
- spec/norma_cql_spec.rb
|
433
|
+
- spec/norma_ruby_spec.rb
|
434
|
+
- spec/norma_ruby_sql_spec.rb
|
435
|
+
- spec/norma_sql_spec.rb
|
436
|
+
- spec/norma_tables_spec.rb
|
437
|
+
- spec/ruby_api_spec.rb
|
258
438
|
- spec/spec_helper.rb
|
259
439
|
- status.html
|
260
440
|
- why.html
|
261
|
-
-
|
262
|
-
homepage: http://
|
263
|
-
licenses:
|
441
|
+
- TODO
|
442
|
+
homepage: http://github.com/cjheath/activefacts
|
443
|
+
licenses:
|
444
|
+
- MIT
|
264
445
|
post_install_message: For more information on ActiveFacts, see http://dataconstellation.com/ActiveFacts
|
265
446
|
rdoc_options:
|
266
447
|
- -S
|
@@ -276,6 +457,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
276
457
|
- - ! '>='
|
277
458
|
- !ruby/object:Gem::Version
|
278
459
|
version: '0'
|
460
|
+
segments:
|
461
|
+
- 0
|
462
|
+
hash: -1995723602565457823
|
279
463
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
464
|
none: false
|
281
465
|
requirements:
|
@@ -283,7 +467,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
467
|
- !ruby/object:Gem::Version
|
284
468
|
version: '0'
|
285
469
|
requirements: []
|
286
|
-
rubyforge_project:
|
470
|
+
rubyforge_project:
|
287
471
|
rubygems_version: 1.8.24
|
288
472
|
signing_key:
|
289
473
|
specification_version: 3
|