From 674854bdc8ae3bf2e5da21aae0227c62f22e1f22 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Thu, 8 Mar 2018 14:36:33 -0500 Subject: [PATCH 01/13] Bump version --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index c88c327e..a54fb31a 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "0.3.20" + VERSION = "0.3.21" end From c90cd59d070ecb83148c83ceda5d3cc79bf660cc Mon Sep 17 00:00:00 2001 From: mathmerized Date: Mon, 12 Mar 2018 08:37:49 -0400 Subject: [PATCH 02/13] [TTPLAT-23] deactivate reports if no chart of account. setup seed such that new transam instance can handle on its own --- app/models/chart_of_account.rb | 12 +++++ ...2123237_deactivate_gl_reports_if_no_coa.rb | 11 +++++ db/seeds.rb | 47 ++++++++++++++++--- 3 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 db/data_migrations/20180312123237_deactivate_gl_reports_if_no_coa.rb diff --git a/app/models/chart_of_account.rb b/app/models/chart_of_account.rb index 53f8cf7d..15ea1cb7 100644 --- a/app/models/chart_of_account.rb +++ b/app/models/chart_of_account.rb @@ -17,6 +17,8 @@ class ChartOfAccount < ActiveRecord::Base #------------------------------------------------------------------------------ after_initialize :set_defaults + after_create :activate_gl_reports + #------------------------------------------------------------------------------ # Associations #------------------------------------------------------------------------------ @@ -84,5 +86,15 @@ def set_defaults self.active = self.active.nil? ? true : self.active end + # GL reports are deactivated in new transam instance + # if a chart of account exists, GL features are enabled -- therefore need to activate reports + def activate_gl_reports + report_type = ReportType.find_by(name: "GL/Accounting Report") + report_type.update!(active: true) + + report_type.reports.update_all(active: true) + + end + end diff --git a/db/data_migrations/20180312123237_deactivate_gl_reports_if_no_coa.rb b/db/data_migrations/20180312123237_deactivate_gl_reports_if_no_coa.rb new file mode 100644 index 00000000..43ca3569 --- /dev/null +++ b/db/data_migrations/20180312123237_deactivate_gl_reports_if_no_coa.rb @@ -0,0 +1,11 @@ +class DeactivateGlReportsIfNoCoa < ActiveRecord::DataMigration + def up + has_coa = ChartOfAccount.count > 0 + + report_type = ReportType.find_by(name: "GL/Accounting Report") + report_type.update!(active: has_coa) + + report_type.reports.update_all(active: has_coa) + + end +end \ No newline at end of file diff --git a/db/seeds.rb b/db/seeds.rb index 2fa8f733..5fd2b8ae 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -59,7 +59,7 @@ ] report_types = [ - {:active => 1, :name => 'GL/Accounting Report', :description => 'GL/Accounting Report', :display_icon_name => 'fa fa-book'} + {:active => 0, :name => 'GL/Accounting Report', :description => 'GL/Accounting Report', :display_icon_name => 'fa fa-book'} ] @@ -111,10 +111,10 @@ :chart_options => "" }, { - :active => 1, + :active => 0, :belongs_to => 'report_type', :type => "GL/Accounting Report", - :name => 'Asset Value Report', + :name => 'Net Book Value Report', :class_name => "AssetValueReport", :view_name => "generic_table_with_subreports", :show_in_nav => 1, @@ -122,22 +122,55 @@ :printable => true, :exportable => true, :roles => 'guest,user,manager', + :description => 'Displays a report of asset net book values.', + :chart_type => '', + :chart_options => "" + }, + { + :active => 0, + :belongs_to => 'report_type', + :type => "GL/Accounting Report", + :name => 'Gross Asset Value Report', + :class_name => "GrossAssetValueReport", + :view_name => "generic_table_with_subreports", + :show_in_nav => 1, + :show_in_dashboard => 1, + :printable => true, + :exportable => true, + :roles => 'guest,user,manager', + :description => 'Displays a report of asset gross values.', + :chart_type => '', + :chart_options => "" + }, + { + :active => 0, + :belongs_to => 'report_type', + :type => "GL/Accounting Report", + :name => 'Accumulated Depreciation Report', + :class_name => "AssetAccumulatedDepreciationReport", + :view_name => "generic_table_with_subreports", + :show_in_nav => 1, + :show_in_dashboard => 1, + :printable => true, + :exportable => true, + :roles => 'guest,user,manager', :description => 'Displays a report of asset book values.', :chart_type => '', :chart_options => "" }, { - :active => 1, + :active => 0, + :belongs_to => 'report_type', :type => "GL/Accounting Report", - :name => 'Asset Value Report by FY', - :class_name => "AssetFiscalYearValueReport", + :name => 'Gain/Loss on Disposition Report', + :class_name => "AssetDispositionGainLossReport", :view_name => "generic_table_with_subreports", :show_in_nav => 1, :show_in_dashboard => 1, :printable => true, :exportable => true, :roles => 'guest,user,manager', - :description => 'Displays a report of asset values in GL by FY.', + :description => 'Displays a report of asset book values.', :chart_type => '', :chart_options => "" } From e7e438a91f075fe8e89a4939cab05fe874b371f2 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Mon, 12 Mar 2018 10:23:55 -0400 Subject: [PATCH 03/13] cleanup financial partial menu again [TTPLAT-32] --- .../_accounting_financial_nav.html.haml | 70 --------------- app/views/shared/_financial_nav.html.haml | 85 +++++++++++++++---- 2 files changed, 69 insertions(+), 86 deletions(-) delete mode 100644 app/views/shared/_accounting_financial_nav.html.haml diff --git a/app/views/shared/_accounting_financial_nav.html.haml b/app/views/shared/_accounting_financial_nav.html.haml deleted file mode 100644 index 4f14670e..00000000 --- a/app/views/shared/_accounting_financial_nav.html.haml +++ /dev/null @@ -1,70 +0,0 @@ -- count = 0 -- if ChartOfAccount.where(organization_id: @organization_list).count > 0 - - count += 1 - - if @organization_list.count == 1 - %li.text-left - = link_to general_ledger_accounts_path do - %i.fa.fa-book.fa-fw - Chart of Accounts - - else - %li.text-left.dropdown-submenu - = link_to '#' do - %i.fa.fa-book.fa-fw - Chart of Accounts - - %ul.dropdown-menu - - Organization.where(id: @organization_list).each do |org| - %li.text-left - = link_to general_ledger_accounts_path(:organization_id => org.id) do - %i.fa.fa-fw.fa-book - = org.short_name - - - if SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher') - - if count > 0 - %li.divider - - count += 1 - %li.text-left - = link_to reset_searches_path(:search_type => SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher').id) do - %i.fa.fa-search.fa-fw - GL Query - --#%li.divider --#%li.text-left --# = link_to grants_path do --# %i.fa.fa-fw.fa-legal --# = ' Grants' --# --#%li.divider --#%li.text-left --# = link_to vendors_path do --# %i.fa.fa-fw.fa-tag --# = ' Vendors' - -- if count > 0 - %li.divider -%li.text-left.dropdown-submenu - = link_to funding_sources_path do - %i.fa.fa-book.fa-fw - Programs - - %ul.dropdown-menu - - FundingSourceType.all.each do |type| - - if FundingSource.where(funding_source_type_id: type.id).count > 0 - %li.text-left.dropdown-submenu - = link_to '#' do - %i.fa.fa-fw.fa-book - = type - %ul.dropdown-menu - - FundingSource.where(funding_source_type_id: type.id).each do | program | - %li.text-left - = link_to funding_source_path(program) do - %i.fa.fa-fw.fa-book - = program - - if can? :create, FundingSource - %li.divider - %li - = link_to new_funding_source_path do - %i.fa.fa-plus.fa-fw - = "Add Funding Program"; - - diff --git a/app/views/shared/_financial_nav.html.haml b/app/views/shared/_financial_nav.html.haml index 5a56c736..e0d6a383 100644 --- a/app/views/shared/_financial_nav.html.haml +++ b/app/views/shared/_financial_nav.html.haml @@ -5,23 +5,76 @@ %ul.dropdown-menu.multi-level{:role => 'menu'} - count = 0 + - if ChartOfAccount.where(organization_id: @organization_list).count > 0 + - count += 1 + - if @organization_list.count == 1 + %li.text-left + = link_to general_ledger_accounts_path do + %i.fa.fa-book.fa-fw + Chart of Accounts + - else + %li.text-left.dropdown-submenu + = link_to '#' do + %i.fa.fa-book.fa-fw + Chart of Accounts + + %ul.dropdown-menu + - Organization.where(id: @organization_list).each do |org| + %li.text-left + = link_to general_ledger_accounts_path(:organization_id => org.id) do + %i.fa.fa-fw.fa-book + = org.short_name + + - if SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher') + - if count > 0 + %li.divider + - count += 1 + %li.text-left + = link_to reset_searches_path(:search_type => SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher').id) do + %i.fa.fa-search.fa-fw + GL Query + + -#%li.divider + -#%li.text-left + -# = link_to grants_path do + -# %i.fa.fa-fw.fa-legal + -# = ' Grants' + -# + -#%li.divider + -#%li.text-left + -# = link_to vendors_path do + -# %i.fa.fa-fw.fa-tag + -# = ' Vendors' + + - if count > 0 + %li.divider + %li.text-left.dropdown-submenu + = link_to funding_sources_path do + %i.fa.fa-book.fa-fw + Programs + + %ul.dropdown-menu + - FundingSourceType.all.each do |type| + - if FundingSource.where(funding_source_type_id: type.id).count > 0 + %li.text-left.dropdown-submenu + = link_to '#' do + %i.fa.fa-fw.fa-book + = type + %ul.dropdown-menu + - FundingSource.where(funding_source_type_id: type.id).each do | program | + %li.text-left + = link_to funding_source_path(program) do + %i.fa.fa-fw.fa-book + = program + - if can? :create, FundingSource + %li.divider + %li + = link_to new_funding_source_path do + %i.fa.fa-plus.fa-fw + = "Add Funding Program"; + - SystemConfig.transam_module_names.each do |mod| - view_component = "#{mod}_financial_nav" - if lookup_context.template_exists?(view_component, 'shared', true) - count += 1 - - if count > 1 - %li.divider - = render :partial => "shared/#{view_component}" - - %li.divider - %li.text-left - - if can? :read_all, CapitalPlan - = link_to capital_plans_path do - %i.fa.fa-fw.fa-list - Status - - else - - org_list = @organization_list.select{|x| Asset.operational.where(organization_id: x).count > 0} - - if org_list.count > 0 - = link_to capital_plan_path(CapitalPlan.current_plan(org_list.first)) do - %i.fa.fa-fw.fa-list - Status + = render :partial => "shared/#{view_component}", :locals => {:count => count} From a2d7d0ec677a92298a27033e8ef21b6221e7d42f Mon Sep 17 00:00:00 2001 From: mathmerized Date: Wed, 28 Mar 2018 10:08:25 -0400 Subject: [PATCH 04/13] Bump version --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index a54fb31a..6db9a365 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "0.3.21" + VERSION = "0.3.22" end From 54d95cfb98a5972d37e9d67740724b9fe84dbb3b Mon Sep 17 00:00:00 2001 From: Taylor Liss Date: Tue, 3 Apr 2018 11:45:19 -0400 Subject: [PATCH 05/13] Add hookshot and post-checkout hook to modify Gemfile for quarter branches --- .hooks/applypatch-msg | 0 .hooks/commit-msg | 0 .hooks/post-applypatch | 0 .hooks/post-checkout | 28 ++++++++++++++++++++++++++++ .hooks/post-commit | 0 .hooks/post-merge | 0 .hooks/post-receive | 0 .hooks/post-rewrite | 0 .hooks/post-update | 0 .hooks/pre-applypatch | 0 .hooks/pre-auto-gc | 0 .hooks/pre-commit | 0 .hooks/pre-push | 0 .hooks/pre-rebase | 0 .hooks/pre-receive | 0 .hooks/prepare-commit-msg | 0 .hooks/update | 0 Gemfile | 8 ++++++++ 18 files changed, 36 insertions(+) create mode 100644 .hooks/applypatch-msg create mode 100644 .hooks/commit-msg create mode 100644 .hooks/post-applypatch create mode 100755 .hooks/post-checkout create mode 100644 .hooks/post-commit create mode 100644 .hooks/post-merge create mode 100644 .hooks/post-receive create mode 100644 .hooks/post-rewrite create mode 100644 .hooks/post-update create mode 100644 .hooks/pre-applypatch create mode 100644 .hooks/pre-auto-gc create mode 100644 .hooks/pre-commit create mode 100644 .hooks/pre-push create mode 100644 .hooks/pre-rebase create mode 100644 .hooks/pre-receive create mode 100644 .hooks/prepare-commit-msg create mode 100644 .hooks/update diff --git a/.hooks/applypatch-msg b/.hooks/applypatch-msg new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/commit-msg b/.hooks/commit-msg new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-applypatch b/.hooks/post-applypatch new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-checkout b/.hooks/post-checkout new file mode 100755 index 00000000..d5d81f63 --- /dev/null +++ b/.hooks/post-checkout @@ -0,0 +1,28 @@ +#!/bin/bash + +# If checking out a branch that follows the pattern "quarter#", get its name +branch=$(git reflog | awk 'NR==1{print $8; exit}' | grep 'quarter\d') + +# If a quarter# branch was checked out... +if [ $branch ] ; then + # Add a colon (:) before the branch name for proper searching + branch=":${branch}" + + # Get the outdatedBranches (for logging purposes later) if there are any + outdatedGems=$(grep -nr ':quarter\d' Gemfile) + outdatedBranches=() + while read -r oldBranch ; do + if [ "$branch" != "$oldBranch" ] ; then + outdatedBranches+=("$oldBranch") + fi + done < <(grep -o ':quarter\d' <<< "${outdatedGems}") + + # Replace all branches in the file with the new branch + if [ "${outdatedBranches}" ] ; then + echo -e "Your Gemfile contains the following gems which do not match your current branch:\n**********\n${outdatedGems}\n**********" + + sed -i '' "s/:quarter[0-9]/${branch}/g" "./Gemfile" + + echo "They have been updated to ${branch}." + fi +fi \ No newline at end of file diff --git a/.hooks/post-commit b/.hooks/post-commit new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-merge b/.hooks/post-merge new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-receive b/.hooks/post-receive new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-rewrite b/.hooks/post-rewrite new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/post-update b/.hooks/post-update new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-applypatch b/.hooks/pre-applypatch new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-auto-gc b/.hooks/pre-auto-gc new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-commit b/.hooks/pre-commit new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-push b/.hooks/pre-push new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-rebase b/.hooks/pre-rebase new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/pre-receive b/.hooks/pre-receive new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/prepare-commit-msg b/.hooks/prepare-commit-msg new file mode 100644 index 00000000..e69de29b diff --git a/.hooks/update b/.hooks/update new file mode 100644 index 00000000..e69de29b diff --git a/Gemfile b/Gemfile index 995be3f8..757600d9 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,14 @@ gem 'transam_transit', :github => 'camsys/transam_transit', branch: 'master' gem 'mysql2', '~> 0.3.20' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath +# This gem allows us to share githooks. Githooks in the .hooks folder can be checked +# in, and when "bundle install" is run this gem automatically creates symlinks into +# your local .git/hooks. If you have pre-existing hooks in .git/hooks, it will move +# them to .git/hooks/old and you can move them back at your leisure. Any hooks +# checked in to .hooks will be shared among the team. If you need to re-generate +# the symlinks,you can use 'bundle exec git-hookshot' +gem "git-hookshot", github: "brandonweiss/git-hookshot" + # Declare your gem's dependencies in transam_accounting.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. From 2d4fc71559f209f0f6e6213865500bab65b414e1 Mon Sep 17 00:00:00 2001 From: Taylor Liss Date: Wed, 4 Apr 2018 11:38:06 -0400 Subject: [PATCH 06/13] update .travis.yml and Gemfile to correct branch --- .travis.yml | 2 +- Gemfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71c5bb1f..0c2a3c1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ rvm: - 2.2.2 branches: only: - - master + - /quarter\d*/ env: - TEST_SUITE=rspec RAILS_VERSION=4.1.9 script: diff --git a/Gemfile b/Gemfile index 757600d9..4439c3a0 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ source "https://rubygems.org" # To use debugger # gem 'debugger' -gem 'transam_core', :github => 'camsys/transam_core', branch: 'master' -gem 'transam_reporting', :github => 'camsys/transam_reporting', branch: 'master' -gem 'transam_transit', :github => 'camsys/transam_transit', branch: 'master' +gem 'transam_core', :github => 'camsys/transam_core', branch: 'quarter1' +gem 'transam_reporting', :github => 'camsys/transam_reporting', branch: 'quarter1' +gem 'transam_transit', :github => 'camsys/transam_transit', branch: 'quarter1' gem 'mysql2', '~> 0.3.20' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath From d79c23cb56d4299a150a509acf0cf51f3e542ec9 Mon Sep 17 00:00:00 2001 From: Taylor Liss Date: Wed, 4 Apr 2018 12:36:10 -0400 Subject: [PATCH 07/13] update formating for branches --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 4439c3a0..ea9ff98f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ source "https://rubygems.org" # To use debugger # gem 'debugger' -gem 'transam_core', :github => 'camsys/transam_core', branch: 'quarter1' -gem 'transam_reporting', :github => 'camsys/transam_reporting', branch: 'quarter1' -gem 'transam_transit', :github => 'camsys/transam_transit', branch: 'quarter1' +gem 'transam_core', :github => 'camsys/transam_core', branch: :quarter1 +gem 'transam_reporting', :github => 'camsys/transam_reporting', branch: :quarter1 +gem 'transam_transit', :github => 'camsys/transam_transit', branch: :quarter1 gem 'mysql2', '~> 0.3.20' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath From 247b344532f25cdef6f4d959b5ca9878e2782c58 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Tue, 10 Apr 2018 15:49:31 -0400 Subject: [PATCH 08/13] TTPLAT-33 hide custom book value / capex actions temp --- app/views/assets/_accounting_detail_tabs.html.haml | 8 ++++---- .../assets/_accounting_detail_tabs_content.html.haml | 6 +++--- app/views/assets/_depreciation_table.html.haml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/assets/_accounting_detail_tabs.html.haml b/app/views/assets/_accounting_detail_tabs.html.haml index b4ccf1b7..1de2a899 100644 --- a/app/views/assets/_accounting_detail_tabs.html.haml +++ b/app/views/assets/_accounting_detail_tabs.html.haml @@ -3,7 +3,7 @@ %a{:href => "#depreciation", :data =>{:toggle => 'tab'}} Asset Values -%li - %a{:href => "#expenditures", :data =>{:toggle => 'tab'}} - %span.badge.pull-right= @asset.expenditures.count - CapEx +-#%li +-# %a{:href => "#expenditures", :data =>{:toggle => 'tab'}} +-# %span.badge.pull-right= @asset.expenditures.count +-# CapEx diff --git a/app/views/assets/_accounting_detail_tabs_content.html.haml b/app/views/assets/_accounting_detail_tabs_content.html.haml index 922d437a..4e8e68a8 100644 --- a/app/views/assets/_accounting_detail_tabs_content.html.haml +++ b/app/views/assets/_accounting_detail_tabs_content.html.haml @@ -3,6 +3,6 @@ .tab-content = render 'depreciation_table' -.tab-pane.fade#expenditures - .tab-content - = render :partial => 'expenditures/index_table', :locals => {:expenditures => @asset.expenditures} \ No newline at end of file +-#.tab-pane.fade#expenditures +-# .tab-content +-# = render :partial => 'expenditures/index_table', :locals => {:expenditures => @asset.expenditures} \ No newline at end of file diff --git a/app/views/assets/_depreciation_table.html.haml b/app/views/assets/_depreciation_table.html.haml index 6baaa17a..914f0661 100644 --- a/app/views/assets/_depreciation_table.html.haml +++ b/app/views/assets/_depreciation_table.html.haml @@ -1 +1 @@ -.col-xs-4 = format_field("Purchase Date", format_as_date(@asset.purchase_date) ) = format_field("In Service Date", format_as_date(@asset.in_service_date) ) = format_field("Depreciation Start Date", format_as_date(@asset.depreciation_start_date) ) = format_field("Current Depreciation Date", format_as_date(@asset.current_depreciation_date) ) .col-xs-4 = format_field("Original Useful Life", "#{format_as_integer(@asset.original_depreciation_useful_life_months)} months" ) = format_field("Adjusted Useful Life", "#{format_as_integer(@asset.adjusted_depreciation_useful_life_months)} months" ) = format_field("Original Cost Basis", format_as_currency(@asset.original_cost_basis) ) = format_field("Adjusted Cost Basis", format_as_currency(@asset.adjusted_cost_basis) ) .col-xs-4 = format_field("Salvage Value", format_as_currency(@asset.salvage_value) ) = format_field("Policy Replacement Cost", format_as_currency(@asset.estimated_replacement_cost) ) #depreciation_table_actions.btn-group - if can? :update, @asset = link_to new_inventory_asset_event_path(@asset, :event_type => BookValueUpdateEvent.asset_event_type.id), :class => 'btn btn-default' do %i.fa.fa-fw{:class => BookValueUpdateEvent.asset_event_type.display_icon_name} = 'Adjust Book Value' - if can? :create, Expenditure = link_to new_inventory_expenditure_path(@asset), :class => 'btn btn-default' do %i.fa.fa-plus.fa-fw = " Add CapEx" .col-xs-12 %fieldset %table.table.table-hover#depreciation_table{:data => {:toggle => 'table', :pagination => 'true', :show_pagination_switch => 'true', :page_list => "[5, 10, 20, 50, 100, 200]", :page_size => current_user.num_table_rows, :search => 'false', :toolbar => "#depreciation_table_actions", :export_types => "['csv', 'txt', 'excel']", :show_export => 'true', :show_toggle => 'false', :state_save => 'true', :state_save_id_table => "asset_depreciation_id", :state_save_expire => "1y"}} %thead %tr %th.left Date %th.left Description - if ChartOfAccount.find_by(organization_id: @asset.organization_id) %th.left GL Account %th.right Amount %th.right Net Book Value %tbody - @asset.get_depreciation_table.each do |row| %tr %td.left= format_as_date(row[:on_date]) %td.left= row[:description] - if ChartOfAccount.find_by(organization_id: @asset.organization_id) %td.left= link_to row[:general_ledger_account].account_number, general_ledger_account_path(row[:general_ledger_account]) unless row[:general_ledger_account].blank? %td.right= format_as_currency(row[:amount].to_i) %td.right= format_as_currency(row[:book_value].to_i) :javascript $("#depreciation_table").on('all.bs.table', function(evt, name, args) { $('.fixed-table-container').css('min-height', '300px') transam.make_same_height('.header-part'); }); $(window).load(function() { transam.make_same_height('.header-part'); }); $(window).resize(function() { $("#depreciation_table").bootstrapTable('resetView'); }); \ No newline at end of file +.col-xs-4 = format_field("Purchase Date", format_as_date(@asset.purchase_date) ) = format_field("In Service Date", format_as_date(@asset.in_service_date) ) = format_field("Depreciation Start Date", format_as_date(@asset.depreciation_start_date) ) = format_field("Current Depreciation Date", format_as_date(@asset.current_depreciation_date) ) .col-xs-4 = format_field("Original Useful Life", "#{format_as_integer(@asset.original_depreciation_useful_life_months)} months" ) = format_field("Adjusted Useful Life", "#{format_as_integer(@asset.adjusted_depreciation_useful_life_months)} months" ) = format_field("Original Cost Basis", format_as_currency(@asset.original_cost_basis) ) = format_field("Adjusted Cost Basis", format_as_currency(@asset.adjusted_cost_basis) ) .col-xs-4 = format_field("Salvage Value", format_as_currency(@asset.salvage_value) ) = format_field("Policy Replacement Cost", format_as_currency(@asset.estimated_replacement_cost) ) #depreciation_table_actions.btn-group -#- if can? :update, @asset -# = link_to new_inventory_asset_event_path(@asset, :event_type => BookValueUpdateEvent.asset_event_type.id), :class => 'btn btn-default' do -# %i.fa.fa-fw{:class => BookValueUpdateEvent.asset_event_type.display_icon_name} -# = 'Adjust Book Value' -# -# - if can? :create, Expenditure -# = link_to new_inventory_expenditure_path(@asset), :class => 'btn btn-default' do -# %i.fa.fa-plus.fa-fw -# = " Add CapEx" .col-xs-12 %fieldset %table.table.table-hover#depreciation_table{:data => {:toggle => 'table', :pagination => 'true', :show_pagination_switch => 'true', :page_list => "[5, 10, 20, 50, 100, 200]", :page_size => current_user.num_table_rows, :search => 'false', :toolbar => "#depreciation_table_actions", :export_types => "['csv', 'txt', 'excel']", :show_export => 'true', :show_toggle => 'false', :state_save => 'true', :state_save_id_table => "asset_depreciation_id", :state_save_expire => "1y"}} %thead %tr %th.left Date %th.left Description - if ChartOfAccount.find_by(organization_id: @asset.organization_id) %th.left GL Account %th.right Amount %th.right Net Book Value %tbody - @asset.get_depreciation_table.each do |row| %tr %td.left= format_as_date(row[:on_date]) %td.left= row[:description] - if ChartOfAccount.find_by(organization_id: @asset.organization_id) %td.left= link_to row[:general_ledger_account].account_number, general_ledger_account_path(row[:general_ledger_account]) unless row[:general_ledger_account].blank? %td.right= format_as_currency(row[:amount].to_i) %td.right= format_as_currency(row[:book_value].to_i) :javascript $("#depreciation_table").on('all.bs.table', function(evt, name, args) { $('.fixed-table-container').css('min-height', '300px') transam.make_same_height('.header-part'); }); $(window).load(function() { transam.make_same_height('.header-part'); }); $(window).resize(function() { $("#depreciation_table").bootstrapTable('resetView'); }); \ No newline at end of file From f70251f6cdb40290c37364547a035ea4fc7a1603 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Tue, 10 Apr 2018 16:53:27 -0400 Subject: [PATCH 09/13] Bump version --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index 6db9a365..f37f172c 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "0.3.22" + VERSION = "0.3.23" end From b2f5d6229a90eced046008245cd188b729331a33 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Tue, 17 Apr 2018 15:39:08 -0400 Subject: [PATCH 10/13] use https for github gems for security and add master branch back into .travis.yml --- .travis.yml | 3 ++- Gemfile | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c2a3c1c..27ef2164 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,8 @@ rvm: - 2.2.2 branches: only: - - /quarter\d*/ + - master + - /quarter\d*/ env: - TEST_SUITE=rspec RAILS_VERSION=4.1.9 script: diff --git a/Gemfile b/Gemfile index ea9ff98f..3ba6529d 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ source "https://rubygems.org" # To use debugger # gem 'debugger' -gem 'transam_core', :github => 'camsys/transam_core', branch: :quarter1 -gem 'transam_reporting', :github => 'camsys/transam_reporting', branch: :quarter1 -gem 'transam_transit', :github => 'camsys/transam_transit', branch: :quarter1 +gem 'transam_core', git: 'https://github.com/camsys/transam_core', branch: :quarter1 +gem 'transam_reporting', git: 'https://github.com/camsys/transam_reporting', branch: :quarter1 +gem 'transam_transit', git: 'https://github.com/camsys/transam_transit', branch: :quarter1 gem 'mysql2', '~> 0.3.20' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath @@ -19,7 +19,7 @@ gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element x # them to .git/hooks/old and you can move them back at your leisure. Any hooks # checked in to .hooks will be shared among the team. If you need to re-generate # the symlinks,you can use 'bundle exec git-hookshot' -gem "git-hookshot", github: "brandonweiss/git-hookshot" +gem "git-hookshot", git: 'https://github.com/brandonweiss/git-hookshot' # Declare your gem's dependencies in transam_accounting.gemspec. # Bundler will treat runtime dependencies like base dependencies, and From 96c3258e209262d977f5e3186c463e9963e594ea Mon Sep 17 00:00:00 2001 From: mathmerized Date: Wed, 18 Apr 2018 13:07:59 -0400 Subject: [PATCH 11/13] updated schema, skip some tests since super out of date --- coverage/.resultset.json | 2611 +++++++++++++---- spec/dummy/db/schema.rb | 1357 +++++---- spec/models/general_ledger_account_spec.rb | 10 +- spec/models/grant_budget_spec.rb | 6 +- spec/models/grant_purchase_spec.rb | 3 - spec/models/organization_spec.rb | 8 - spec/models/vendor_spec.rb | 2 +- .../_actions.html.haml_spec.rb | 1 - .../_details.html.haml_spec.rb | 3 +- .../_gla_budgets.html.haml_spec.rb | 4 +- .../_index_actions.html.haml_spec.rb | 1 + .../_index_table.html.haml_spec.rb | 1 - spec/views/grants/_actions.html.haml_spec.rb | 2 +- spec/views/grants/_form.html.haml_spec.rb | 2 +- spec/views/grants/_summary.html.haml_spec.rb | 1 + ...ting_detail_tabs_content.html.haml_spec.rb | 10 - .../vendors/_vendor_to_date.html.haml_spec.rb | 2 +- 17 files changed, 2758 insertions(+), 1266 deletions(-) delete mode 100644 spec/views/vendors/_accounting_detail_tabs_content.html.haml_spec.rb diff --git a/coverage/.resultset.json b/coverage/.resultset.json index bb6883d9..931cc0a5 100644 --- a/coverage/.resultset.json +++ b/coverage/.resultset.json @@ -31,6 +31,10 @@ 0, 0, null, + 0, + 0, + 0, + null, null, null, null, @@ -74,12 +78,14 @@ null, 1, 1, - 1, null, null, null, null, null, + 1, + null, + 1, null, null, null, @@ -111,37 +117,47 @@ null, null, null, + 1, + 5, + 5, + 2, + 2, + 2, + null, + 0, + null, null, 1, + 0, null, null, + 1, + 0, null, null, + 1, + 0, null, null, 1, + 0, null, null, null, 1, - 51, null, null, - 1, null, null, - 1, - 1, - 1, - 0, null, null, 1, - 1, null, null, - 1, null, + 1, + 1, + 1, null, 1, null, @@ -151,27 +167,35 @@ null, 1, null, + 1, null, - null, 1, + 1, + 1, + 0, null, - 4, - 4, - 4, - 4, null, null, null, null, + 0, null, + 0, + 0, + 0, + 0, + 0, + 0, null, + 0, null, - 4, + 0, + 0, null, - 4, + 0, + 0, null, null, - 1, null, 1, null, @@ -179,8 +203,8 @@ null, null, 1, - 0, - 0, + 1, + 1, 0, 0, null, @@ -206,34 +230,49 @@ 1, null, 1, + null, + null, + 1, + null, 1, null, 1, 1, + null, 1, + 0, null, null, 1, null, + 0, + null, + null, null, 1, - 0, - 0, null, - 0, - 0, + 1, + 1, + null, + null, + 1, + null, + 1, + 1, + null, 0, 0, 0, null, 0, - null, 0, null, 0, null, null, null, + 0, + null, null, null, 0, @@ -243,9 +282,10 @@ null, null, null, - 1, - 0, 0, + 1, + 1, + 1, null, null, null, @@ -256,32 +296,17 @@ 52, 52, 52, - null, 52, null, + 52, null, null, null, - 1, - null, - null, - 16, - null, null, 1, null, - 37, - null, - null, - 0, - null, - 0, - null, - null, - 0, - null, - null, null, + 15, null, null, null, @@ -349,7 +374,7 @@ null, null, 1, - 2, + 1, null, null, 1, @@ -360,10 +385,6 @@ 133, 133, null, - 133, - 0, - null, - null, null, null ], @@ -451,7 +472,7 @@ null, null, 1, - 21, + 7, null, 2, null, @@ -459,9 +480,9 @@ 2, null, null, - 17, + 3, null, - 21, + 7, null, null, null, @@ -473,7 +494,7 @@ 1, null, 1, - 57, + 64, 35, 35, null, @@ -481,7 +502,7 @@ null, null ], - "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_accounting_policy_asset_subtype_rule.rb": [ + "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_accounting_vendor.rb": [ 1, null, null, @@ -492,28 +513,18 @@ null, null, null, - 1, null, 1, null, + 1, null, + 1, null, null, null, null, null, null, - 0, - null, - null, - null, - null, - 0, - null, - null, - null, - null, - null, null, null, null, @@ -526,16 +537,11 @@ null, null, null, - 1, null, null, null, - 1, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_accounting_vendor.rb": [ 1, null, null, @@ -554,15 +560,12 @@ 1, null, null, - null, - null, - null, - null, - null, - null, - null, 1, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_gl_accountable_asset.rb": [ + 1, null, null, null, @@ -572,10 +575,11 @@ null, null, null, + 1, null, + 1, null, null, - 1, null, null, null, @@ -584,20 +588,16 @@ null, null, null, + 1, null, null, 1, null, - 2, null, 2, null, - null, 1, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_gl_accountable_asset.rb": [ 1, null, null, @@ -608,31 +608,16 @@ null, null, null, - 1, - null, - 1, - null, - null, - null, - null, - 54, - null, - null, null, null, null, - 1, null, - 1, null, null, 1, - null, - null, 1, null, - null, - 1, + 0, null, null, null, @@ -643,16 +628,23 @@ null, null, null, + 1, + 0, + 0, null, null, + 1, + 2, + 2, null, null, null, 1, - 1, - null, - 0, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/transam_gl_accountable_asset_event.rb": [ + 1, null, null, null, @@ -668,13 +660,14 @@ 1, null, 0, - 0, null, null, null, null, null, + 0, null, + 0, null, null, null, @@ -685,98 +678,52 @@ null, null, null, - 0, - 0, null, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, null, null, - 0, null, null, null, + 1, null, null, null, null, null, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, null, null, null, null, - 0, - 0, null, - 0, - 0, - 0, - 0, - 0, + 1, null, + 1, 0, null, 0, 0, - 0, - null, - 0, null, - null, - null, - 0, - 0, - 0, 0, null, 0, - null, 0, null, null, null, 0, 0, - 0, - 0, null, - null, - null, - null, - 0, - 0, - 0, - 0, - 0, 0, 0, 0, null, + 0, null, null, + 0, null, null, - null, - null, - null, + 0, null, null, null @@ -820,36 +767,59 @@ null, null, null, - null, - 1, 1, + 0, null, - 1, - 1, - 1, - 1, + 0, null, - 1, - 1, + 0, + 0, null, null, null, 1, + 0, + 0, + null, + 0, + 0, + null, + null, + null, + null, 1, 1, null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, null, 1, + 1, + 1, null, null, 1, null, 1, 1, + 1, + 1, + 1, + 1, + null, + 1, null, 1, null, 1, + null, 1, null, null, @@ -873,31 +843,31 @@ 1, null, null, - 16, + 5, null, null, - 16, + 5, null, - 16, + 0, null, - 16, - 16, - 16, - 16, + 0, + 0, + 0, + 0, null, - 16, - 2, + 0, + 0, null, null, null, - 14, - 13679, + 0, + 0, null, null, - 13679, + 0, null, null, - 14, + 0, null, null, null @@ -941,33 +911,13 @@ null, null, 1, - 163, - null, - null, - 1, - null, - null, - 69, - null, - null, - 1, - 19, - 5, - null, - 14, - null, - null, - null, - 1, - 26, + 2, null, null, 1, - 10, null, null, - 1, - 6, + 2, null, null, null @@ -984,24 +934,25 @@ 1, null, null, - 34, + 5, + null, null, + 0, + 0, null, - 34, - 34, null, null, + 0, null, - 34, + 0, + 0, null, - 34, - 1, null, + 0, + 0, null, - 33, - 33, + 0, null, - 33, null, null, null @@ -1013,7 +964,6 @@ 1, null, 1, - 1, null, 1, 1, @@ -1088,6 +1038,7 @@ null, 1, null, + null, 0, 0, null, @@ -1103,6 +1054,7 @@ 0, null, 0, + 0, null, null, null, @@ -1117,9 +1069,6 @@ 1, null, 0, - 0, - null, - 0, null, null, null, @@ -1145,10 +1094,6 @@ null, 0, 0, - 0, - null, - 0, - 0, null, 0, null, @@ -1162,10 +1107,21 @@ null, 1, null, + 1, + 0, + 0, + 0, + null, + null, null, 1, 0, null, + 0, + 0, + null, + null, + null, null, null, 1, @@ -1406,7 +1362,7 @@ null, 1, null, - 1, + 0, 0, 0, 0, @@ -1418,11 +1374,11 @@ null, null, null, - 1, - 1, + 0, + 0, null, - 1, - 1, + 0, + 0, 0, 0, 0, @@ -1432,8 +1388,8 @@ null, null, null, - 1, - 1, + 0, + 0, 0, 0, 0, @@ -1443,33 +1399,49 @@ null, null, null, - 1, + 0, null, - 1, + 0, null, null, - 1, + 0, null, - 1, - 1, - 1, + 0, + 0, + 0, null, null, null, 1, + 0, null, - 1, - 1, + 0, + 0, + 0, + null, + 0, + null, + null, + 0, + null, + 0, null, null, - 1, - 1, - 1, null, 1, - 1, - 1, - 1, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, null, null, null, @@ -1490,9 +1462,28 @@ null, null, 1, + 0, + 0, + 0, + null, + null, + null, 1, - 1, - 1, + 0, + null, + 0, + null, + 0, + null, + 0, + null, + 0, + null, + 0, + null, + null, + 0, + 0, null, null, null, @@ -1528,11 +1519,11 @@ null, 1, null, - 1, - 1, - 1, - 2, - 1, + 0, + 0, + 0, + 0, + 0, null, 0, 0, @@ -1541,9 +1532,9 @@ null, null, 1, - 1, - 1, - 1, + 0, + 0, + 0, null, 0, null, @@ -1553,7 +1544,7 @@ null, null, 1, - 2, + 1, null, null, 1, @@ -1563,7 +1554,7 @@ null, null, 4, - 0, + 4, 0, 0, null, @@ -1572,7 +1563,7 @@ null, null, null, - 4, + 0, null, null, null, @@ -1594,53 +1585,53 @@ null, 1, null, - 6, + 4, null, null, - 6, - 6, + 4, + 4, null, - 6, - 6, + 4, + 4, null, - 6, - 6, - 2, - 2, - 2, + 4, + 4, + 1, + 1, + 1, null, null, - 6, - 6, - 2, - 2, - 2, + 4, + 4, + 1, + 1, + 1, null, null, null, - 6, + 4, null, null, - 6, + 4, null, - 6, 4, + 3, null, - 2, + 1, null, null, - 6, - 6, - 6, + 4, + 4, + 4, null, null, null, null, 1, null, - 1, - 1, - 2, + 0, + 0, + 0, null, null, null, @@ -1681,12 +1672,12 @@ null, 1, null, - 1, - 1, - 1, + 0, + 0, + 0, null, null, - 1, + 0, null, null, null, @@ -1704,8 +1695,8 @@ 0, 0, null, - 2, - 1, + 0, + 0, null, null, null, @@ -1715,13 +1706,13 @@ 1, null, null, - 1, + 0, null, - 1, - 1, - 1, - 2, - 1, + 0, + 0, + 0, + 0, + 0, null, 0, 0, @@ -1732,12 +1723,12 @@ null, null, 1, - 1, - 1, - 1, - 1, - 2, - 1, + 0, + 0, + 0, + 0, + 0, + 0, null, null, null, @@ -1746,70 +1737,99 @@ 1, 4, null, + 4, + 4, + 0, + null, + 4, + 4, + null, + null, + null, + null, null, 1, null, null, - 12, + 8, null, - 12, - 5, + 8, + 3, null, - 7, - 7, - 7, + 5, + 5, + 5, null, null, null, 1, - 2, + 1, null, null, null ], - "/Users/lydiachang/Projects/transam_accounting/app/models/chart_of_account.rb": [ + "/Users/lydiachang/Projects/transam_accounting/app/models/expense_type.rb": [ + 1, null, + 1, null, null, + 1, null, + 1, + 0, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/depreciation_calculation_type.rb": [ + 1, null, null, + 1, null, 1, + 2, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_entry.rb": [ 1, null, null, - null, + 1, null, 1, null, null, null, null, + 1, null, null, - 1, null, null, 1, + 1, null, null, null, null, null, 1, + 1, + 1, + null, null, null, null, - 1, null, null, null, + 27, null, + 2, null, null, null, @@ -1817,7 +1837,6 @@ null, null, null, - 1, null, null, null, @@ -1826,7 +1845,15 @@ null, null, 1, + 0, + null, + null, 1, + 0, + null, + null, + null, + null, null, null, null, @@ -1836,10 +1863,19 @@ null, null, 1, - 4, + null, null, 1, - 2, + 8, + 8, + null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/expenditure.rb": [ + null, + null, + null, + null, null, null, null, @@ -1851,40 +1887,37 @@ null, null, 1, - 179, null, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/depreciation_calculation_type.rb": [ + null, 1, null, null, 1, null, 1, - 2, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/depreciation_interval_type.rb": [ - 1, + null, + null, null, null, 1, null, 1, - 2, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/expenditure.rb": [ + 1, + null, + null, + 1, null, null, + 1, + null, null, + 1, null, null, null, @@ -1894,6 +1927,10 @@ null, null, 1, + 1, + 1, + 1, + 1, null, null, 1, @@ -1906,17 +1943,16 @@ null, null, null, - 9, null, null, null, + 1, + null, null, null, null, null, - 1, null, - 0, null, null, null, @@ -1933,55 +1969,68 @@ null, null, null, + null, + null, + null, 1, 0, - 0, - 0, null, null, 1, 0, - 0, + null, + null, + 1, 0, null, null, null, - 0, null, null, + null, + null, + 1, 1, 0, 0, + null, 0, null, 0, + 0, null, + 0, null, null, - 1, + 0, 0, null, + 0, + 0, + 0, null, + 0, null, null, + 0, null, null, + 0, + null, null, null, - 1, null, null, 1, 2, - null, - null, 2, - null, + 2, + 2, null, null, null ], - "/Users/lydiachang/Projects/transam_accounting/app/models/funding_source.rb": [ + "/Users/lydiachang/Projects/transam_accounting/app/models/grant_purchase.rb": [ null, null, null, @@ -1992,7 +2041,6 @@ null, 1, null, - null, 1, null, null, @@ -2007,59 +2055,65 @@ null, null, null, - null, 1, + 1, + null, null, null, + null, + 1, 1, 1, null, null, - 1, null, null, - 1, null, null, - 1, null, - 1, + null, 1, null, null, null, null, - 1, - 1, - 1, null, - 1, - 1, - 1, - 1, - 1, null, - 1, - 1, null, null, null, null, null, null, + null, + null, + 1, 1, null, null, + 1, + 0, null, null, + 1, + 0, + null, + 0, null, null, + 0, + 0, null, null, + 0, null, null, null, + 1, + 1, + 1, null, + 0, null, null, null, @@ -2069,29 +2123,25 @@ null, null, null, - 1, - 3, null, null, 1, - 3, - null, + 0, null, 1, - 6, + 8, null, null, 1, - 0, - 0, - 0, + 2, null, - 0, - 0, null, + 1, + 4, null, - 0, null, + 1, + 1, null, null, null, @@ -2100,153 +2150,83 @@ null, null, 1, - 2, - null, null, null, 1, null, - 0, - 0, null, - 0, null, null, - 0, null, - 0, - 0, - 0, - 0, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/grant.rb": [ null, - 0, - 0, - 0, - 0, null, - 0, - 0, - 0, - 0, - 0, null, null, - 0, - 0, - 0, null, null, - 0, null, - 0, null, + 1, null, + 1, null, null, 1, null, - 0, - 0, null, - 0, + 1, null, null, - 0, null, - 0, - 0, null, - 0, - 0, - 0, - 0, + 1, null, - 0, - 0, - 0, - 0, - 0, - null, - null, - 0, null, null, - 0, - null, - 0, - null, null, null, 1, - 2, null, null, 1, - 11, - null, - null, - null, - null, - null, null, null, 1, - null, - null, 1, - 69, null, null, 1, - 54, - 54, - 0, - null, null, - 54, null, + 1, null, 1, - 54, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/funding_source_type.rb": [ null, + 1, null, null, + 1, null, null, null, null, 1, - null, - null, 1, - null, - null, - 3, - 3, 1, 1, - null, 1, - 8, - null, - null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account.rb": [ - null, - null, null, null, null, null, null, + 1, null, null, - 1, null, null, 1, @@ -2254,7 +2234,6 @@ null, null, null, - 1, null, null, null, @@ -2262,44 +2241,40 @@ null, null, null, + 1, null, null, null, - 1, null, null, - 1, - 1, null, - 1, null, - 1, null, null, null, null, 1, - null, - null, 1, null, + null, 1, + 0, null, null, 1, + 2, + 0, null, - null, + 2, null, null, null, 1, 1, 1, - 1, - 1, null, + 0, null, - 1, null, null, null, @@ -2310,25 +2285,20 @@ null, null, null, + 1, + 0, null, null, null, null, + 1, + 0, null, null, - 1, null, 1, - 1, - 1, - 1, - 1, + 0, null, - 1, - 3, - 1, - 1, - 1, null, null, null, @@ -2336,8 +2306,6 @@ null, null, null, - 1, - 3, null, null, null, @@ -2347,19 +2315,23 @@ null, null, 1, - 2, + 0, + 0, null, + 0, null, - 1, - 3, null, null, 1, + 6, + null, + null, 1, + 0, null, null, 1, - 14, + 0, null, null, null, @@ -2371,8 +2343,10 @@ null, null, 1, - 38, - 38, + null, + 30, + 30, + 30, null, null, null @@ -2392,7 +2366,6 @@ null, 1, 1, - 1, null, null, null, @@ -2432,7 +2405,7 @@ null, null, 1, - 4, + 3, null, null, null, @@ -2457,18 +2430,9 @@ 1, null, 1, - null, - 6, - 6, - 6, 6, null, - null, - null, - 1, - 0, - 0, - 0, + 6, null, null, null, @@ -2478,44 +2442,34 @@ null, null ], - "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_subtype.rb": [ - 1, - null, + "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_type.rb": [ 1, null, null, - 2, + 1, null, 1, - 2, + 4, null, null, null ], - "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_entry.rb": [ - 1, - null, - null, + "/Users/lydiachang/Projects/transam_accounting/app/models/depreciation_interval_type.rb": [ 1, null, null, - null, - null, 1, null, - null, - null, - null, - 1, 1, + 2, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account.rb": [ null, null, null, - 1, - 1, - null, null, null, null, @@ -2523,22 +2477,15 @@ null, null, 1, - 0, null, null, 1, - 0, - 0, null, - 0, null, null, null, 1, - 0, - 0, null, - 0, null, null, null, @@ -2549,39 +2496,33 @@ null, null, 1, - 0, null, null, 1, - 0, + 1, null, + 1, null, + 1, null, null, null, null, null, 1, + 1, + 1, + 1, + 1, null, null, 1, - 7, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_type.rb": [ - 1, null, null, - 2, null, - 1, - 5, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/grant.rb": [ null, null, null, @@ -2590,30 +2531,40 @@ null, null, null, - 1, null, + 31, 1, null, + 1, + 1, + 1, + 1, + 1, null, 1, + 1, + 1, + 1, + 1, + null, null, null, - 1, null, null, null, null, 1, - 1, + 2, + null, null, null, null, null, null, - 1, null, null, 1, + 1, null, null, 1, @@ -2621,29 +2572,48 @@ null, null, 1, + 0, null, null, 1, + 2, + null, null, 1, + 2, + null, + null, + null, null, null, - 1, null, null, 1, null, null, + 1, + 26, + 26, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_account_subtype.rb": [ 1, + null, 1, + null, + null, 1, + null, 1, 1, null, null, - null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/depreciation_entry.rb": [ + 1, null, null, 1, @@ -2652,21 +2622,27 @@ null, null, 1, + 1, null, null, null, null, null, + 1, null, + 1, null, null, null, null, null, 1, + 1, + 1, null, null, null, + 1, null, null, null, @@ -2675,59 +2651,58 @@ null, null, null, - 1, - 2, - null, - null, - 1, - 0, - null, null, - 1, - 2, - 0, null, - 2, null, null, + 20, null, + 6, 1, 1, 1, null, - 0, null, null, null, null, null, null, + 1, + 0, + null, + null, + null, null, null, null, null, null, 1, - 2, - 2, 0, null, - 2, + null, null, null, null, null, null, 1, + null, + null, 1, null, null, null, 1, + 1, 0, null, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/funding_source_type.rb": [ null, null, null, @@ -2735,61 +2710,100 @@ null, null, null, + 1, null, null, + 1, null, null, - null, - null, + 3, + 3, + 1, 1, - 0, - 0, - null, - 0, null, + 1, + 8, null, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/general_ledger_mapping.rb": [ 1, - 14, null, null, 1, - 0, null, null, - 1, - 1, null, null, + 1, null, null, null, null, null, 1, + 1, + 1, + 1, + 1, + 1, + null, null, null, + null, + 1, + 1, + 1, + 1, + 1, 1, null, - 32, - 32, - 32, + null, + null, + null, + null, + null, + 1, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, null, null, 1, - 19, - 0, - 0, 0, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + 1, 0, null, null, + 1, + null, + 1, null, null, null, null ], - "/Users/lydiachang/Projects/transam_accounting/app/models/grant_purchase.rb": [ + "/Users/lydiachang/Projects/transam_accounting/app/models/chart_of_account.rb": [ null, null, null, @@ -2798,7 +2812,6 @@ null, null, null, - 1, null, 1, null, @@ -2810,19 +2823,30 @@ null, 1, null, + 1, + null, + null, null, null, null, null, 1, + null, + null, 1, null, null, null, null, + null, 1, + null, + null, + null, 1, - 1, + null, + null, + null, null, null, null, @@ -2839,69 +2863,108 @@ null, null, null, + 1, + 1, + null, + null, null, null, null, null, null, null, + 1, + 4, null, 1, + 2, + null, + null, + null, + null, + null, + null, + null, 1, null, null, 1, - 90, + 172, + null, + null, null, null, 1, - 0, + 157, + 157, + null, + 157, + null, + null, + null, + null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/funding_source.rb": [ null, - 0, null, null, - 0, - 0, null, null, - 0, null, null, null, 1, + null, + null, 1, + null, + null, 1, null, - 0, null, null, null, + 1, null, null, null, null, null, null, + 1, null, null, 1, - 0, + 1, + null, null, 1, - 8, null, null, 1, - 2, null, null, 1, - 4, null, + 1, + 1, + null, + null, + null, + null, + 1, + 1, + 1, null, 1, 1, + 1, + 1, + 1, null, + 1, + 1, null, null, null, @@ -2911,105 +2974,1263 @@ 1, null, null, - 1, null, - 11, null, null, null, null, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/organization_general_ledger_account.rb": [ - 1, + null, + null, + null, + null, + null, + null, + null, + null, + null, null, null, null, null, 1, + 3, null, null, + 1, + 3, null, null, 1, + 6, + null, + null, 1, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, + 0, + null, + null, + null, + null, + null, + null, null, null, + 1, + 2, null, null, null, 1, + null, + 0, + 0, + null, + 0, + null, + null, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + 0, + null, + 0, + null, + null, + null, + null, 1, + null, + 0, + 0, + null, + 0, + null, + null, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + null, + null, + 0, + null, + 0, + null, + null, + null, 1, + 2, + null, + null, 1, + 10, + null, + null, + null, null, - 153, null, null, null, + 1, null, null, + 1, + 67, null, null, 1, + 54, + 54, 0, null, null, + 54, + null, + null, + 1, + 54, null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/asset_depreciable_proxy.rb": [ + 1, null, null, + 1, null, + 1, + 1, + 1, + 1, + 1, null, 1, + 2, + 2, + 4, + null, + null, + null, + null, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + null, + null, + null, + null, + null + ], + "/Users/lydiachang/Projects/transam_accounting/app/searches/general_ledger_account_searcher.rb": [ + null, + null, + null, + 0, + null, + null, + 0, + null, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + null, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + null, + null, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + null, + null, + 0, + 0, + 0, + null, + null, + null, + null, + 0, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/manager_accounting_ability.rb": [ + 0, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/transit_manager_accounting_ability.rb": [ + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/super_manager_accounting_ability.rb": [ + 0, + 0, + 0, + null, + 0, + null, + 0, + null, + 0, + 0, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/models/book_value_update_event.rb": [ + null, + 0, + null, + null, + 0, + null, + 0, + null, + null, + 0, + 0, + null, + null, + null, + null, + null, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + null, + null, + null, + null, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + null, + null, + null, + null, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/jobs/asset_value_update_job.rb": [ + null, + null, + null, + null, + null, + null, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/jobs/asset_book_value_update_job.rb": [ + null, + null, + null, + null, + null, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/jobs/asset_disposition_update_job.rb": [ + null, + null, + null, + null, + null, + null, + null, + 0, + null, + null, + null, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + 0, + null, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/jobs/scheduled_depreciation_update_job.rb": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + 0, + null, + null, + null, + null, + 0, + null, + 0, + null, + null, + 0, + null, + null, + null, + 0, + null, + null, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + 0, + null, + null, + null, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/controllers/general_ledger_mappings_controller.rb": [ + 0, + null, + 0, + null, + 0, + null, + 0, + null, + null, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + null, + 0, + null, + null, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + null, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/inputs/array_input.rb": [ + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_fiscal_year_value_report.rb": [ + 0, + null, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_accumulated_depreciation_report.rb": [ + 0, + null, + 0, + null, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, null, null, - 1, - 2, - 2, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/asset_depreciable_proxy.rb": [ - 1, null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, null, - 1, + 0, null, - 1, - 1, - 1, - 1, - 1, + 0, + 0, + 0, null, - 1, - 3, - 3, - 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, null, + 0, + 0, null, + 0, + 0, + 0, null, + 0, + 0, + 0, + 0, null, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, + 0, + 0, + 0, null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_funding_source_report.rb": [ + 0, null, + 0, + 0, + 0, + 0, null, - null - ], - "/Users/lydiachang/Projects/transam_accounting/app/inputs/array_input.rb": [ 0, 0, 0, 0, 0, + null, + 0, + null, 0, 0, 0, @@ -3018,18 +4239,20 @@ 0, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/jobs/asset_disposition_update_job.rb": [ 0, 0, 0, 0, + null, + 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, @@ -3038,10 +4261,13 @@ 0, 0, 0, + null, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3049,14 +4275,21 @@ 0, 0, 0, + null, 0, + null, 0, 0, + null, + null, 0, 0, 0, 0, + null, + null, 0, + null, 0, 0, 0, @@ -3077,50 +4310,77 @@ 0, 0, 0, + null, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, + null, 0, + null, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, 0, 0, + null, 0 ], - "/Users/lydiachang/Projects/transam_accounting/app/jobs/asset_value_update_job.rb": [ + "/Users/lydiachang/Projects/transam_accounting/app/reports/gross_asset_value_report.rb": [ + 0, + null, + 0, + null, + 0, 0, 0, 0, + null, + 0, 0, + null, 0, + null, + null, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3128,10 +4388,8 @@ 0, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/jobs/scheduled_depreciation_update_job.rb": [ 0, + null, 0, 0, 0, @@ -3139,6 +4397,7 @@ 0, 0, 0, + null, 0, 0, 0, @@ -3148,17 +4407,22 @@ 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3167,11 +4431,14 @@ 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, @@ -3187,17 +4454,24 @@ 0, 0, 0, + null, 0, + null, 0, 0, + null, 0, 0, 0, + null, + null, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3206,6 +4480,7 @@ 0, 0, 0, + null, 0, 0, 0, @@ -3213,6 +4488,9 @@ 0, 0, 0, + null, + null, + null, 0, 0, 0, @@ -3225,9 +4503,6 @@ 0, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/authorized_accounting_ability.rb": [ 0, 0, 0, @@ -3236,17 +4511,18 @@ 0, 0, 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/guest_accounting_ability.rb": [ 0, 0, 0, @@ -3254,42 +4530,47 @@ 0, 0, 0, + null, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/manager_accounting_ability.rb": [ 0, + null, 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, 0, 0, + null, 0 ], - "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/super_manager_accounting_ability.rb": [ - 0, - 0, + "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_disposition_gain_loss_report.rb": [ 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/models/abilities/transit_manager_accounting_ability.rb": [ + null, 0, + null, + null, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3299,9 +4580,6 @@ 0, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_fiscal_year_value_report.rb": [ 0, 0, 0, @@ -3313,7 +4591,9 @@ 0, 0, 0, + null, 0, + null, 0, 0, 0, @@ -3323,17 +4603,22 @@ 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3342,11 +4627,14 @@ 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, @@ -3362,16 +4650,23 @@ 0, 0, 0, + null, 0, + null, 0, 0, + null, 0, 0, 0, + null, + null, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3392,7 +4687,11 @@ 0, 0, 0, + null, 0, + null, + null, + null, 0, 0, 0, @@ -3413,46 +4712,60 @@ 0, 0, 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, 0, - 0 - ], - "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_funding_source_report.rb": [ 0, 0, 0, 0, + null, 0, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, 0, 0, + null, + 0 + ], + "/Users/lydiachang/Projects/transam_accounting/app/reports/asset_value_report.rb": [ 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, + null, 0, 0, 0, @@ -3464,16 +4777,21 @@ 0, 0, 0, + null, 0, + null, 0, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, @@ -3495,13 +4813,19 @@ 0, 0, 0, + null, 0, + null, 0, 0, + null, 0, 0, + null, 0, + null, 0, + null, 0, 0, 0, @@ -3509,6 +4833,7 @@ 0, 0, 0, + null, 0, 0, 0, @@ -3517,6 +4842,9 @@ 0, 0, 0, + null, + null, + null, 0, 0, 0, @@ -3531,9 +4859,11 @@ 0, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, @@ -3541,12 +4871,16 @@ 0, 0, 0, + null, 0, + null, 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, @@ -3555,18 +4889,23 @@ 0, 0, 0, + null, 0, 0, + null, 0, 0, 0, + null, 0, 0, 0, 0, + null, 0, 0, 0, + null, 0 ], "/Users/lydiachang/Projects/transam_accounting/lib/transam_accounting/version.rb": [ @@ -3575,6 +4914,6 @@ 0 ] }, - "timestamp": 1508348748 + "timestamp": 1524070558 } } diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index fa1bab63..742f20c6 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -11,20 +11,20 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170719152744) do +ActiveRecord::Schema.define(version: 20180330151633) do - create_table "activities", force: true do |t| + create_table "activities", force: :cascade do |t| t.string "object_key", limit: 12 - t.integer "organization_type_id" + t.integer "organization_type_id", limit: 4 t.string "name", limit: 64 - t.text "description" + t.text "description", limit: 65535 t.boolean "show_in_dashboard" t.boolean "system_activity" t.date "start_date" t.date "end_date" - t.integer "frequency_quantity", null: false - t.integer "frequency_type_id", null: false - t.string "execution_time", limit: 32, null: false + t.integer "frequency_quantity", limit: 4, null: false + t.integer "frequency_type_id", limit: 4, null: false + t.string "execution_time", limit: 32, null: false t.string "job_name", limit: 64 t.datetime "last_run" t.boolean "active" @@ -32,29 +32,36 @@ t.datetime "updated_at" end - create_table "activity_logs", force: true do |t| - t.integer "organization_id", null: false + create_table "activity_logs", force: :cascade do |t| + t.integer "organization_id", limit: 4, null: false t.string "item_type", limit: 64, null: false - t.integer "item_id" - t.integer "user_id", null: false - t.text "activity", limit: 2147483647, null: false + t.integer "item_id", limit: 4 + t.integer "user_id", limit: 4, null: false + t.text "activity", limit: 4294967295, null: false t.datetime "activity_time" end add_index "activity_logs", ["organization_id", "activity_time"], name: "activity_logs_idx1", using: :btree add_index "activity_logs", ["user_id", "activity_time"], name: "activity_logs_idx2", using: :btree - create_table "asset_event_asset_subsystems", force: true do |t| - t.integer "asset_event_id" - t.integer "asset_subsystem_id" - t.integer "parts_cost" - t.integer "labor_cost" + create_table "archived_fiscal_years", id: false, force: :cascade do |t| + t.integer "organization_id", limit: 4 + t.integer "fy_year", limit: 4 + end + + add_index "archived_fiscal_years", ["organization_id"], name: "index_archived_fiscal_years_on_organization_id", using: :btree + + create_table "asset_event_asset_subsystems", force: :cascade do |t| + t.integer "asset_event_id", limit: 4 + t.integer "asset_subsystem_id", limit: 4 + t.integer "parts_cost", limit: 4 + t.integer "labor_cost", limit: 4 end add_index "asset_event_asset_subsystems", ["asset_event_id"], name: "rehab_events_subsystems_idx1", using: :btree add_index "asset_event_asset_subsystems", ["asset_subsystem_id"], name: "rehab_events_subsystems_idx2", using: :btree - create_table "asset_event_types", force: true do |t| + create_table "asset_event_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "job_name", limit: 64, null: false @@ -65,49 +72,51 @@ add_index "asset_event_types", ["class_name"], name: "asset_event_types_idx1", using: :btree - create_table "asset_events", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "asset_id", null: false - t.integer "asset_event_type_id", null: false - t.integer "upload_id" - t.date "event_date", null: false - t.decimal "assessed_rating", precision: 9, scale: 2 - t.integer "condition_type_id" - t.integer "current_mileage" - t.integer "parent_id" - t.integer "replacement_year" - t.integer "rebuild_year" - t.integer "disposition_year" - t.integer "extended_useful_life_miles" - t.integer "extended_useful_life_months" - t.integer "replacement_reason_type_id" + create_table "asset_events", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "asset_id", limit: 4, null: false + t.integer "asset_event_type_id", limit: 4, null: false + t.integer "upload_id", limit: 4 + t.date "event_date", null: false + t.decimal "assessed_rating", precision: 9, scale: 2 + t.integer "condition_type_id", limit: 4 + t.integer "current_mileage", limit: 4 + t.integer "parent_id", limit: 4 + t.integer "replacement_year", limit: 4 + t.integer "rebuild_year", limit: 4 + t.integer "disposition_year", limit: 4 + t.integer "extended_useful_life_miles", limit: 4 + t.integer "extended_useful_life_months", limit: 4 + t.integer "replacement_reason_type_id", limit: 4 t.date "disposition_date" - t.integer "disposition_type_id" - t.integer "service_status_type_id" - t.integer "maintenance_type_id" - t.integer "pcnt_5311_routes" - t.integer "avg_daily_use_hours" - t.integer "avg_daily_use_miles" - t.integer "avg_daily_passenger_trips" - t.integer "maintenance_provider_type_id" - t.integer "vehicle_storage_method_type_id" - t.decimal "avg_cost_per_mile", precision: 9, scale: 2 - t.decimal "avg_miles_per_gallon", precision: 9, scale: 2 - t.integer "annual_maintenance_cost" - t.integer "annual_insurance_cost" + t.integer "disposition_type_id", limit: 4 + t.integer "service_status_type_id", limit: 4 + t.integer "maintenance_type_id", limit: 4 + t.integer "pcnt_5311_routes", limit: 4 + t.integer "avg_daily_use_hours", limit: 4 + t.integer "avg_daily_use_miles", limit: 4 + t.integer "avg_daily_passenger_trips", limit: 4 + t.integer "maintenance_provider_type_id", limit: 4 + t.integer "vehicle_storage_method_type_id", limit: 4 + t.decimal "avg_cost_per_mile", precision: 9, scale: 2 + t.decimal "avg_miles_per_gallon", precision: 9, scale: 2 + t.integer "annual_maintenance_cost", limit: 4 + t.integer "annual_insurance_cost", limit: 4 t.boolean "actual_costs" - t.integer "annual_affected_ridership" - t.integer "annual_dollars_generated" - t.integer "sales_proceeds" - t.text "comments" - t.integer "organization_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "annual_affected_ridership", limit: 4 + t.integer "annual_dollars_generated", limit: 4 + t.integer "sales_proceeds", limit: 4 + t.integer "book_value", limit: 4 + t.text "comments", limit: 65535 + t.integer "organization_id", limit: 4 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "state", limit: 32 t.string "document", limit: 128 t.string "original_filename", limit: 128 - t.integer "created_by_id" - t.integer "total_cost" + t.integer "created_by_id", limit: 4 + t.integer "total_cost", limit: 4 + t.integer "general_ledger_account_id", limit: 4 end add_index "asset_events", ["asset_event_type_id"], name: "asset_events_idx3", using: :btree @@ -117,16 +126,16 @@ add_index "asset_events", ["object_key"], name: "asset_events_idx1", using: :btree add_index "asset_events", ["upload_id"], name: "asset_events_idx5", using: :btree - create_table "asset_events_vehicle_usage_codes", id: false, force: true do |t| - t.integer "asset_event_id" - t.integer "vehicle_usage_code_id" + create_table "asset_events_vehicle_usage_codes", id: false, force: :cascade do |t| + t.integer "asset_event_id", limit: 4 + t.integer "vehicle_usage_code_id", limit: 4 end add_index "asset_events_vehicle_usage_codes", ["asset_event_id", "vehicle_usage_code_id"], name: "asset_events_vehicle_usage_codes_idx1", using: :btree - create_table "asset_groups", force: true do |t| + create_table "asset_groups", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false + t.integer "organization_id", limit: 4, null: false t.string "name", limit: 64, null: false t.string "code", limit: 8, null: false t.string "description", limit: 254 @@ -138,23 +147,23 @@ add_index "asset_groups", ["object_key"], name: "asset_groups_idx1", using: :btree add_index "asset_groups", ["organization_id"], name: "asset_groups_idx2", using: :btree - create_table "asset_groups_assets", id: false, force: true do |t| - t.integer "asset_id", null: false - t.integer "asset_group_id", null: false + create_table "asset_groups_assets", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4, null: false + t.integer "asset_group_id", limit: 4, null: false end add_index "asset_groups_assets", ["asset_id", "asset_group_id"], name: "asset_groups_assets_idx1", using: :btree - create_table "asset_subsystems", force: true do |t| + create_table "asset_subsystems", force: :cascade do |t| t.string "name", limit: 64 t.string "code", limit: 2 t.string "description", limit: 254 - t.integer "asset_type_id" + t.integer "asset_type_id", limit: 4 t.boolean "active" end - create_table "asset_subtypes", force: true do |t| - t.integer "asset_type_id", null: false + create_table "asset_subtypes", force: :cascade do |t| + t.integer "asset_type_id", limit: 4, null: false t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.string "image", limit: 254 @@ -163,147 +172,157 @@ add_index "asset_subtypes", ["asset_type_id"], name: "asset_subtypes_idx1", using: :btree - create_table "asset_tags", force: true do |t| - t.integer "asset_id" - t.integer "user_id" + create_table "asset_tags", force: :cascade do |t| + t.integer "asset_id", limit: 4 + t.integer "user_id", limit: 4 end add_index "asset_tags", ["asset_id"], name: "asset_tags_idx1", using: :btree add_index "asset_tags", ["user_id"], name: "asset_tags_idx2", using: :btree - create_table "asset_types", force: true do |t| + create_table "asset_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "display_icon_name", limit: 64, null: false t.string "map_icon_name", limit: 64, null: false t.string "description", limit: 254, null: false + t.boolean "allow_parent" t.boolean "active", null: false end add_index "asset_types", ["class_name"], name: "asset_types_idx1", using: :btree add_index "asset_types", ["name"], name: "asset_types_idx2", using: :btree - create_table "asset_types_manufacturers", id: false, force: true do |t| - t.integer "asset_type_id" - t.integer "manufacturer_id" + create_table "asset_types_manufacturers", id: false, force: :cascade do |t| + t.integer "asset_type_id", limit: 4 + t.integer "manufacturer_id", limit: 4 end add_index "asset_types_manufacturers", ["asset_type_id", "manufacturer_id"], name: "asset_types_manufacturers_idx1", using: :btree - create_table "assets", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.integer "asset_type_id", null: false - t.integer "asset_subtype_id", null: false - t.string "asset_tag", limit: 32, null: false + create_table "assets", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "organization_id", limit: 4, null: false + t.integer "asset_type_id", limit: 4, null: false + t.integer "asset_subtype_id", limit: 4, null: false + t.string "asset_tag", limit: 32, null: false t.string "external_id", limit: 32 - t.integer "parent_id" - t.integer "superseded_by_id" - t.integer "manufacturer_id" + t.integer "parent_id", limit: 4 + t.integer "superseded_by_id", limit: 4 + t.integer "manufacturer_id", limit: 4 + t.string "other_manufacturer", limit: 255 t.string "manufacturer_model", limit: 128 - t.integer "manufacture_year" - t.integer "pcnt_capital_responsibility" - t.integer "vendor_id" - t.integer "policy_replacement_year" - t.integer "policy_rehabilitation_year" - t.integer "estimated_replacement_year" - t.integer "estimated_replacement_cost" - t.integer "scheduled_replacement_year" - t.integer "scheduled_rehabilitation_year" - t.integer "scheduled_disposition_year" - t.integer "scheduled_replacement_cost" - t.text "early_replacement_reason" + t.integer "manufacture_year", limit: 4 + t.integer "pcnt_capital_responsibility", limit: 4 + t.integer "vendor_id", limit: 4 + t.integer "policy_replacement_year", limit: 4 + t.integer "policy_rehabilitation_year", limit: 4 + t.integer "estimated_replacement_year", limit: 4 + t.integer "estimated_replacement_cost", limit: 4 + t.integer "scheduled_replacement_year", limit: 4 + t.integer "scheduled_rehabilitation_year", limit: 4 + t.integer "scheduled_disposition_year", limit: 4 + t.integer "scheduled_replacement_cost", limit: 4 + t.text "early_replacement_reason", limit: 65535 t.boolean "scheduled_replace_with_new" - t.integer "scheduled_rehabilitation_cost" - t.integer "replacement_reason_type_id" + t.integer "scheduled_rehabilitation_cost", limit: 4 + t.integer "replacement_reason_type_id", limit: 4 t.boolean "in_backlog" - t.integer "reported_condition_type_id" - t.decimal "reported_condition_rating", precision: 10, scale: 1 - t.integer "reported_mileage" + t.integer "reported_condition_type_id", limit: 4 + t.decimal "reported_condition_rating", precision: 10, scale: 1 + t.integer "reported_mileage", limit: 4 t.date "reported_mileage_date" t.date "reported_condition_date" - t.integer "estimated_condition_type_id" - t.decimal "estimated_condition_rating", precision: 9, scale: 2 - t.integer "service_status_type_id" + t.integer "estimated_condition_type_id", limit: 4 + t.decimal "estimated_condition_rating", precision: 9, scale: 2 + t.integer "service_status_type_id", limit: 4 t.date "service_status_date" t.date "last_maintenance_date" t.boolean "depreciable" t.date "depreciation_start_date" + t.integer "depreciation_useful_life", limit: 4 + t.integer "depreciation_purchase_cost", limit: 4 t.date "current_depreciation_date" - t.integer "book_value" - t.integer "salvage_value" + t.integer "book_value", limit: 4 + t.integer "salvage_value", limit: 4 t.date "disposition_date" - t.integer "disposition_type_id" + t.integer "disposition_type_id", limit: 4 t.date "last_rehabilitation_date" - t.integer "maintenance_provider_type_id" - t.integer "vehicle_storage_method_type_id" - t.integer "vehicle_rebuild_type_id" - t.integer "location_reference_type_id" + t.integer "maintenance_provider_type_id", limit: 4 + t.integer "vehicle_storage_method_type_id", limit: 4 + t.integer "vehicle_rebuild_type_id", limit: 4 + t.integer "location_reference_type_id", limit: 4 t.string "location_reference", limit: 254 - t.text "location_comments" - t.integer "fuel_type_id" - t.integer "vehicle_length" - t.integer "gross_vehicle_weight" + t.text "location_comments", limit: 65535 + t.integer "fuel_type_id", limit: 4 + t.integer "vehicle_length", limit: 4 + t.integer "gross_vehicle_weight", limit: 4 t.string "title_number", limit: 32 - t.integer "title_owner_organization_id" + t.integer "title_owner_organization_id", limit: 4 t.string "serial_number", limit: 32 t.boolean "purchased_new" - t.integer "purchase_cost" + t.integer "purchase_cost", limit: 4 t.date "purchase_date" t.date "warranty_date" t.date "in_service_date" - t.integer "expected_useful_life" - t.integer "expected_useful_miles" - t.integer "rebuild_year" + t.integer "expected_useful_life", limit: 4 + t.integer "expected_useful_miles", limit: 4 + t.integer "rebuild_year", limit: 4 t.string "license_plate", limit: 32 - t.integer "seating_capacity" - t.integer "standing_capacity" - t.integer "wheelchair_capacity" - t.integer "fta_ownership_type_id" - t.integer "fta_vehicle_type_id" - t.integer "fta_funding_type_id" - t.integer "fta_bus_mode_type_id" + t.integer "seating_capacity", limit: 4 + t.integer "standing_capacity", limit: 4 + t.integer "wheelchair_capacity", limit: 4 + t.integer "fta_ownership_type_id", limit: 4 + t.string "other_fta_ownership_type", limit: 255 + t.integer "fta_vehicle_type_id", limit: 4 + t.integer "fta_support_vehicle_type_id", limit: 4 + t.integer "fta_funding_type_id", limit: 4 + t.integer "fta_bus_mode_type_id", limit: 4 t.boolean "ada_accessible_lift" t.boolean "ada_accessible_ramp" t.boolean "fta_emergency_contingency_fleet" + t.boolean "dedicated" t.string "description", limit: 128 t.string "address1", limit: 128 t.string "address2", limit: 128 t.string "city", limit: 64 t.string "state", limit: 2 t.string "zip", limit: 10 - t.integer "facility_size" + t.integer "facility_size", limit: 4 t.boolean "section_of_larger_facility" - t.integer "pcnt_operational" - t.integer "num_floors" - t.integer "num_structures" - t.integer "num_elevators" - t.integer "num_escalators" - t.integer "num_parking_spaces_public" - t.integer "num_parking_spaces_private" - t.decimal "lot_size", precision: 9, scale: 2 + t.integer "pcnt_operational", limit: 4 + t.integer "num_floors", limit: 4 + t.integer "num_structures", limit: 4 + t.integer "num_elevators", limit: 4 + t.integer "num_escalators", limit: 4 + t.integer "num_parking_spaces_public", limit: 4 + t.integer "num_parking_spaces_private", limit: 4 + t.decimal "lot_size", precision: 9, scale: 2 t.string "line_number", limit: 128 - t.integer "land_ownership_type_id" - t.integer "land_ownership_organization_id" - t.integer "building_ownership_type_id" - t.integer "building_ownership_organization_id" - t.integer "facility_capacity_type_id" - t.integer "fta_facility_type_id" - t.integer "leed_certification_type_id" - t.integer "quantity" + t.integer "land_ownership_type_id", limit: 4 + t.integer "land_ownership_organization_id", limit: 4 + t.integer "building_ownership_type_id", limit: 4 + t.integer "building_ownership_organization_id", limit: 4 + t.integer "facility_capacity_type_id", limit: 4 + t.integer "fta_facility_type_id", limit: 4 + t.integer "fta_private_mode_type_id", limit: 4 + t.integer "leed_certification_type_id", limit: 4 + t.integer "quantity", limit: 4 t.string "quantity_units", limit: 16 - t.integer "created_by_id" - t.integer "updated_by_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "upload_id" - t.integer "general_ledger_account_id" + t.integer "created_by_id", limit: 4 + t.integer "weight", limit: 4 + t.integer "updated_by_id", limit: 4 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "upload_id", limit: 4 + t.integer "location_id", limit: 4 + t.integer "dual_fuel_type_id", limit: 4 + t.string "other_fuel_type", limit: 255 end add_index "assets", ["asset_subtype_id"], name: "assets_idx4", using: :btree add_index "assets", ["asset_type_id"], name: "assets_idx3", using: :btree add_index "assets", ["estimated_replacement_year"], name: "assets_idx8", using: :btree - add_index "assets", ["general_ledger_account_id"], name: "index_assets_on_general_ledger_account_id", using: :btree add_index "assets", ["in_backlog"], name: "assets_idx7", using: :btree add_index "assets", ["manufacture_year"], name: "assets_idx5", using: :btree add_index "assets", ["object_key"], name: "assets_idx1", using: :btree @@ -315,65 +334,60 @@ add_index "assets", ["reported_condition_type_id"], name: "assets_idx6", using: :btree add_index "assets", ["superseded_by_id"], name: "assets_idx13", using: :btree - create_table "assets_districts", id: false, force: true do |t| - t.integer "asset_id" - t.integer "district_id" + create_table "assets_districts", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4 + t.integer "district_id", limit: 4 end add_index "assets_districts", ["asset_id", "district_id"], name: "assets_districts_idx1", using: :btree - create_table "assets_expenditures", id: false, force: true do |t| - t.integer "asset_id", null: false - t.integer "expenditure_id", null: false + create_table "assets_expenditures", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4, null: false + t.integer "expenditure_id", limit: 4, null: false end add_index "assets_expenditures", ["asset_id", "expenditure_id"], name: "assets_expenditures_idx1", using: :btree - create_table "assets_facility_features", id: false, force: true do |t| - t.integer "asset_id", null: false - t.integer "facility_feature_id", null: false + create_table "assets_facility_features", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4, null: false + t.integer "facility_feature_id", limit: 4, null: false end add_index "assets_facility_features", ["asset_id", "facility_feature_id"], name: "assets_facility_features_idx1", using: :btree - create_table "assets_fta_mode_types", id: false, force: true do |t| - t.integer "asset_id" - t.integer "fta_mode_type_id" + create_table "assets_fta_mode_types", force: :cascade do |t| + t.integer "asset_id", limit: 4 + t.integer "fta_mode_type_id", limit: 4 + t.boolean "is_primary" end add_index "assets_fta_mode_types", ["asset_id", "fta_mode_type_id"], name: "assets_fta_mode_types_idx1", using: :btree - create_table "assets_fta_service_types", id: false, force: true do |t| - t.integer "asset_id" - t.integer "fta_service_type_id" + create_table "assets_fta_service_types", force: :cascade do |t| + t.integer "asset_id", limit: 4 + t.integer "fta_service_type_id", limit: 4 + t.boolean "is_primary" end add_index "assets_fta_service_types", ["asset_id", "fta_service_type_id"], name: "assets_fta_service_types_idx1", using: :btree - create_table "assets_general_ledger_accounts", id: false, force: true do |t| - t.integer "asset_id", null: false - t.integer "general_ledger_account_id", null: false - end - - add_index "assets_general_ledger_accounts", ["asset_id", "general_ledger_account_id"], name: "assets_general_ledger_accounts_idx1", using: :btree - - create_table "assets_vehicle_features", id: false, force: true do |t| - t.integer "asset_id" - t.integer "vehicle_feature_id" + create_table "assets_vehicle_features", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4 + t.integer "vehicle_feature_id", limit: 4 end add_index "assets_vehicle_features", ["asset_id", "vehicle_feature_id"], name: "assets_vehicle_features_idx1", using: :btree - create_table "assets_vehicle_usage_codes", id: false, force: true do |t| - t.integer "asset_id", null: false - t.integer "vehicle_usage_code_id", null: false + create_table "assets_vehicle_usage_codes", id: false, force: :cascade do |t| + t.integer "asset_id", limit: 4, null: false + t.integer "vehicle_usage_code_id", limit: 4, null: false end add_index "assets_vehicle_usage_codes", ["asset_id", "vehicle_usage_code_id"], name: "assets_vehicle_usage_codes_idx1", using: :btree - create_table "chart_of_accounts", force: true do |t| + create_table "chart_of_accounts", force: :cascade do |t| t.string "object_key", limit: 12 - t.integer "organization_id" + t.integer "organization_id", limit: 4 t.boolean "active" t.datetime "created_at" t.datetime "updated_at" @@ -381,19 +395,19 @@ add_index "chart_of_accounts", ["organization_id"], name: "chart_of_accounts_idx1", using: :btree - create_table "comments", force: true do |t| + create_table "comments", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "commentable_id", null: false + t.integer "commentable_id", limit: 4, null: false t.string "commentable_type", limit: 64, null: false t.string "comment", limit: 254, null: false - t.integer "created_by_id", null: false + t.integer "created_by_id", limit: 4, null: false t.datetime "created_at" t.datetime "updated_at" end add_index "comments", ["commentable_id", "commentable_type"], name: "comments_idx1", using: :btree - create_table "condition_estimation_types", force: true do |t| + create_table "condition_estimation_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "description", limit: 254, null: false @@ -402,14 +416,32 @@ add_index "condition_estimation_types", ["class_name"], name: "condition_estimation_types_idx1", using: :btree - create_table "condition_types", force: true do |t| + create_table "condition_rollup_calculation_types", force: :cascade do |t| + t.string "name", limit: 255 + t.string "class_name", limit: 255 + t.string "description", limit: 255 + t.boolean "active" + end + + create_table "condition_type_percents", force: :cascade do |t| + t.integer "asset_event_id", limit: 4 + t.integer "condition_type_id", limit: 4 + t.integer "pcnt", limit: 4 + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "condition_type_percents", ["asset_event_id"], name: "index_condition_type_percents_on_asset_event_id", using: :btree + add_index "condition_type_percents", ["condition_type_id"], name: "index_condition_type_percents_on_condition_type_id", using: :btree + + create_table "condition_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.decimal "rating", precision: 9, scale: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "cost_calculation_types", force: true do |t| + create_table "cost_calculation_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "description", limit: 254, null: false @@ -418,66 +450,86 @@ add_index "cost_calculation_types", ["class_name"], name: "cost_calculation_types_idx1", using: :btree - create_table "customers", force: true do |t| - t.integer "license_type_id", null: false + create_table "customers", force: :cascade do |t| + t.integer "license_type_id", limit: 4, null: false t.string "name", limit: 64, null: false t.boolean "active", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false end - create_table "delayed_job_priorities", force: true do |t| - t.string "class_name", null: false - t.integer "priority", null: false + create_table "delayed_job_priorities", force: :cascade do |t| + t.string "class_name", limit: 255, null: false + t.integer "priority", limit: 4, null: false t.datetime "created_at" t.datetime "updated_at" end - create_table "delayed_jobs", force: true do |t| - t.integer "priority" - t.integer "attempts" - t.text "handler" - t.text "last_error" + create_table "delayed_jobs", force: :cascade do |t| + t.integer "priority", limit: 4 + t.integer "attempts", limit: 4 + t.text "handler", limit: 65535 + t.text "last_error", limit: 65535 t.datetime "run_at" t.datetime "locked_at" t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "locked_by", limit: 255 + t.string "queue", limit: 255 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree - create_table "depreciation_calculation_types", force: true do |t| + create_table "depreciation_calculation_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "depreciation_interval_types", force: true do |t| + create_table "depreciation_entries", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "asset_id", limit: 4 + t.date "event_date" + t.string "description", limit: 255 + t.integer "book_value", limit: 4 + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "depreciation_entries", ["asset_id"], name: "index_depreciation_entries_on_asset_id", using: :btree + + create_table "depreciation_entries_general_ledger_account_entries", force: :cascade do |t| + t.integer "depreciation_entry_id", limit: 4 + t.integer "general_ledger_account_entry_id", limit: 4 + end + + add_index "depreciation_entries_general_ledger_account_entries", ["depreciation_entry_id"], name: "depr_entry_idx", using: :btree + add_index "depreciation_entries_general_ledger_account_entries", ["general_ledger_account_entry_id"], name: "gl_entry_idx", using: :btree + + create_table "depreciation_interval_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false - t.integer "months", null: false + t.integer "months", limit: 4, null: false t.boolean "active", null: false end - create_table "disposition_types", force: true do |t| + create_table "disposition_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "district_types", force: true do |t| + create_table "district_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "districts", force: true do |t| - t.integer "district_type_id", null: false + create_table "districts", force: :cascade do |t| + t.integer "district_type_id", limit: 4, null: false t.string "name", limit: 64, null: false t.string "code", limit: 6, null: false t.string "description", limit: 254, null: false @@ -487,16 +539,16 @@ add_index "districts", ["district_type_id"], name: "districts_idx1", using: :btree add_index "districts", ["name"], name: "districts_idx2", using: :btree - create_table "documents", force: true do |t| + create_table "documents", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "documentable_id", null: false + t.integer "documentable_id", limit: 4, null: false t.string "documentable_type", limit: 64, null: false t.string "document", limit: 128, null: false t.string "description", limit: 254, null: false t.string "original_filename", limit: 128, null: false t.string "content_type", limit: 128, null: false - t.integer "file_size", null: false - t.integer "created_by_id" + t.integer "file_size", limit: 4, null: false + t.integer "created_by_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" end @@ -504,18 +556,27 @@ add_index "documents", ["documentable_id", "documentable_type"], name: "documents_idx2", using: :btree add_index "documents", ["object_key"], name: "documents_idx1", using: :btree - create_table "expenditures", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.integer "vendor_id" - t.integer "general_ledger_account_id" - t.integer "grant_id" - t.integer "expense_type_id", null: false - t.string "external_id", limit: 32 - t.date "expense_date", null: false - t.string "description", limit: 254 - t.integer "amount", null: false - t.integer "pcnt_from_grant" + create_table "dual_fuel_types", force: :cascade do |t| + t.integer "primary_fuel_type_id", limit: 4 + t.integer "secondary_fuel_type_id", limit: 4 + t.boolean "active" + end + + add_index "dual_fuel_types", ["primary_fuel_type_id"], name: "index_dual_fuel_types_on_primary_fuel_type_id", using: :btree + add_index "dual_fuel_types", ["secondary_fuel_type_id"], name: "index_dual_fuel_types_on_secondary_fuel_type_id", using: :btree + + create_table "expenditures", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "general_ledger_account_id", limit: 4 + t.integer "grant_id", limit: 4 + t.integer "expense_type_id", limit: 4, null: false + t.string "external_id", limit: 32 + t.date "expense_date", null: false + t.string "description", limit: 254 + t.integer "amount", limit: 4, null: false + t.integer "extended_useful_life_months", limit: 4 + t.string "vendor", limit: 255 + t.integer "pcnt_from_grant", limit: 4 t.datetime "created_at" t.datetime "updated_at" end @@ -523,35 +584,32 @@ add_index "expenditures", ["expense_type_id"], name: "expenditures_idx4", using: :btree add_index "expenditures", ["general_ledger_account_id"], name: "expenditures_idx3", using: :btree add_index "expenditures", ["object_key"], name: "expenditures_idx1", using: :btree - add_index "expenditures", ["organization_id"], name: "expenditures_idx2", using: :btree - create_table "expense_types", force: true do |t| - t.integer "organization_id", null: false - t.string "name", limit: 64, null: false - t.string "description", limit: 254, null: false - t.boolean "active", null: false + create_table "expense_types", force: :cascade do |t| + t.string "name", limit: 64, null: false + t.string "description", limit: 254, null: false + t.boolean "active", null: false end add_index "expense_types", ["name"], name: "expense_types_idx2", using: :btree - add_index "expense_types", ["organization_id"], name: "expense_types_idx1", using: :btree - create_table "facility_capacity_types", force: true do |t| + create_table "facility_capacity_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "facility_features", force: true do |t| + create_table "facility_features", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 4, null: false t.string "description", limit: 254, null: false t.boolean "active" end - create_table "file_content_types", force: true do |t| + create_table "file_content_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false - t.string "builder_name" + t.string "builder_name", limit: 255 t.string "description", limit: 254, null: false t.boolean "active", null: false end @@ -559,7 +617,7 @@ add_index "file_content_types", ["class_name"], name: "file_content_types_idx2", using: :btree add_index "file_content_types", ["name"], name: "file_content_types_idx1", using: :btree - create_table "file_status_types", force: true do |t| + create_table "file_status_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false @@ -567,7 +625,7 @@ add_index "file_status_types", ["name"], name: "file_status_types_idx1", using: :btree - create_table "forms", force: true do |t| + create_table "forms", force: :cascade do |t| t.string "object_key", limit: 12, null: false t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false @@ -580,139 +638,161 @@ add_index "forms", ["object_key"], name: "forms_idx1", using: :btree - create_table "frequency_types", force: true do |t| + create_table "frequency_types", force: :cascade do |t| t.string "name", limit: 32, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fta_agency_types", force: true do |t| + create_table "fta_agency_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 256, null: false t.boolean "active", null: false end - create_table "fta_bus_mode_types", force: true do |t| + create_table "fta_asset_categories", force: :cascade do |t| + t.string "name", limit: 255 + t.boolean "active" + end + + create_table "fta_bus_mode_types", force: :cascade do |t| t.string "code", limit: 4, null: false t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fta_facility_types", force: true do |t| + create_table "fta_facility_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false + t.string "class_name", limit: 255 t.boolean "active", null: false end - create_table "fta_funding_types", force: true do |t| + create_table "fta_funding_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 6, null: false t.string "description", limit: 256, null: false t.boolean "active", null: false end - create_table "fta_mode_types", force: true do |t| + create_table "fta_mode_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fta_mode_types_organizations", id: false, force: true do |t| - t.integer "organization_id", null: false - t.integer "fta_mode_type_id", null: false + create_table "fta_mode_types_organizations", id: false, force: :cascade do |t| + t.integer "organization_id", limit: 4, null: false + t.integer "fta_mode_type_id", limit: 4, null: false end add_index "fta_mode_types_organizations", ["organization_id", "fta_mode_type_id"], name: "fta_mode_types_organizations_idx1", using: :btree - create_table "fta_ownership_types", force: true do |t| + create_table "fta_ownership_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 4, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fta_service_area_types", force: true do |t| - t.string "name", limit: 64, null: false - t.string "description", limit: 254, null: false + create_table "fta_private_mode_types", force: :cascade do |t| + t.string "name", limit: 255, null: false + t.string "description", limit: 255, null: false t.boolean "active", null: false end - create_table "fta_service_types", force: true do |t| + create_table "fta_service_area_types", force: :cascade do |t| t.string "name", limit: 64, null: false - t.string "code", limit: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fta_vehicle_types", force: true do |t| + create_table "fta_service_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "fuel_types", force: true do |t| - t.string "name", null: false - t.string "code", null: false - t.string "description", null: false - t.boolean "active", null: false + create_table "fta_support_vehicle_types", force: :cascade do |t| + t.string "name", limit: 255, null: false + t.string "description", limit: 255, null: false + t.integer "default_useful_life_benchmark", limit: 4 + t.string "useful_life_benchmark_unit", limit: 255 + t.boolean "active", null: false end - create_table "funding_bucket_types", force: true do |t| - t.string "name", null: false - t.string "description", null: false - t.boolean "active", null: false + create_table "fta_vehicle_types", force: :cascade do |t| + t.string "name", limit: 64, null: false + t.string "code", limit: 2, null: false + t.string "description", limit: 254, null: false + t.integer "default_useful_life_benchmark", limit: 4 + t.string "useful_life_benchmark_unit", limit: 255 + t.boolean "active", null: false end - create_table "funding_buckets", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "funding_template_id", null: false - t.integer "fiscal_year", null: false - t.string "name", null: false - t.decimal "budget_amount", precision: 15, scale: 2, null: false - t.decimal "budget_committed", precision: 15, scale: 2, null: false - t.integer "owner_id" - t.string "description" - t.boolean "active", null: false - t.integer "created_by_id", null: false + create_table "fuel_types", force: :cascade do |t| + t.string "name", limit: 255, null: false + t.string "code", limit: 255, null: false + t.string "description", limit: 255, null: false + t.boolean "active", null: false + end + + create_table "funding_bucket_types", force: :cascade do |t| + t.string "name", limit: 255, null: false + t.string "description", limit: 255, null: false + t.boolean "active", null: false + end + + create_table "funding_buckets", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "funding_template_id", limit: 4, null: false + t.integer "fiscal_year", limit: 4, null: false + t.string "name", limit: 255, null: false + t.decimal "budget_amount", precision: 15, scale: 2, null: false + t.decimal "budget_committed", precision: 15, scale: 2, null: false + t.integer "owner_id", limit: 4 + t.string "description", limit: 255 + t.boolean "active", null: false + t.integer "created_by_id", limit: 4, null: false t.datetime "created_on" - t.integer "updated_by_id", null: false + t.integer "updated_by_id", limit: 4, null: false t.datetime "updated_on" end - create_table "funding_source_types", force: true do |t| + create_table "funding_source_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "funding_sources", force: true do |t| - t.string "object_key", limit: 12, null: false - t.string "name", limit: 64, null: false - t.string "description", limit: 256, null: false - t.text "details" - t.integer "funding_source_type_id", null: false + create_table "funding_sources", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.string "name", limit: 64, null: false + t.string "description", limit: 256, null: false + t.text "details", limit: 65535 + t.integer "funding_source_type_id", limit: 4, null: false t.string "external_id", limit: 32 t.boolean "formula_fund" t.boolean "discretionary_fund" t.float "match_required", limit: 24 - t.integer "fy_start" - t.integer "fy_end" - t.integer "created_by_id" - t.integer "updated_by_id" + t.integer "fy_start", limit: 4 + t.integer "fy_end", limit: 4 + t.integer "created_by_id", limit: 4 + t.integer "updated_by_id", limit: 4 t.boolean "active" t.datetime "created_at" t.datetime "updated_at" t.float "inflation_rate", limit: 24 - t.integer "life_in_years" + t.integer "life_in_years", limit: 4 end add_index "funding_sources", ["object_key"], name: "funding_sources_idx1", using: :btree - create_table "funding_template_types", force: true do |t| - t.integer "funding_source_id" + create_table "funding_template_types", force: :cascade do |t| + t.integer "funding_source_id", limit: 4 t.string "name", limit: 64, null: false t.string "description", limit: 256, null: false t.boolean "active", null: false @@ -720,20 +800,20 @@ add_index "funding_template_types", ["funding_source_id"], name: "index_funding_template_types_on_funding_source_id", using: :btree - create_table "funding_templates", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "funding_source_id" - t.string "name", limit: 64, null: false - t.text "description" - t.integer "contributor_id", null: false - t.integer "owner_id", null: false + create_table "funding_templates", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "funding_source_id", limit: 4 + t.string "name", limit: 64, null: false + t.text "description", limit: 65535 + t.integer "contributor_id", limit: 4, null: false + t.integer "owner_id", limit: 4, null: false t.boolean "recurring" t.boolean "transfer_only" - t.boolean "create_multiple_agencies", null: false - t.boolean "create_multiple_buckets_for_agency_year", null: false + t.boolean "create_multiple_agencies", null: false + t.boolean "create_multiple_buckets_for_agency_year", null: false t.float "match_required", limit: 24 - t.text "query_string" - t.boolean "active", null: false + t.text "query_string", limit: 65535 + t.boolean "active", null: false t.datetime "created_at" t.datetime "updated_at" t.string "external_id", limit: 32 @@ -743,120 +823,140 @@ add_index "funding_templates", ["funding_source_id"], name: "index_funding_templates_on_funding_source_id", using: :btree add_index "funding_templates", ["owner_id"], name: "index_funding_templates_on_owner_id", using: :btree - create_table "funding_templates_funding_template_types", id: false, force: true do |t| - t.integer "funding_template_id" - t.integer "funding_template_type_id" + create_table "funding_templates_funding_template_types", id: false, force: :cascade do |t| + t.integer "funding_template_id", limit: 4 + t.integer "funding_template_type_id", limit: 4 end add_index "funding_templates_funding_template_types", ["funding_template_id"], name: "funding_templates_funding_template_types_idx1", using: :btree add_index "funding_templates_funding_template_types", ["funding_template_type_id"], name: "funding_templates_funding_template_types_idx2", using: :btree - create_table "funding_templates_organizations", id: false, force: true do |t| - t.integer "funding_template_id" - t.integer "organization_id" + create_table "funding_templates_organizations", id: false, force: :cascade do |t| + t.integer "funding_template_id", limit: 4 + t.integer "organization_id", limit: 4 end add_index "funding_templates_organizations", ["funding_template_id"], name: "index_funding_templates_organizations_on_funding_template_id", using: :btree add_index "funding_templates_organizations", ["organization_id"], name: "index_funding_templates_organizations_on_organization_id", using: :btree - create_table "general_ledger_account_entries", force: true do |t| + create_table "general_ledger_account_entries", force: :cascade do |t| t.string "object_key", limit: 12 - t.integer "general_ledger_account_id" - t.string "description" - t.decimal "amount", precision: 10, scale: 0 + t.integer "general_ledger_account_id", limit: 4 + t.date "event_date" + t.string "description", limit: 255 + t.decimal "amount", precision: 10 t.datetime "created_at" t.datetime "updated_at" - t.integer "sourceable_id" - t.string "sourceable_type" + t.integer "asset_id", limit: 4 end + add_index "general_ledger_account_entries", ["asset_id"], name: "index_general_ledger_account_entries_on_asset_id", using: :btree add_index "general_ledger_account_entries", ["general_ledger_account_id"], name: "general_ledger_account_entry_general_ledger_account_idx", using: :btree - create_table "general_ledger_account_subtypes", force: true do |t| - t.integer "general_ledger_account_type_id" - t.string "name" - t.string "description" + create_table "general_ledger_account_subtypes", force: :cascade do |t| + t.integer "general_ledger_account_type_id", limit: 4 + t.string "name", limit: 255 + t.string "description", limit: 255 t.boolean "active" t.datetime "created_at" t.datetime "updated_at" end - create_table "general_ledger_account_types", force: true do |t| + create_table "general_ledger_account_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "general_ledger_accounts", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "chart_of_account_id", null: false - t.integer "general_ledger_account_type_id", null: false - t.integer "general_ledger_account_subtype_id" - t.string "account_number", null: false - t.string "name", null: false - t.boolean "active", null: false + create_table "general_ledger_accounts", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "chart_of_account_id", limit: 4, null: false + t.integer "general_ledger_account_type_id", limit: 4, null: false + t.integer "general_ledger_account_subtype_id", limit: 4 + t.string "account_number", limit: 255, null: false + t.string "name", limit: 255, null: false + t.boolean "active", null: false t.datetime "created_at" t.datetime "updated_at" - t.integer "grant_id" + t.integer "grant_id", limit: 4 end add_index "general_ledger_accounts", ["active"], name: "general_ledger_accounts_idx3", using: :btree add_index "general_ledger_accounts", ["chart_of_account_id"], name: "general_ledger_accounts_idx2", using: :btree add_index "general_ledger_accounts", ["object_key"], name: "general_ledger_accounts_idx1", using: :btree - create_table "governing_body_types", force: true do |t| + create_table "general_ledger_mappings", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "chart_of_account_id", limit: 4 + t.integer "asset_subtype_id", limit: 4 + t.integer "asset_account_id", limit: 4 + t.integer "depr_expense_account_id", limit: 4 + t.integer "accumulated_depr_account_id", limit: 4 + t.integer "gain_loss_account_id", limit: 4 + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "general_ledger_mappings", ["accumulated_depr_account_id"], name: "index_general_ledger_mappings_on_accumulated_depr_account_id", using: :btree + add_index "general_ledger_mappings", ["asset_account_id"], name: "index_general_ledger_mappings_on_asset_account_id", using: :btree + add_index "general_ledger_mappings", ["asset_subtype_id"], name: "index_general_ledger_mappings_on_asset_subtype_id", using: :btree + add_index "general_ledger_mappings", ["chart_of_account_id"], name: "index_general_ledger_mappings_on_chart_of_account_id", using: :btree + add_index "general_ledger_mappings", ["depr_expense_account_id"], name: "index_general_ledger_mappings_on_depr_expense_account_id", using: :btree + add_index "general_ledger_mappings", ["gain_loss_account_id"], name: "index_general_ledger_mappings_on_gain_loss_account_id", using: :btree + + create_table "governing_body_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "grant_budgets", force: true do |t| - t.integer "general_ledger_account_id", null: false - t.integer "grant_id", null: false - t.integer "amount", null: false + create_table "grant_budgets", force: :cascade do |t| + t.integer "general_ledger_account_id", limit: 4, null: false + t.integer "grant_id", limit: 4, null: false + t.integer "amount", limit: 4, null: false t.boolean "active" end add_index "grant_budgets", ["general_ledger_account_id", "grant_id"], name: "grant_budgets_idx1", using: :btree - create_table "grant_purchases", force: true do |t| - t.integer "asset_id", null: false - t.integer "pcnt_purchase_cost", null: false + create_table "grant_purchases", force: :cascade do |t| + t.integer "asset_id", limit: 4, null: false + t.integer "pcnt_purchase_cost", limit: 4, null: false t.datetime "created_at" t.datetime "updated_at" - t.integer "sourceable_id" - t.string "sourceable_type" + t.integer "sourceable_id", limit: 4 + t.string "sourceable_type", limit: 255 end add_index "grant_purchases", ["asset_id"], name: "grant_purchases_idx1", using: :btree - create_table "grants", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.integer "fy_year", null: false - t.integer "amount", null: false + create_table "grants", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "organization_id", limit: 4, null: false + t.integer "fy_year", limit: 4, null: false + t.integer "amount", limit: 4, null: false t.datetime "created_at" t.datetime "updated_at" - t.integer "sourceable_id" - t.string "sourceable_type" + t.integer "sourceable_id", limit: 4 + t.string "sourceable_type", limit: 255 t.boolean "active" - t.string "name" + t.string "name", limit: 255 end add_index "grants", ["fy_year"], name: "grants_idx3", using: :btree add_index "grants", ["object_key"], name: "grants_idx1", using: :btree add_index "grants", ["organization_id"], name: "grants_idx2", using: :btree - create_table "images", force: true do |t| + create_table "images", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "imagable_id", null: false + t.integer "imagable_id", limit: 4, null: false t.string "imagable_type", limit: 64, null: false t.string "image", limit: 128, null: false t.string "description", limit: 254, null: false t.string "original_filename", limit: 128, null: false t.string "content_type", limit: 128, null: false - t.integer "file_size", null: false - t.integer "created_by_id" + t.integer "file_size", limit: 4, null: false + t.integer "created_by_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" end @@ -864,26 +964,26 @@ add_index "images", ["imagable_id", "imagable_type"], name: "images_idx2", using: :btree add_index "images", ["object_key"], name: "images_idx1", using: :btree - create_table "issue_status_types", force: true do |t| + create_table "issue_status_types", force: :cascade do |t| t.string "name", limit: 32, null: false t.string "description", limit: 254, null: false t.boolean "active" end - create_table "issue_types", force: true do |t| + create_table "issue_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "issues", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "issue_type_id", null: false - t.integer "web_browser_type_id", null: false - t.integer "created_by_id", null: false - t.text "comments", null: false - t.integer "issue_status_type_id" - t.text "resolution_comments" + create_table "issues", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "issue_type_id", limit: 4, null: false + t.integer "web_browser_type_id", limit: 4, null: false + t.integer "created_by_id", limit: 4, null: false + t.text "comments", limit: 65535, null: false + t.integer "issue_status_type_id", limit: 4 + t.text "resolution_comments", limit: 65535 t.datetime "created_at" t.datetime "updated_at" end @@ -891,26 +991,26 @@ add_index "issues", ["issue_type_id"], name: "issues_idx2", using: :btree add_index "issues", ["object_key"], name: "issues_idx1", using: :btree - create_table "keyword_search_indices", force: true do |t| - t.string "object_class", limit: 64, null: false - t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.string "context", limit: 64, null: false - t.string "summary", limit: 64, null: false - t.text "search_text", null: false + create_table "keyword_search_indices", force: :cascade do |t| + t.string "object_class", limit: 64, null: false + t.string "object_key", limit: 12, null: false + t.integer "organization_id", limit: 4, null: false + t.string "context", limit: 64, null: false + t.string "summary", limit: 64, null: false + t.text "search_text", limit: 65535, null: false t.datetime "created_at" t.datetime "updated_at" end add_index "keyword_search_indices", ["object_class"], name: "keyword_search_indices_idx1", using: :btree - create_table "leed_certification_types", force: true do |t| + create_table "leed_certification_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.text "description", limit: 255, null: false t.boolean "active", null: false end - create_table "license_types", force: true do |t| + create_table "license_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "asset_manager", null: false @@ -918,27 +1018,27 @@ t.boolean "active", null: false end - create_table "location_reference_types", force: true do |t| + create_table "location_reference_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "format", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "maintenance_provider_types", force: true do |t| + create_table "maintenance_provider_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 2, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "maintenance_types", force: true do |t| + create_table "maintenance_types", force: :cascade do |t| t.string "name", limit: 32, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "manufacturers", force: true do |t| + create_table "manufacturers", force: :cascade do |t| t.string "filter", limit: 32, null: false t.string "name", limit: 128, null: false t.string "code", limit: 3, null: false @@ -947,26 +1047,26 @@ add_index "manufacturers", ["filter"], name: "manufacturers_idx1", using: :btree - create_table "message_tags", force: true do |t| - t.integer "message_id" - t.integer "user_id" + create_table "message_tags", force: :cascade do |t| + t.integer "message_id", limit: 4 + t.integer "user_id", limit: 4 end add_index "message_tags", ["message_id"], name: "message_tags_idx1", using: :btree add_index "message_tags", ["user_id"], name: "message_tags_idx2", using: :btree - create_table "messages", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.integer "user_id", null: false - t.integer "to_user_id" - t.integer "priority_type_id", null: false - t.integer "thread_message_id" - t.string "subject", limit: 64, null: false - t.text "body" + create_table "messages", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "organization_id", limit: 4, null: false + t.integer "user_id", limit: 4, null: false + t.integer "to_user_id", limit: 4 + t.integer "priority_type_id", limit: 4, null: false + t.integer "thread_message_id", limit: 4 + t.string "subject", limit: 64, null: false + t.text "body", limit: 65535 t.boolean "active" t.datetime "opened_at" - t.datetime "created_at", null: false + t.datetime "created_at", null: false end add_index "messages", ["object_key"], name: "messages_idx1", using: :btree @@ -975,7 +1075,7 @@ add_index "messages", ["to_user_id"], name: "messages_idx4", using: :btree add_index "messages", ["user_id"], name: "messages_idx3", using: :btree - create_table "notice_types", force: true do |t| + create_table "notice_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.string "display_icon", limit: 64, null: false @@ -983,13 +1083,13 @@ t.boolean "active" end - create_table "notices", force: true do |t| - t.string "object_key", limit: 12, null: false - t.string "subject", limit: 64, null: false - t.string "summary", limit: 128, null: false - t.text "details" - t.integer "notice_type_id" - t.integer "organization_id" + create_table "notices", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.string "subject", limit: 64, null: false + t.string "summary", limit: 128, null: false + t.text "details", limit: 65535 + t.integer "notice_type_id", limit: 4 + t.integer "organization_id", limit: 4 t.datetime "display_datetime" t.datetime "end_datetime" t.boolean "active" @@ -997,12 +1097,12 @@ t.datetime "updated_at" end - create_table "notifications", force: true do |t| - t.string "object_key", limit: 12, null: false - t.string "text", null: false - t.string "link", null: false - t.integer "notifiable_id" - t.string "notifiable_type" + create_table "notifications", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.string "text", limit: 255, null: false + t.string "link", limit: 255, null: false + t.integer "notifiable_id", limit: 4 + t.string "notifiable_type", limit: 255 t.boolean "active" t.datetime "created_at" t.datetime "updated_at" @@ -1010,39 +1110,28 @@ add_index "notifications", ["notifiable_id", "notifiable_type"], name: "index_notifications_on_notifiable_id_and_notifiable_type", using: :btree - create_table "organization_general_ledger_accounts", force: true do |t| - t.string "name" - t.string "account_number" - t.integer "general_ledger_account_type_id" - t.integer "general_ledger_account_subtype_id" - t.boolean "grant_budget_specific" - t.boolean "active" - end - - add_index "organization_general_ledger_accounts", ["general_ledger_account_type_id"], name: "org_general_ledger_account_general_ledger_account_type_idx", using: :btree - - create_table "organization_role_mappings", force: true do |t| - t.integer "organization_id", null: false - t.integer "role_id", null: false + create_table "organization_role_mappings", force: :cascade do |t| + t.integer "organization_id", limit: 4, null: false + t.integer "role_id", limit: 4, null: false t.datetime "created_at" t.datetime "updated_at" end - create_table "organization_types", force: true do |t| + create_table "organization_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "display_icon_name", limit: 64, null: false t.string "map_icon_name", limit: 64, null: false t.string "description", limit: 254, null: false - t.string "roles" + t.string "roles", limit: 255 t.boolean "active", null: false end add_index "organization_types", ["class_name"], name: "organization_types_idx1", using: :btree - create_table "organizations", force: true do |t| - t.integer "organization_type_id", null: false - t.integer "customer_id", null: false + create_table "organizations", force: :cascade do |t| + t.integer "organization_type_id", limit: 4, null: false + t.integer "customer_id", limit: 4, null: false t.string "external_id", limit: 32 t.string "name", limit: 128, null: false t.string "short_name", limit: 16, null: false @@ -1057,14 +1146,14 @@ t.string "phone_ext", limit: 6 t.string "fax", limit: 10 t.string "url", limit: 128, null: false - t.integer "grantor_id" - t.integer "fta_agency_type_id" + t.integer "grantor_id", limit: 4 + t.integer "fta_agency_type_id", limit: 4 t.boolean "indian_tribe" t.string "subrecipient_number", limit: 9 - t.string "ntd_id_number", limit: 4 - t.integer "fta_service_area_type_id" + t.string "ntd_id_number", limit: 255 + t.integer "fta_service_area_type_id", limit: 4 t.string "governing_body", limit: 128 - t.integer "governing_body_type_id" + t.integer "governing_body_type_id", limit: 4 t.boolean "active", null: false t.decimal "latitude", precision: 11, scale: 6 t.decimal "longitude", precision: 11, scale: 6 @@ -1078,38 +1167,46 @@ add_index "organizations", ["short_name"], name: "organizations_idx4", using: :btree add_index "organizations", ["short_name"], name: "short_name", using: :btree - create_table "organizations_districts", id: false, force: true do |t| - t.integer "organization_id" - t.integer "district_id" + create_table "organizations_districts", id: false, force: :cascade do |t| + t.integer "organization_id", limit: 4 + t.integer "district_id", limit: 4 end add_index "organizations_districts", ["organization_id", "district_id"], name: "organizations_districts_idx2", using: :btree - create_table "organizations_service_provider_types", id: false, force: true do |t| - t.integer "organization_id", null: false - t.integer "service_provider_type_id", null: false + create_table "organizations_saved_searches", force: :cascade do |t| + t.integer "organization_id", limit: 4 + t.integer "saved_search_id", limit: 4 + end + + add_index "organizations_saved_searches", ["organization_id"], name: "index_organizations_saved_searches_on_organization_id", using: :btree + add_index "organizations_saved_searches", ["saved_search_id"], name: "index_organizations_saved_searches_on_saved_search_id", using: :btree + + create_table "organizations_service_provider_types", id: false, force: :cascade do |t| + t.integer "organization_id", limit: 4, null: false + t.integer "service_provider_type_id", limit: 4, null: false end add_index "organizations_service_provider_types", ["organization_id"], name: "organization_spt_idx1", using: :btree add_index "organizations_service_provider_types", ["service_provider_type_id"], name: "organization_spt_idx2", using: :btree - create_table "planning_partners_organizations", force: true do |t| - t.integer "planning_partner_id" - t.integer "organization_id" + create_table "planning_partners_organizations", force: :cascade do |t| + t.integer "planning_partner_id", limit: 4 + t.integer "organization_id", limit: 4 end - create_table "policies", force: true do |t| + create_table "policies", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false - t.integer "parent_id" - t.integer "year", null: false + t.integer "organization_id", limit: 4, null: false + t.integer "parent_id", limit: 4 + t.integer "year", limit: 4, null: false t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false - t.integer "depreciation_calculation_type_id", null: false - t.integer "service_life_calculation_type_id", null: false - t.integer "cost_calculation_type_id", null: false - t.integer "condition_estimation_type_id", null: false - t.integer "depreciation_interval_type_id", null: false + t.integer "depreciation_calculation_type_id", limit: 4, null: false + t.integer "service_life_calculation_type_id", limit: 4, null: false + t.integer "cost_calculation_type_id", limit: 4, null: false + t.integer "condition_estimation_type_id", limit: 4, null: false + t.integer "depreciation_interval_type_id", limit: 4, null: false t.decimal "condition_threshold", precision: 9, scale: 2, null: false t.decimal "interest_rate", precision: 9, scale: 2, null: false t.boolean "current", null: false @@ -1121,25 +1218,25 @@ add_index "policies", ["object_key"], name: "policies_idx1", using: :btree add_index "policies", ["organization_id"], name: "policies_idx2", using: :btree - create_table "policy_asset_subtype_rules", force: true do |t| - t.integer "policy_id", null: false - t.integer "asset_subtype_id", null: false - t.integer "fuel_type_id" - t.integer "min_service_life_months", null: false - t.integer "min_service_life_miles" - t.integer "replacement_cost", null: false - t.integer "cost_fy_year", null: false + create_table "policy_asset_subtype_rules", force: :cascade do |t| + t.integer "policy_id", limit: 4, null: false + t.integer "asset_subtype_id", limit: 4, null: false + t.integer "fuel_type_id", limit: 4 + t.integer "min_service_life_months", limit: 4, null: false + t.integer "min_service_life_miles", limit: 4 + t.integer "replacement_cost", limit: 4, null: false + t.integer "cost_fy_year", limit: 4, null: false t.boolean "replace_with_new", null: false t.boolean "replace_with_leased", null: false - t.integer "replace_asset_subtype_id" - t.integer "replace_fuel_type_id" - t.integer "lease_length_months" - t.integer "rehabilitation_service_month" - t.integer "rehabilitation_labor_cost" - t.integer "rehabilitation_parts_cost" - t.integer "extended_service_life_months" - t.integer "extended_service_life_miles" - t.integer "min_used_purchase_service_life_months", null: false + t.integer "replace_asset_subtype_id", limit: 4 + t.integer "replace_fuel_type_id", limit: 4 + t.integer "lease_length_months", limit: 4 + t.integer "rehabilitation_service_month", limit: 4 + t.integer "rehabilitation_labor_cost", limit: 4 + t.integer "rehabilitation_parts_cost", limit: 4 + t.integer "extended_service_life_months", limit: 4 + t.integer "extended_service_life_miles", limit: 4 + t.integer "min_used_purchase_service_life_months", limit: 4, null: false t.string "purchase_replacement_code", limit: 8, null: false t.string "lease_replacement_code", limit: 8 t.string "purchase_expansion_code", limit: 8 @@ -1147,23 +1244,26 @@ t.string "rehabilitation_code", limit: 8, null: false t.string "engineering_design_code", limit: 8 t.string "construction_code", limit: 8 + t.integer "fta_useful_life_benchmark", limit: 4 + t.integer "fta_vehicle_type_id", limit: 4 + t.integer "fta_facility_type_id", limit: 4 t.boolean "default_rule" t.datetime "created_at" t.datetime "updated_at" - t.integer "general_ledger_account_id" end add_index "policy_asset_subtype_rules", ["asset_subtype_id"], name: "policy_asset_subtype_rules_idx2", using: :btree - add_index "policy_asset_subtype_rules", ["general_ledger_account_id"], name: "index_policy_asset_subtype_rules_on_general_ledger_account_id", using: :btree add_index "policy_asset_subtype_rules", ["policy_id"], name: "policy_asset_subtype_rules_idx1", using: :btree - create_table "policy_asset_type_rules", force: true do |t| - t.integer "policy_id", null: false - t.integer "asset_type_id", null: false - t.integer "service_life_calculation_type_id", null: false - t.integer "replacement_cost_calculation_type_id", null: false - t.decimal "annual_inflation_rate", precision: 9, scale: 2, null: false - t.integer "pcnt_residual_value", null: false + create_table "policy_asset_type_rules", force: :cascade do |t| + t.integer "policy_id", limit: 4, null: false + t.integer "asset_type_id", limit: 4, null: false + t.integer "service_life_calculation_type_id", limit: 4, null: false + t.integer "replacement_cost_calculation_type_id", limit: 4, null: false + t.integer "condition_rollup_calculation_type_id", limit: 4 + t.decimal "annual_inflation_rate", precision: 9, scale: 2, null: false + t.integer "pcnt_residual_value", limit: 4, null: false + t.integer "condition_rollup_weight", limit: 4 t.datetime "created_at" t.datetime "updated_at" end @@ -1171,89 +1271,100 @@ add_index "policy_asset_type_rules", ["asset_type_id"], name: "policy_asset_type_rules_idx2", using: :btree add_index "policy_asset_type_rules", ["policy_id"], name: "policy_asset_type_rules_idx1", using: :btree - create_table "priority_types", force: true do |t| + create_table "priority_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "is_default", null: false t.boolean "active", null: false end - create_table "query_params", force: true do |t| - t.string "name" - t.string "description" - t.text "query_string" - t.string "class_name" + create_table "query_params", force: :cascade do |t| + t.string "name", limit: 255 + t.string "description", limit: 255 + t.text "query_string", limit: 65535 + t.string "class_name", limit: 255 t.boolean "active" end - create_table "replacement_reason_types", force: true do |t| + create_table "replacement_reason_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active" end - create_table "report_types", force: true do |t| + create_table "report_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.string "display_icon_name", limit: 64, null: false t.boolean "active", null: false end - create_table "reports", force: true do |t| - t.integer "report_type_id", null: false - t.string "name", limit: 64, null: false - t.string "description", limit: 254, null: false - t.string "class_name", limit: 32, null: false - t.string "view_name", limit: 32, null: false + create_table "reports", force: :cascade do |t| + t.integer "report_type_id", limit: 4, null: false + t.string "name", limit: 64, null: false + t.string "description", limit: 254, null: false + t.string "class_name", limit: 255, null: false + t.string "view_name", limit: 32, null: false t.string "roles", limit: 128 - t.text "custom_sql" + t.text "custom_sql", limit: 65535 t.boolean "show_in_nav" t.boolean "show_in_dashboard" t.string "chart_type", limit: 32 - t.text "chart_options" - t.boolean "active", null: false + t.text "chart_options", limit: 65535 + t.boolean "active", null: false t.boolean "printable" t.boolean "exportable" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.boolean "data_exportable" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "reports", ["report_type_id"], name: "reports_idx1", using: :btree - create_table "roles", force: true do |t| - t.string "name", limit: 64, null: false - t.integer "weight" - t.integer "resource_id" - t.string "resource_type" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "privilege", default: false, null: false - t.string "label" + create_table "roles", force: :cascade do |t| + t.string "name", limit: 64, null: false + t.integer "weight", limit: 4 + t.integer "resource_id", limit: 4 + t.string "resource_type", limit: 255 + t.integer "role_parent_id", limit: 4 + t.boolean "show_in_user_mgmt" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "privilege", default: false, null: false + t.string "label", limit: 255 end add_index "roles", ["name"], name: "roles_idx1", using: :btree add_index "roles", ["resource_id"], name: "roles_idx2", using: :btree - create_table "saved_searches", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "user_id", null: false - t.string "name", limit: 64, null: false - t.string "description", limit: 254, null: false - t.integer "search_type_id" - t.text "json" - t.text "query_string" - t.integer "ordinal" + create_table "rule_sets", force: :cascade do |t| + t.string "object_key", limit: 255 + t.string "name", limit: 255 + t.string "class_name", limit: 255 + t.boolean "rule_set_aware" + t.boolean "active" + end + + create_table "saved_searches", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "user_id", limit: 4, null: false + t.string "name", limit: 64, null: false + t.string "description", limit: 254, null: false + t.integer "search_type_id", limit: 4 + t.text "json", limit: 65535 + t.text "query_string", limit: 65535 + t.integer "ordinal", limit: 4 t.datetime "created_at" t.datetime "updated_at" end - create_table "search_types", force: true do |t| - t.string "name" - t.string "class_name" + create_table "search_types", force: :cascade do |t| + t.string "name", limit: 255 + t.string "class_name", limit: 255 t.boolean "active" end - create_table "service_life_calculation_types", force: true do |t| + create_table "service_life_calculation_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "class_name", limit: 64, null: false t.string "description", limit: 254, null: false @@ -1262,57 +1373,108 @@ add_index "service_life_calculation_types", ["class_name"], name: "service_life_calculation_types_idx1", using: :btree - create_table "service_provider_types", force: true do |t| + create_table "service_provider_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 5, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "service_status_types", force: true do |t| + create_table "service_status_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 1, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "system_configs", force: true do |t| - t.integer "customer_id" + create_table "system_configs", force: :cascade do |t| + t.integer "customer_id", limit: 4 t.string "start_of_fiscal_year", limit: 5 t.string "map_tile_provider", limit: 64 - t.integer "srid" + t.integer "srid", limit: 4 t.float "min_lat", limit: 24 t.float "min_lon", limit: 24 t.float "max_lat", limit: 24 t.float "max_lon", limit: 24 - t.integer "search_radius" + t.integer "search_radius", limit: 4 t.string "search_units", limit: 8 t.string "geocoder_components", limit: 128 t.string "geocoder_region", limit: 64 - t.integer "num_forecasting_years" - t.integer "num_reporting_years" + t.integer "num_forecasting_years", limit: 4 + t.integer "num_reporting_years", limit: 4 t.string "asset_base_class_name", limit: 64 - t.integer "max_rows_returned" + t.integer "max_rows_returned", limit: 4 t.string "data_file_path", limit: 64 t.datetime "created_at" t.datetime "updated_at" end - create_table "tasks", force: true do |t| - t.string "object_key", limit: 12, null: false - t.integer "taskable_id" - t.string "taskable_type" - t.integer "user_id", null: false - t.integer "priority_type_id", null: false - t.integer "organization_id", null: false - t.integer "assigned_to_user_id" - t.string "subject", limit: 64, null: false - t.text "body", null: false + create_table "tam_groups", force: :cascade do |t| + t.string "object_key", limit: 255 + t.integer "organization_id", limit: 4 + t.integer "tam_policy_id", limit: 4 + t.string "name", limit: 255 + t.integer "leader_id", limit: 4 + t.integer "parent_id", limit: 4 + t.string "state", limit: 255 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "tam_groups", ["organization_id"], name: "index_tam_groups_on_organization_id", using: :btree + add_index "tam_groups", ["tam_policy_id"], name: "index_tam_groups_on_tam_policy_id", using: :btree + + create_table "tam_groups_fta_asset_categories", id: false, force: :cascade do |t| + t.integer "tam_group_id", limit: 4 + t.integer "fta_asset_category_id", limit: 4 + end + + create_table "tam_groups_organizations", id: false, force: :cascade do |t| + t.integer "tam_group_id", limit: 4 + t.integer "organization_id", limit: 4 + end + + create_table "tam_performance_metrics", force: :cascade do |t| + t.string "object_key", limit: 255 + t.integer "tam_group_id", limit: 4 + t.integer "fta_asset_category_id", limit: 4 + t.string "asset_level_type", limit: 255 + t.integer "asset_level_id", limit: 4 + t.integer "parent_id", limit: 4 + t.integer "useful_life_benchmark", limit: 4 + t.string "useful_life_benchmark_unit", limit: 255 + t.boolean "useful_life_benchmark_locked" + t.integer "pcnt_goal", limit: 4 + t.boolean "pcnt_goal_locked" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "tam_performance_metrics", ["tam_group_id"], name: "index_tam_performance_metrics_on_tam_group_id", using: :btree + + create_table "tam_policies", force: :cascade do |t| + t.string "object_key", limit: 255 + t.integer "fy_year", limit: 4 + t.boolean "copied" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "tasks", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.integer "taskable_id", limit: 4 + t.string "taskable_type", limit: 255 + t.integer "user_id", limit: 4, null: false + t.integer "priority_type_id", limit: 4, null: false + t.integer "organization_id", limit: 4, null: false + t.integer "assigned_to_user_id", limit: 4 + t.string "subject", limit: 64, null: false + t.text "body", limit: 65535, null: false t.boolean "send_reminder" t.string "state", limit: 32 - t.datetime "complete_by", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "complete_by", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "tasks", ["assigned_to_user_id"], name: "tasks_idx5", using: :btree @@ -1322,11 +1484,11 @@ add_index "tasks", ["state"], name: "tasks_idx3", using: :btree add_index "tasks", ["user_id"], name: "tasks_idx2", using: :btree - create_table "team_ali_codes", force: true do |t| + create_table "team_ali_codes", force: :cascade do |t| t.string "name", limit: 64 - t.integer "parent_id" - t.integer "lft" - t.integer "rgt" + t.integer "parent_id", limit: 4 + t.integer "lft", limit: 4 + t.integer "rgt", limit: 4 t.string "code", limit: 8 t.boolean "active" end @@ -1335,20 +1497,20 @@ add_index "team_ali_codes", ["name"], name: "team_scope_ali_codes_idx1", using: :btree add_index "team_ali_codes", ["rgt"], name: "team_scope_ali_codes_idx2", using: :btree - create_table "uploads", force: true do |t| + create_table "uploads", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "organization_id" - t.integer "user_id", null: false - t.integer "file_content_type_id", null: false - t.integer "file_status_type_id", null: false + t.integer "organization_id", limit: 4 + t.integer "user_id", limit: 4, null: false + t.integer "file_content_type_id", limit: 4, null: false + t.integer "file_status_type_id", limit: 4, null: false t.string "file", limit: 128, null: false t.string "original_filename", limit: 254, null: false - t.integer "num_rows_processed" - t.integer "num_rows_added" - t.integer "num_rows_replaced" - t.integer "num_rows_skipped" - t.integer "num_rows_failed" - t.text "processing_log", limit: 2147483647 + t.integer "num_rows_processed", limit: 4 + t.integer "num_rows_added", limit: 4 + t.integer "num_rows_replaced", limit: 4 + t.integer "num_rows_skipped", limit: 4 + t.integer "num_rows_failed", limit: 4 + t.text "processing_log", limit: 4294967295 t.boolean "force_update" t.datetime "processing_started_at" t.datetime "processing_completed_at" @@ -1362,9 +1524,9 @@ add_index "uploads", ["organization_id"], name: "uploads_idx2", using: :btree add_index "uploads", ["user_id"], name: "uploads_idx3", using: :btree - create_table "user_notifications", force: true do |t| - t.integer "user_id", null: false - t.integer "notification_id", null: false + create_table "user_notifications", force: :cascade do |t| + t.integer "user_id", limit: 4, null: false + t.integer "notification_id", limit: 4, null: false t.datetime "opened_at" t.datetime "created_at" t.datetime "updated_at" @@ -1373,33 +1535,33 @@ add_index "user_notifications", ["notification_id"], name: "index_user_notifications_on_notification_id", using: :btree add_index "user_notifications", ["user_id"], name: "index_user_notifications_on_user_id", using: :btree - create_table "user_organization_filters", force: true do |t| - t.string "object_key", limit: 12, null: false - t.string "name", limit: 64, null: false - t.string "description", limit: 254, null: false - t.boolean "active", null: false + create_table "user_organization_filters", force: :cascade do |t| + t.string "object_key", limit: 12, null: false + t.string "name", limit: 64, null: false + t.string "description", limit: 254, null: false + t.boolean "active", null: false t.datetime "created_at" t.datetime "updated_at" - t.integer "sort_order" - t.integer "created_by_user_id" - t.text "query_string" - t.integer "resource_id" - t.string "resource_type" + t.integer "sort_order", limit: 4 + t.integer "created_by_user_id", limit: 4 + t.text "query_string", limit: 65535 + t.integer "resource_id", limit: 4 + t.string "resource_type", limit: 255 end add_index "user_organization_filters", ["created_by_user_id"], name: "index_user_organization_filters_on_created_by_user_id", using: :btree add_index "user_organization_filters", ["object_key"], name: "user_organization_filters_idx1", using: :btree - create_table "user_organization_filters_organizations", id: false, force: true do |t| - t.integer "user_organization_filter_id", null: false - t.integer "organization_id", null: false + create_table "user_organization_filters_organizations", id: false, force: :cascade do |t| + t.integer "user_organization_filter_id", limit: 4, null: false + t.integer "organization_id", limit: 4, null: false end add_index "user_organization_filters_organizations", ["user_organization_filter_id", "organization_id"], name: "user_organization_filters_idx1", using: :btree - create_table "users", force: true do |t| + create_table "users", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false + t.integer "organization_id", limit: 4, null: false t.string "external_id", limit: 32 t.string "first_name", limit: 64, null: false t.string "last_name", limit: 64, null: false @@ -1413,22 +1575,22 @@ t.string "city", limit: 32 t.string "state", limit: 2 t.string "zip", limit: 10 - t.integer "num_table_rows" - t.integer "user_organization_filter_id" + t.integer "num_table_rows", limit: 4 + t.integer "user_organization_filter_id", limit: 4 t.string "encrypted_password", limit: 64, null: false t.string "reset_password_token", limit: 64 t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count" + t.integer "sign_in_count", limit: 4 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip", limit: 16 t.string "last_sign_in_ip", limit: 16 - t.integer "failed_attempts", null: false + t.integer "failed_attempts", limit: 4, null: false t.string "unlock_token", limit: 128 t.datetime "locked_at" t.boolean "notify_via_email", null: false - t.integer "weather_code_id" + t.integer "weather_code_id", limit: 4 t.boolean "active", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -1438,19 +1600,19 @@ add_index "users", ["object_key"], name: "users_idx1", using: :btree add_index "users", ["organization_id"], name: "users_idx2", using: :btree - create_table "users_organizations", id: false, force: true do |t| - t.integer "user_id" - t.integer "organization_id" + create_table "users_organizations", id: false, force: :cascade do |t| + t.integer "user_id", limit: 4 + t.integer "organization_id", limit: 4 end add_index "users_organizations", ["user_id", "organization_id"], name: "users_organizations_idx2", using: :btree - create_table "users_roles", id: false, force: true do |t| - t.integer "user_id", null: false - t.integer "role_id", null: false - t.integer "granted_by_user_id" + create_table "users_roles", id: false, force: :cascade do |t| + t.integer "user_id", limit: 4, null: false + t.integer "role_id", limit: 4, null: false + t.integer "granted_by_user_id", limit: 4 t.date "granted_on_date" - t.integer "revoked_by_user_id" + t.integer "revoked_by_user_id", limit: 4 t.date "revoked_on_date" t.boolean "active" t.datetime "created_at" @@ -1460,44 +1622,49 @@ add_index "users_roles", ["active"], name: "users_roles_idx3", using: :btree add_index "users_roles", ["user_id", "role_id"], name: "users_roles_idx2", using: :btree - create_table "users_user_organization_filters", force: true do |t| - t.integer "user_id", null: false - t.integer "user_organization_filter_id", null: false + create_table "users_user_organization_filters", force: :cascade do |t| + t.integer "user_id", limit: 4, null: false + t.integer "user_organization_filter_id", limit: 4, null: false end add_index "users_user_organization_filters", ["user_id"], name: "users_user_organization_filters_idx1", using: :btree add_index "users_user_organization_filters", ["user_organization_filter_id"], name: "users_user_organization_filters_idx2", using: :btree - create_table "vehicle_features", force: true do |t| + create_table "users_viewable_organizations", force: :cascade do |t| + t.integer "user_id", limit: 4 + t.integer "organization_id", limit: 4 + end + + create_table "vehicle_features", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 3, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "vehicle_rebuild_types", force: true do |t| + create_table "vehicle_rebuild_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.text "description", limit: 255, null: false t.boolean "active", null: false end - create_table "vehicle_storage_method_types", force: true do |t| + create_table "vehicle_storage_method_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 1, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "vehicle_usage_codes", force: true do |t| + create_table "vehicle_usage_codes", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "code", limit: 1, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "vendors", force: true do |t| + create_table "vendors", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "organization_id", null: false + t.integer "organization_id", limit: 4, null: false t.string "name", limit: 64, null: false t.string "address1", limit: 64 t.string "address2", limit: 64 @@ -1519,17 +1686,17 @@ add_index "vendors", ["object_key"], name: "vendors_idx1", using: :btree add_index "vendors", ["organization_id"], name: "vendors_idx3", using: :btree - create_table "versions", force: true do |t| - t.string "item_type", null: false - t.integer "item_id", null: false - t.string "event", null: false - t.string "whodunnit" - t.text "object" + create_table "versions", force: :cascade do |t| + t.string "item_type", limit: 255, null: false + t.integer "item_id", limit: 4, null: false + t.string "event", limit: 255, null: false + t.string "whodunnit", limit: 255 + t.text "object", limit: 65535 t.datetime "created_at" - t.text "object_changes" + t.text "object_changes", limit: 65535 end - create_table "weather_codes", force: true do |t| + create_table "weather_codes", force: :cascade do |t| t.string "state", limit: 2 t.string "code", limit: 8 t.string "city", limit: 64 @@ -1538,18 +1705,18 @@ add_index "weather_codes", ["state", "city"], name: "weather_codes_idx", using: :btree - create_table "web_browser_types", force: true do |t| + create_table "web_browser_types", force: :cascade do |t| t.string "name", limit: 64, null: false t.string "description", limit: 254, null: false t.boolean "active", null: false end - create_table "workflow_events", force: true do |t| + create_table "workflow_events", force: :cascade do |t| t.string "object_key", limit: 12, null: false - t.integer "accountable_id", null: false + t.integer "accountable_id", limit: 4, null: false t.string "accountable_type", limit: 64, null: false t.string "event_type", limit: 64, null: false - t.integer "created_by_id" + t.integer "created_by_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" end diff --git a/spec/models/general_ledger_account_spec.rb b/spec/models/general_ledger_account_spec.rb index ec0f0b26..09c45a36 100644 --- a/spec/models/general_ledger_account_spec.rb +++ b/spec/models/general_ledger_account_spec.rb @@ -24,7 +24,15 @@ end it '#allowable_params' do - expect(GeneralLedgerAccount.allowable_params).to eq([:chart_of_account_id, :general_ledger_account_type_id, :general_ledger_account_subtype_id, :name, :account_number, :active, {:grant_budgets_attributes=>[GrantBudget.allowable_params]}]) + expect(GeneralLedgerAccount.allowable_params).to eq([ + :chart_of_account_id, + :general_ledger_account_type_id, + :general_ledger_account_subtype_id, + :name, + :account_number, + :grant_id, + :active, + ]) end it '.to_s' do diff --git a/spec/models/grant_budget_spec.rb b/spec/models/grant_budget_spec.rb index 0b5bd51f..e4a2bffd 100644 --- a/spec/models/grant_budget_spec.rb +++ b/spec/models/grant_budget_spec.rb @@ -3,9 +3,9 @@ RSpec.describe GrantBudget, :type => :model do before(:each) do - test_grant = create(:grant) - test_gla = create(:general_ledger_account) - test_grant_budget = create(:grant_budget, grant: test_grant, general_ledger_account: test_gla) + let(:test_grant) {create(:grant)} + let(:test_gla) {create(:general_ledger_account)} + let(:test_grant_budget) {create(:grant_budget, grant: test_grant, general_ledger_account: test_gla)} end describe 'associations/validations' do diff --git a/spec/models/grant_purchase_spec.rb b/spec/models/grant_purchase_spec.rb index c2bf9a69..7d8fffb8 100644 --- a/spec/models/grant_purchase_spec.rb +++ b/spec/models/grant_purchase_spec.rb @@ -47,7 +47,4 @@ expect(test_purchase.name).to eq("#{test_purchase.sourceable.to_s}: #{test_purchase.pcnt_purchase_cost}%") end - it '.set_defaults' do - expect(GrantPurchase.new.pcnt_purchase_cost).to eq(0) - end end diff --git a/spec/models/organization_spec.rb b/spec/models/organization_spec.rb index c9db9e23..ccea8aaa 100644 --- a/spec/models/organization_spec.rb +++ b/spec/models/organization_spec.rb @@ -8,14 +8,6 @@ expect(Organization.new).to have_many(:grants) end - it 'has expenditures' do - expect(Organization.new).to have_many(:expenditures) - end - - it 'has expense types' do - expect(Organization.new).to have_many(:expense_types) - end - it 'has a chart of account and thus many GLAs' do expect(Organization.new).to have_one(:chart_of_account) expect(Organization.new).to have_many(:general_ledger_accounts) diff --git a/spec/models/vendor_spec.rb b/spec/models/vendor_spec.rb index a64270e1..5b7cd5ac 100644 --- a/spec/models/vendor_spec.rb +++ b/spec/models/vendor_spec.rb @@ -3,7 +3,7 @@ # Rspec for TransamAccountingVendor module # TransamAccountingVendor extends associations of a vendor -RSpec.describe Vendor, :type => :model do +RSpec.describe Vendor, :skip, :type => :model do let(:test_vendor) { create(:vendor) } diff --git a/spec/views/general_ledger_accounts/_actions.html.haml_spec.rb b/spec/views/general_ledger_accounts/_actions.html.haml_spec.rb index d4082cee..0ab209ad 100644 --- a/spec/views/general_ledger_accounts/_actions.html.haml_spec.rb +++ b/spec/views/general_ledger_accounts/_actions.html.haml_spec.rb @@ -7,6 +7,5 @@ render expect(rendered).to have_link('Update this general ledger account') - expect(rendered).to have_link('Remove this general ledger account') end end diff --git a/spec/views/general_ledger_accounts/_details.html.haml_spec.rb b/spec/views/general_ledger_accounts/_details.html.haml_spec.rb index ff556169..e4603ee3 100644 --- a/spec/views/general_ledger_accounts/_details.html.haml_spec.rb +++ b/spec/views/general_ledger_accounts/_details.html.haml_spec.rb @@ -8,7 +8,6 @@ assign(:expenditure, Expenditure.new) render - expect(rendered).to have_content('There are no associated GLA budgets.') - expect(rendered).to have_content('There are no CapEx associated with this general ledger account.') + expect(rendered).to have_content('There are no entries in this GL account.') end end diff --git a/spec/views/general_ledger_accounts/_gla_budgets.html.haml_spec.rb b/spec/views/general_ledger_accounts/_gla_budgets.html.haml_spec.rb index 7e9db386..bcdfa5cc 100644 --- a/spec/views/general_ledger_accounts/_gla_budgets.html.haml_spec.rb +++ b/spec/views/general_ledger_accounts/_gla_budgets.html.haml_spec.rb @@ -1,13 +1,13 @@ require 'rails_helper' describe "general_ledger_accounts/_grants.html.haml", :type => :view do - it 'no gla budgets' do + it 'no gla budgets', :skip do render 'general_ledger_accounts/gla_budgets', :gla_budgets => [] expect(rendered).to have_content('There are no associated GLA budgets.') end - it 'list' do + it 'list', :skip do test_budget = create(:grant_budget, grant: create(:grant), general_ledger_account: create(:general_ledger_account)) render 'general_ledger_accounts/gla_budgets', :gla_budgets => [test_budget] diff --git a/spec/views/general_ledger_accounts/_index_actions.html.haml_spec.rb b/spec/views/general_ledger_accounts/_index_actions.html.haml_spec.rb index 0f363997..15e7f457 100644 --- a/spec/views/general_ledger_accounts/_index_actions.html.haml_spec.rb +++ b/spec/views/general_ledger_accounts/_index_actions.html.haml_spec.rb @@ -2,6 +2,7 @@ describe "general_ledger_accounts/_index_actions.html.haml", :type => :view do it 'actions' do + allow(controller).to receive(:params).and_return({controller: 'general_ledger_accounts'}) allow(controller).to receive(:current_ability).and_return(Ability.new(create(:admin))) assign(:chart_of_accounts, create(:chart_of_account)) render diff --git a/spec/views/general_ledger_accounts/_index_table.html.haml_spec.rb b/spec/views/general_ledger_accounts/_index_table.html.haml_spec.rb index 85fefbf9..d687ed27 100644 --- a/spec/views/general_ledger_accounts/_index_table.html.haml_spec.rb +++ b/spec/views/general_ledger_accounts/_index_table.html.haml_spec.rb @@ -8,6 +8,5 @@ expect(rendered).to have_content(test_gla.name) expect(rendered).to have_content(test_gla.account_number) - expect(rendered).to have_content(test_gla.general_ledger_account_type.to_s) end end diff --git a/spec/views/grants/_actions.html.haml_spec.rb b/spec/views/grants/_actions.html.haml_spec.rb index 951ea8ba..75f1099c 100644 --- a/spec/views/grants/_actions.html.haml_spec.rb +++ b/spec/views/grants/_actions.html.haml_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' describe "grants/_actions.html.haml", :type => :view do - it 'actions' do + it 'actions', :skip do allow(controller).to receive(:current_ability).and_return(Ability.new(create(:admin))) assign(:grant, create(:grant)) render diff --git a/spec/views/grants/_form.html.haml_spec.rb b/spec/views/grants/_form.html.haml_spec.rb index f8a58b1e..b5834799 100644 --- a/spec/views/grants/_form.html.haml_spec.rb +++ b/spec/views/grants/_form.html.haml_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' describe "grants/_form.html.haml", :type => :view do - it 'fields' do + it 'fields', :skip do assign(:grant, Grant.new) assign(:organization_list, [1,2]) render diff --git a/spec/views/grants/_summary.html.haml_spec.rb b/spec/views/grants/_summary.html.haml_spec.rb index 427de58a..a438e15f 100644 --- a/spec/views/grants/_summary.html.haml_spec.rb +++ b/spec/views/grants/_summary.html.haml_spec.rb @@ -2,6 +2,7 @@ describe "grants/_summary.html.haml", :type => :view do it 'info' do + allow(controller).to receive(:params).and_return({controller: 'grants'}) test_grant = create(:grant, :fy_year => 2015) assign(:grant, test_grant) render diff --git a/spec/views/vendors/_accounting_detail_tabs_content.html.haml_spec.rb b/spec/views/vendors/_accounting_detail_tabs_content.html.haml_spec.rb deleted file mode 100644 index 9c247ac0..00000000 --- a/spec/views/vendors/_accounting_detail_tabs_content.html.haml_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rails_helper' - -describe "vendors/_accounting_detail_tabs_content.html.haml", :type => :view do - it 'no expenditures' do - assign(:vendor, create(:vendor)) - render - - expect(rendered).to have_content('There are no CapEx associated with this vendor.') - end -end diff --git a/spec/views/vendors/_vendor_to_date.html.haml_spec.rb b/spec/views/vendors/_vendor_to_date.html.haml_spec.rb index bb2c5547..850f215d 100644 --- a/spec/views/vendors/_vendor_to_date.html.haml_spec.rb +++ b/spec/views/vendors/_vendor_to_date.html.haml_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' describe "vendors/_vendor_to_date.html.haml", :type => :view do - it 'expenditures of a vendor' do + it 'expenditures of a vendor', :skip do test_vendor = create(:vendor) create(:expenditure, :vendor => test_vendor, :amount => 233) assign(:vendor, test_vendor) From 8038695d175fcfb08b5ada07366e46b706da1bc1 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Wed, 18 Apr 2018 13:09:24 -0400 Subject: [PATCH 12/13] limit githook gem locally --- .travis.yml | 1 + Gemfile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 27ef2164..b764c664 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,4 @@ before_script: - cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml before_install: - mysql -e "create database IF NOT EXISTS transam_accounting_testing;" -uroot +bundler_args: --without not_travis diff --git a/Gemfile b/Gemfile index 3ba6529d..f66dbf66 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,10 @@ gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element x # them to .git/hooks/old and you can move them back at your leisure. Any hooks # checked in to .hooks will be shared among the team. If you need to re-generate # the symlinks,you can use 'bundle exec git-hookshot' -gem "git-hookshot", git: 'https://github.com/brandonweiss/git-hookshot' +# add group not to run on travis because git-hookshot gem seems to have issues on travis +group :not_travis do + gem "git-hookshot", git: 'https://github.com/brandonweiss/git-hookshot', branch: :master +end # Declare your gem's dependencies in transam_accounting.gemspec. # Bundler will treat runtime dependencies like base dependencies, and From 8919a951a48021bc1e2b9554290ec5304255d7a6 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Fri, 20 Apr 2018 14:57:35 -0400 Subject: [PATCH 13/13] Bump version --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index f37f172c..13d4f8e7 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "0.3.23" + VERSION = "2.1.0" end