From ec0280bcdea1836b04b97f68a4914162f07c74cc Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 26 Feb 2014 13:16:34 -0800 Subject: [PATCH] upgrade to ruby 2.0.0 --- .rbenv-version | 2 +- Gemfile | 5 +++-- app/models/upload.rb | 4 ++-- config/application.rb | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.rbenv-version b/.rbenv-version index 546d4d8a9..5d0b60ca6 100644 --- a/.rbenv-version +++ b/.rbenv-version @@ -1 +1 @@ -1.9.3-p327 \ No newline at end of file +2.0.0-p451 \ No newline at end of file diff --git a/Gemfile b/Gemfile index d1e76aad5..606e60ba4 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,6 @@ group :test do gem "mocha", :require => "mocha/setup" gem "ffaker" gem "simplecov", :require => false - gem "pry" gem "vcr" gem "webmock" gem "timecop" @@ -49,6 +48,8 @@ end group :development do gem 'ruby-prof' - gem 'pry' end +group :development, :test do + gem 'pry' +end \ No newline at end of file diff --git a/app/models/upload.rb b/app/models/upload.rb index 2ac39c06d..e1db311cf 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -204,13 +204,13 @@ class Upload < ActiveRecord::Base def file_header_to_content_type(source_path) case File.read(source_path, 10) - when /^\xff\xd8/ + when /^\xff\xd8/n "image/jpeg" when /^GIF87a/, /^GIF89a/ "image/gif" - when /^\x89PNG\r\n\x1a\n/ + when /^\x89PNG\r\n\x1a\n/n "image/png" when /^CWS/, /^FWS/, /^ZWS/ diff --git a/config/application.rb b/config/application.rb index 7cb210549..dab89ed4e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,4 +24,6 @@ module Danbooru config.action_mailer.perform_deliveries = true config.log_tags = [lambda {|req| "PID:#{Process.pid}"}] end + + I18n.enforce_available_locales = false end