marty 0.5.15 → 0.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +27 -0
- data/.rspec +3 -0
- data/.travis.yml +23 -0
- data/Gemfile +23 -0
- data/INDEPENDENCE_ISSUES.md +23 -0
- data/app/assets/images/marty/.gitkeep +0 -0
- data/app/components/marty/report_form.rb +9 -4
- data/gemini_deprecations.md +6 -0
- data/lib/marty/data_change.rb +99 -0
- data/lib/marty/data_conversion.rb +11 -3
- data/lib/marty/data_exporter.rb +9 -0
- data/lib/marty/version.rb +1 -1
- data/marty.gemspec +35 -0
- data/script/rails +8 -0
- data/spec/controllers/application_controller_spec.rb +52 -0
- data/spec/controllers/job_controller_spec.rb +226 -0
- data/spec/controllers/rpc_controller_spec.rb +379 -0
- data/spec/controllers/rpc_import_spec.rb +45 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/components_controller.rb +7 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/gemini/amortization_type.rb +5 -0
- data/spec/dummy/app/models/gemini/bud_category.rb +7 -0
- data/spec/dummy/app/models/gemini/entity.rb +2 -0
- data/spec/dummy/app/models/gemini/extras/data_import.rb +5 -0
- data/spec/dummy/app/models/gemini/extras/settlement_import.rb +28 -0
- data/spec/dummy/app/models/gemini/fannie_bup.rb +29 -0
- data/spec/dummy/app/models/gemini/grouping.rb +8 -0
- data/spec/dummy/app/models/gemini/grouping_head_version.rb +14 -0
- data/spec/dummy/app/models/gemini/head.rb +7 -0
- data/spec/dummy/app/models/gemini/head_version.rb +14 -0
- data/spec/dummy/app/models/gemini/helper.rb +44 -0
- data/spec/dummy/app/models/gemini/loan_program.rb +11 -0
- data/spec/dummy/app/models/gemini/mortgage_type.rb +5 -0
- data/spec/dummy/app/models/gemini/simple.rb +6 -0
- data/spec/dummy/app/models/gemini/streamline_type.rb +16 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +82 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml.example +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +35 -0
- data/spec/dummy/config/environments/production.rb +69 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/delayed_job.rb +5 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +12 -0
- data/spec/dummy/db/migrate/20140801000000_create_groupings.rb +11 -0
- data/spec/dummy/db/migrate/20150406171536_create_categories.rb +27 -0
- data/spec/dummy/db/migrate/20150408200916_create_loan_programs.rb +26 -0
- data/spec/dummy/db/migrate/20150408201429_create_types.rb +21 -0
- data/spec/dummy/db/migrate/20150420000001_create_heads.rb +14 -0
- data/spec/dummy/db/migrate/20150420000002_create_head_versions.rb +15 -0
- data/spec/dummy/db/migrate/20150420000003_create_grouping_head_versions.rb +12 -0
- data/spec/dummy/db/migrate/20151023000001_create_simple.rb +12 -0
- data/spec/dummy/db/seeds.rb +8 -0
- data/spec/dummy/delorean/blame_report.dl +171 -0
- data/spec/dummy/delorean/data_report.dl +105 -0
- data/spec/dummy/delorean/fields.dl +52 -0
- data/spec/dummy/delorean/styles.dl +134 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/lib/class_list.rb +3 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/icons/READ.txt +3 -0
- data/spec/dummy/public/icons/application_cascade.png +0 -0
- data/spec/dummy/public/icons/application_delete.png +0 -0
- data/spec/dummy/public/icons/application_put.png +0 -0
- data/spec/dummy/public/icons/application_view_detail.png +0 -0
- data/spec/dummy/public/icons/arrow_in.png +0 -0
- data/spec/dummy/public/icons/arrow_refresh.png +0 -0
- data/spec/dummy/public/icons/database_save.png +0 -0
- data/spec/dummy/public/icons/door_in.png +0 -0
- data/spec/dummy/public/icons/door_out.png +0 -0
- data/spec/dummy/public/icons/group.png +0 -0
- data/spec/dummy/public/icons/page_lightning.png +0 -0
- data/spec/dummy/public/icons/printer.png +0 -0
- data/spec/dummy/public/icons/report_disk.png +0 -0
- data/spec/dummy/public/icons/report_go.png +0 -0
- data/spec/dummy/public/icons/report_magnify.png +0 -0
- data/spec/dummy/public/icons/script.png +0 -0
- data/spec/dummy/public/icons/script_add.png +0 -0
- data/spec/dummy/public/icons/script_go.png +0 -0
- data/spec/dummy/public/icons/script_key.png +0 -0
- data/spec/dummy/public/icons/table_go.png +0 -0
- data/spec/dummy/public/icons/time.png +0 -0
- data/spec/dummy/public/icons/time_add.png +0 -0
- data/spec/dummy/public/icons/time_go.png +0 -0
- data/spec/dummy/public/icons/timeline_marker.png +0 -0
- data/spec/dummy/public/icons/user_add.png +0 -0
- data/spec/dummy/public/icons/user_delete.png +0 -0
- data/spec/dummy/public/icons/user_edit.png +0 -0
- data/spec/dummy/public/icons/wrench.png +0 -0
- data/spec/dummy/script/delayed_job +6 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/features/javascripts/job_dashboard_live_search.js.coffee +8 -0
- data/spec/features/javascripts/login.js.coffee +8 -0
- data/spec/features/jobs_dashboard_netzke_spec.rb +24 -0
- data/spec/features/jobs_dashboard_spec.rb +49 -0
- data/spec/fixtures/scripts/load_tests/script1.dl +2 -0
- data/spec/fixtures/scripts/load_tests/script2.dl +2 -0
- data/spec/job_helper.rb +102 -0
- data/spec/lib/data_exporter_spec.rb +71 -0
- data/spec/lib/data_importer_spec.rb +461 -0
- data/spec/lib/xl_spec.rb +198 -0
- data/spec/lib/xl_styles_spec.rb +115 -0
- data/spec/models/api_auth_spec.rb +187 -0
- data/spec/models/posting_spec.rb +107 -0
- data/spec/models/promise_spec.rb +65 -0
- data/spec/models/script_spec.rb +187 -0
- data/spec/models/user_spec.rb +68 -0
- data/spec/requests/routes_spec.rb +12 -0
- data/spec/spec_helper.rb +61 -0
- data/spec/support/clean_db_helpers.rb +18 -0
- data/spec/support/delayed_job_helpers.rb +12 -0
- data/spec/support/user_helpers.rb +12 -0
- metadata +139 -89
- data/app/components/marty/auth_app.rb~ +0 -51
- data/app/components/marty/auth_app/javascripts/auth_app.js~ +0 -91
- data/app/components/marty/cm_form_panel.rb~ +0 -5
- data/app/components/marty/cm_grid_panel.rb~ +0 -35
- data/app/components/marty/data_import_view.rb~ +0 -142
- data/app/components/marty/extras/layout.rb~ +0 -46
- data/app/components/marty/live_search_grid_panel.rb~ +0 -49
- data/app/components/marty/main_auth_app.rb~ +0 -238
- data/app/components/marty/mcfly_grid_panel.rb~ +0 -80
- data/app/components/marty/new_posting_form.rb~ +0 -46
- data/app/components/marty/new_posting_window.rb~ +0 -21
- data/app/components/marty/pivot_grid.rb +0 -52
- data/app/components/marty/pivot_grid/endpoints.rb +0 -45
- data/app/components/marty/pivot_grid/javascripts/extensions.js +0 -150
- data/app/components/marty/pivot_grid/javascripts/pivot_grid.js +0 -86
- data/app/components/marty/pivot_grid/services.rb +0 -44
- data/app/components/marty/posting_grid.rb~ +0 -140
- data/app/components/marty/promise_view.rb~ +0 -157
- data/app/components/marty/promise_view/stylesheets/promise_view.css~ +0 -15
- data/app/components/marty/report_form.rb~ +0 -217
- data/app/components/marty/report_select.rb~ +0 -133
- data/app/components/marty/reporting.rb~ +0 -39
- data/app/components/marty/script_detail.rb~ +0 -430
- data/app/components/marty/script_form.rb~ +0 -233
- data/app/components/marty/script_form/javascripts/Ext.ux.form.field.CodeMirror.js~ +0 -909
- data/app/components/marty/script_grid.rb~ +0 -99
- data/app/components/marty/script_tester.rb~ +0 -213
- data/app/components/marty/scripting.rb~ +0 -124
- data/app/components/marty/select_report.rb~ +0 -143
- data/app/components/marty/simple_app.rb~ +0 -101
- data/app/components/marty/tag_grid.rb~ +0 -89
- data/app/components/marty/tree_panel.rb~ +0 -256
- data/app/components/marty/tree_panel/javascripts/tree_panel.js~ +0 -317
- data/app/components/marty/user_pivot.rb +0 -128
- data/app/components/marty/user_view.rb~ +0 -188
- data/app/controllers/marty/application_controller.rb~ +0 -133
- data/app/controllers/marty/components_controller.rb~ +0 -37
- data/app/controllers/marty/job_controller.rb~ +0 -28
- data/app/controllers/marty/rpc_controller.rb~ +0 -61
- data/app/helpers/marty/script_set.rb~ +0 -59
- data/app/models/marty/api_auth.rb~ +0 -48
- data/app/models/marty/data_change.rb~ +0 -141
- data/app/models/marty/enum.rb~ +0 -16
- data/app/models/marty/import_type.rb~ +0 -48
- data/app/models/marty/poop.rb~ +0 -169
- data/app/models/marty/posting.rb~ +0 -86
- data/app/models/marty/posting_type.rb~ +0 -21
- data/app/models/marty/promise.rb~ +0 -196
- data/app/models/marty/role.rb~ +0 -10
- data/app/models/marty/script.rb~ +0 -62
- data/app/models/marty/tag.rb~ +0 -91
- data/app/models/marty/user.rb~ +0 -148
- data/app/models/marty/user_role.rb~ +0 -13
- data/app/views/layouts/marty/application.html.erb~ +0 -11
- data/config/routes.rb~ +0 -10
- data/db/migrate/019_create_marty_postings.rb~ +0 -19
- data/db/migrate/095_create_marty_tags.rb~ +0 -19
- data/lib/marty.rb~ +0 -13
- data/lib/marty/content_handler.rb~ +0 -93
- data/lib/marty/data_exporter.rb~ +0 -137
- data/lib/marty/data_importer.rb~ +0 -114
- data/lib/marty/data_row_processor.rb~ +0 -206
- data/lib/marty/drop_folder_hook.rb~ +0 -17
- data/lib/marty/folder_hook.rb~ +0 -9
- data/lib/marty/lazy_column_loader.rb~ +0 -47
- data/lib/marty/mcfly_query.rb~ +0 -188
- data/lib/marty/migrations.rb~ +0 -65
- data/lib/marty/monkey.rb~ +0 -160
- data/lib/marty/permissions.rb~ +0 -69
- data/lib/marty/promise.rb~ +0 -41
- data/lib/marty/promise_job.rb~ +0 -121
- data/lib/marty/promise_proxy.rb~ +0 -69
- data/lib/marty/util.rb~ +0 -80
- data/lib/marty/version.rb~ +0 -3
- data/lib/marty/xl.rb~ +0 -526
- data/lib/pyxll/README.txt~ +0 -16
- data/lib/pyxll/gemini.py~ +0 -110
- data/lib/pyxll/pyxll.cfg~ +0 -12
@@ -0,0 +1,69 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_files = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
|
64
|
+
# Log the query plan for queries taking more than this (works
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
+
|
68
|
+
config.eager_load = true
|
69
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_files = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
#config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
#config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
|
38
|
+
config.eager_load = false
|
39
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'a087c113817a728e1552d63682abbd7f19fd7481ea3e24154889af53ab56d114f8901f63909a5e8310260c7187f6fd203cddc8743f6486fead0a4043cd7976c2'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class CreateCategories < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
ActiveRecord::Migration.new.create_table 'entities' do |t|
|
4
|
+
t.string :name
|
5
|
+
end
|
6
|
+
McflyAppendOnlyMigration.new.create_table 'gemini_bud_categories' do |t|
|
7
|
+
t.string :name
|
8
|
+
end
|
9
|
+
McflyAppendOnlyMigration.new.add_sql 'gemini_bud_categories', false
|
10
|
+
|
11
|
+
McflyMigration.new.create_table 'gemini_fannie_bups' do |t|
|
12
|
+
t.integer "entity_id"
|
13
|
+
t.integer "bud_category_id", null: false
|
14
|
+
t.decimal "note_rate", precision: 7, scale: 4, null: false
|
15
|
+
t.integer "settlement_mm", null: false
|
16
|
+
t.integer "settlement_yy", null: false
|
17
|
+
t.float "buy_up", null: false
|
18
|
+
t.float "buy_down", null: false
|
19
|
+
end
|
20
|
+
McflyMigration.new.add_sql 'gemini_fannie_bups', false
|
21
|
+
end
|
22
|
+
|
23
|
+
def down
|
24
|
+
drop_table 'gemini_bud_categories'
|
25
|
+
drop_table 'gemini_fannie_bups'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class CreateLoanPrograms < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
McflyMigration.new.create_table 'gemini_loan_programs' do |t|
|
4
|
+
t.string "name", null: false
|
5
|
+
t.integer "amortization_type_id", null: false
|
6
|
+
t.integer "mortgage_type_id", null: false
|
7
|
+
t.boolean "conforming", default: true, null: false
|
8
|
+
t.numrange "ltv_ratio_percent_range"
|
9
|
+
t.boolean "high_balance_indicator", default: false, null: false
|
10
|
+
t.integer "loan_amortization_period_count", default: 360, null: false
|
11
|
+
t.integer "streamline_type_id"
|
12
|
+
t.integer "extra_feature_type_id"
|
13
|
+
t.integer "arm_initial_reset_period_count"
|
14
|
+
t.decimal "arm_initial_cap_percent", precision: 7, scale: 4
|
15
|
+
t.decimal "arm_periodic_cap_percent", precision: 7, scale: 4
|
16
|
+
t.decimal "arm_lifetime_cap_percent", precision: 7, scale: 4
|
17
|
+
t.integer "arm_index_type_id"
|
18
|
+
t.decimal "arm_margin_rate_percent", precision: 7, scale: 4
|
19
|
+
end
|
20
|
+
McflyMigration.new.add_sql 'gemini_loan_programs', false
|
21
|
+
end
|
22
|
+
|
23
|
+
def down
|
24
|
+
drop_table 'gemini_loan_programs'
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateTypes < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table 'gemini_amortization_types' do |t|
|
4
|
+
t.string "name", null: false
|
5
|
+
end
|
6
|
+
|
7
|
+
create_table 'gemini_mortgage_types' do |t|
|
8
|
+
t.string "name", null: false
|
9
|
+
end
|
10
|
+
|
11
|
+
create_table 'gemini_streamline_types' do |t|
|
12
|
+
t.string "name", null: false
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def down
|
17
|
+
drop_table 'gemini_amortization_types'
|
18
|
+
drop_table 'gemini_mortgage_types'
|
19
|
+
drop_table 'gemini_streamline_types'
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateHeads < McflyMigration
|
2
|
+
include Marty::Migrations
|
3
|
+
|
4
|
+
def change
|
5
|
+
table_name = "heads"
|
6
|
+
|
7
|
+
create_table table_name do |t|
|
8
|
+
t.string :name, null: false
|
9
|
+
t.text :condition_text
|
10
|
+
end
|
11
|
+
|
12
|
+
add_mcfly_unique_index Gemini::Head
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateHeadVersions < McflyMigration
|
2
|
+
include Marty::Migrations
|
3
|
+
|
4
|
+
def change
|
5
|
+
table_name = "head_versions"
|
6
|
+
|
7
|
+
create_table table_name do |t|
|
8
|
+
t.references :head, null: false
|
9
|
+
t.string :version, null: false
|
10
|
+
t.text :result_text
|
11
|
+
end
|
12
|
+
|
13
|
+
add_mcfly_unique_index Gemini::HeadVersion
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateGroupingHeadVersions < McflyMigration
|
2
|
+
include Marty::Migrations
|
3
|
+
|
4
|
+
def change
|
5
|
+
table_name = "grouping_head_versions"
|
6
|
+
|
7
|
+
create_table table_name do |t|
|
8
|
+
t.references :grouping, null: false
|
9
|
+
t.references :head_version, null: false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateSimple < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
McflyMigration.new.create_table 'gemini_simples' do |t|
|
4
|
+
t.string "some_name"
|
5
|
+
end
|
6
|
+
McflyMigration.new.add_sql 'gemini_simples', false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
drop_table 'gemini_simples'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Gemini seeds needed for testing purposes
|
2
|
+
Gemini::AmortizationType.create(name: "Fixed")
|
3
|
+
Gemini::AmortizationType.create(name: "Adjustable")
|
4
|
+
Gemini::MortgageType.create(name: "Conventional")
|
5
|
+
Gemini::MortgageType.create(name: "FHA")
|
6
|
+
Gemini::MortgageType.create(name: "VA")
|
7
|
+
Gemini::MortgageType.create(name: "USDA/Rural Housing")
|
8
|
+
Gemini::StreamlineType.seed
|
@@ -0,0 +1,171 @@
|
|
1
|
+
import Fields
|
2
|
+
import Styles
|
3
|
+
|
4
|
+
PostingField2: Fields::PostingField2
|
5
|
+
store = ["NOW"] + [lp.name for lp in Marty::Posting.get_latest(10, nil)]
|
6
|
+
|
7
|
+
StyleRow:
|
8
|
+
profile =?
|
9
|
+
obj = profile["obj"]
|
10
|
+
status = profile["status"]
|
11
|
+
attrs = profile["attrs"]
|
12
|
+
user_name = Marty::DataChange.user_name(obj.user_id)
|
13
|
+
delete = profile["deleted"]
|
14
|
+
create = status == "new"
|
15
|
+
|
16
|
+
o_user_name = if delete then Marty::DataChange.user_name(obj.o_user_id)
|
17
|
+
else ""
|
18
|
+
o_dt = if delete then obj.obsoleted_dt.to_s else ""
|
19
|
+
del_style = if delete then Styles::Style.bg_redish else {}
|
20
|
+
mod_style = Styles::Style.bg_tan
|
21
|
+
new_style = if create then Styles::Style.bg_lightgreen else {}
|
22
|
+
|
23
|
+
b_style = Styles::Style.calibri + new_style
|
24
|
+
b_c_style = b_style + mod_style
|
25
|
+
m_style = b_style + Styles::Style.bg_lightgray + del_style
|
26
|
+
m_d_style = m_style + Styles::Style.datetime
|
27
|
+
|
28
|
+
row = [
|
29
|
+
obj.group_id,
|
30
|
+
obj.created_dt.to_s,
|
31
|
+
user_name,
|
32
|
+
o_dt,
|
33
|
+
o_user_name,
|
34
|
+
] + [ a.value for a in attrs]
|
35
|
+
|
36
|
+
row_styles = [
|
37
|
+
m_style,
|
38
|
+
m_d_style,
|
39
|
+
m_style,
|
40
|
+
m_d_style,
|
41
|
+
m_style,
|
42
|
+
] + [
|
43
|
+
(if a.changed then b_c_style else b_style)
|
44
|
+
for a in attrs
|
45
|
+
]
|
46
|
+
|
47
|
+
s_row = ["row", row, {"style": row_styles}]
|
48
|
+
|
49
|
+
StyleGroup:
|
50
|
+
group =?
|
51
|
+
rows = [
|
52
|
+
StyleRow(profile = profile).s_row
|
53
|
+
for profile in group
|
54
|
+
]
|
55
|
+
|
56
|
+
ModelRows:
|
57
|
+
klass =?
|
58
|
+
t1 =?
|
59
|
+
t2 =?
|
60
|
+
|
61
|
+
groups = Marty::DataChange.changes(t1, t2, klass)
|
62
|
+
|
63
|
+
headers = ["Group ID", "Created", "By", "Deleted", "By"] +
|
64
|
+
Marty::DataChange.class_headers(klass)
|
65
|
+
|
66
|
+
width = headers.length
|
67
|
+
border = [
|
68
|
+
"border",
|
69
|
+
[0, {"off": 1}, width, {"off": 1}],
|
70
|
+
Styles::Style.border_thin,
|
71
|
+
]
|
72
|
+
|
73
|
+
row_groups = [
|
74
|
+
StyleGroup(group = x[1]).rows + [border]
|
75
|
+
for x in groups
|
76
|
+
]
|
77
|
+
|
78
|
+
s_style = {"style": [Styles::Style.s_hdr] * width}
|
79
|
+
s_headers = ["row", headers, s_style]
|
80
|
+
rows = [s_headers] + row_groups.flatten(1)
|
81
|
+
count = row_groups.length
|
82
|
+
ws = if count > 0 then [klass, rows] else nil
|
83
|
+
|
84
|
+
DataBlameReport:
|
85
|
+
title = "Data Blame Report"
|
86
|
+
|
87
|
+
pt_name1 =?
|
88
|
+
posting1 =? Marty::Posting.lookup(pt_name1)
|
89
|
+
t1 = posting1.created_dt
|
90
|
+
|
91
|
+
pt_name2 =?
|
92
|
+
posting2 =? Marty::Posting.lookup(pt_name2)
|
93
|
+
t2 = posting2.created_dt
|
94
|
+
|
95
|
+
class_list =? false
|
96
|
+
|
97
|
+
form = [
|
98
|
+
Fields::PostingField1,
|
99
|
+
PostingField2,
|
100
|
+
Fields::ClassListField,
|
101
|
+
]
|
102
|
+
|
103
|
+
ts = if Gemini::Helper.infinity_dt(t1)
|
104
|
+
then [t2, t1]
|
105
|
+
else if Gemini::Helper.infinity_dt(t2)
|
106
|
+
then [t1, t2]
|
107
|
+
else [t1, t2].sort
|
108
|
+
|
109
|
+
sanitized = if class_list
|
110
|
+
then Marty::DataChange.sanitize_classes(class_list)
|
111
|
+
else Marty::DataChange.class_list
|
112
|
+
|
113
|
+
result = [
|
114
|
+
ModelRows(t1 = ts[0], t2 = ts[1], klass = klass).ws
|
115
|
+
for klass in sanitized
|
116
|
+
].compact
|
117
|
+
|
118
|
+
format = "xlsx"
|
119
|
+
|
120
|
+
ModelSummaryRow:
|
121
|
+
klass =?
|
122
|
+
t1 =?
|
123
|
+
t2 =?
|
124
|
+
|
125
|
+
r = Marty::DataChange.change_summary(t1, t2, klass)
|
126
|
+
cr = r['created']
|
127
|
+
up = r['updated']
|
128
|
+
dl = r['deleted']
|
129
|
+
|
130
|
+
ws = if cr > 0 || up > 0 || dl > 0 then ["row", [klass, cr, up, dl]] else nil
|
131
|
+
|
132
|
+
DataBlameReportSummary:
|
133
|
+
title = "Summary Data Blame Report"
|
134
|
+
|
135
|
+
pt_name1 =?
|
136
|
+
posting1 =? Marty::Posting.lookup(pt_name1)
|
137
|
+
t1 = posting1.created_dt
|
138
|
+
|
139
|
+
pt_name2 =?
|
140
|
+
posting2 =? Marty::Posting.lookup(pt_name2)
|
141
|
+
t2 = posting2.created_dt
|
142
|
+
|
143
|
+
form = [
|
144
|
+
Fields::PostingField1,
|
145
|
+
PostingField2,
|
146
|
+
]
|
147
|
+
|
148
|
+
postings = [
|
149
|
+
["Posting 1", pt_name1,],
|
150
|
+
["Posting 2", pt_name2,],
|
151
|
+
]
|
152
|
+
|
153
|
+
hrow = [
|
154
|
+
"row", ["Data Table", "Created", "Updated", "Deleted",],
|
155
|
+
Styles::Style.m_hdr_style0,
|
156
|
+
]
|
157
|
+
|
158
|
+
ts = if Gemini::Helper.infinity_dt(t1)
|
159
|
+
then [t2, t1]
|
160
|
+
else if Gemini::Helper.infinity_dt(t2)
|
161
|
+
then [t1, t2]
|
162
|
+
else [t1, t2].sort
|
163
|
+
|
164
|
+
rows = [
|
165
|
+
ModelSummaryRow(t1 = ts[0], t2 = ts[1], klass = klass).ws
|
166
|
+
for klass in Marty::DataChange.class_list
|
167
|
+
].compact
|
168
|
+
|
169
|
+
header = [["row", r, {"style" : [Styles::Style.s_hdr]}] for r in postings]
|
170
|
+
result = [[title,[hrow] + rows, {"widths" : [30]}], ["Parameters", header]]
|
171
|
+
format = "xlsx"
|