diff --git a/Gemfile b/Gemfile index 299af4509..34e81cef6 100644 --- a/Gemfile +++ b/Gemfile @@ -25,8 +25,10 @@ gem 'rufus-scheduler' #gem 'dalli', path: 'lib/dalli-2.7.2' group :development do gem 'grape-swagger' - gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' + #gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' #gem 'puma' + gem 'pry-rails' + gem 'pry-byebug' gem 'better_errors', path: 'lib/better_errors' gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' end @@ -50,8 +52,8 @@ group :test do #end end - gem 'rspec-rails' , '2.13.1' - gem 'guard-rspec','2.5.0' + # gem 'rspec-rails' , '2.13.1' + # gem 'guard-rspec','2.5.0' # Gems used only for assets and not required # in production environments by default. group :assets do @@ -95,7 +97,7 @@ if File.exist?(database_file) adapters.each do |adapter| case adapter when 'mysql2' - gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw] + gem "mysql2", "= 0.3.18", :platforms => [:mri, :mingw] gem "activerecord-jdbcmysql-adapter", :platforms => :jruby when 'mysql' gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 252d823e9..ccc879c1c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -97,12 +97,10 @@ class AttachmentsController < ApplicationController end if candown || User.current.admin? || User.current.id == @attachment.author_id @attachment.increment_download - if stale?(:etag => @attachment.digest) - # images are sent inline send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename), :type => detect_content_type(@attachment), - :disposition => (@attachment.image? ? 'inline' : 'attachment') + :disposition => 'attachment' #inline can open in browser end else