From b7c3b04c7494d4a6acb364704add4b5dbb612a7a Mon Sep 17 00:00:00 2001 From: cktricky Date: Tue, 22 Oct 2013 00:58:48 -0400 Subject: [PATCH 1/3] this seems to have fixed a nuisance error within our unit-tests. Issue #57 --- app/models/benefits.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/models/benefits.rb b/app/models/benefits.rb index 92bbdf3..ac748c9 100644 --- a/app/models/benefits.rb +++ b/app/models/benefits.rb @@ -10,15 +10,16 @@ class Benefits < ActiveRecord::Base make_backup(file, data_path, full_file_name) if backup == "true" end - def self.make_backup(file, data_path, full_file_name) - system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") - # FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.now.to_i}_#{file.original_filename}" - end + def self.make_backup(*params) + if File.exists?(full_file_name) + system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") + end + end =begin - def self.make_backup(file, data_path, full_file_name) - FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.now.to_i}_#{file.original_filename}" - end + def self.make_backup(file, data_path, full_file_name) + FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.now.to_i}_#{file.original_filename}" + end =end end From 3820b780660f61ad0c92d2f6d96e813c8d8c24ea Mon Sep 17 00:00:00 2001 From: Mike McCabe Date: Tue, 22 Oct 2013 10:16:09 -0400 Subject: [PATCH 2/3] fixing this function that was not explicitly using the params --- app/models/benefits.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/benefits.rb b/app/models/benefits.rb index ac748c9..985b8cc 100644 --- a/app/models/benefits.rb +++ b/app/models/benefits.rb @@ -10,7 +10,7 @@ class Benefits < ActiveRecord::Base make_backup(file, data_path, full_file_name) if backup == "true" end - def self.make_backup(*params) + def self.make_backup(file, data_path, full_file_name) if File.exists?(full_file_name) system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") end From bd066068ff2fd63a0edeede010167cfa63a03aff Mon Sep 17 00:00:00 2001 From: Al Snow Date: Sun, 20 Oct 2013 10:42:30 -0400 Subject: [PATCH 3/3] Upgraded Rails from 3.2.13 to 3.2.15. Removed unneeded "~>" gem numbers in Gemfile. --- Gemfile | 8 +-- Gemfile.lock | 195 ++++++++++++++++++++++++++------------------------- 2 files changed, 105 insertions(+), 98 deletions(-) mode change 100755 => 100644 Gemfile.lock diff --git a/Gemfile b/Gemfile index b07d1c3..c3836db 100755 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rails', '3.2.13' +gem 'rails', '3.2.15' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' @@ -37,13 +37,13 @@ end # Gems used only for assets and not required # in production environments by default. group :assets do - gem 'sass-rails', '~> 3.2.3' - gem 'coffee-rails', '~> 3.2.1' + gem 'sass-rails' + gem 'coffee-rails' gem 'jquery-fileupload-rails' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby - gem 'uglifier', '>= 1.0.3' + gem 'uglifier' end diff --git a/Gemfile.lock b/Gemfile.lock old mode 100755 new mode 100644 index 66398cd..92d0f04 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.13) - actionpack (= 3.2.13) - mail (~> 2.5.3) - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) + actionmailer (3.2.15) + actionpack (= 3.2.15) + mail (~> 2.5.4) + actionpack (3.2.15) + activemodel (= 3.2.15) + activesupport (= 3.2.15) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,19 +14,19 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) + activemodel (3.2.15) + activesupport (= 3.2.15) builder (~> 3.0.0) - activerecord (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) + activerecord (3.2.15) + activemodel (= 3.2.15) + activesupport (= 3.2.15) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - activesupport (3.2.13) - i18n (= 0.6.1) + activeresource (3.2.15) + activemodel (= 3.2.15) + activesupport (= 3.2.15) + activesupport (3.2.15) + i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) addressable (2.3.5) arel (3.0.2) @@ -34,25 +34,25 @@ GEM childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) - bcrypt-ruby (3.0.1) + bcrypt-ruby (3.1.2) better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - brakeman (1.9.5) + brakeman (2.1.2) erubis (~> 2.6) fastercsv (~> 1.5) haml (>= 3.0, < 5.0) - highline (~> 1.6) + highline (~> 1.6.19) multi_json (~> 1.2) - ruby2ruby (= 2.0.3) - ruby_parser (~> 3.1.1) + ruby2ruby (~> 2.0.5) + ruby_parser (~> 3.2.2) sass (~> 3.0) - slim (~> 1.3.6) + slim (>= 1.3.6, < 3.0) terminal-table (~> 1.4) builder (3.0.4) - bundler-audit (0.1.2) + bundler-audit (0.2.0) bundler (~> 1.2) capybara (2.1.0) mime-types (>= 1.16) @@ -60,89 +60,92 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) + celluloid (0.15.2) + timers (~> 1.1.0) childprocess (0.3.9) ffi (~> 1.0, >= 1.0.11) cliver (0.2.2) - coderay (1.0.9) + coderay (1.1.0) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.6.2) - cucumber (1.3.2) + coffee-script-source (1.6.3) + cucumber (1.3.8) builder (>= 2.1.2) diff-lcs (>= 1.1.3) - gherkin (~> 2.12.0) - multi_json (~> 1.3) + gherkin (~> 2.12.1) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.0.2) database_cleaner (1.0.1) debug_inspector (0.0.2) diff-lcs (1.2.4) + dotenv (0.9.0) em-websocket (0.5.0) eventmachine (>= 0.12.9) http_parser.rb (~> 0.5.3) erubis (2.7.0) eventmachine (1.0.3) - execjs (1.4.0) - multi_json (~> 1.0) + execjs (2.0.2) fastercsv (1.5.5) ffi (1.9.0) - foreman (0.62.0) + foreman (0.63.0) + dotenv (>= 0.7) thor (>= 0.13.6) - formatador (0.2.4) - gauntlt (1.0.5) + gauntlt (1.0.6) + aruba cucumber nokogiri (~> 1.5.0) trollop - gherkin (2.12.0) + gherkin (2.12.2) multi_json (~> 1.3) - guard (1.7.0) - formatador (>= 0.2.4) - listen (>= 0.6.0) - lumberjack (>= 1.0.2) - pry (>= 0.9.10) + guard (1.4.0) + listen (>= 0.4.2) thor (>= 0.14.6) - guard-brakeman (0.6.3) - brakeman (>= 1.8.2) + guard-brakeman (0.8.1) + brakeman (>= 2.1.1) guard (>= 1.1.0) - guard-livereload (1.3.0) + guard-livereload (1.0.3) em-websocket (>= 0.2.0) - guard (>= 1.5.0) + guard (>= 1.1.0) multi_json (~> 1.0) guard-rspec (2.5.4) guard (>= 1.1) rspec (~> 2.11) guard-shell (0.5.1) guard (>= 1.1.0) - haml (4.0.2) + haml (4.0.3) tilt hashr (0.0.22) - highline (1.6.16) - hike (1.2.2) + highline (1.6.20) + hike (1.2.3) http_parser.rb (0.5.3) - i18n (0.6.1) + i18n (0.6.5) journey (1.0.4) jquery-fileupload-rails (0.4.1) actionpack (>= 3.1) railties (>= 3.1) - jquery-rails (3.0.1) + jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.7.7) - kgio (2.8.0) + json (1.8.1) + kgio (2.8.1) launchy (2.3.0) addressable (~> 2.3) libv8 (3.16.14.3) - listen (0.7.3) - lumberjack (1.0.3) - mail (2.5.3) - i18n (>= 0.4.0) + listen (2.1.1) + celluloid (>= 0.15.2) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - method_source (0.8.1) - mime-types (1.22) - multi_json (1.7.2) + method_source (0.8.2) + mime-types (1.25) + multi_json (1.8.2) + multi_test (0.0.2) nokogiri (1.5.10) poltergeist (1.4.1) capybara (~> 2.1.0) @@ -152,10 +155,11 @@ GEM polyglot (0.3.3) powder (0.2.0) thor (>= 0.11.5) - pry (0.9.12) - coderay (~> 1.0.5) - method_source (~> 0.8) - slop (~> 3.4) + pry (0.9.6) + coderay (>= 0.9.8) + method_source (>= 0.6.5) + ruby_parser (>= 2.0.5) + slop (~> 2.1.0) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) @@ -165,24 +169,26 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.13) - actionmailer (= 3.2.13) - actionpack (= 3.2.13) - activerecord (= 3.2.13) - activeresource (= 3.2.13) - activesupport (= 3.2.13) + rails (3.2.15) + actionmailer (= 3.2.15) + actionpack (= 3.2.15) + activerecord (= 3.2.15) + activeresource (= 3.2.15) + activesupport (= 3.2.15) bundler (~> 1.0) - railties (= 3.2.13) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) + railties (= 3.2.15) + railties (3.2.15) + actionpack (= 3.2.15) + activesupport (= 3.2.15) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - raindrops (0.10.0) + raindrops (0.12.0) rake (10.1.0) rb-fsevent (0.9.3) + rb-inotify (0.9.2) + ffi (>= 0.5.0) rdoc (3.12.2) json (~> 1.4) ref (1.0.5) @@ -190,10 +196,10 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - rspec-core (2.14.2) - rspec-expectations (2.14.0) + rspec-core (2.14.6) + rspec-expectations (2.14.3) diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.1) + rspec-mocks (2.14.4) rspec-rails (2.14.0) actionpack (>= 3.0) activesupport (>= 3.0) @@ -201,45 +207,46 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - ruby2ruby (2.0.3) + ruby2ruby (2.0.6) ruby_parser (~> 3.1) sexp_processor (~> 4.0) - ruby_parser (3.1.3) + ruby_parser (3.2.2) sexp_processor (~> 4.1) - sass (3.2.7) + sass (3.2.12) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - sexp_processor (4.2.1) - slim (1.3.8) - temple (~> 0.6.3) - tilt (~> 1.3.3) - slop (3.4.4) + sexp_processor (4.4.0) + slim (2.0.1) + temple (~> 0.6.6) + tilt (>= 1.3.3, < 2.1) + slop (2.1.0) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.7) - temple (0.6.3) + sqlite3 (1.3.8) + temple (0.6.7) terminal-table (1.4.5) therubyracer (0.12.0) libv8 (~> 3.16.14.0) ref thor (0.18.1) - tilt (1.3.7) + tilt (1.4.1) + timers (1.1.0) travis-lint (1.7.0) hashr (~> 0.0.22) - treetop (1.4.12) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) trollop (2.0) - tzinfo (0.3.37) - uglifier (2.0.1) + tzinfo (0.3.38) + uglifier (2.2.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) - unicorn (4.6.2) + unicorn (4.6.3) kgio (~> 2.6) rack raindrops (~> 0.7) @@ -258,7 +265,7 @@ DEPENDENCIES brakeman bundler-audit capybara - coffee-rails (~> 3.2.1) + coffee-rails database_cleaner (< 1.1.0) execjs foreman @@ -274,12 +281,12 @@ DEPENDENCIES powder pry rack-livereload - rails (= 3.2.13) + rails (= 3.2.15) rb-fsevent rspec-rails - sass-rails (~> 3.2.3) + sass-rails sqlite3 therubyracer travis-lint - uglifier (>= 1.0.3) + uglifier unicorn