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'
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
Executable → Regular
+101 -94
View File
@@ -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
+7 -7
View File
@@ -11,15 +11,15 @@ class Benefits < ActiveRecord::Base
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
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
+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