mcfly 0.0.18 → 0.0.19

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: 325926858c6b7470e2e8ec190e1687acf2333176
4
- data.tar.gz: 4954ea54da5a03cd7f792293dd7ce92391ebb07b
3
+ metadata.gz: e5a2ed94848d3460cbf727f542510f3ad70b7a16
4
+ data.tar.gz: cc1960246aca8ba7b598b0188c1ed739adb0addc
5
5
  SHA512:
6
- metadata.gz: 2876c9d82c53ce066e856dedd0f4d0d927ba9bd26ba85ebda2dcf03a9d1e75c3662f7581fd4e39c41864a27c8d8e2e04cfc711c2939b1f27c5570b0a7470aeec
7
- data.tar.gz: 83af740784adc21713e895e61ac6de18192364b570455db37817785a8dfbb96121702bb1a39f0cb3116ab352cf962299896f308507e2ebddf54b429272464e28
6
+ metadata.gz: 3fa0d0b71637f7d32d69bf3769e0d26c0683d2d1599dbd37771e4bc840ff14627ae8adf64258bdb00f7ecb8d3318b24109b8682816cbba0dca617bc93ef47622
7
+ data.tar.gz: 0bdd70da17caffe1b5648bc2b4895791bfef573a1d9a18e86410dafeeab8cc53ae0f2cf3901b0e66c34c8156bd8c95730efbb1f5c0112136c17fc4f343236739
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mcfly (0.0.17)
4
+ mcfly (0.0.19)
5
5
  delorean_lang (~> 0.1)
6
6
  pg (~> 0.17)
7
7
 
@@ -34,9 +34,9 @@ GEM
34
34
  minitest (~> 5.1)
35
35
  thread_safe (~> 0.3, >= 0.3.4)
36
36
  tzinfo (~> 1.1)
37
- arel (6.0.3)
37
+ arel (6.0.4)
38
38
  builder (3.2.2)
39
- delorean_lang (0.3.21)
39
+ delorean_lang (0.3.22)
40
40
  activerecord (>= 3.2)
41
41
  treetop (~> 1.5)
42
42
  diff-lcs (1.2.5)
@@ -49,7 +49,7 @@ GEM
49
49
  minitest (5.8.1)
50
50
  nokogiri (1.6.6.2)
51
51
  mini_portile (~> 0.6.0)
52
- pg (0.18.3)
52
+ pg (0.19.0)
53
53
  polyglot (0.3.5)
54
54
  rack (1.6.4)
55
55
  rack-test (0.6.3)
@@ -85,7 +85,7 @@ GEM
85
85
  rspec-mocks (~> 2.99.0)
86
86
  thor (0.19.1)
87
87
  thread_safe (0.3.5)
88
- treetop (1.6.3)
88
+ treetop (1.6.8)
89
89
  polyglot (~> 0.3)
90
90
  tzinfo (1.2.2)
91
91
  thread_safe (~> 0.1)
@@ -98,4 +98,4 @@ DEPENDENCIES
98
98
  rspec-rails (~> 2.99)
99
99
 
100
100
  BUNDLED WITH
101
- 1.10.6
101
+ 1.13.6
@@ -2,3 +2,8 @@
2
2
  -- not infinity (i.e. object is obsoleted).
3
3
  ALTER TABLE "%{table}" ADD CONSTRAINT check_o_user
4
4
  CHECK ((obsoleted_dt = 'Infinity') = (o_user_id IS NULL));
5
+
6
+ -- obsoleted_dt > created_dt should be enforced -- however, there are
7
+ -- many instances of obsoleted_dt=created_dt in our existing apps.
8
+ ALTER TABLE "%{table}" ADD CONSTRAINT check_bad_obsolete
9
+ CHECK (obsoleted_dt >= created_dt);
@@ -1,11 +1,11 @@
1
1
  class McflyMigration < ActiveRecord::Migration
2
2
  INSERT_TRIG, UPDATE_TRIG, UPDATE_APPEND_ONLY_TRIG, DELETE_TRIG, CONSTRAINT =
3
3
  %w{
4
- insert_trig
5
- update_trig
6
- update_append_only_trig
7
- delete_trig
8
- constraint
4
+ insert_trig
5
+ update_trig
6
+ update_append_only_trig
7
+ delete_trig
8
+ constraint
9
9
  }.map { |f|
10
10
  File.read(File.dirname(__FILE__) + "/#{f}.sql")
11
11
  }
@@ -1,3 +1,3 @@
1
1
  module Mcfly
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -0,0 +1 @@
1
+ ../../spec/
@@ -9,19 +9,19 @@ describe "Mcfly" do
9
9
  @dts = ['2001-01-01', '2001-01-05', '2001-01-10']
10
10
 
11
11
  @sis = [
12
- ["FN Fix-30 MBS", "A"],
13
- ["FN Fix-30 Cash", "A"],
14
- ["FN Fix-30 MBS Blend", "A"],
15
- ["FN Fix-30 HB MBS", "A"],
16
- ["FN Fix-15 MBS", "B"],
17
- ["FN Fix-15 Cash", "B"],
18
- ["FN Fix-15 HB MBS", "B"],
19
- ["FN Fix-15 HB Cash", "B"],
20
- ["FN ARM 3/1 LIBOR", "D"],
21
- ["FN ARM 3/1 LIBOR Cash", "D"],
22
- ["FN ARM 5/1 LIBOR", "D"],
23
- ["FN ARM 5/1 LIBOR Cash", "D"],
24
- ]
12
+ ["FN Fix-30 MBS", "A"],
13
+ ["FN Fix-30 Cash", "A"],
14
+ ["FN Fix-30 MBS Blend", "A"],
15
+ ["FN Fix-30 HB MBS", "A"],
16
+ ["FN Fix-15 MBS", "B"],
17
+ ["FN Fix-15 Cash", "B"],
18
+ ["FN Fix-15 HB MBS", "B"],
19
+ ["FN Fix-15 HB Cash", "B"],
20
+ ["FN ARM 3/1 LIBOR", "D"],
21
+ ["FN ARM 3/1 LIBOR Cash", "D"],
22
+ ["FN ARM 5/1 LIBOR", "D"],
23
+ ["FN ARM 5/1 LIBOR Cash", "D"],
24
+ ]
25
25
 
26
26
  @sis.each_with_index { |(name, sc), i|
27
27
  si = SecurityInstrument.new(name: name, settlement_class: sc)
@@ -226,14 +226,18 @@ describe "Mcfly" do
226
226
  mp = MarketPrice.lookup_si('infinity', si)
227
227
  mp.user_id.should == 20
228
228
  mp.o_user_id.should == nil
229
+ end
229
230
 
230
- rid = mp.id
231
+ it "should set o_user on delete" do
232
+ si = SecurityInstrument.find_by_name("FN Fix-15 HB MBS")
233
+ mp = MarketPrice.lookup_si('infinity', si)
234
+ mp.obsoleted_dt.should == Float::INFINITY
235
+ mp.o_user_id.should == nil
231
236
 
237
+ rid = mp.id
232
238
  Mcfly.whodunnit = {id: 30}
233
-
234
239
  mp.delete
235
240
  mp = MarketPrice.find(rid)
236
241
  mp.o_user_id.should == 30
237
242
  end
238
-
239
243
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arman Bostani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -116,6 +116,7 @@ files:
116
116
  - spec/dummy/public/500.html
117
117
  - spec/dummy/public/favicon.ico
118
118
  - spec/dummy/script/rails
119
+ - spec/dummy/spec
119
120
  - spec/model_spec.rb
120
121
  - spec/no_trans_spec.rb
121
122
  - spec/spec_helper.rb
@@ -139,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
140
  version: '0'
140
141
  requirements: []
141
142
  rubyforge_project:
142
- rubygems_version: 2.4.8
143
+ rubygems_version: 2.5.2
143
144
  signing_key:
144
145
  specification_version: 4
145
146
  summary: A database table versioning system.