tramway-core 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b50e3254d0eff6b27d870175f9841226dcf972efecc51d000bddb9e80093cfb7
4
- data.tar.gz: 2d1eba971d10ef1484fa61e4960eeaa372c805f22c847d561708cfe00e69b41c
3
+ metadata.gz: f210d16378e75f559af9d82c4d91e7773ac4d41eeefd1517566d7de58065d54c
4
+ data.tar.gz: 053a94a32d41e4e18297d51d798f29ff4f56ba7a3b19fb9ee4ad63cb623b74b8
5
5
  SHA512:
6
- metadata.gz: a8c79fa1c480ef88129519aefb2be008b36e0b4d63ab8ed6084f66a92f18d945afe42d7f044f10440320c95f89a91eadb6d6fe609f93b9d8de5147a6ef21f79e
7
- data.tar.gz: ccfb06818de42b038b10a3afac722057b97778cd3b156f4598c36941da1bbb796b86bcdea4b94f51f378a3b489157fc32029a8c2cea4f728978e0a45f88bc0ab
6
+ metadata.gz: b5a41fe68961d1911fbc688af0e8e1b4c3b18f5e1113b8a694225a7df067c621b16bce2ed8ca0978c8a2a27488463a113a633287e813e24f7323c1c7fc3e3a2a
7
+ data.tar.gz: 284ba15ae8efd8b6f271db77b7acda396a33c6d90e3b7d2188d0c9200dc934210bfcbf7e9e3f3fe810a08e925230548c6ce4678133d3789fb46f603a59c03365
@@ -1,4 +1,6 @@
1
1
  class FileUploader < ApplicationUploader
2
+ include ImageSizes
3
+
2
4
  def extension_white_list
3
5
  %w(pdf doc docx xls csv xlsx jpg)
4
6
  end
@@ -0,0 +1,13 @@
1
+ module ImageSizes
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ version :medium do
6
+ process :resize_to_fill => [400, 400]
7
+ end
8
+
9
+ version :small do
10
+ process :resize_to_fill => [100, 100]
11
+ end
12
+ end
13
+ end
@@ -13,13 +13,7 @@ class PhotoUploader < ApplicationUploader
13
13
  end
14
14
  end
15
15
 
16
- version :medium do
17
- process :resize_to_fill => [400, 400]
18
- end
19
-
20
- version :small do
21
- process :resize_to_fill => [100, 100]
22
- end
16
+ include ImageSizes
23
17
 
24
18
  # FIXME move to tramway-landing uploader
25
19
  version :card do
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Core
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-01 00:00:00.000000000 Z
11
+ date: 2018-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform-rails
@@ -227,6 +227,7 @@ files:
227
227
  - app/uploaders/application_uploader.rb
228
228
  - app/uploaders/file_uploader.rb
229
229
  - app/uploaders/image_defaults.rb
230
+ - app/uploaders/image_sizes.rb
230
231
  - app/uploaders/photo_uploader.rb
231
232
  - app/views/tramway/core/shared/_messages.html.haml
232
233
  - config/locales/ru/dates.yml