kamifusen 1.8 → 1.9

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: 05b8beb4ef9751b96229c3b9d267a9c6fc99f34d4bb869228495ce51779b06e0
4
- data.tar.gz: 879e686e9b394b0b34aecabaa35469ffc063c4c815fbd6b92fabc226c2fc6894
3
+ metadata.gz: a82b418d1a07d8b33f845d6ded2bdf3d1309943e41350f8e003bbdcbfe867f08
4
+ data.tar.gz: 0d20f1c01167036520f1451f1d295d8c7a32d40e315b8ac6fdee707fb3236c43
5
5
  SHA512:
6
- metadata.gz: 9cf81c743cf040ed1beb800be796fbbdc9883d75efbea3ed17951598fcd32d2dbe095235fbe7d2d568a320de1a7a476d0889eea737dd1b3d7531fe667790d804
7
- data.tar.gz: 0ccb61359dbe83cca6b6ae7a6c1a27fae0e0d52616d448582de9314deb8a1964e4fd5c1b23d11d4f3908cef7c0476813ab47dc1b8e2892b4ac9dcda8cf6259a9
6
+ metadata.gz: 999758e2fece72df932546f261091b4ffc1584b85668fc9102852d703d4c45526a66ae980ae918f64a6884b99267d2c8c2d3c4646b78a7475ccfd5c01ccf64e0
7
+ data.tar.gz: be8d74901d1bb3f1859e01e6940c00aa2c9ee67aa086c34fb241de5e5adb510e14a93f39c040ba8dfa8708b1134d7637783775b3a7225cb400575d57643c316c
@@ -11,9 +11,8 @@ picture_class = options[:picture_class]
11
11
  width = options[:width]
12
12
  height = options[:height]
13
13
 
14
- # kamifusen settings
15
- sizes = [360, 375, 414, 576, 640, 750, 768, 828, 992, 1152, 1200, 1366, 1400, 1536, 1920, 1984, 2400]
16
- quality = 80
14
+ sizes = Kamifusen.sizes
15
+ quality = Kamifusen.quality
17
16
 
18
17
  if source&.metadata &&
19
18
  source.metadata['analyzed'] &&
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kamifusen
4
- VERSION = "1.8"
4
+ VERSION = "1.9"
5
5
  end
data/lib/kamifusen.rb CHANGED
@@ -9,6 +9,36 @@ module Kamifusen
9
9
  mattr_accessor :with_webp
10
10
  @@with_webp = true
11
11
 
12
+ mattr_accessor :sizes
13
+ @@sizes = [
14
+ # 360, # Old android
15
+ 375, # Old iPhone
16
+ # 414, # ?
17
+ 576, # Tablets desktop
18
+ 640, # iPhone SE, some tablets
19
+ 750, # iPhone 6/7/8, 375@2x
20
+ 768, # Old iPads, Old desktops
21
+ # 828, # ?
22
+ # 992, # Breakpoint bootstrap
23
+ 1080, # iPhone 6/7/8 plus, 414@2.608 (sorry)
24
+ # 1125, # iPhone 10, 375@3x
25
+ 1152,
26
+ # 1172, # iPhone 12, 390@3x
27
+ 1200, # Desktop
28
+ 1366, # Desktop
29
+ # 1400, # Breakpoint boostrap
30
+ 1440, # Samsung Galaxy S20, 360@4x
31
+ 1536, # Desktop, some iPads
32
+ 1920, # Desktop 2k
33
+ 2048, # Some iPad
34
+ 2240, # Desktop iMac M1 chipset
35
+ 2880, # Desktop MacBook Pro/Air 13" @2x
36
+ 3072 # Desktop MacBook Pro 16" @2x
37
+ ]
38
+
39
+ mattr_accessor :quality
40
+ @@quality = 80
41
+
12
42
  class Engine < ::Rails::Engine
13
43
  end
14
44
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamifusen
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.8'
4
+ version: '1.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Moulène