mcfly 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +69 -67
- data/lib/mcfly/controller.rb +1 -1
- data/lib/mcfly/has_mcfly.rb +8 -6
- data/lib/mcfly/migration.rb +1 -1
- data/lib/mcfly/version.rb +1 -1
- data/mcfly.gemspec +1 -1
- data/spec/dummy/config/application.rb +0 -39
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +4 -4
- data/spec/dummy/db/schema.rb +24 -22
- data/spec/dummy/spec +1 -1
- data/spec/no_trans_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 653de3547c41c9f073883dec130bb219ef3d19bf
|
|
4
|
+
data.tar.gz: 9f85fa1fec81d8e4375ad67e262c0bc8618e8aa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca1cce82ec4f03030bf1655b196562ad62ccc08de0664dd6056997976df8f35f9b0e975c1fca33f5beeedee6418fbddf9b00132db331564781343e5e2be1f926
|
|
7
|
+
data.tar.gz: ee9b6717861484123dab28fd587d5bd74afb6abb0c593d4efbde3c29c91f75d4239003d47a1869eeac2c0524da03a9f1d680971bd6b31c00b8b3bdecfb24e1dd
|
data/Gemfile.lock
CHANGED
|
@@ -1,93 +1,95 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
mcfly (0.0.
|
|
4
|
+
mcfly (0.0.20)
|
|
5
5
|
delorean_lang (~> 0.1)
|
|
6
6
|
pg (~> 0.17)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionpack (
|
|
12
|
-
actionview (=
|
|
13
|
-
activesupport (=
|
|
14
|
-
rack (~>
|
|
15
|
-
rack-test (
|
|
16
|
-
rails-dom-testing (~>
|
|
11
|
+
actionpack (5.1.4)
|
|
12
|
+
actionview (= 5.1.4)
|
|
13
|
+
activesupport (= 5.1.4)
|
|
14
|
+
rack (~> 2.0)
|
|
15
|
+
rack-test (>= 0.6.3)
|
|
16
|
+
rails-dom-testing (~> 2.0)
|
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
18
|
-
actionview (
|
|
19
|
-
activesupport (=
|
|
18
|
+
actionview (5.1.4)
|
|
19
|
+
activesupport (= 5.1.4)
|
|
20
20
|
builder (~> 3.1)
|
|
21
|
-
|
|
22
|
-
rails-dom-testing (~>
|
|
23
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
|
24
|
-
activemodel (
|
|
25
|
-
activesupport (=
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
erubi (~> 1.4)
|
|
22
|
+
rails-dom-testing (~> 2.0)
|
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
24
|
+
activemodel (5.1.4)
|
|
25
|
+
activesupport (= 5.1.4)
|
|
26
|
+
activerecord (5.1.4)
|
|
27
|
+
activemodel (= 5.1.4)
|
|
28
|
+
activesupport (= 5.1.4)
|
|
29
|
+
arel (~> 8.0)
|
|
30
|
+
activesupport (5.1.4)
|
|
31
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
32
32
|
i18n (~> 0.7)
|
|
33
|
-
json (~> 1.7, >= 1.7.7)
|
|
34
33
|
minitest (~> 5.1)
|
|
35
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
|
36
34
|
tzinfo (~> 1.1)
|
|
37
|
-
arel (
|
|
38
|
-
builder (3.2.
|
|
39
|
-
|
|
35
|
+
arel (8.0.0)
|
|
36
|
+
builder (3.2.3)
|
|
37
|
+
concurrent-ruby (1.0.5)
|
|
38
|
+
crass (1.0.3)
|
|
39
|
+
delorean_lang (0.3.34)
|
|
40
40
|
activerecord (>= 3.2)
|
|
41
41
|
treetop (~> 1.5)
|
|
42
|
-
diff-lcs (1.
|
|
43
|
-
|
|
44
|
-
i18n (0.
|
|
45
|
-
|
|
46
|
-
loofah (2.
|
|
42
|
+
diff-lcs (1.3)
|
|
43
|
+
erubi (1.7.0)
|
|
44
|
+
i18n (0.9.1)
|
|
45
|
+
concurrent-ruby (~> 1.0)
|
|
46
|
+
loofah (2.1.1)
|
|
47
|
+
crass (~> 1.0.2)
|
|
47
48
|
nokogiri (>= 1.5.9)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
method_source (0.9.0)
|
|
50
|
+
mini_portile2 (2.3.0)
|
|
51
|
+
minitest (5.11.1)
|
|
52
|
+
nokogiri (1.8.1)
|
|
53
|
+
mini_portile2 (~> 2.3.0)
|
|
54
|
+
pg (0.21.0)
|
|
53
55
|
polyglot (0.3.5)
|
|
54
|
-
rack (
|
|
55
|
-
rack-test (0.
|
|
56
|
-
rack (>= 1.0)
|
|
57
|
-
rails-
|
|
58
|
-
activesupport (>= 4.2.0
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
nokogiri (~> 1.6.0)
|
|
62
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
|
63
|
-
rails-html-sanitizer (1.0.2)
|
|
56
|
+
rack (2.0.3)
|
|
57
|
+
rack-test (0.8.2)
|
|
58
|
+
rack (>= 1.0, < 3)
|
|
59
|
+
rails-dom-testing (2.0.3)
|
|
60
|
+
activesupport (>= 4.2.0)
|
|
61
|
+
nokogiri (>= 1.6)
|
|
62
|
+
rails-html-sanitizer (1.0.3)
|
|
64
63
|
loofah (~> 2.0)
|
|
65
|
-
railties (
|
|
66
|
-
actionpack (=
|
|
67
|
-
activesupport (=
|
|
64
|
+
railties (5.1.4)
|
|
65
|
+
actionpack (= 5.1.4)
|
|
66
|
+
activesupport (= 5.1.4)
|
|
67
|
+
method_source
|
|
68
68
|
rake (>= 0.8.7)
|
|
69
69
|
thor (>= 0.18.1, < 2.0)
|
|
70
|
-
rake (
|
|
71
|
-
rspec-
|
|
72
|
-
rspec-
|
|
73
|
-
rspec-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
rspec-mocks (
|
|
77
|
-
|
|
70
|
+
rake (12.3.0)
|
|
71
|
+
rspec-core (3.7.1)
|
|
72
|
+
rspec-support (~> 3.7.0)
|
|
73
|
+
rspec-expectations (3.7.0)
|
|
74
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
75
|
+
rspec-support (~> 3.7.0)
|
|
76
|
+
rspec-mocks (3.7.0)
|
|
77
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
78
|
+
rspec-support (~> 3.7.0)
|
|
79
|
+
rspec-rails (3.7.2)
|
|
78
80
|
actionpack (>= 3.0)
|
|
79
|
-
activemodel (>= 3.0)
|
|
80
81
|
activesupport (>= 3.0)
|
|
81
82
|
railties (>= 3.0)
|
|
82
|
-
rspec-
|
|
83
|
-
rspec-
|
|
84
|
-
rspec-
|
|
85
|
-
rspec-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
rspec-core (~> 3.7.0)
|
|
84
|
+
rspec-expectations (~> 3.7.0)
|
|
85
|
+
rspec-mocks (~> 3.7.0)
|
|
86
|
+
rspec-support (~> 3.7.0)
|
|
87
|
+
rspec-support (3.7.0)
|
|
88
|
+
thor (0.20.0)
|
|
89
|
+
thread_safe (0.3.6)
|
|
90
|
+
treetop (1.6.9)
|
|
89
91
|
polyglot (~> 0.3)
|
|
90
|
-
tzinfo (1.2.
|
|
92
|
+
tzinfo (1.2.4)
|
|
91
93
|
thread_safe (~> 0.1)
|
|
92
94
|
|
|
93
95
|
PLATFORMS
|
|
@@ -95,7 +97,7 @@ PLATFORMS
|
|
|
95
97
|
|
|
96
98
|
DEPENDENCIES
|
|
97
99
|
mcfly!
|
|
98
|
-
rspec-rails (~>
|
|
100
|
+
rspec-rails (~> 3.0)
|
|
99
101
|
|
|
100
102
|
BUNDLED WITH
|
|
101
|
-
1.
|
|
103
|
+
1.16.1
|
data/lib/mcfly/controller.rb
CHANGED
data/lib/mcfly/has_mcfly.rb
CHANGED
|
@@ -44,7 +44,7 @@ module Mcfly
|
|
|
44
44
|
return if value.nil?
|
|
45
45
|
|
|
46
46
|
unless VALSET.member?(value.obsoleted_dt)
|
|
47
|
-
entry.errors[field]
|
|
47
|
+
entry.errors[field] << "Obsoleted association value!"
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -146,11 +146,13 @@ module Mcfly
|
|
|
146
146
|
# checks against registered associations
|
|
147
147
|
if self.class.class_variable_defined?(:@@associations)
|
|
148
148
|
self.class.class_variable_get(:@@associations).each do |klass, fk|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
if klass.where("obsoleted_dt = ? AND #{fk} = ?",
|
|
150
|
+
'infinity', self.id).exists?
|
|
151
|
+
self.errors.add(:base,
|
|
152
|
+
"#{self.class.name.demodulize} can't be deleted "\
|
|
153
|
+
"because #{klass.name.demodulize} records exist")
|
|
154
|
+
throw :abort
|
|
155
|
+
end
|
|
154
156
|
end
|
|
155
157
|
end
|
|
156
158
|
|
data/lib/mcfly/migration.rb
CHANGED
data/lib/mcfly/version.rb
CHANGED
data/mcfly.gemspec
CHANGED
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
|
2
|
-
|
|
3
|
-
# Pick the frameworks you want:
|
|
4
2
|
require "active_record/railtie"
|
|
5
3
|
require "action_controller/railtie"
|
|
6
|
-
# require "action_mailer/railtie"
|
|
7
|
-
# require "active_resource/railtie"
|
|
8
|
-
# require "sprockets/railtie"
|
|
9
|
-
# require "rails/test_unit/railtie"
|
|
10
4
|
|
|
11
5
|
Bundler.require
|
|
12
6
|
require "mcfly"
|
|
13
7
|
|
|
14
8
|
module Dummy
|
|
15
9
|
class Application < Rails::Application
|
|
16
|
-
# Settings in config/environments/* take precedence over those specified here.
|
|
17
|
-
# Application configuration should go into files in config/initializers
|
|
18
|
-
# -- all .rb files in that directory are automatically loaded.
|
|
19
|
-
|
|
20
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
|
21
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
|
22
|
-
|
|
23
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
|
24
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
|
25
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
|
26
|
-
|
|
27
|
-
# Activate observers that should always be running.
|
|
28
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
|
29
|
-
|
|
30
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
31
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
32
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
|
33
|
-
|
|
34
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
35
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
36
|
-
# config.i18n.default_locale = :de
|
|
37
|
-
|
|
38
10
|
# Configure the default encoding used in templates for Ruby 1.9.
|
|
39
11
|
config.encoding = "utf-8"
|
|
40
12
|
|
|
@@ -44,17 +16,6 @@ module Dummy
|
|
|
44
16
|
# Enable escaping HTML in JSON.
|
|
45
17
|
config.active_support.escape_html_entities_in_json = true
|
|
46
18
|
|
|
47
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
|
48
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
|
49
|
-
# like if you have constraints or database-specific column types
|
|
50
|
-
# config.active_record.schema_format = :sql
|
|
51
|
-
|
|
52
|
-
# Enable the asset pipeline
|
|
53
|
-
config.assets.enabled = true
|
|
54
|
-
|
|
55
|
-
# Version of your assets, change this if you want to expire all your assets
|
|
56
|
-
config.assets.version = '1.0'
|
|
57
|
-
|
|
58
19
|
config.i18n.enforce_available_locales = true
|
|
59
20
|
end
|
|
60
21
|
end
|
|
@@ -14,7 +14,7 @@ Dummy::Application.configure do
|
|
|
14
14
|
config.action_controller.perform_caching = false
|
|
15
15
|
|
|
16
16
|
# Don't care if the mailer can't send
|
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
|
17
|
+
# config.action_mailer.raise_delivery_errors = false
|
|
18
18
|
|
|
19
19
|
# Print deprecation notices to the Rails logger
|
|
20
20
|
config.active_support.deprecation = :log
|
|
@@ -24,13 +24,13 @@ Dummy::Application.configure do
|
|
|
24
24
|
|
|
25
25
|
# Log the query plan for queries taking more than this (works
|
|
26
26
|
# with SQLite, MySQL, and PostgreSQL)
|
|
27
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
27
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
28
28
|
|
|
29
29
|
# Do not compress assets
|
|
30
|
-
config.assets.compress = false
|
|
30
|
+
# config.assets.compress = false
|
|
31
31
|
|
|
32
32
|
# Expands the lines which load the assets
|
|
33
|
-
config.assets.debug = true
|
|
33
|
+
# config.assets.debug = true
|
|
34
34
|
|
|
35
35
|
config.eager_load = false
|
|
36
36
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: UTF-8
|
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
@@ -9,31 +8,34 @@
|
|
|
9
8
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
9
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
10
|
#
|
|
12
|
-
# It's strongly recommended
|
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
12
|
|
|
14
|
-
ActiveRecord::Schema.define(:
|
|
13
|
+
ActiveRecord::Schema.define(version: 2) do
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
t.integer
|
|
21
|
-
t.
|
|
22
|
-
t.
|
|
23
|
-
t.
|
|
24
|
-
t.integer
|
|
25
|
-
t.integer
|
|
26
|
-
t.decimal
|
|
15
|
+
# These are extensions that must be enabled in order to support this database
|
|
16
|
+
enable_extension "plpgsql"
|
|
17
|
+
|
|
18
|
+
create_table "market_prices", id: :serial, force: :cascade do |t|
|
|
19
|
+
t.integer "group_id", null: false
|
|
20
|
+
t.datetime "created_dt", null: false
|
|
21
|
+
t.datetime "obsoleted_dt", null: false
|
|
22
|
+
t.integer "user_id", null: false
|
|
23
|
+
t.integer "o_user_id"
|
|
24
|
+
t.integer "security_instrument_id", null: false
|
|
25
|
+
t.decimal "coupon", null: false
|
|
26
|
+
t.integer "settlement_mm", null: false
|
|
27
|
+
t.integer "settlement_yy", null: false
|
|
28
|
+
t.decimal "price"
|
|
27
29
|
end
|
|
28
30
|
|
|
29
|
-
create_table "security_instruments", :force
|
|
30
|
-
t.integer
|
|
31
|
-
t.datetime "created_dt",
|
|
32
|
-
t.datetime "obsoleted_dt",
|
|
33
|
-
t.integer
|
|
34
|
-
t.integer
|
|
35
|
-
t.string
|
|
36
|
-
t.string
|
|
31
|
+
create_table "security_instruments", id: :serial, force: :cascade do |t|
|
|
32
|
+
t.integer "group_id", null: false
|
|
33
|
+
t.datetime "created_dt", null: false
|
|
34
|
+
t.datetime "obsoleted_dt", null: false
|
|
35
|
+
t.integer "user_id", null: false
|
|
36
|
+
t.integer "o_user_id"
|
|
37
|
+
t.string "name", null: false
|
|
38
|
+
t.string "settlement_class", limit: 1, null: false
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
end
|
data/spec/dummy/spec
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
spec/dummy/../../spec/
|
data/spec/no_trans_spec.rb
CHANGED
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.
|
|
4
|
+
version: 0.0.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arman Bostani
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pg
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '3.0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '3.0'
|
|
55
55
|
description: A database table versioning system.
|
|
56
56
|
email:
|
|
57
57
|
- arman.bostani@pnmac.com
|
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
140
140
|
version: '0'
|
|
141
141
|
requirements: []
|
|
142
142
|
rubyforge_project:
|
|
143
|
-
rubygems_version: 2.
|
|
143
|
+
rubygems_version: 2.6.14
|
|
144
144
|
signing_key:
|
|
145
145
|
specification_version: 4
|
|
146
146
|
summary: A database table versioning system.
|