attache 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +15 -5
- data/lib/attache/backup.rb +0 -4
- data/lib/attache/base.rb +10 -0
- data/lib/attache/delete.rb +0 -4
- data/lib/attache/download.rb +0 -5
- data/lib/attache/tus/upload.rb +0 -5
- data/lib/attache/upload.rb +0 -5
- data/lib/attache/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 142d8bbaf242702c8f4ffc3dd138981bf5e36515
|
4
|
+
data.tar.gz: 489c6110a4ccf9d646537d0e29ae3be1febd9d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42ca943075fad7ef4c8897f617bfec5c758687d45b31c50ee6d841459b6bc53351bb47c3a62d5614041de7a85158b07e9723de3196ea06b46fac10dae5a61ef6
|
7
|
+
data.tar.gz: bdc7479ebc633564b8ab06208f4bdafa74ca4cd6631e83f9d08daeb5061f147c0ea34c864048fa95d557b151c1f0a2818153e5564cde31c62e789190c5ab4f97
|
data/Rakefile
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
if ENV['RACK_ENV'] == 'production'
|
2
|
+
# Heroku
|
3
|
+
# https://gist.github.com/Geesu/d0b58488cfae51f361c6
|
4
|
+
namespace :assets do
|
5
|
+
task 'precompile' do
|
6
|
+
puts "Not applicable"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
else
|
10
|
+
require "bundler/gem_tasks"
|
11
|
+
require 'rspec/core/rake_task'
|
12
|
+
require 'attache/tasks'
|
4
13
|
|
5
|
-
RSpec::Core::RakeTask.new(:spec)
|
6
|
-
task :default => :spec
|
14
|
+
RSpec::Core::RakeTask.new(:spec)
|
15
|
+
task :default => :spec
|
16
|
+
end
|
data/lib/attache/backup.rb
CHANGED
data/lib/attache/base.rb
CHANGED
@@ -5,6 +5,16 @@ class Attache::Base
|
|
5
5
|
else
|
6
6
|
@app.call(env)
|
7
7
|
end
|
8
|
+
rescue Timeout::Error
|
9
|
+
Attache.logger.error $@
|
10
|
+
Attache.logger.error $!
|
11
|
+
Attache.logger.error "ERROR 503 #{env['PATH_INFO']} REFERER #{env['HTTP_REFERER'].inspect}"
|
12
|
+
[503, { 'X-Exception' => $!.to_s }, []]
|
13
|
+
rescue Exception
|
14
|
+
Attache.logger.error $@
|
15
|
+
Attache.logger.error $!
|
16
|
+
Attache.logger.error "ERROR 500 #{env['PATH_INFO']} REFERER #{env['HTTP_REFERER'].inspect}"
|
17
|
+
[500, { 'X-Exception' => $!.to_s }, []]
|
8
18
|
end
|
9
19
|
|
10
20
|
def vhost_for(host)
|
data/lib/attache/delete.rb
CHANGED
data/lib/attache/download.rb
CHANGED
@@ -73,11 +73,6 @@ class Attache::Download < Attache::Base
|
|
73
73
|
else
|
74
74
|
@app.call(env)
|
75
75
|
end
|
76
|
-
rescue Exception
|
77
|
-
Attache.logger.error $@
|
78
|
-
Attache.logger.error $!
|
79
|
-
Attache.logger.error "ERROR REFERER #{env['HTTP_REFERER'].inspect}"
|
80
|
-
[500, { 'X-Exception' => $!.to_s }, []]
|
81
76
|
end
|
82
77
|
|
83
78
|
private
|
data/lib/attache/tus/upload.rb
CHANGED
@@ -66,11 +66,6 @@ class Attache::Tus::Upload < Attache::Base
|
|
66
66
|
else
|
67
67
|
@app.call(env)
|
68
68
|
end
|
69
|
-
rescue Exception
|
70
|
-
Attache.logger.error $@
|
71
|
-
Attache.logger.error $!
|
72
|
-
Attache.logger.error "ERROR REFERER #{env['HTTP_REFERER'].inspect}"
|
73
|
-
[500, { 'X-Exception' => $!.to_s }, []]
|
74
69
|
end
|
75
70
|
|
76
71
|
private
|
data/lib/attache/upload.rb
CHANGED
@@ -33,11 +33,6 @@ class Attache::Upload < Attache::Base
|
|
33
33
|
else
|
34
34
|
@app.call(env)
|
35
35
|
end
|
36
|
-
rescue Exception
|
37
|
-
Attache.logger.error $@
|
38
|
-
Attache.logger.error $!
|
39
|
-
Attache.logger.error "ERROR REFERER #{env['HTTP_REFERER'].inspect}"
|
40
|
-
[500, { 'X-Exception' => $!.to_s }, []]
|
41
36
|
end
|
42
37
|
|
43
38
|
def self.sanitize(filename)
|
data/lib/attache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- choonkeat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|