This commit is contained in:
cktricky
2013-10-22 10:38:00 -04:00
4 changed files with 145 additions and 105 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'rails', '3.2.13' gem 'rails', '3.2.15'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -37,13 +37,13 @@ end
# Gems used only for assets and not required # Gems used only for assets and not required
# in production environments by default. # in production environments by default.
group :assets do group :assets do
gem 'sass-rails', '~> 3.2.3' gem 'sass-rails'
gem 'coffee-rails', '~> 3.2.1' gem 'coffee-rails'
gem 'jquery-fileupload-rails' gem 'jquery-fileupload-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby # gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3' gem 'uglifier'
end end
Executable → Regular
+101 -94
View File
@@ -1,12 +1,12 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (3.2.13) actionmailer (3.2.15)
actionpack (= 3.2.13) actionpack (= 3.2.15)
mail (~> 2.5.3) mail (~> 2.5.4)
actionpack (3.2.13) actionpack (3.2.15)
activemodel (= 3.2.13) activemodel (= 3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
builder (~> 3.0.0) builder (~> 3.0.0)
erubis (~> 2.7.0) erubis (~> 2.7.0)
journey (~> 1.0.4) journey (~> 1.0.4)
@@ -14,19 +14,19 @@ GEM
rack-cache (~> 1.2) rack-cache (~> 1.2)
rack-test (~> 0.6.1) rack-test (~> 0.6.1)
sprockets (~> 2.2.1) sprockets (~> 2.2.1)
activemodel (3.2.13) activemodel (3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
builder (~> 3.0.0) builder (~> 3.0.0)
activerecord (3.2.13) activerecord (3.2.15)
activemodel (= 3.2.13) activemodel (= 3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
arel (~> 3.0.2) arel (~> 3.0.2)
tzinfo (~> 0.3.29) tzinfo (~> 0.3.29)
activeresource (3.2.13) activeresource (3.2.15)
activemodel (= 3.2.13) activemodel (= 3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
activesupport (3.2.13) activesupport (3.2.15)
i18n (= 0.6.1) i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0) multi_json (~> 1.0)
addressable (2.3.5) addressable (2.3.5)
arel (3.0.2) arel (3.0.2)
@@ -34,25 +34,25 @@ GEM
childprocess (>= 0.3.6) childprocess (>= 0.3.6)
cucumber (>= 1.1.1) cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0) rspec-expectations (>= 2.7.0)
bcrypt-ruby (3.0.1) bcrypt-ruby (3.1.2)
better_errors (1.0.1) better_errors (1.0.1)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubis (>= 2.6.6) erubis (>= 2.6.6)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
brakeman (1.9.5) brakeman (2.1.2)
erubis (~> 2.6) erubis (~> 2.6)
fastercsv (~> 1.5) fastercsv (~> 1.5)
haml (>= 3.0, < 5.0) haml (>= 3.0, < 5.0)
highline (~> 1.6) highline (~> 1.6.19)
multi_json (~> 1.2) multi_json (~> 1.2)
ruby2ruby (= 2.0.3) ruby2ruby (~> 2.0.5)
ruby_parser (~> 3.1.1) ruby_parser (~> 3.2.2)
sass (~> 3.0) sass (~> 3.0)
slim (~> 1.3.6) slim (>= 1.3.6, < 3.0)
terminal-table (~> 1.4) terminal-table (~> 1.4)
builder (3.0.4) builder (3.0.4)
bundler-audit (0.1.2) bundler-audit (0.2.0)
bundler (~> 1.2) bundler (~> 1.2)
capybara (2.1.0) capybara (2.1.0)
mime-types (>= 1.16) mime-types (>= 1.16)
@@ -60,89 +60,92 @@ GEM
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (~> 2.0) xpath (~> 2.0)
celluloid (0.15.2)
timers (~> 1.1.0)
childprocess (0.3.9) childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11) ffi (~> 1.0, >= 1.0.11)
cliver (0.2.2) cliver (0.2.2)
coderay (1.0.9) coderay (1.1.0)
coffee-rails (3.2.2) coffee-rails (3.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (~> 3.2.0) railties (~> 3.2.0)
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.6.2) coffee-script-source (1.6.3)
cucumber (1.3.2) cucumber (1.3.8)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.3) diff-lcs (>= 1.1.3)
gherkin (~> 2.12.0) gherkin (~> 2.12.1)
multi_json (~> 1.3) multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.0.2)
database_cleaner (1.0.1) database_cleaner (1.0.1)
debug_inspector (0.0.2) debug_inspector (0.0.2)
diff-lcs (1.2.4) diff-lcs (1.2.4)
dotenv (0.9.0)
em-websocket (0.5.0) em-websocket (0.5.0)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0.5.3) http_parser.rb (~> 0.5.3)
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.0.3) eventmachine (1.0.3)
execjs (1.4.0) execjs (2.0.2)
multi_json (~> 1.0)
fastercsv (1.5.5) fastercsv (1.5.5)
ffi (1.9.0) ffi (1.9.0)
foreman (0.62.0) foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6) thor (>= 0.13.6)
formatador (0.2.4) gauntlt (1.0.6)
gauntlt (1.0.5) aruba
cucumber cucumber
nokogiri (~> 1.5.0) nokogiri (~> 1.5.0)
trollop trollop
gherkin (2.12.0) gherkin (2.12.2)
multi_json (~> 1.3) multi_json (~> 1.3)
guard (1.7.0) guard (1.4.0)
formatador (>= 0.2.4) listen (>= 0.4.2)
listen (>= 0.6.0)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6) thor (>= 0.14.6)
guard-brakeman (0.6.3) guard-brakeman (0.8.1)
brakeman (>= 1.8.2) brakeman (>= 2.1.1)
guard (>= 1.1.0) guard (>= 1.1.0)
guard-livereload (1.3.0) guard-livereload (1.0.3)
em-websocket (>= 0.2.0) em-websocket (>= 0.2.0)
guard (>= 1.5.0) guard (>= 1.1.0)
multi_json (~> 1.0) multi_json (~> 1.0)
guard-rspec (2.5.4) guard-rspec (2.5.4)
guard (>= 1.1) guard (>= 1.1)
rspec (~> 2.11) rspec (~> 2.11)
guard-shell (0.5.1) guard-shell (0.5.1)
guard (>= 1.1.0) guard (>= 1.1.0)
haml (4.0.2) haml (4.0.3)
tilt tilt
hashr (0.0.22) hashr (0.0.22)
highline (1.6.16) highline (1.6.20)
hike (1.2.2) hike (1.2.3)
http_parser.rb (0.5.3) http_parser.rb (0.5.3)
i18n (0.6.1) i18n (0.6.5)
journey (1.0.4) journey (1.0.4)
jquery-fileupload-rails (0.4.1) jquery-fileupload-rails (0.4.1)
actionpack (>= 3.1) actionpack (>= 3.1)
railties (>= 3.1) railties (>= 3.1)
jquery-rails (3.0.1) jquery-rails (3.0.4)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (1.7.7) json (1.8.1)
kgio (2.8.0) kgio (2.8.1)
launchy (2.3.0) launchy (2.3.0)
addressable (~> 2.3) addressable (~> 2.3)
libv8 (3.16.14.3) libv8 (3.16.14.3)
listen (0.7.3) listen (2.1.1)
lumberjack (1.0.3) celluloid (>= 0.15.2)
mail (2.5.3) rb-fsevent (>= 0.9.3)
i18n (>= 0.4.0) rb-inotify (>= 0.9)
mail (2.5.4)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
method_source (0.8.1) method_source (0.8.2)
mime-types (1.22) mime-types (1.25)
multi_json (1.7.2) multi_json (1.8.2)
multi_test (0.0.2)
nokogiri (1.5.10) nokogiri (1.5.10)
poltergeist (1.4.1) poltergeist (1.4.1)
capybara (~> 2.1.0) capybara (~> 2.1.0)
@@ -152,10 +155,11 @@ GEM
polyglot (0.3.3) polyglot (0.3.3)
powder (0.2.0) powder (0.2.0)
thor (>= 0.11.5) thor (>= 0.11.5)
pry (0.9.12) pry (0.9.6)
coderay (~> 1.0.5) coderay (>= 0.9.8)
method_source (~> 0.8) method_source (>= 0.6.5)
slop (~> 3.4) ruby_parser (>= 2.0.5)
slop (~> 2.1.0)
rack (1.4.5) rack (1.4.5)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
@@ -165,24 +169,26 @@ GEM
rack rack
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.13) rails (3.2.15)
actionmailer (= 3.2.13) actionmailer (= 3.2.15)
actionpack (= 3.2.13) actionpack (= 3.2.15)
activerecord (= 3.2.13) activerecord (= 3.2.15)
activeresource (= 3.2.13) activeresource (= 3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.2.13) railties (= 3.2.15)
railties (3.2.13) railties (3.2.15)
actionpack (= 3.2.13) actionpack (= 3.2.15)
activesupport (= 3.2.13) activesupport (= 3.2.15)
rack-ssl (~> 1.3.2) rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0) thor (>= 0.14.6, < 2.0)
raindrops (0.10.0) raindrops (0.12.0)
rake (10.1.0) rake (10.1.0)
rb-fsevent (0.9.3) rb-fsevent (0.9.3)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
rdoc (3.12.2) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
ref (1.0.5) ref (1.0.5)
@@ -190,10 +196,10 @@ GEM
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
rspec-core (2.14.2) rspec-core (2.14.6)
rspec-expectations (2.14.0) rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.1) rspec-mocks (2.14.4)
rspec-rails (2.14.0) rspec-rails (2.14.0)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
@@ -201,45 +207,46 @@ GEM
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
ruby2ruby (2.0.3) ruby2ruby (2.0.6)
ruby_parser (~> 3.1) ruby_parser (~> 3.1)
sexp_processor (~> 4.0) sexp_processor (~> 4.0)
ruby_parser (3.1.3) ruby_parser (3.2.2)
sexp_processor (~> 4.1) sexp_processor (~> 4.1)
sass (3.2.7) sass (3.2.12)
sass-rails (3.2.6) sass-rails (3.2.6)
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
sexp_processor (4.2.1) sexp_processor (4.4.0)
slim (1.3.8) slim (2.0.1)
temple (~> 0.6.3) temple (~> 0.6.6)
tilt (~> 1.3.3) tilt (>= 1.3.3, < 2.1)
slop (3.4.4) slop (2.1.0)
sprockets (2.2.2) sprockets (2.2.2)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7) sqlite3 (1.3.8)
temple (0.6.3) temple (0.6.7)
terminal-table (1.4.5) terminal-table (1.4.5)
therubyracer (0.12.0) therubyracer (0.12.0)
libv8 (~> 3.16.14.0) libv8 (~> 3.16.14.0)
ref ref
thor (0.18.1) thor (0.18.1)
tilt (1.3.7) tilt (1.4.1)
timers (1.1.0)
travis-lint (1.7.0) travis-lint (1.7.0)
hashr (~> 0.0.22) hashr (~> 0.0.22)
treetop (1.4.12) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
trollop (2.0) trollop (2.0)
tzinfo (0.3.37) tzinfo (0.3.38)
uglifier (2.0.1) uglifier (2.2.1)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2) multi_json (~> 1.0, >= 1.0.2)
unicorn (4.6.2) unicorn (4.6.3)
kgio (~> 2.6) kgio (~> 2.6)
rack rack
raindrops (~> 0.7) raindrops (~> 0.7)
@@ -258,7 +265,7 @@ DEPENDENCIES
brakeman brakeman
bundler-audit bundler-audit
capybara capybara
coffee-rails (~> 3.2.1) coffee-rails
database_cleaner (< 1.1.0) database_cleaner (< 1.1.0)
execjs execjs
foreman foreman
@@ -274,12 +281,12 @@ DEPENDENCIES
powder powder
pry pry
rack-livereload rack-livereload
rails (= 3.2.13) rails (= 3.2.15)
rb-fsevent rb-fsevent
rspec-rails rspec-rails
sass-rails (~> 3.2.3) sass-rails
sqlite3 sqlite3
therubyracer therubyracer
travis-lint travis-lint
uglifier (>= 1.0.3) uglifier
unicorn unicorn
+7 -7
View File
@@ -11,15 +11,15 @@ class Benefits < ActiveRecord::Base
end end
def self.make_backup(*params) def self.make_backup(*params)
if File.exists?(full_file_name) if File.exists?(full_file_name)
system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}")
end end
end end
=begin =begin
def self.make_backup(file, data_path, full_file_name) 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}" FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.now.to_i}_#{file.original_filename}"
end end
=end =end
end end
+33
View File
@@ -0,0 +1,33 @@
class Benefits < ActiveRecord::Base
attr_accessor :backup
def self.save(file, backup=false)
data_path = Rails.root.join("public", "data")
full_file_name = "#{data_path}/#{file.original_filename}"
f = File.open(full_file_name, "w+")
f.write file.read
f.close
make_backup(file, data_path, full_file_name) if backup == "true"
end
<<<<<<< HEAD
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
=======
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
end
>>>>>>> bd066068ff2fd63a0edeede010167cfa63a03aff
=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
=end
end