mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 10:47:31 +08:00
Merge pull request #4384 from tgxworld/raise_error_when_method_not_implemented
FIX: Make sure we raise an error when method is not implemented.
This commit is contained in:
commit
42593562f5
|
@ -13,6 +13,7 @@ module FileStore
|
||||||
end
|
end
|
||||||
|
|
||||||
def store_file(file, path, opts = {})
|
def store_file(file, path, opts = {})
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_upload(upload)
|
def remove_upload(upload)
|
||||||
|
@ -24,24 +25,31 @@ module FileStore
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_file(url)
|
def remove_file(url)
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_been_uploaded?(url)
|
def has_been_uploaded?(url)
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def download_url(upload)
|
def download_url(upload)
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def cdn_url(url)
|
def cdn_url(url)
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def absolute_base_url
|
def absolute_base_url
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def relative_base_url
|
def relative_base_url
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def external?
|
def external?
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def internal?
|
def internal?
|
||||||
|
@ -49,6 +57,7 @@ module FileStore
|
||||||
end
|
end
|
||||||
|
|
||||||
def path_for(upload)
|
def path_for(upload)
|
||||||
|
not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
def download(upload)
|
def download(upload)
|
||||||
|
@ -111,6 +120,12 @@ module FileStore
|
||||||
`ls -tr #{CACHE_DIR} | head -n +#{CACHE_MAXIMUM_SIZE} | xargs rm -f`
|
`ls -tr #{CACHE_DIR} | head -n +#{CACHE_MAXIMUM_SIZE} | xargs rm -f`
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def not_implemented
|
||||||
|
raise "Not implemented."
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user