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.
@@ -20,7 +20,8 @@ module ActiveFacts
20
20
  )
21
21
  end
22
22
 
23
- def initialize composition, options = {}
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 composition, options = {}
29
- @composition = composition
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'] || '_') : ''
@@ -5,7 +5,6 @@
5
5
  #
6
6
  require 'digest/sha1'
7
7
  require 'activefacts/metamodel'
8
- require 'activefacts/registry'
9
8
  require 'activefacts/compositions'
10
9
  require 'activefacts/generator/sql'
11
10
 
@@ -92,13 +92,13 @@ module ActiveFacts
92
92
  }
93
93
  end
94
94
 
95
- def initialize composition, options = {}
96
- @composition = composition
95
+ def initialize compositions, options = {}
96
+ @compositions = compositions
97
97
  @options = options
98
98
  end
99
99
 
100
100
  def generate
101
- @composition.summary
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 composition, options = {}
23
- @composition = composition
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 &report
37
+ @compositions.each{ |composition| composition.validate(&report) }
38
38
  nil
39
39
  end
40
40
  end
@@ -14,9 +14,9 @@ class Loadable
14
14
  pattern = dir_path+"/**/*"+@extension
15
15
  Dir[pattern].
16
16
  map do |p|
17
- p.
18
- sub(%r{#{Regexp.escape(dir_path)}/}, '').
19
- sub(%r{#{@extension}}, '')
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.8
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-02 00:00:00.000000000 Z
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.10
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.10
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