ruby-thumbor 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +12 -8
- data/lib/ruby-thumbor.rb +0 -1
- data/lib/thumbor/cascade.rb +5 -9
- data/lib/thumbor/crypto_url.rb +8 -28
- data/lib/thumbor/version.rb +1 -1
- data/spec/spec_helper.rb +7 -3
- data/spec/thumbor/cascade_spec.rb +147 -324
- metadata +7 -67
- data/spec/thumbor/crypto_url_spec.rb +0 -482
- data/spec/util/thumbor.rb +0 -7
data/spec/util/thumbor.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
def decrypt_in_thumbor(str)
|
2
|
-
command = "python -c 'from thumbor.crypto import Cryptor; cr = Cryptor(\"my-security-keymy\"); print cr.decrypt(\"" << str << "\")'"
|
3
|
-
result = Array.new
|
4
|
-
IO.popen(command) { |f| result.push(f.gets) }
|
5
|
-
result = result.join('').strip
|
6
|
-
JSON.parse(result.gsub('"', "@@@").gsub("'", '"').gsub("@@@", '\\"').gsub('True', 'true').gsub('False', 'false').gsub('None', 'null'))
|
7
|
-
end
|