carrierwave-tinypng 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/carrierwave/tinypng.rb +19 -0
- data/lib/carrierwave/tinypng/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65acdef4b87fdf8433560924278ab6cb4e9eb662
|
4
|
+
data.tar.gz: 5fffe0e0f5df1e520fc21500de817cb234615b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c553a5faf3a6320176119120d81c94be851d8a23475e430b3323be57ff04bb74caccd0128393e36a19937af1506f669a71ad5b5cd1113126393af4c06de97db
|
7
|
+
data.tar.gz: 25dfcb3a66ae7ddbea7b0d1399e922d000ac529d74d759d25c5cf7b3e9a05d5785780e059698fb6ca79220b2826329e07e58a3921b592cb2411f398d7ee9c517
|
data/README.md
CHANGED
data/lib/carrierwave/tinypng.rb
CHANGED
@@ -47,3 +47,22 @@ module CarrierWave
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
if defined?(Rails)
|
52
|
+
module CarrierWave
|
53
|
+
module TinyPNG
|
54
|
+
class Railtie < Rails::Railtie
|
55
|
+
initializer 'carrierwave_tinypng.setup_paths' do |app|
|
56
|
+
available_locales = app.config.i18n.available_locales.present? ?
|
57
|
+
[app.config.i18n.available_locales].flatten : []
|
58
|
+
available_locales_pattern = available_locales.empty? ?
|
59
|
+
'*' : "{#{ available_locales.join(',') }}"
|
60
|
+
files = Dir[File.join(File.dirname(__FILE__),
|
61
|
+
'locale',
|
62
|
+
"#{available_locales_pattern}.yml")]
|
63
|
+
I18n.load_path = files.concat(I18n.load_path)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|