activefacts-compositions 1.9.8 → 1.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/activefacts-compositions.gemspec +1 -1
- data/bin/schema_compositor +67 -62
- data/lib/activefacts/compositions/datavault.rb +23 -39
- data/lib/activefacts/compositions/relational.rb +81 -14
- data/lib/activefacts/compositions/staging.rb +49 -0
- data/lib/activefacts/compositions/version.rb +1 -1
- data/lib/activefacts/generator/doc/cwm.rb +80 -302
- data/lib/activefacts/generator/doc/glossary.rb +1 -2
- data/lib/activefacts/generator/doc/graphviz.rb +3 -3
- data/lib/activefacts/generator/doc/ldm.rb +39 -39
- data/lib/activefacts/generator/oo.rb +3 -3
- data/lib/activefacts/generator/rails/models.rb +4 -4
- data/lib/activefacts/generator/rails/schema.rb +56 -25
- data/lib/activefacts/generator/ruby.rb +2 -1
- data/lib/activefacts/generator/sql.rb +4 -3
- data/lib/activefacts/generator/sql/server.rb +0 -1
- data/lib/activefacts/generator/summary.rb +3 -3
- data/lib/activefacts/generator/validate.rb +3 -3
- data/lib/activefacts/loadable.rb +3 -3
- metadata +5 -4
@@ -20,7 +20,8 @@ module ActiveFacts
|
|
20
20
|
)
|
21
21
|
end
|
22
22
|
|
23
|
-
def initialize
|
23
|
+
def initialize compositions, options = {}
|
24
|
+
raise "--ruby only processes a single composition" if compositions.size > 1
|
24
25
|
super
|
25
26
|
@scope = options.delete('scope') || ''
|
26
27
|
@scope = @scope.split(/::/)
|
@@ -6,8 +6,8 @@
|
|
6
6
|
require 'digest/sha1'
|
7
7
|
require 'activefacts/metamodel'
|
8
8
|
require 'activefacts/metamodel/datatypes'
|
9
|
-
require 'activefacts/registry'
|
10
9
|
require 'activefacts/compositions'
|
10
|
+
require 'activefacts/compositions/names'
|
11
11
|
require 'activefacts/generator'
|
12
12
|
|
13
13
|
module ActiveFacts
|
@@ -25,8 +25,9 @@ module ActiveFacts
|
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
28
|
-
def initialize
|
29
|
-
|
28
|
+
def initialize compositions, options = {}
|
29
|
+
raise "--sql only processes a single composition" if compositions.size > 1
|
30
|
+
@composition = compositions[0]
|
30
31
|
@options = options
|
31
32
|
@delay_fks = options.delete "delay_fks"
|
32
33
|
@underscore = options.has_key?("underscore") ? (options['underscore'] || '_') : ''
|
@@ -92,13 +92,13 @@ module ActiveFacts
|
|
92
92
|
}
|
93
93
|
end
|
94
94
|
|
95
|
-
def initialize
|
96
|
-
@
|
95
|
+
def initialize compositions, options = {}
|
96
|
+
@compositions = compositions
|
97
97
|
@options = options
|
98
98
|
end
|
99
99
|
|
100
100
|
def generate
|
101
|
-
@
|
101
|
+
@compositions.map(&:summary)*"\n\n"
|
102
102
|
end
|
103
103
|
end
|
104
104
|
publish_generator Summary
|
@@ -19,8 +19,8 @@ module ActiveFacts
|
|
19
19
|
}
|
20
20
|
end
|
21
21
|
|
22
|
-
def initialize
|
23
|
-
@
|
22
|
+
def initialize compositions, options = {}
|
23
|
+
@compositions = compositions
|
24
24
|
@options = options
|
25
25
|
end
|
26
26
|
|
@@ -34,7 +34,7 @@ module ActiveFacts
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
@composition.validate
|
37
|
+
@compositions.each{ |composition| composition.validate(&report) }
|
38
38
|
nil
|
39
39
|
end
|
40
40
|
end
|
data/lib/activefacts/loadable.rb
CHANGED
@@ -14,9 +14,9 @@ class Loadable
|
|
14
14
|
pattern = dir_path+"/**/*"+@extension
|
15
15
|
Dir[pattern].
|
16
16
|
map do |p|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
p.
|
18
|
+
sub(%r{#{Regexp.escape(dir_path)}/}, '').
|
19
|
+
sub(%r{#{@extension}}, '')
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts-compositions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,7 +101,7 @@ dependencies:
|
|
101
101
|
version: '1'
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 1.9.
|
104
|
+
version: 1.9.12
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -111,7 +111,7 @@ dependencies:
|
|
111
111
|
version: '1'
|
112
112
|
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 1.9.
|
114
|
+
version: 1.9.12
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: tracing
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- lib/activefacts/compositions/datavault.rb
|
178
178
|
- lib/activefacts/compositions/names.rb
|
179
179
|
- lib/activefacts/compositions/relational.rb
|
180
|
+
- lib/activefacts/compositions/staging.rb
|
180
181
|
- lib/activefacts/compositions/traits/rails.rb
|
181
182
|
- lib/activefacts/compositions/version.rb
|
182
183
|
- lib/activefacts/generator.rb
|