activefacts-compositions 1.9.9 → 1.9.10

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: 21764b88dbad036917cb41736a88158dfe3a0557
4
- data.tar.gz: c6e8dac27a2114b466b03e6707489280af4103ca
3
+ metadata.gz: 92a737c515247b8ec677c99cdfed1a550daf92e1
4
+ data.tar.gz: 863d201ecf700a29c68a83bb373ead97382ca6f5
5
5
  SHA512:
6
- metadata.gz: 6dc9d157c1ff522b0b529d3693b35149d1d4a917648d46a909ff32a3003164fbb86decc0db1823072b51fdb513d820857d835a3946418ddb6f4ed64678677757
7
- data.tar.gz: 52e636f04f8acd46418c0ab3def5bfacc99a0802714a2f07dc1cc4baf730d926ecd34a5eaa7d4cb33a42f936081290a6dbf514d7cc2822f56523bbbd2368029c
6
+ metadata.gz: cacf53c424c21b0764ae8e2878bf1e083f1fd7bd1ba93c7075420393ee0e34a16057688298255bb21516c40b5eb1630a632cec5c778ef745388b4065e3d6eaca
7
+ data.tar.gz: f179277f0ce2fc207466933f2e344260c86cf7acd995c902275787b70218aca7883f1565e7d068d30c90b76f56a66db2604dce46d49ddec82d7de4a2bb1601ed
@@ -35,14 +35,14 @@ class SchemaCompositor
35
35
  Loadable.new(path).
36
36
  enumerate.
37
37
  select do |filename|
38
- begin
39
- require(pathname = path+"/"+filename)
40
- trace :loading, "Loaded #{pathname}"
41
- rescue LoadError => e
42
- trace :loading, "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
43
- rescue Exception => e
44
- $stderr.puts "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
45
- end
38
+ begin
39
+ require(pathname = path+"/"+filename)
40
+ trace :loading, "Loaded #{pathname}"
41
+ rescue LoadError => e
42
+ trace :loading, "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
43
+ rescue Exception => e
44
+ $stderr.puts "Can't load #{pathname}: #{e.class}: #{e.message} #{e.backtrace[0]}"
45
+ end
46
46
  end
47
47
  end
48
48
  end
@@ -111,7 +111,7 @@ class SchemaCompositor
111
111
 
112
112
  # Run each generator
113
113
  @generators.each do |generator_klass, modes|
114
- output = generator_klass.new(compositions, modes).generate
114
+ output = generator_klass.new(compositions, modes).generate
115
115
  puts output if output
116
116
  end
117
117
  end
@@ -15,7 +15,7 @@ module ActiveFacts
15
15
  {
16
16
  reference: ['Boolean', "Emit the reference (static) tables as well. Default is to omit them"],
17
17
  datestamp: ['String', "Use this data type for date stamps"],
18
- id: ['String', "Append this to data vault surrogate keys (default VID)"],
18
+ id: ['String', "Append this to data vault surrogate keys (default HID)"],
19
19
  hubname: ['String', "Suffix or pattern for naming hub tables. Include a + to insert the name. Default 'HUB'"],
20
20
  linkname: ['String', "Suffix or pattern for naming link tables. Include a + to insert the name. Default 'LINK'"],
21
21
  satname: ['String', "Suffix or pattern for naming satellite tables. Include a + to insert the name. Default 'SAT'"],
@@ -46,9 +46,6 @@ module ActiveFacts
46
46
  # Inject surrogate keys if the options ask for that
47
47
  inject_surrogates if @option_surrogates
48
48
 
49
- # Inject load date time and record source if building staging
50
- inject_all_datetime_recordsource
51
-
52
49
  # Remove the un-used absorption paths
53
50
  delete_reverse_absorptions
54
51
 
@@ -396,10 +393,6 @@ module ActiveFacts
396
393
  return true
397
394
  end
398
395
 
399
- # This function is over-written in the Staging subclass
400
- def inject_all_datetime_recordsource
401
- end
402
-
403
396
  #
404
397
  # Datetime and recordsource functions defined here because they are used in both Staging and Datavault subclasses
405
398
  #
@@ -410,6 +403,7 @@ module ActiveFacts
410
403
  name: "Load"+datestamp_type_name,
411
404
  object_type: datestamp_type
412
405
  )
406
+
413
407
  # Add a load DateTime value
414
408
  recsrc_field = @constellation.ValueField(:new,
415
409
  parent: mapping,
@@ -440,7 +434,7 @@ module ActiveFacts
440
434
 
441
435
  def recordsource_type_name
442
436
  @recordsource_type_name ||= begin
443
- [true, '', 'true', 'yes', nil].include?(t = @option_recordsource) ? 'RecordSource' : t
437
+ [true, '', 'true', 'yes', nil].include?(t = @option_recordsource) ? 'String' : t
444
438
  end
445
439
  end
446
440
 
@@ -41,6 +41,8 @@ module ActiveFacts
41
41
  def devolve_all
42
42
  # Rename composites with STG prefix
43
43
  rename_parents
44
+
45
+ inject_all_datetime_recordsource
44
46
  end
45
47
  end
46
48
 
@@ -1,5 +1,5 @@
1
1
  module ActiveFacts
2
2
  module Compositions
3
- VERSION = "1.9.9"
3
+ VERSION = "1.9.10"
4
4
  end
5
5
  end
@@ -57,7 +57,7 @@ module ActiveFacts
57
57
  @options = options
58
58
  @underscore = options.has_key?("underscore") ? (options['underscore'] || '_') : ''
59
59
 
60
- @vocabulary = composition.constellation.Vocabulary.values[0] # REVISIT when importing from other vocabularies
60
+ @vocabulary = @composition.constellation.Vocabulary.values[0] # REVISIT when importing from other vocabularies
61
61
  end
62
62
 
63
63
  def data_type_context
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.9
4
+ version: 1.9.10
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-31 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler