activefacts-compositions 1.9.20 → 1.9.21
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.
- checksums.yaml +4 -4
- data/bin/afcomp +2 -2
- data/bin/schema_compositor +17 -6
- data/lib/activefacts/compositions.rb +2 -2
- data/lib/activefacts/compositions/binary.rb +1 -1
- data/lib/activefacts/compositions/datavault.rb +1 -1
- data/lib/activefacts/compositions/relational.rb +1 -1
- data/lib/activefacts/compositions/staging.rb +1 -1
- data/lib/activefacts/compositions/version.rb +1 -1
- data/lib/activefacts/generator.rb +2 -2
- data/lib/activefacts/generator/doc/cwm.rb +2 -2
- data/lib/activefacts/generator/doc/graphviz.rb +1 -1
- data/lib/activefacts/generator/doc/ldm.rb +1 -1
- data/lib/activefacts/generator/etl/unidex.rb +1 -1
- data/lib/activefacts/generator/rails/models.rb +1 -1
- data/lib/activefacts/generator/rails/schema.rb +1 -1
- data/lib/activefacts/generator/ruby.rb +1 -1
- data/lib/activefacts/generator/sql.rb +1 -1
- data/lib/activefacts/generator/sql/mysql.rb +1 -1
- data/lib/activefacts/generator/sql/oracle.rb +1 -1
- data/lib/activefacts/generator/sql/postgres.rb +1 -1
- data/lib/activefacts/generator/sql/server.rb +1 -1
- data/lib/activefacts/generator/summary.rb +1 -1
- data/lib/activefacts/generator/transgen.rb +1 -1
- data/lib/activefacts/generator/validate.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 844f00a51607447cf1d629f514f7afe06d20a996
|
4
|
+
data.tar.gz: 6274fe0597c71587a0102637e2f83540b907919d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd447a4faf7b38663e95bce5b1576f6097ac3ecee9779f0e5a63ef15119ce9983445916e02371579ab3dca77115fdf175eca01ba6d571e85a4f5783ded448a55
|
7
|
+
data.tar.gz: 1ebdb686870e87e07287f66a770d4711b5f7b0bf72e9e7cc271f5e13f2e94e5ac26c0b1c0b58e7631dee787323683c9e3ecd203af08a93e8eb19861df839a638
|
data/bin/afcomp
CHANGED
@@ -62,11 +62,11 @@ class SchemaCompositor
|
|
62
62
|
option = compositor
|
63
63
|
end
|
64
64
|
|
65
|
-
if action = ActiveFacts::Compositions.compositors[option]
|
65
|
+
if action, helptext = ActiveFacts::Compositions.compositors[option]
|
66
66
|
options.delete(option)
|
67
67
|
check_options(action, modes)
|
68
68
|
@compositors << [action, modes, option]
|
69
|
-
elsif action = ActiveFacts::Generators.generators[option]
|
69
|
+
elsif action, helptext = ActiveFacts::Generators.generators[option]
|
70
70
|
options.delete(option)
|
71
71
|
check_options(action, modes)
|
72
72
|
@generators << [action, modes, option]
|
data/bin/schema_compositor
CHANGED
@@ -36,16 +36,19 @@ class SchemaCompositor
|
|
36
36
|
trace :loading, "Enumerating under #{path.inspect}" do
|
37
37
|
Loadable.new(path).
|
38
38
|
enumerate.
|
39
|
-
|
39
|
+
map do |filename|
|
40
40
|
begin
|
41
41
|
require(pathname = path+"/"+filename)
|
42
42
|
trace :loading, "Loaded #{pathname}"
|
43
|
+
filename
|
43
44
|
rescue LoadError => e
|
44
45
|
trace :loading, "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
|
46
|
+
nil
|
45
47
|
rescue Exception => e
|
46
48
|
$stderr.puts "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
|
49
|
+
nil
|
47
50
|
end
|
48
|
-
end
|
51
|
+
end.compact
|
49
52
|
end
|
50
53
|
end
|
51
54
|
|
@@ -70,6 +73,8 @@ class SchemaCompositor
|
|
70
73
|
options.delete(option)
|
71
74
|
check_options(action, modes)
|
72
75
|
@generators << [action, modes, option]
|
76
|
+
elsif option == 'help'
|
77
|
+
# Finish, then help
|
73
78
|
else
|
74
79
|
$stderr.puts "Action --#{option} is not recognised"
|
75
80
|
exit 1
|
@@ -184,12 +189,18 @@ end
|
|
184
189
|
sc = SchemaCompositor.new(ARGV)
|
185
190
|
sc.enumerate_available('activefacts/compositions')
|
186
191
|
sc.enumerate_available('activefacts/generator')
|
187
|
-
|
188
|
-
|
189
|
-
|
192
|
+
inputs = sc.enumerate_available('activefacts/input')
|
193
|
+
sc.arrange_actions
|
194
|
+
if sc.options['help'] || (sc.generators.empty? && sc.compositors.empty?)
|
195
|
+
compositors = (c = ActiveFacts::Compositions.compositors).keys.sort.map{|k| "%-15s %s" % [k, c[k][1]]}
|
196
|
+
generators = (c = ActiveFacts::Generators.generators).keys.sort.map{|k| "%-15s %s" % [k, c[k][1]]}
|
197
|
+
puts "You need to use a compositor to create the right kind of schema, and at least one generator to get output."
|
198
|
+
puts "Use '#{$PROGRAM_NAME} --<compositorname> --<generatorname> inputfile.ext'"
|
199
|
+
puts "Available input formats (file extensions):\n\t#{inputs*"\n\t"}\n\n"
|
200
|
+
puts "Available compositors:\n\t#{compositors*"\n\t"}\n\n"
|
201
|
+
puts "Available generators:\n\t#{generators*"\n\t"}\n\n"
|
190
202
|
puts "To get help for a particular action, follow it by =help, e.g. --relational:help"
|
191
203
|
exit
|
192
204
|
end
|
193
205
|
|
194
|
-
sc.arrange_actions
|
195
206
|
sc.process_files ARGV
|
@@ -8,8 +8,8 @@ module ActiveFacts
|
|
8
8
|
@@compositors ||= {}
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.publish_compositor klass
|
12
|
-
compositors[klass.name.sub(/^ActiveFacts::Compositions::/,'').gsub(/::/, '/').downcase] = klass
|
11
|
+
def self.publish_compositor klass, helptext = ''
|
12
|
+
compositors[klass.name.sub(/^ActiveFacts::Compositions::/,'').gsub(/::/, '/').downcase] = [klass, helptext]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -7,8 +7,8 @@ module ActiveFacts
|
|
7
7
|
@@generators ||= {}
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.publish_generator klass
|
11
|
-
generators[klass.name.sub(/^ActiveFacts::Generators::/,'').gsub(/::/, '/').downcase] = klass
|
10
|
+
def self.publish_generator klass, helptext = ''
|
11
|
+
generators[klass.name.sub(/^ActiveFacts::Generators::/,'').gsub(/::/, '/').downcase] = [klass, helptext]
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# ActiveFacts Common Warehouse Metamodel Generator
|
3
3
|
#
|
4
|
-
# This generator produces an CWM XMI-
|
4
|
+
# This generator produces an CWM XMI-formatted model of a Composition.
|
5
5
|
#
|
6
6
|
# Copyright (c) 2016 Infinuendo. Read the LICENSE file.
|
7
7
|
#
|
@@ -519,6 +519,6 @@ module ActiveFacts
|
|
519
519
|
|
520
520
|
end
|
521
521
|
end
|
522
|
-
publish_generator Doc::CWM
|
522
|
+
publish_generator Doc::CWM, "Common Warehouse Metamodel represented as an XMI file. Use a relational compositor"
|
523
523
|
end
|
524
524
|
end
|
@@ -250,6 +250,6 @@ module ActiveFacts
|
|
250
250
|
MM = ActiveFacts::Metamodel unless const_defined?(:MM)
|
251
251
|
end
|
252
252
|
end
|
253
|
-
publish_generator Rails::Models
|
253
|
+
publish_generator Rails::Models, "Generate models in Ruby for use with ActiveRecord and Rails. Use a relational compositor"
|
254
254
|
end
|
255
255
|
end
|