compressed_attributes 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/compressed_attributes.rb +4 -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: d9a3e405d3eb2dc68abca859e118eee29908511a
|
4
|
+
data.tar.gz: 4be6f540cfb2d0c5a83c78468b7dda83da34e451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76620634c19ccc526f95a38b90710811bdbc5b331ee2e4807c4645cc25512e088f0920cffa4299adead1890799d9d3e9bec8dcc3ba324882a06b1b739363754d
|
7
|
+
data.tar.gz: 33653d5848cd93b05bdd10d651934b50ce214609b00f06275967e4b8312c274df471303db3c9531bf2ab4e0df59cf5dac885d83c89e86e5236523474fc84fe41
|
@@ -24,7 +24,10 @@ module CompressedAttributes
|
|
24
24
|
|
25
25
|
compressed_attribute_names.each do |attribute_name|
|
26
26
|
define_method("#{attribute_name}=".to_sym) do |new_value|
|
27
|
-
|
27
|
+
# Designates GZIP [http://www.gzip.org/zlib/rfc-gzip.html]
|
28
|
+
if new_value != nil && new_value[0..1].bytes != [31,139]
|
29
|
+
new_value = new_value.gzip
|
30
|
+
end
|
28
31
|
|
29
32
|
if defined?(super)
|
30
33
|
super(new_value)
|