neofiles 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5872fc7a18fd718ba418406742eff52c13a95f4
4
- data.tar.gz: e677b851a4e6b89cb71d87360f22ba22a1488577
3
+ metadata.gz: dfeb665960be3f2ef0ecb2f3e727abfb127b57b1
4
+ data.tar.gz: 2e5ca2d5104a9aedf42cd6383c74a59a44673a5e
5
5
  SHA512:
6
- metadata.gz: b170149ccb7201d112291695d16fb0595902d4fe180f4e1f8541aab49897f4b149d3c522f825adda3fb91520fb7de7d756169f6d1740665344d9d55126077395
7
- data.tar.gz: d0b896968b9be2b52274a0bec910508a9a44004adb5c0b6d8ded9ae7948be2abe4f8af44fd9666117c736c98c198e7c3560e305113d7de05654e42b0bb17ca91
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
- else
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
@@ -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(:generic, buf.join)
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.
@@ -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: 'Описание'
@@ -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
- else
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
@@ -1,3 +1,3 @@
1
1
  module Neofiles
2
- VERSION = "1.0.0"
2
+ VERSION = '1.0.1'
3
3
  end
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.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-23 00:00:00.000000000 Z
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.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.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.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.0
40
+ version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-imagespec
43
43
  requirement: !ruby/object:Gem::Requirement