Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authormaxwell <maxwell@maxwell-betty.(none)>2011-07-25 07:04:46 +0400
committermaxwell <maxwell@maxwell-betty.(none)>2011-07-25 07:06:07 +0400
commit7a5852e73acd1e160922e514ccec08748b4bc543 (patch)
tree0a9fe59e33246773b18a0287f86a90b45fa5daa0 /config
parent56cdb7a3ad24c00ecc9b6e16fdcfff628fe1ac5a (diff)
fix a bug with openssl keys in development. note to future max and
rafi. never monkey patch anything on the top of a completely random model. never again. ever. TODO: look into replacing a monkey patch on a to_s in User#generate_key that makes the single test green, but my dell had a heart attack other places, that might just be sqlite3 or my dell
Diffstat (limited to 'config')
-rw-r--r--config/initializers/patch_openssl_pkey.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/patch_openssl_pkey.rb b/config/initializers/patch_openssl_pkey.rb
new file mode 100644
index 000000000..ef6b1ddfe
--- /dev/null
+++ b/config/initializers/patch_openssl_pkey.rb
@@ -0,0 +1,14 @@
+# Copyright (c) 2010, Diaspora Inc. This file is
+# licensed under the Affero General Public License version 3 or later. See
+# the COPYRIGHT file.
+#
+#
+#
+#Why? as of rails 3.0.4, objects are marshalled by calling to yaml, if it is a text field in the db. since we assume things are strings coming out, and pkey does not seem to define a to_yaml, it was getting set to nil
+class OpenSSL::PKey::RSA
+ def to_yaml
+ self.to_s
+ end
+end
+
+