ncs_mdes_warehouse 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  NCS Navigator MDES Warehouse History
2
2
  ====================================
3
3
 
4
+ 0.7.3
5
+ -----
6
+
7
+ - Correct primary key resolution in FK index. (#2388)
8
+
9
+ - Remove autoload for MDES 2.0 models. MDES models should only be loaded via a
10
+ warehouse configuration instance. Doing otherwise will likely confuse
11
+ DataMapper.
12
+
4
13
  0.7.2
5
14
  -----
6
15
 
@@ -7,8 +7,5 @@ module NcsNavigator::Warehouse
7
7
  module Models
8
8
  autoload :MdesModel, 'ncs_navigator/warehouse/models/mdes_model'
9
9
  autoload :MdesModelCollection, 'ncs_navigator/warehouse/models/mdes_model_collection'
10
-
11
- # Generated modules
12
- autoload :TwoPointZero, 'ncs_navigator/warehouse/models/two_point_zero'
13
10
  end
14
11
  end
@@ -96,7 +96,7 @@ module NcsNavigator::Warehouse::Transformers
96
96
 
97
97
  if reference_value && !seen?(foreign_model, reference_value)
98
98
  interim_unsatisfied << RelationshipInstance.new(
99
- record.id, record.class.to_s, foreign_model, reference_name, reference_value
99
+ record.key.first, record.class.to_s, foreign_model, reference_name, reference_value
100
100
  )
101
101
  end
102
102
  end
@@ -1,5 +1,5 @@
1
1
  module NcsNavigator
2
2
  module Warehouse
3
- VERSION = '0.7.2'
3
+ VERSION = '0.7.3'
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module NcsNavigator::Warehouse::Transformers
6
6
  include ::DataMapper::Resource
7
7
 
8
8
  property :psu_id, String
9
- property :id, Integer, :key => true
9
+ property :a_id, Integer, :key => true
10
10
 
11
11
  belongs_to :old_one, self, :child_key => [ :old_one_id ]
12
12
  belongs_to :frob, 'NcsNavigator::Warehouse::Transformers::Frob', :child_key => [ :frob_id ]
@@ -16,7 +16,7 @@ module NcsNavigator::Warehouse::Transformers
16
16
  include ::DataMapper::Resource
17
17
 
18
18
  property :psu_id, String
19
- property :id, Integer, :key => true
19
+ property :f_id, Integer, :key => true
20
20
  end
21
21
 
22
22
  before(:each) do
@@ -47,27 +47,27 @@ module NcsNavigator::Warehouse::Transformers
47
47
 
48
48
  describe 'reporting errors' do
49
49
  before do
50
- fk_index.record_and_verify(Frob.new(:id => 8))
51
- fk_index.record_and_verify(Frob.new(:id => 16))
50
+ fk_index.record_and_verify(Frob.new(:f_id => 8))
51
+ fk_index.record_and_verify(Frob.new(:f_id => 16))
52
52
  end
53
53
 
54
54
  it 'does not report for a key which is satisfied when it is first recorded' do
55
- fk_index.record_and_verify(Addr.new(:frob_id => 8, :id => 1))
55
+ fk_index.record_and_verify(Addr.new(:frob_id => 8, :a_id => 1))
56
56
  fk_index.report_errors(transform_status)
57
57
 
58
58
  errors.should == []
59
59
  end
60
60
 
61
61
  it 'does not report for a key which is not initially satisfied but is later' do
62
- fk_index.record_and_verify(Addr.new(:frob_id => 4, :id => 1))
63
- fk_index.record_and_verify(Frob.new(:id => 4))
62
+ fk_index.record_and_verify(Addr.new(:frob_id => 4, :a_id => 1))
63
+ fk_index.record_and_verify(Frob.new(:f_id => 4))
64
64
  fk_index.report_errors(transform_status)
65
65
 
66
66
  errors.should == []
67
67
  end
68
68
 
69
69
  it 'does not report for a key which is provided by the external key provider' do
70
- fk_index.record_and_verify(Addr.new(:id => 8, :old_one_id => 120))
70
+ fk_index.record_and_verify(Addr.new(:a_id => 8, :old_one_id => 120))
71
71
  fk_index.report_errors(transform_status)
72
72
 
73
73
  errors.should == []
@@ -76,7 +76,7 @@ module NcsNavigator::Warehouse::Transformers
76
76
  it 'does not report for a key which is provided by the external key provider when the associated model class has not previously been referenced' do
77
77
  another_index = ForeignKeyIndex.new(:existing_key_provider => key_provider)
78
78
 
79
- another_index.record_and_verify(Addr.new(:id => 8, :frob_id => 80))
79
+ another_index.record_and_verify(Addr.new(:a_id => 8, :frob_id => 80))
80
80
  another_index.report_errors(transform_status)
81
81
 
82
82
  errors.should == []
@@ -84,7 +84,7 @@ module NcsNavigator::Warehouse::Transformers
84
84
 
85
85
  describe 'when a key is never satisfied' do
86
86
  before do
87
- fk_index.record_and_verify(Addr.new(:frob_id => 4, :id => 1))
87
+ fk_index.record_and_verify(Addr.new(:frob_id => 4, :a_id => 1))
88
88
  fk_index.report_errors(transform_status)
89
89
  end
90
90
 
@@ -113,7 +113,7 @@ module NcsNavigator::Warehouse::Transformers
113
113
  end
114
114
 
115
115
  it 'reports multiple failed references for a single record' do
116
- fk_index.record_and_verify(Addr.new(:id => 1, :frob_id => 2, :old_one_id => 3))
116
+ fk_index.record_and_verify(Addr.new(:a_id => 1, :frob_id => 2, :old_one_id => 3))
117
117
  fk_index.report_errors(transform_status)
118
118
 
119
119
  errors.collect { |e| e.message.match(/foreign key (\S+)/)[1] }.sort.should ==
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ncs_mdes_warehouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-21 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ncs_mdes
@@ -1817,7 +1817,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1817
1817
  version: '0'
1818
1818
  segments:
1819
1819
  - 0
1820
- hash: -207131653451212377
1820
+ hash: 4409560537695379906
1821
1821
  required_rubygems_version: !ruby/object:Gem::Requirement
1822
1822
  none: false
1823
1823
  requirements:
@@ -1826,7 +1826,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1826
1826
  version: '0'
1827
1827
  segments:
1828
1828
  - 0
1829
- hash: -207131653451212377
1829
+ hash: 4409560537695379906
1830
1830
  requirements: []
1831
1831
  rubyforge_project:
1832
1832
  rubygems_version: 1.8.24