aspect_ratio 1.0.2 → 1.0.4

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
  SHA256:
3
- metadata.gz: c727cc38141fc35419ce9564cf6c70e81e640c6b0eb3223a77d2cc51e4884952
4
- data.tar.gz: b370b181355375cd1d05d1e4bc69589dc4276f10a3fac2aa264ff93b1e610620
3
+ metadata.gz: 9dd85391060dc95f2bcb3e239cfd71e2e355c36aabeba1125b6c831b0f89ad6c
4
+ data.tar.gz: 1aa2961f79d46ae905bf47882d9ffc74630baca1c0de7bb40cc01a123b1715a2
5
5
  SHA512:
6
- metadata.gz: 7b6eb6e35e4fd68d95fd73f1dc90e85fcbb0ceaf04f55c037d4677167cab45204ea9eb9d3186498a38c31b02410b616061dc7f4c731fceb564f73851a583ee22
7
- data.tar.gz: 71fae0df1912c665fd014db3089412042e77641889fd6b76be68505b6ffb023fc2a7c14095967295622676ef8d349c69590f00541cb994af93497947096502d6
6
+ metadata.gz: 16dafe9d8f7d3978932d57ceee8c35bf189c692cda098f5cdd0a7dd0acd3d8c0008a05f4f1f0a0d1dcc7764fc78e374da8f67ed757862bf1963522ef85d7cbc5
7
+ data.tar.gz: 71a886634e7b26817661ed8f90ea8ffcffc7f0150fafd02ded29a0d0dd6c89bc3460732771a168a5d5af2ac08ceef3be475f425d3448b265b113664a874b5682
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'aspect_ratio'
6
- s.version = '1.0.2'
6
+ s.version = '1.0.4'
7
7
  s.date = '2016-04-26'
8
8
  s.summary = 'Image aspect ratio calculation utility'
9
9
  s.description = 'Image aspect ratio calculation utility'
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.license = 'MIT'
15
15
 
16
16
  s.require_paths = ['lib']
17
- s.required_ruby_version = '>= 2.2.0'
17
+ s.required_ruby_version = '>= 2.4.0'
18
18
  s.test_files = s.files.grep(%r{^(test)/})
19
19
 
20
20
  s.add_development_dependency 'minitest', '~> 5'
@@ -55,22 +55,22 @@ module AspectRatio
55
55
  end
56
56
  end
57
57
 
58
- Δx = ((x - xʹ) / 2).to_f.floor
59
- Δy = ((y - yʹ) / 2).to_f.floor
58
+ delta_x = ((x - xʹ) / 2).to_f.floor
59
+ delta_y = ((y - yʹ) / 2).to_f.floor
60
60
 
61
61
  if (vertical || rotate) && !(vertical && rotate)
62
62
  [
63
- Δy, # crop top left x
64
- Δx, # crop top left y
65
- y - Δy * 2, # crop width
66
- x - Δx * 2 # crop height
63
+ delta_y, # crop top left x
64
+ delta_x, # crop top left y
65
+ y - delta_y * 2, # crop width
66
+ x - delta_x * 2 # crop height
67
67
  ]
68
68
  else
69
69
  [
70
- Δx.to_f, # crop top left x
71
- Δy, # crop top left y
72
- x - Δx * 2, # crop width
73
- y - Δy * 2 # crop height
70
+ delta_x.to_f, # crop top left x
71
+ delta_y, # crop top left y
72
+ x - delta_x * 2, # crop width
73
+ y - delta_y * 2 # crop height
74
74
  ]
75
75
  end
76
76
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspect_ratio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trung Lê
@@ -46,15 +46,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.2.0
49
+ version: 2.4.0
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubyforge_project:
57
- rubygems_version: 2.7.3
56
+ rubygems_version: 3.0.3
58
57
  signing_key:
59
58
  specification_version: 4
60
59
  summary: Image aspect ratio calculation utility