neofiles 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/neofiles/neofiles_helper.rb +1 -1
- data/app/models/neofiles/file.rb +1 -1
- data/config/locales/ru.yml +17 -17
- data/lib/neofiles.rb +1 -1
- data/lib/neofiles/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfeb665960be3f2ef0ecb2f3e727abfb127b57b1
|
4
|
+
data.tar.gz: 2e5ca2d5104a9aedf42cd6383c74a59a44673a5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d209519580976a5c53713b863e94b9d1c8e8e77b6c8b42cd88acd8c55ec5fbf16f41908bf968eff9dc50df55f94531bf91e49021ee239c7259eb0c0ebe71e5
|
7
|
+
data.tar.gz: fe39a16e3a0224d0662ba1e21709e5183027714c371e676574f689db0e2d25cbbf2ade686568dd771ebda77e5e4f5978307fe6e69947ad6b3a8da0a2a6af6521
|
@@ -168,7 +168,7 @@ HTML
|
|
168
168
|
if image_file.is_a? Neofiles::Image
|
169
169
|
image_file_width = image_file.width
|
170
170
|
image_file_height = image_file.height
|
171
|
-
|
171
|
+
elsif image_file.is_a? Hash
|
172
172
|
image_file_width = image_file[:width]
|
173
173
|
image_file_height = image_file[:height]
|
174
174
|
end
|
data/app/models/neofiles/file.rb
CHANGED
@@ -230,7 +230,7 @@ class Neofiles::File
|
|
230
230
|
|
231
231
|
# Construct Mongoid binary object from string of bytes.
|
232
232
|
def self.binary_for(*buf)
|
233
|
-
BSON::Binary.new(
|
233
|
+
BSON::Binary.new(buf.join, :generic)
|
234
234
|
end
|
235
235
|
|
236
236
|
# Try different methods to extract file name or path from argument object.
|
data/config/locales/ru.yml
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
ru:
|
2
2
|
neofiles:
|
3
|
-
403_access_denied: Ошибка 403: недостаточно прав для получения файла в таком формате
|
4
|
-
404_not_found: Ошибка 404: файл не найден
|
5
|
-
file_not_found: Файл не найден
|
6
|
-
data_not_passed: Не переданы данные для сохранения
|
7
|
-
file_not_passed: Не передан файл для сохранения
|
8
|
-
id_not_passed: Не передан ID
|
9
|
-
unknown_file_type: Не могу создать файл неизвестного типа %{type}
|
10
|
-
swf_type_incorrect: Файл с расширением SWF определяется как %{content_type}
|
11
|
-
mini_magick_error: Не могу обработать переданное изображение
|
12
|
-
unsupported_image_type: Формат картинок %{type} не поддерживается
|
3
|
+
403_access_denied: 'Ошибка 403: недостаточно прав для получения файла в таком формате'
|
4
|
+
404_not_found: 'Ошибка 404: файл не найден'
|
5
|
+
file_not_found: 'Файл не найден'
|
6
|
+
data_not_passed: 'Не переданы данные для сохранения'
|
7
|
+
file_not_passed: 'Не передан файл для сохранения'
|
8
|
+
id_not_passed: 'Не передан ID'
|
9
|
+
unknown_file_type: 'Не могу создать файл неизвестного типа %{type}'
|
10
|
+
swf_type_incorrect: 'Файл с расширением SWF определяется как %{content_type}'
|
11
|
+
mini_magick_error: 'Не могу обработать переданное изображение'
|
12
|
+
unsupported_image_type: 'Формат картинок %{type} не поддерживается'
|
13
13
|
|
14
14
|
views:
|
15
|
-
no_description: Без описания
|
16
|
-
local_date_format: %d.%m.%Y <span class="muted text-muted">в %H:%M</span>
|
17
|
-
created_at: Создан %{local_date}
|
18
|
-
owner: Владелец
|
19
|
-
no_wm: не ставить водяной знак
|
20
|
-
save: Сохранить
|
21
|
-
description: Описание
|
15
|
+
no_description: 'Без описания'
|
16
|
+
local_date_format: '%d.%m.%Y <span class="muted text-muted">в %H:%M</span>'
|
17
|
+
created_at: 'Создан %{local_date}'
|
18
|
+
owner: 'Владелец'
|
19
|
+
no_wm: 'не ставить водяной знак'
|
20
|
+
save: 'Сохранить'
|
21
|
+
description: 'Описание'
|
data/lib/neofiles.rb
CHANGED
@@ -47,7 +47,7 @@ module Neofiles
|
|
47
47
|
if image_file.is_a? Neofiles::Image
|
48
48
|
image_file_width = image_file.width
|
49
49
|
image_file_height = image_file.height
|
50
|
-
|
50
|
+
elsif image_file.is_a? Hash
|
51
51
|
image_file_width = image_file[:width]
|
52
52
|
image_file_height = image_file[:height]
|
53
53
|
end
|
data/lib/neofiles/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neofiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konanykhin Ilya
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.0
|
33
|
+
version: '5.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.0
|
40
|
+
version: '5.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ruby-imagespec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|