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
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Gemini::Extras::SettlementImport
|
2
|
+
def import_validation(ids)
|
3
|
+
validate_settlement_date(ids, 0)
|
4
|
+
end
|
5
|
+
|
6
|
+
def import_validation_allow_prior_month(ids)
|
7
|
+
validate_settlement_date(ids, 1)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
def validate_settlement_date(ids, month_interval)
|
12
|
+
# Given a set of ids, make sure that settlement mm/yy are not more
|
13
|
+
# than x months older than current date.
|
14
|
+
bad = where("id IN (?) AND " +
|
15
|
+
"date_trunc('month', current_date) - " +
|
16
|
+
"INTERVAL '#{month_interval} month' > " +
|
17
|
+
"format('%s-%s-01', settlement_yy, settlement_mm)::date",
|
18
|
+
ids).limit(1)
|
19
|
+
|
20
|
+
return if bad.empty?
|
21
|
+
|
22
|
+
x = bad[0]
|
23
|
+
|
24
|
+
raise "One or more records failed validation. " +
|
25
|
+
"Settlement #{x.settlement_mm}/#{x.settlement_yy} is " +
|
26
|
+
"#{month_interval + 1 } or more months in the past."
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Gemini
|
2
|
+
class FannieBup < ActiveRecord::Base
|
3
|
+
extend Gemini::Extras::DataImport
|
4
|
+
extend Gemini::Extras::SettlementImport
|
5
|
+
|
6
|
+
self.table_name = 'gemini_fannie_bups'
|
7
|
+
|
8
|
+
has_mcfly
|
9
|
+
mcfly_validates_uniqueness_of :note_rate,
|
10
|
+
scope: [:entity_id,
|
11
|
+
:bud_category_id,
|
12
|
+
:settlement_mm,
|
13
|
+
:settlement_yy,
|
14
|
+
]
|
15
|
+
|
16
|
+
belongs_to :entity
|
17
|
+
mcfly_belongs_to :bud_category
|
18
|
+
|
19
|
+
def self.import_preprocess(data)
|
20
|
+
data.map {
|
21
|
+
|rec|
|
22
|
+
rec["note_rate"].gsub! /\$/, ''
|
23
|
+
rec["buy_up"].gsub! /\%/, ''
|
24
|
+
rec["buy_down"].gsub! /\%/, ''
|
25
|
+
rec
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Gemini::GroupingHeadVersion < ActiveRecord::Base
|
2
|
+
self.table_name = 'grouping_head_versions'
|
3
|
+
|
4
|
+
has_mcfly
|
5
|
+
|
6
|
+
validates_presence_of \
|
7
|
+
:grouping_id,
|
8
|
+
:head_version_id
|
9
|
+
|
10
|
+
mcfly_validates_uniqueness_of :grouping_id, scope: [:head_version_id]
|
11
|
+
|
12
|
+
mcfly_belongs_to :grouping, class_name: "Gemini::Grouping"
|
13
|
+
mcfly_belongs_to :head_version, class_name: "Gemini::HeadVersion"
|
14
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'delorean_lang'
|
2
|
+
|
3
|
+
class Gemini::Helper
|
4
|
+
include Delorean::Model
|
5
|
+
|
6
|
+
# Just for testing
|
7
|
+
delorean_fn :sleep, sig: 1 do
|
8
|
+
|seconds|
|
9
|
+
Kernel.sleep seconds
|
10
|
+
end
|
11
|
+
|
12
|
+
# Just for testing
|
13
|
+
delorean_fn :to_csv, sig: [1, 2] do
|
14
|
+
|*args|
|
15
|
+
|
16
|
+
# NOTE: can't use |data, config| due to delorean_fn weirdness.
|
17
|
+
data, config = args
|
18
|
+
|
19
|
+
Marty::DataExporter.to_csv(data, config)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Just for testing
|
23
|
+
delorean_fn :import_data, sig: [2, 3] do
|
24
|
+
|import_type, data, col_sep|
|
25
|
+
|
26
|
+
col_sep ||= "\t"
|
27
|
+
|
28
|
+
raise "Insufficient permissions to run the data import" unless
|
29
|
+
import_type.allow_import?
|
30
|
+
|
31
|
+
Marty::DataImporter.do_import_summary(import_type.get_model_class,
|
32
|
+
data,
|
33
|
+
'infinity',
|
34
|
+
import_type.cleaner_function,
|
35
|
+
import_type.validation_function,
|
36
|
+
col_sep,
|
37
|
+
false)
|
38
|
+
end
|
39
|
+
|
40
|
+
delorean_fn :infinity_dt, sig: 1 do
|
41
|
+
|pt|
|
42
|
+
Mcfly.is_infinity pt
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Gemini::StreamlineType < ActiveRecord::Base
|
2
|
+
extend Marty::Enum
|
3
|
+
|
4
|
+
self.table_name = 'gemini_streamline_types'
|
5
|
+
|
6
|
+
def self.seed
|
7
|
+
["IRRRL",
|
8
|
+
"FHA Streamline",
|
9
|
+
"DURP",
|
10
|
+
"Refi Plus",
|
11
|
+
"Relief Refi Open Access",
|
12
|
+
"Relief Refi",
|
13
|
+
"Not Streamlined",
|
14
|
+
].each { |n| Gemini::StreamlineType.create(name: n) }
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_model/railtie"
|
5
|
+
require "active_job/railtie"
|
6
|
+
require "active_record/railtie"
|
7
|
+
require "action_controller/railtie"
|
8
|
+
require "action_mailer/railtie"
|
9
|
+
require "action_view/railtie"
|
10
|
+
require "sprockets/railtie"
|
11
|
+
|
12
|
+
Bundler.require(*Rails.groups)
|
13
|
+
require "marty"
|
14
|
+
|
15
|
+
module Dummy
|
16
|
+
APP_ROOT = File.expand_path("..", __FILE__).freeze
|
17
|
+
class Application < Rails::Application
|
18
|
+
# Settings in config/environments/* take precedence over those specified here.
|
19
|
+
# Application configuration should go into files in config/initializers
|
20
|
+
# -- all .rb files in that directory are automatically loaded.
|
21
|
+
|
22
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
23
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
24
|
+
|
25
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
26
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
27
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
28
|
+
|
29
|
+
# Activate observers that should always be running.
|
30
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
31
|
+
|
32
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
33
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
34
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
35
|
+
|
36
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
37
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
38
|
+
# config.i18n.default_locale = :de
|
39
|
+
|
40
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
41
|
+
config.encoding = "utf-8"
|
42
|
+
|
43
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
44
|
+
config.filter_parameters += [:password]
|
45
|
+
|
46
|
+
# Enable escaping HTML in JSON.
|
47
|
+
config.active_support.escape_html_entities_in_json = true
|
48
|
+
|
49
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
50
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
51
|
+
# like if you have constraints or database-specific column types
|
52
|
+
# config.active_record.schema_format = :sql
|
53
|
+
|
54
|
+
# Enforce whitelist mode for mass assignment.
|
55
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
56
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
57
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
58
|
+
#config.active_record.whitelist_attributes = true
|
59
|
+
|
60
|
+
# Enable the asset pipeline
|
61
|
+
config.assets.enabled = true
|
62
|
+
|
63
|
+
# Version of your assets, change this if you want to expire all your assets
|
64
|
+
config.assets.version = '1.0'
|
65
|
+
|
66
|
+
config.paths["config/database"] = "#{APP_ROOT}/database.yml"
|
67
|
+
|
68
|
+
config.marty.auth_source = 'local'
|
69
|
+
|
70
|
+
config.marty.system_account = 'marty'
|
71
|
+
config.marty.local_password = 'marty'
|
72
|
+
config.marty.class_list = []
|
73
|
+
config.marty.roles = [
|
74
|
+
:admin,
|
75
|
+
:dev,
|
76
|
+
:viewer,
|
77
|
+
:user_manager,
|
78
|
+
]
|
79
|
+
config.secret_key_base = "SECRET_KEY_BASE"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
require "marty/permissions"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
26
|
+
#config.active_record.mass_assignment_sanitizer = :strict
|
27
|
+
|
28
|
+
# Do not compress assets
|
29
|
+
config.assets.compress = false
|
30
|
+
|
31
|
+
# Expands the lines which load the assets
|
32
|
+
config.assets.debug = true
|
33
|
+
|
34
|
+
config.eager_load = false
|
35
|
+
end
|