carrierwave-bombshelter 0.1.0.1 → 0.1.0.2

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
  SHA1:
3
- metadata.gz: ed41681d9c9d13ef0d2c091f8b4ceaa8dbc9b188
4
- data.tar.gz: 46c93a01a51fc012beca72bf0f3e3616a6fe0b1d
3
+ metadata.gz: c830e118a3048b76347216008b0f720fd2bbb59e
4
+ data.tar.gz: aece90372866fb87faaf591293ab5d16a78783b0
5
5
  SHA512:
6
- metadata.gz: 8f6d7695d54e5dba09661ce08633f41d8ee2a3eff9d6d96ba0847935ccfdaae145b7df2663d0efeae001d3dd230b4b91660a61624ee73b4bf16563d286ada1e9
7
- data.tar.gz: 3efbd72356939eb7957b7dedc0021a1ba8e3932899e531e52f6384b9079360fbae9d1c24e0d48e46db6f738d3bd5ef0ee43c52baff9da8ed080c977e4f3effc4
6
+ metadata.gz: 08b443db602a3b6ba29e16983f8e807d2db799a81853802ce8dc67c546676384f88a98f9b8bc00d2b40006842fd45225e7ecbb6a47d39d91bf96983fa187bd6e
7
+ data.tar.gz: cccd0d26230e80c9500a94988ba5e916ddb9ced50099f1aab5d0d035fe407893ac843b7f87d8217cbaf51bccb9f31dfdac26cdee4aa75a44e96e150221b25e29
data/README.md CHANGED
@@ -38,13 +38,13 @@ class YourUploader < CarrierWave::Uploader::Base
38
38
  end
39
39
  ```
40
40
 
41
- By default BombShelter sets maximum allowed dimensions to 4096x4096, but you can set your own ones by defining `max_pixel_dimentions` method:
41
+ By default BombShelter sets maximum allowed dimensions to 4096x4096, but you can set your own ones by defining `max_pixel_dimensions` method:
42
42
 
43
43
  ```ruby
44
44
  class YourUploader < CarrierWave::Uploader::Base
45
45
  include CarrierWave::BombShelter
46
46
 
47
- def max_pixel_dimentions
47
+ def max_pixel_dimensions
48
48
  [1024, 1024]
49
49
  end
50
50
  end
@@ -52,7 +52,7 @@ end
52
52
 
53
53
  ## Contributing
54
54
 
55
- Bug reports and pull requests are welcome on GitHub at https://github.com/DarthSim/carrierwave-bombshelter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/DarthSim/carrierwave-bombshelter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.
56
56
 
57
57
  ## License
58
58
 
@@ -14,24 +14,24 @@ module CarrierWave
14
14
  extend ActiveSupport::Concern
15
15
 
16
16
  included do
17
- before :cache, :check_pixel_dimentions!
17
+ before :cache, :check_pixel_dimensions!
18
18
  end
19
19
 
20
- def max_pixel_dimentions
20
+ def max_pixel_dimensions
21
21
  [4096, 4096]
22
22
  end
23
23
 
24
24
  private
25
25
 
26
- def check_pixel_dimentions!(new_file)
26
+ def check_pixel_dimensions!(new_file)
27
27
  sizes = FastImage.size(new_file.path)
28
- max_sizes = max_pixel_dimentions
28
+ max_sizes = max_pixel_dimensions
29
29
 
30
30
  return if !sizes || (sizes[0] <= max_sizes[0] && sizes[1] <= max_sizes[1])
31
31
 
32
32
  fail CarrierWave::IntegrityError,
33
33
  I18n.translate(
34
- :'errors.messages.pixel_dimentions_error',
34
+ :'errors.messages.pixel_dimensions_error',
35
35
  x_size: max_sizes[0], y_size: max_sizes[1]
36
36
  )
37
37
  end
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module BombShelter
3
- VERSION = '0.1.0.1'
3
+ VERSION = '0.1.0.2'
4
4
  end
5
5
  end
data/lib/locale/en.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  en:
2
2
  errors:
3
3
  messages:
4
- pixel_dimentions_error: "Image size should be less than or equal to %{x_size}x%{y_size}"
4
+ pixel_dimensions_error: "Image size should be less than or equal to %{x_size}x%{y_size}"
data/lib/locale/ru.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ru:
2
2
  errors:
3
3
  messages:
4
- pixel_dimentions_error: "Изображение не должно превышать размера %{x_size}x%{y_size}"
4
+ pixel_dimensions_error: "Изображение не должно превышать размера %{x_size}x%{y_size}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-bombshelter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.1
4
+ version: 0.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DarthSim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler