diff --git a/.gitignore b/.gitignore
index 9947f3f6576..e4121e00ea7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,10 @@ spec/fixtures/*.y*ml
spec/fixtures/*.fixture.*
coverage/*
+#Documentation
+.yardoc/
+doc/
+
# Uploaded files and local files
public/uploads/*
public/assets/*
diff --git a/.yardoc/checksums b/.yardoc/checksums
deleted file mode 100644
index fa9d256c4de..00000000000
--- a/.yardoc/checksums
+++ /dev/null
@@ -1,144 +0,0 @@
-app/models/jobs/process_photo.rb 07bf353232233eabbeeac1410d971630420e2e24
-app/models/conversation_visibility.rb c3c3f3ea3cbf8f9ce75821eb99edccab068ae816
-app/models/notifications/request_accepted.rb 17bf0a5bde9fa1172392a0bf981e7e926418231f
-app/helpers/aspects_helper.rb 8bf0e66d7d304e01b6e49cdc68b8afc5b61e1e25
-app/models/jobs/mail_mentioned.rb e468499ccc0bbefde48e4824dc3d8cdd8a272b26
-lib/diaspora/user.rb 2bfd74896a7a0846d69a35b656e3fc71ae59a164
-app/controllers/comments_controller.rb d9483663a26d6d5966eabe8ca5c924ac2312592c
-app/models/like.rb e3ad7863591358109b7f4e5bfa53bd87759b42b1
-app/models/jobs/mail_comment_on_post.rb 86b2b719a7bdbe45d6c7106c83b73ce663213533
-app/models/jobs/mail_started_sharing.rb 3bf07022266acbd487ba7ae57f5ea6bef1564f14
-app/helpers/language_helper.rb 7499b66eef413a4edc41bfc7aa11e10a5f98734d
-lib/fake.rb 55d535ce2bfaef8ca63c6f92a959f543866c67af
-app/models/jobs/receive_salmon.rb 778b38c4c38d8cc0338b298466b880478cba7d3b
-lib/hcard.rb 9afd5c6c628f3d6ab05114be01ca93fcbcddc3a0
-lib/diaspora/guid.rb 0831c36a234e4a67b041a5bcb0ef0c0b8fcaeb3e
-lib/webfinger.rb 2b41dbed8d2304f66793281886f847b5641a3e39
-lib/collect_user_photos.rb 9850815c569d450f93c37af2b5af2ac395aa7566
-app/controllers/invitations_controller.rb ceed71a32e35a980ae74c5d8dea46c2ffe8effdd
-app/models/comment.rb 2b3400756f3dfae2b217c14c141f01e5d97e639e
-app/controllers/tags_controller.rb 58c67c894f053908bdc24be53c6ab4eec27611f9
-app/models/user.rb 08ffea5fc5044e8baad97dc055f5cf2352b99a10
-app/models/notifications/liked.rb d38ed71e1638a6d2e1f339b21d47f02619bf596b
-app/controllers/tokens_controller.rb a810569f631fb8feadd53a7d8862fa078563f8a5
-app/models/notifications/also_commented.rb b9c1dc5cd1a333f5983d9dd9e995f1ec7b7afaf8
-app/models/service_user.rb fbb47f76a189e11d23664e691c732ecee14454a1
-app/controllers/messages_controller.rb 8400298e3a5bf49234092e3729dfb246c10d61e6
-lib/development_mail_interceptor.rb 129f13c43f0c4bcd273312000ab2befbc91a60ab
-app/models/post.rb 4f8b6ee1c04e72539ed26f12b6aa56b140d4853e
-app/models/aspect_visibility.rb 3edc84d7f2b88a21f6455617d76f613524d7c8c4
-lib/diaspora/user/querying.rb ae17ed4bde5597b68ad006e883e946355d81da69
-app/helpers/layout_helper.rb 9ea5941a1b6c88687018dbc13a8696d31995c60b
-lib/splunk_logging.rb 47f9b5db8b32c6da921d360992c976770e04098f
-lib/chrome_frame.rb bfa3a5d0e60edf00716724f8e41682fe80040d1c
-app/controllers/aspects_controller.rb a1d388f76b63ceeb7a6bfca489180a3c8d8147d5
-app/helpers/markdownify_helper.rb 144de1c8e41cd9ea62b9f2bfd5e01d3e270db2b7
-app/helpers/publics_helper.rb 391ae86656d7542f99057baf4e54384e98fc5976
-lib/rake_helpers.rb 6dcf44ace70c72350ed647e35a97ce89fd90f975
-lib/diaspora/encryptable.rb 1546637e5d086c1d8c53214a94be9387cc6ab50d
-app/mailers/notifier.rb 1a98e17916d3a63b1cee8cd2c13174e303521157
-lib/diaspora/parser.rb cfb7f7f797b43fa57ae507527f32fc96801dda1c
-app/models/request.rb 6ba9fafc1eed807fc9bb70f1eb80c44485c78128
-lib/diaspora.rb 404e72b8e03cf9a3bb1dd97540375608f1b26edc
-app/models/user_preference.rb 3f38fcd2f1da6292f2877f1598126eb50f793af5
-app/controllers/likes_controller.rb 4079f53539ab9ff24b7509d431cbdba8bf2f5742
-app/uploaders/unprocessed_image.rb 55a574a606795c76d86c0dcb4007fc2e9caeed98
-app/helpers/status_messages_helper.rb 82fa934ff00a6a00af03e7ba0258c829661f7be3
-app/controllers/services_controller.rb 03369201b2ce5ae7113adc7b375a8ecc5b0edd35
-app/models/jobs/mail_liked.rb f9575abef93b17f37b7368c0037b500c5b965dc9
-app/controllers/apis_controller.rb 6197b2ba581f8ec5cb08f2ba8a71e99b333c6a67
-app/helpers/application_helper.rb f660726b7bf19d2e39138219fdc734d31ee418c2
-app/controllers/posts_controller.rb 37900577192f332cbbe8fd49f6fe9142e8e0f32c
-app/helpers/error_messages_helper.rb 9062b5b36b2df5d97a4afc67274512bea3bd746b
-app/controllers/status_messages_controller.rb 9db3bd7c597a8b42eda4d81afd22f4043df8d1b2
-app/models/jobs/receive.rb 49b602779318ad7b41e6c12c082d651c7661e2c5
-app/models/profile.rb 6a151c0f31bcbdc6207cad3ad090e6eac982283a
-app/models/activity_streams/photo.rb b8e9ce3c1bde805ce064454db213e377c8b4392b
-app/models/relayable_retraction.rb 7521197d0ba57495f431af93bf0dff1b9b3636c2
-app/helpers/stream_helper.rb 1e3d0f97465b581cb9f0499207d89c06d0b4d69f
-app/models/aspect.rb c335d5779cf6e077efe625c679bada8af4e1230c
-app/controllers/conversation_visibilities_controller.rb fd91f231add57aeba7384527d2276f7370194562
-app/models/jobs/base.rb 3124c3c0624f5a0ab223415ce09e3ab4a76e0759
-lib/diaspora/web_socket.rb a36225354db4e3715369935ef57e66c293d92d1c
-lib/diaspora/user/connecting.rb 6f81cdfcd461e5b7b448399ebce7e00fac148a18
-app/models/invitation.rb d4ea320bd3dc3772c788aafa90b7982deb59e3fd
-app/models/notifications/started_sharing.rb 583e1ccb9ed908e07ffc4a0f6dc43bed3878255a
-app/helpers/aspect_global_helper.rb 9a4e6228057af7b1131f688c3bdc11294a2098be
-lib/youtube_titles.rb e8b728d8f2a39b8df271130b795a898983c30573
-app/models/jobs/receive_local_batch.rb 883d9546eac5a0b212102a44711d4970e8b7e96d
-app/controllers/post_visibilities_controller.rb 7a52e9a7185548f2bd3ec377b97d7b8b387326bb
-app/controllers/admins_controller.rb e9bbfecb0a2f636830acefa59995678df6341869
-app/controllers/people_controller.rb 7563bc524a08fe294a94b02865ad7e9e0a51ae69
-app/helpers/sockets_helper.rb 4d98677751262dc2d52315b1cd80832c5c1d53e9
-app/models/message.rb cd9162d6cac3df3b25a164d4aea9f6de4e617c1f
-app/models/jobs/http_multi.rb 20e960fa80a3a5fa7306364d5ab93a811767d913
-lib/webfinger_profile.rb 37dca32719312bc3d3a47b58eb0fa1716081b577
-app/controllers/publics_controller.rb c6f444d66aa2422e9a73e0e9e670b2276a322ef6
-lib/encryptor.rb 90365ba2ec1051d050273181d57f8583dae96ff4
-app/controllers/sockets_controller.rb 676e60737df103f9653afc050b2ad97540cdb033
-app/controllers/application_controller.rb 2d65af8fef391b50280286daffca6f608cea7ed6
-lib/postzord.rb 91155a42f013f68cad3fe44037d97766c4459e46
-app/models/notification_actor.rb 5b6fe651b341e3c2c1d56e1fc55fa74ac09c7d05
-app/models/jobs/mail_private_message.rb d28db317cf4738d1036284b329e8fee13f9534cb
-app/controllers/users_controller.rb 69840f7d491bdc507e648884739543ae8f41eea3
-app/models/services/twitter.rb 3db64d3870e8960ed826663d3b21670a6ab1302a
-app/helpers/users_helper.rb bdab0e9c1f2158460a0426e5d260a331cf7acde3
-app/models/mention.rb ecdb144f9213cdd9e81972fc603c5db0da6e6ee6
-app/models/person.rb 8facc2c7e56c95c14151978032fc9bcf5794496e
-lib/diaspora/webhooks.rb abd3613c592790c2c375c91d36e8af82eb7492bf
-app/models/jobs/delete_account.rb 712442380ddb73761b235908e33d5fa0ac681753
-app/models/notifications/mentioned.rb 9f15f72210a305d08d480670f3833d6c6a03188f
-app/models/conversation.rb 5886762a03434f2c9fc744f25c12cc397c489a59
-app/controllers/profiles_controller.rb 2c439988db06ac4dee45e6e72cdf5d24abc51528
-app/helpers/likes_helper.rb d0c91fba653ae44ee4bd9862cbc0d6221cc64ae9
-app/helpers/mobile_helper.rb d146b4d30af80e370df75c5454a823c981ae73de
-lib/direction_detector.rb 80ae6454c9d11cc8cfe76d7f3d4f65d903562a62
-app/models/aspect_membership.rb c9195f714c5a51555b180e50b13bdabc73f8b716
-lib/pubsubhubbub.rb 17ceaa27d14b1cac0b40dff0a5ceebc332dc1b5d
-lib/postzord/receiver.rb c38b6bd8a6389210b7e5ea7a611014b07b505149
-app/controllers/photos_controller.rb 853274a36afb4a8232b2dc1eb20b7a2dcbaa10f8
-app/models/notifications/comment_on_post.rb 00c05f15683458ae8b37023c51f9f7bbea28bfa4
-lib/cruise/build.rb 82ff59377ba3ad2a11e9a52940ebb1aac2ffea52
-app/helpers/people_helper.rb 0350106a67127dbb05231d6880d5517399de96e3
-app/models/jobs/post_to_service.rb 406fcf6091c07bd59d06db1b015336f50b165f87
-lib/diaspora/exporter.rb dc61617c690ff6b8f6e9474a7c73810c1075c58b
-app/models/status_message.rb f623f4f969e02a9ec089205ba88f442e486ca521
-app/models/contact.rb f16d247b6ec0c4497e3ba90a1b0a4ff4eb4db814
-app/uploaders/processed_image.rb c16375b00e6589505ed48fab14c0291bca19342d
-app/controllers/aspect_memberships_controller.rb c09c52883c63951c7af4bd52cedae134ae7ee344
-lib/log_overrider.rb 8efa54a42e32b2493cbec0d6f622da54c1d76e57
-app/models/jobs/resend_invitation.rb 955d43f984d42d6a49c3a270ef0e22ae6baff8b7
-app/models/notifications/private_message.rb 423dd184873141fbf65320026772f9c2a6763f2c
-app/controllers/sessions_controller.rb 3435dafb115375e406e71f0b1abc527ccb6744ca
-app/models/notification.rb e63f02dedc4828606b58668c9a1cf2f6cc04ceb5
-app/models/services/tumblr.rb cf17a8c6935ed1c2817d312b73b7cd5040124261
-app/controllers/notifications_controller.rb c0d117950c8578b6f3d2f303bb8d93e9b22b90b9
-app/controllers/registrations_controller.rb 9f1c6bb886cafcb17e3e85bafe238c1004007f16
-app/models/jobs/update_service_users.rb 87d8fb174d9a3f2402b76dff098af30c9e62c6bb
-app/controllers/contacts_controller.rb 6e51e74f08eb8d476d0252ff68b8aa9c0d6a7847
-app/helpers/comments_helper.rb e4bb2ef4b1d4abba48c792f4f2ae245d8b958a8b
-app/models/jobs/notify_local_users.rb f1a552240566e61912b276d964ce907fcb97c5d0
-lib/diaspora/relayable.rb ffef93646ef927ce597441c51ecdc0246a721fbf
-lib/diaspora/ostatus_builder.rb e19d782a0f9776a1758f87dd17c5d589e176a9e1
-app/models/jobs/socket_webfinger.rb 4c3a50bff8c51007108dcb4ffd277a1f20b05a36
-app/models/services/facebook.rb 289d3f2c968bb9d4d6a4183b4fd71816d7e2b680
-lib/postzord/dispatch.rb 1dab04be068e01ae73de632f358660ee156dfb75
-app/models/app_config.rb 89900ef69a85706b353a8d34ed9d6aef90d20713
-app/helpers/tags_helper.rb 6ffe96fd4d7da104244cd58801e7e4b4c16a7c4a
-app/controllers/conversations_controller.rb 8a335ecf35080fca8c13eaa84178f7cf32dd46cf
-app/models/jobs/invite_user_by_email.rb 0620f53733c346b7a7bc7d01f6dcc9d5ab10c562
-lib/salmon/salmon.rb 879c2ee468b9118c22792f73aef13b867c7002b5
-app/models/post_visibility.rb f6d320b1c4b35c9307e59b1e37cf46bd855375fd
-app/models/photo.rb 98ec70c45f51445f00f667a843c0d4e82baa97fa
-app/models/retraction.rb 3265e0ac2cf98081a49d80377473a0c299480b7a
-app/models/jobs/mail_also_commented.rb 105042cfa879bcd1de321e560e2145e0f27cd52c
-lib/resque_job_logging.rb 1df39084b3fdfd73c73537855a7388bd8ab8ac29
-app/controllers/activity_streams/photos_controller.rb ab58bb90489997f7fee6ffe40330729ab40dc741
-app/models/jobs/http_post.rb 2560c6b08be06020c87bf60e4be63add4073a48a
-lib/active_record_instantiation_logs.rb d9e1817a755b39e4fa7f9c54f2e4c26882855721
-app/models/jobs/publish_to_hub.rb bdd97083b596c30e08b24689e78c85322b875204
-app/models/service.rb ab3c000da614959247b924d6dc0c91f7e7439336
-app/controllers/home_controller.rb d2e3453c670f71f1c51e7863b7b8c061c3abaca1
-lib/diaspora/taggable.rb 7e82aa7a9f7460568aca6f911e42289d6332c6e8
-app/controllers/apps_controller.rb 447d557f9cc265de6ee672d1ef01fba060f0d2cd
-app/helpers/notifications_helper.rb 93cdba1161e88b83fad57b68892af216164588d7
diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat
deleted file mode 100644
index 494d8bd5a7d..00000000000
Binary files a/.yardoc/objects/root.dat and /dev/null differ
diff --git a/.yardoc/proxy_types b/.yardoc/proxy_types
deleted file mode 100644
index ff011162a4c..00000000000
Binary files a/.yardoc/proxy_types and /dev/null differ
diff --git a/doc/ActionController/LogSubscriber.html b/doc/ActionController/LogSubscriber.html
deleted file mode 100644
index 22a1afe51df..00000000000
--- a/doc/ActionController/LogSubscriber.html
+++ /dev/null
@@ -1,289 +0,0 @@
-
-
-
-
-
- Class: ActionController::LogSubscriber
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ActionController::LogSubscriber
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- ActionController::LogSubscriber
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Oink::InstanceTypeCounter
-
-
-
-
-
- Defined in:
- lib/log_overrider.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#before_report_active_record_count , included , #report_hash , #report_hash! , #report_instance_type_count
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) process_action (event)
-
-
-
-
-
-
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
- # File 'lib/log_overrider.rb', line 43
-
-def process_action ( event )
- payload = event . payload
- additions = ActionController :: Base . log_process_action ( payload )
- params = payload [ :params ] . except ( * INTERNAL_PARAMS )
-
- log_hash = { :event = > :request_completed ,
- :status = > payload [ :status ] ,
- :controller = > payload [ :controller ] ,
- :action = > payload [ :action ] ,
- :format = > payload [ :formats ] . first . to_s . upcase ,
- :ms = > ( "%.0f" % event . duration ) . to_i ,
- :params = > params . inspect }
- log_hash . merge! ( {
- :gc_ms = > GC . time / 1000 ,
- :gc_collections = > GC . collections ,
- :gc_bytes= > GC . growth } ) if GC . respond_to? ( :enable_stats )
-
- log_hash . merge! ( { :view_ms = > payload [ :view_runtime ] ,
- :db_ms = > payload [ :db_runtime ] } ) unless additions . blank?
- log_hash . merge! ( report_hash! )
-
- Rails . logger . info ( log_hash )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) start_processing (event)
-
-
-
-
-
-
-
-
-
-39
-40
-41
-
-
- # File 'lib/log_overrider.rb', line 39
-
-def start_processing ( event )
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ActionDispatch.html b/doc/ActionDispatch.html
deleted file mode 100644
index b45083144f4..00000000000
--- a/doc/ActionDispatch.html
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
- Module: ActionDispatch
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: ActionDispatch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/log_overrider.rb
-
-
-
-
-
Defined Under Namespace
-
-
-
-
-
- Classes: ShowExceptions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ActionView/LogSubscriber.html b/doc/ActionView/LogSubscriber.html
deleted file mode 100644
index dc5b0c2e82e..00000000000
--- a/doc/ActionView/LogSubscriber.html
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-
-
-
- Class: ActionView::LogSubscriber
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ActionView::LogSubscriber
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- ActionView::LogSubscriber
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/log_overrider.rb
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) render_template (event)
-
-
-
- Also known as:
- render_partial , render_collection
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-
-
- # File 'lib/log_overrider.rb', line 2
-
-def render_template ( event )
- count = event . payload [ :count ] || 1
- hash = { :event = > :render ,
- :template = > from_rails_root ( event . payload [ :identifier ] ) ,
- :total_ms = > event . duration ,
- :count = > count ,
- :ms = > event . duration / count }
-
- hash . merge ( :layout = > event . payload [ :layout ] ) if event . payload [ :layout ]
-
- Rails . logger . info ( hash )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ActiveRecord/LogSubscriber.html b/doc/ActiveRecord/LogSubscriber.html
deleted file mode 100644
index 8932fd0ec70..00000000000
--- a/doc/ActiveRecord/LogSubscriber.html
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
- Class: ActiveRecord::LogSubscriber
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ActiveRecord::LogSubscriber
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- ActiveRecord::LogSubscriber
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/log_overrider.rb
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) sql (event)
-
-
-
-
-
-
-
-
-
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
- # File 'lib/log_overrider.rb', line 83
-
-def sql ( event )
- self . class . runtime += event . duration
- return unless logger . info?
-
- payload = event . payload
- sql = payload [ :sql ] . squeeze ( ' ' )
- binds = nil
-
- unless ( payload [ :binds ] || [ ] ) . empty?
- binds = " " + payload [ :binds ] . map { | col , v |
- [ col . name , v ]
- } . inspect
- end
-
- log_string = "event=sql name='#{payload[:name]}' ms=#{event.duration} query='#{sql}'"
- log_string << "caller_hash=#{caller.hash} binds='#{binds}' caller_with_diaspora='#{caller.grep(/diaspora\/(app|lib)/).join(';')}'"
- info log_string
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AppConfig.html b/doc/AppConfig.html
deleted file mode 100644
index 3158b80cd7f..00000000000
--- a/doc/AppConfig.html
+++ /dev/null
@@ -1,914 +0,0 @@
-
-
-
-
-
- Class: AppConfig
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: AppConfig
-
-
-
-
-
-
-
- Inherits:
-
- Settingslogic
-
-
- Object
-
- Settingslogic
-
- AppConfig
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/app_config.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) [] (key)
-
-
-
-
-
-
-
-
-
-103
-104
-105
-106
-
-
- # File 'app/models/app_config.rb', line 103
-
-def self . [ ] ( key )
- return self . pod_uri if key == :pod_uri
- super
-end
-
-
-
-
-
-
-
-
-
- + (Object ) []= (key, value)
-
-
-
-
-
-
-
-
-
-108
-109
-110
-111
-112
-113
-114
-
-
- # File 'app/models/app_config.rb', line 108
-
-def self . [ ] = ( key , value )
- super
- if key . to_sym == :pod_url
- @@pod_uri = nil
- normalize_pod_url
- end
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) config_file_is_old_style?
-
-
-
-
-
-
-
-
-
-
-71
-72
-73
-
-
- # File 'app/models/app_config.rb', line 71
-
-def self . config_file_is_old_style?
- ! ( File . read ( @source ) =~ /^defaults: &defaults/ )
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) have_old_config_file?
-
-
-
-
-
-
-
-
-
-
-83
-84
-85
-
-
- # File 'app/models/app_config.rb', line 83
-
-def self . have_old_config_file?
- File . exists? ( File . join ( Rails . root , "config" , "app.yml" ) ) || ( File . exists? ( File . join ( Rails . root , "config" , "app_config.yml" ) ) )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) load!
-
-
-
-
-
-
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
- # File 'app/models/app_config.rb', line 21
-
-def self . load!
- if no_config_file? && ! have_old_config_file? && ! travis?
- $stderr . puts "******** You haven't set up your Diaspora settings file. **********\nPlease do the following:\n1. Copy config/application.yml.example to config/application.yml.\n2. Have a look at the settings in that file. It has sensible defaults for development, which (we hope)\nwork without modification. However, it's always good to know what's available to change later.\n3. Restart Diaspora!\n******** Thanks for being an alpha tester! **********\n"
- Process . exit ( 1 )
- end
-
- if ( no_config_file? && have_old_config_file? ) || config_file_is_old_style?
- $stderr . puts "******** The Diaspora configuration file format has changed. **********\nPlease do the following:\n1. Copy config/application.yml.example to config/application.yml.\n2. Make any changes in config/application.yml that you previously made in config/app.yml or config/app_config.yml.\n3. Delete config/app.yml and config/app_config.yml. Don't worry if they don't exist, though.\n4. Restart Diaspora!\n******** Thanks for being an alpha tester! **********\n"
- Process . exit ( 1 )
- end
-
- super
-
- if no_cert_file_in_prod?
- $stderr . puts "******** Diaspora does not know where your SSL-CA-Certificates file is. **********\nPlease add the root certificate bundle (this is operating system specific) to application.yml. Defaults:\nCentOS: '/etc/pki/tls/certs/ca-bundle.crt'\nDebian: '/etc/ssl/certs/ca-certificates.crt'\n\nExample:\nca_file: '/etc/ssl/certs/ca-certificates.crt'\n******** Thanks for being secure! **********\n"
- Process . exit ( 1 )
- end
-
- normalize_pod_url
- normalize_admins
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) no_cert_file_in_prod?
-
-
-
-
-
-
-
-
-
-
-79
-80
-81
-
-
- # File 'app/models/app_config.rb', line 79
-
-def self . no_cert_file_in_prod?
- ( Rails . env == "production" ) && self [ :ca_file ] && ! File . exists? ( self [ :ca_file ] )
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) no_config_file?
-
-
-
-
-
-
-
-
-
-
-75
-76
-77
-
-
- # File 'app/models/app_config.rb', line 75
-
-def self . no_config_file?
- ! File . exists? ( @source )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) normalize_admins
-
-
-
-
-
-
-
-
-
-96
-97
-98
-99
-
-
- # File 'app/models/app_config.rb', line 96
-
-def self . normalize_admins
- self [ :admins ] ||= [ ]
- self [ :admins ] . collect! { | username | username . downcase }
-end
-
-
-
-
-
-
-
-
-
- + (Object ) normalize_pod_url
-
-
-
-
-
-
-
-
-
-87
-88
-89
-90
-91
-92
-93
-94
-
-
- # File 'app/models/app_config.rb', line 87
-
-def self . normalize_pod_url
- unless self [ :pod_url ] =~ /^(https?:\/\/)/
- self [ :pod_url ] = "http://#{self[:pod_url]}"
- end
- unless self [ :pod_url ] =~ /\/$/
- self [ :pod_url ] = "#{self[:pod_url]}/"
- end
-end
-
-
-
-
-
-
-
-
-
- + (Object ) pod_uri
-
-
-
-
-
-
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-
-
- # File 'app/models/app_config.rb', line 118
-
-def self . pod_uri
- if @@pod_uri . nil?
- begin
- @@pod_uri = URI . parse ( self . pod_url )
- rescue
- puts "WARNING: pod url " + self . pod_url + " is not a legal URI"
- end
- end
- return @@pod_uri
-end
-
-
-
-
-
-
-
-
-
- + (Object ) source_file_name
-
-
-
-
-
-
-
-
-
-12
-13
-14
-15
-16
-
-
- # File 'app/models/app_config.rb', line 12
-
-def self . source_file_name
- file_name = "application.yml"
- file_name << ".example" if travis?
- File . join ( Rails . root , "config" , file_name )
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) travis?
-
-
-
-
-
-
-
-
-
-
-8
-9
-10
-
-
- # File 'app/models/app_config.rb', line 8
-
-def self . travis?
- ENV [ "TRAVIS" ]
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ApplicationController.html b/doc/ApplicationController.html
deleted file mode 100644
index a8449a95875..00000000000
--- a/doc/ApplicationController.html
+++ /dev/null
@@ -1,838 +0,0 @@
-
-
-
-
-
- Class: ApplicationController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ApplicationController
-
-
-
-
-
-
-
- Inherits:
-
- ActionController::Base
-
-
- Object
-
- ActionController::Base
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/application_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
Direct Known Subclasses
-
ActivityStreams::PhotosController , AdminsController , ApisController , AppsController , AspectMembershipsController , AspectsController , CommentsController , ContactsController , ConversationVisibilitiesController , ConversationsController , HomeController , LikesController , MessagesController , NotificationsController , PeopleController , PhotosController , PostVisibilitiesController , PostsController , ProfilesController , PublicsController , ServicesController , SocketsController , StatusMessagesController , TagsController , TokensController , UsersController
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) after_sign_in_path_for (resource)
-
-
-
-
-
-
-
-
-
-107
-108
-109
-
-
- # File 'app/controllers/application_controller.rb', line 107
-
-def after_sign_in_path_for ( resource )
- stored_location_for ( :user ) || aspects_path
-end
-
-
-
-
-
-
-
-
-
- - (Object ) clear_gc_stats
-
-
-
-
-
-
-
-
-
-74
-75
-76
-
-
- # File 'app/controllers/application_controller.rb', line 74
-
-def clear_gc_stats
- GC . clear_stats if GC . respond_to? ( :clear_stats )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) ensure_http_referer_is_set
-
-
-
-
-
-
-
-
-
-20
-21
-22
-
-
- # File 'app/controllers/application_controller.rb', line 20
-
-def ensure_http_referer_is_set
- request . env [ 'HTTP_REFERER' ] ||= '/aspects'
-end
-
-
-
-
-
-
-
-
-
- - (Object ) ensure_page
-
-
-
-
-
-
-
-
-
-36
-37
-38
-
-
- # File 'app/controllers/application_controller.rb', line 36
-
-def ensure_page
- params [ :page ] = params [ :page ] ? params [ :page ] . to_i : 1
-end
-
-
-
-
-
-
-
-
-
- - (Object ) grammatical_gender
-
-
-
-
-
-
-
-
-
-103
-104
-105
-
-
- # File 'app/controllers/application_controller.rb', line 103
-
-def grammatical_gender
- @grammatical_gender || nil
-end
-
-
-
-
-
-
-
-
-
- - (Object ) redirect_unless_admin
-
-
-
-
-
-
-
-
-
-78
-79
-80
-81
-82
-83
-
-
- # File 'app/controllers/application_controller.rb', line 78
-
-def redirect_unless_admin
- unless current_user . admin?
- redirect_to root_url , :notice = > 'you need to be an admin to do that'
- return
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-46
-47
-48
-49
-
-
- # File 'app/controllers/application_controller.rb', line 46
-
-def
- [ 'X-Git-Update' ] = AppConfig [ :git_update ]
- [ 'X-Git-Revision' ] = AppConfig [ :git_revision ]
-end
-
-
-
-
-
-
-
-
-
- - (Object ) set_grammatical_gender
-
-
-
-
-
-
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
- # File 'app/controllers/application_controller.rb', line 85
-
-def set_grammatical_gender
- if ( user_signed_in? && I18n . inflector . inflected_locale? )
- gender = current_user . profile . gender . to_s . tr ( '!()[]"\'`*=|/\#.,-:' , '' ) . downcase
- unless gender . empty?
- i_langs = I18n . inflector . inflected_locales ( :gender )
- i_langs . delete I18n . locale
- i_langs . unshift I18n . locale
- i_langs . each do | lang |
- token = I18n . inflector . true_token ( gender , :gender , lang )
- unless token . nil?
- @grammatical_gender = token
- break
- end
- end
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
- # File 'app/controllers/application_controller.rb', line 24
-
-def
- if user_signed_in?
- if request . format . html? && ! params [ :only_posts ]
- @aspect = nil
- @notification_count = Notification . for ( current_user , :unread = > true ) . count
- @unread_message_count = ConversationVisibility . sum ( :unread , :conditions = > "person_id = #{current_user.person.id}" )
- end
- @object_aspect_ids = [ ]
- @all_aspects = current_user . aspects
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) set_invites
-
-
-
-
-
-
-
-
-
-40
-41
-42
-43
-44
-
-
- # File 'app/controllers/application_controller.rb', line 40
-
-def set_invites
- if user_signed_in?
- @invites = current_user . invites
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) set_locale
-
-
-
-
-
-
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
- # File 'app/controllers/application_controller.rb', line 63
-
-def set_locale
- if user_signed_in?
- I18n . locale = current_user . language
- else
- I18n . locale = request . compatible_language_from AVAILABLE_LANGUAGE_CODES
- end
-
- WillPaginate :: ViewHelpers . [ :previous_label ] = "« #{I18n.t('previous')}"
- WillPaginate :: ViewHelpers . [ :next_label ] = "#{I18n.t('next')} »"
-end
-
-
-
-
-
-
-
-
-
- - (Object ) which_action_and_user
-
-
-
-
-
-
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
- # File 'app/controllers/application_controller.rb', line 51
-
-def which_action_and_user
- str = "event=request_with_user controller=#{self.class} action=#{self.action_name} "
- if current_user
- str << "uid=#{current_user.id} "
- str << "user_created_at='#{current_user.created_at.to_date.to_s}' user_created_at_unix=#{current_user.created_at.to_i} " if current_user . created_at
- str << "user_non_pending_contact_count=#{current_user.contacts.size} user_contact_count=#{Contact.unscoped.where(:user_id => current_user.id).size} "
- else
- str << 'uid=nil'
- end
- Rails . logger . info str
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AppsController.html b/doc/AppsController.html
deleted file mode 100644
index 6fda2232d1a..00000000000
--- a/doc/AppsController.html
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
- Class: AppsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: AppsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/apps_controller.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-
-
- # File 'app/controllers/apps_controller.rb', line 2
-
-def show
- @app = 'cubbies'
- @posts = ActivityStreams :: Photo
- max_time = params [ :max_time ] ? Time . at ( params [ :max_time ] . to_i ) : Time . now
- @posts = @posts . where ( ActivityStreams :: Photo . arel_table [ :created_at ] . lt ( max_time )
- ) . where ( :public = > true
- ) . order ( 'posts.created_at DESC'
- ) . includes ( :author = > :profile ) . limit ( 30 )
- = true
- @people = [ ]
- @people_count = 0
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AspectGlobalHelper.html b/doc/AspectGlobalHelper.html
deleted file mode 100644
index 5c22a75ffde..00000000000
--- a/doc/AspectGlobalHelper.html
+++ /dev/null
@@ -1,761 +0,0 @@
-
-
-
-
-
- Module: AspectGlobalHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: AspectGlobalHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/helpers/aspect_global_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) aspect_badge (aspect, opts = {})
-
-
-
-
-
-
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 26
-
-def aspect_badge ( aspect , opts = { } )
- str = "<span class='aspect_badge single'>"
- link = opts . delete ( :link )
- if ! link
- str << link_to ( aspect . name , "#" , 'data-guid' = > aspect . id , :class = > 'hard_aspect_link' ) . html_safe
- else
- str << link_for_aspect ( aspect ) . html_safe
- end
- str << "</span>"
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_badges (aspects, opts = {})
-
-
-
-
-
-
-
-
-
-18
-19
-20
-21
-22
-23
-24
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 18
-
-def aspect_badges ( aspects , opts = { } )
- str = ''
- aspects . each do | aspect |
- str << aspect_badge ( aspect , opts )
- end
- str . html_safe
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_dropdown_list_item (aspect, contact, person)
-
-
-
-
-
-
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 85
-
-def aspect_dropdown_list_item ( aspect , contact , person )
- checked = ( contact . persisted? && contact . aspect_memberships . detect { | am | am . aspect_id == aspect . id } )
- klass = checked ? "selected" : ""
- hidden = ! checked ? "hidden" : ""
-
- str = "<li data-aspect_id=#{aspect.id} class='#{klass}'>"
-
- str << "<img src='/images/icons/check_yes_ok.png' width=18 height=18 class='check #{hidden}'/>"
- str << "<img src='/images/icons/check_yes_ok_white.png' width=18 height=18 class='checkWhite'/>"
- str << aspect . name
- str << "<div class=\"hidden\">"
- str << aspect_membership_button ( aspect , contact , person )
- str << "</div>"
- str << "</li>"
- str . html_safe
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_li (aspect, opts = {})
-
-
-
-
-
-
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 47
-
-def aspect_li ( aspect , opts = { } )
- param_string = ""
- if opts . size > 0
- param_string << '?'
- opts . each_pair do | k , v |
- param_string << "#{k}=#{v}"
- end
- end
-"<li>
-<a href='/aspects/#{aspect.id}#{param_string}'>
- #{aspect.name}
-</a>
-</li>" . html_safe
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_links (aspects, opts = {})
-
-
-
-
-
-
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 37
-
-def aspect_links ( aspects , opts = { } )
- str = ""
- aspects . each do | aspect |
- str << '<li>'
- str << link_for_aspect ( aspect , :params = > opts , 'data-guid' = > aspect . id , :class = > 'hard_aspect_link' ) . html_safe
- str << '</li>'
- end
- str . html_safe
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_or_all_path (aspect)
-
-
-
-
-
-
-
-
-
-77
-78
-79
-80
-81
-82
-83
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 77
-
-def aspect_or_all_path ( aspect )
- if @aspect . is_a? Aspect
- aspect_path @aspect
- else
- aspects_path
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspects_with_post (aspects, post)
-
-
-
-
-
-
-
-
-
-6
-7
-8
-9
-10
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 6
-
-def aspects_with_post ( aspects , post )
- aspects . select do | aspect |
- AspectVisibility . exists? ( :aspect_id = > aspect . id , :post_id = > post . id )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspects_without_post (aspects, post)
-
-
-
-
-
-
-
-
-
-12
-13
-14
-15
-16
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 12
-
-def aspects_without_post ( aspects , post )
- aspects . reject do | aspect |
- AspectVisibility . exists? ( :aspect_id = > aspect . id , :post_id = > post . id )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) current_aspect? (aspect)
-
-
-
-
-
-
-
-
-
-
-73
-74
-75
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 73
-
-def current_aspect? ( aspect )
- ! @aspect . nil? && ! @aspect . instance_of? ( Symbol ) && @aspect . id == aspect . id
-end
-
-
-
-
-
-
-
-
-
- - (Object ) link_for_aspect (aspect, opts = {})
-
-
-
-
-
-
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
- # File 'app/helpers/aspect_global_helper.rb', line 62
-
-def link_for_aspect ( aspect , opts = { } )
- opts [ :params ] ||= { }
- params ||= { }
- opts [ :params ] = opts [ :params ] . merge ( "a_ids[]" = > aspect . id , :created_at = > params [ :created_at ] )
- opts [ :class ] ||= ""
- opts [ :class ] << " hard_aspect_link"
- opts [ 'data-guid' ] = aspect . id
-
- link_to aspect . name , aspects_path ( opts [ :params ] ) , opts
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AspectMembership.html b/doc/AspectMembership.html
deleted file mode 100644
index aa4ed2544d7..00000000000
--- a/doc/AspectMembership.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
- Class: AspectMembership
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: AspectMembership
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- AspectMembership
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/aspect_membership.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AspectMembershipsController.html b/doc/AspectMembershipsController.html
deleted file mode 100644
index 42e9de6f4b0..00000000000
--- a/doc/AspectMembershipsController.html
+++ /dev/null
@@ -1,415 +0,0 @@
-
-
-
-
-
- Class: AspectMembershipsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: AspectMembershipsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/aspect_memberships_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
- # File 'app/controllers/aspect_memberships_controller.rb', line 35
-
-def create
- @person = Person . find ( params [ :person_id ] )
- @aspect = current_user . aspects . where ( :id = > params [ :aspect_id ] ) . first
-
- if @contact = current_user . share_with ( @person , @aspect )
-
- flash . now [ :notice ] = I18n . t 'aspects.add_to_aspect.success'
-
- else
- flash [ :error ] = I18n . t 'contacts.create.failure'
- redirect_to :back
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) destroy
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
- # File 'app/controllers/aspect_memberships_controller.rb', line 9
-
-def destroy
-
-
- @person_id = params [ :person_id ]
- @aspect_id = params [ :aspect_id ]
-
- @contact = current_user . contact_for ( Person . where ( :id = > @person_id ) . first )
- membership = @contact ? @contact . aspect_memberships . where ( :aspect_id = > @aspect_id ) . first : nil
-
- if membership && membership . destroy
- @aspect = membership . aspect
-
- flash . now [ :notice ] = I18n . t 'aspect_memberships.destroy.success'
-
- else
- flash . now [ :error ] = I18n . t 'aspect_memberships.destroy.failure'
- errors = membership ? membership . errors . full_messages : t ( 'aspect_memberships.destroy.no_membership' )
- respond_to do | format |
- format . js { render :text = > errors , :status = > 403 }
- format . html {
- redirect_to :back
- }
- end
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update
-
-
-
-
-
-
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
- # File 'app/controllers/aspect_memberships_controller.rb', line 49
-
-def update
- @person = Person . find ( params [ :person_id ] )
- @from_aspect = current_user . aspects . where ( :id = > params [ :aspect_id ] ) . first
- @to_aspect = current_user . aspects . where ( :id = > params [ :to ] ) . first
-
- response_hash = { }
-
- unless current_user . move_contact ( @person , @to_aspect , @from_aspect )
- flash [ :error ] = I18n . t 'aspects.move_contact.error' , :inspect = > params . inspect
- end
- if aspect = current_user . aspects . where ( :id = > params [ :to ] ) . first
- response_hash [ :notice ] = I18n . t 'aspects.move_contact.success'
- response_hash [ :success ] = true
- else
- response_hash [ :notice ] = I18n . t 'aspects.move_contact.failure'
- response_hash [ :success ] = false
- end
-
- render :text = > response_hash . to_json
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/AspectsHelper.html b/doc/AspectsHelper.html
deleted file mode 100644
index be8086f2fef..00000000000
--- a/doc/AspectsHelper.html
+++ /dev/null
@@ -1,382 +0,0 @@
-
-
-
-
-
- Module: AspectsHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: AspectsHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/helpers/aspects_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) add_to_aspect_button (aspect_id, person_id)
-
-
-
-
-
-
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-
-
- # File 'app/helpers/aspects_helper.rb', line 14
-
-def add_to_aspect_button ( aspect_id , person_id )
- link_to image_tag ( 'icons/monotone_plus_add_round.png' ) ,
- { :controller = > 'aspect_memberships' ,
- :action = > 'create' ,
- :aspect_id = > aspect_id ,
- :person_id = > person_id } ,
- :remote = > true ,
- :method = > 'post' ,
- :class = > 'add button' ,
- 'data-aspect_id' = > aspect_id ,
- 'data-person_id' = > person_id
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspect_membership_button (aspect, contact, person)
-
-
-
-
-
-
-
-
-
-41
-42
-43
-44
-45
-46
-47
-
-
- # File 'app/helpers/aspects_helper.rb', line 41
-
-def aspect_membership_button ( aspect , contact , person )
- if contact . nil? || ! contact . aspect_memberships . detect { | am | am . aspect_id == aspect . id }
- add_to_aspect_button ( aspect . id , person . id )
- else
- remove_from_aspect_button ( aspect . id , person . id )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) remove_from_aspect_button (aspect_id, person_id)
-
-
-
-
-
-
-
-
-
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
- # File 'app/helpers/aspects_helper.rb', line 27
-
-def remove_from_aspect_button ( aspect_id , person_id )
- link_to image_tag ( 'icons/monotone_check_yes.png' ) ,
- { :controller = > "aspect_memberships" ,
- :action = > 'destroy' ,
- :id = > 42 ,
- :aspect_id = > aspect_id ,
- :person_id = > person_id } ,
- :remote = > true ,
- :method = > 'delete' ,
- :class = > 'added button' ,
- 'data-aspect_id' = > aspect_id ,
- 'data-person_id' = > person_id
-end
-
-
-
-
-
-
-
-
-
- - (Object ) remove_link (aspect)
-
-
-
-
-
-
-
-
-
-6
-7
-8
-9
-10
-11
-12
-
-
- # File 'app/helpers/aspects_helper.rb', line 6
-
-def remove_link ( aspect )
- if aspect . contacts . size == 0
- link_to I18n . t ( 'aspects.helper.remove' ) , aspect , :method = > :delete , :confirm = > I18n . t ( 'aspects.helper.are_you_sure' )
- else
- "<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>"
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ContactsController.html b/doc/ContactsController.html
deleted file mode 100644
index b33f227ebd3..00000000000
--- a/doc/ContactsController.html
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
- Class: ContactsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ContactsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/contacts_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) sharing
-
-
-
-
-
-
-
-
-
-8
-9
-10
-11
-
-
- # File 'app/controllers/contacts_controller.rb', line 8
-
-def sharing
- @contacts = current_user . contacts . sharing . includes ( :aspect_memberships )
- render :layout = > false
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ConversationVisibilitiesController.html b/doc/ConversationVisibilitiesController.html
deleted file mode 100644
index f55e0511e48..00000000000
--- a/doc/ConversationVisibilitiesController.html
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-
-
-
- Class: ConversationVisibilitiesController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ConversationVisibilitiesController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/conversation_visibilities_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) destroy
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-
-
- # File 'app/controllers/conversation_visibilities_controller.rb', line 9
-
-def destroy
- @vis = ConversationVisibility . where ( :person_id = > current_user . person . id ,
- :conversation_id = > params [ :conversation_id ] ) . first
- if @vis
- if @vis . destroy
- flash [ :notice ] = I18n . t ( 'conversations.destroy.success' )
- end
- end
- redirect_to conversations_path
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ConversationsController.html b/doc/ConversationsController.html
deleted file mode 100644
index 53b1bf0575c..00000000000
--- a/doc/ConversationsController.html
+++ /dev/null
@@ -1,446 +0,0 @@
-
-
-
-
-
- Class: ConversationsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ConversationsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/conversations_controller.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
- # File 'app/controllers/conversations_controller.rb', line 24
-
-def create
- person_ids = Contact . where ( :id = > params [ :contact_ids ] . split ( ',' ) ) . map! do | contact |
- contact . person_id
- end
-
- params [ :conversation ] [ :participant_ids ] = person_ids | [ current_user . person . id ]
- params [ :conversation ] [ :author ] = current_user . person
-
- if @conversation = Conversation . create ( params [ :conversation ] )
- Postzord :: Dispatch . new ( current_user , @conversation ) . post
-
- flash [ :notice ] = I18n . t ( 'conversations.create.sent' )
- if params [ :profile ]
- redirect_to person_path ( params [ :profile ] )
- else
- redirect_to conversations_path ( :conversation_id = > @conversation . id )
- end
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) index
-
-
-
-
-
-
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
- # File 'app/controllers/conversations_controller.rb', line 6
-
-def index
- @conversations = Conversation . joins ( :conversation_visibilities ) . where (
- :conversation_visibilities = > { :person_id = > current_user . person . id } ) . paginate (
- :page = > params [ :page ] , :per_page = > 15 , :order = > 'updated_at DESC' )
-
- @visibilities = ConversationVisibility . where ( :person_id = > current_user . person . id ) . paginate (
- :page = > params [ :page ] , :per_page = > 15 , :order = > 'updated_at DESC' )
-
- @unread_counts = { }
- @visibilities . each { | v | @unread_counts [ v . conversation_id ] = v . unread }
-
- @authors = { }
- @conversations . each { | c | @authors [ c . id ] = c . last_author }
-
- @conversation = Conversation . joins ( :conversation_visibilities ) . where (
- :conversation_visibilities = > { :person_id = > current_user . person . id , :conversation_id = > params [ :conversation_id ] } ) . first
-end
-
-
-
-
-
-
-
-
-
- - (Object ) new
-
-
-
-
-
-
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
- # File 'app/controllers/conversations_controller.rb', line 58
-
-def new
- all_contacts_and_ids = Contact . connection . execute ( current_user . contacts . joins ( :person = > :profile
- ) . select ( "contacts.id, profiles.first_name, profiles.last_name, people.diaspora_handle" ) . to_sql ) . map do | r |
- { :value = > r [ 0 ] ,
- :name = > Person . name_from_attrs ( r [ 1 ] , r [ 2 ] , r [ 3 ] ) . gsub ( /(")/ , "'" ) }
- end
- @contacts_json = all_contacts_and_ids . to_json . gsub! ( /(")/ , '\\"' )
- @contact = current_user . contacts . find ( params [ :contact_id ] ) if params [ :contact_id ]
- render :layout = > false
-end
-
-
-
-
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
- # File 'app/controllers/conversations_controller.rb', line 44
-
-def show
- if @conversation = Conversation . joins ( :conversation_visibilities ) . where ( :id = > params [ :id ] ,
- :conversation_visibilities = > { :person_id = > current_user . person . id } ) . first
- if @visibility = ConversationVisibility . where ( :conversation_id = > params [ :id ] , :person_id = > current_user . person . id ) . first
- @visibility . unread = 0
- @visibility . save
- end
-
- respond_with @conversation
- else
- redirect_to conversations_path
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/Director.html b/doc/Diaspora/Director.html
deleted file mode 100644
index 08dfb4d37d6..00000000000
--- a/doc/Diaspora/Director.html
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
- Class: Diaspora::Director
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Diaspora::Director
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- Diaspora::Director
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/diaspora/ostatus_builder.rb
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
Constructor Details
-
-
-
-
- - (Director ) initialize
-
-
-
-
-
-
-A new instance of Director
-
-
-
-
-
-
-
-
-
-
-
-
-
-8
-9
-10
-11
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 8
-
-def initialize
- @structure = [ :create_headers , :create_endpoints , :create_subject ,
- :create_body , :create_footer ]
-end
-
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) build (builder)
-
-
-
-
-
-
-
-
-
-13
-14
-15
-16
-17
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 13
-
-def build ( builder )
- @structure . inject ( "" ) do | xml , method |
- xml << builder . send ( method ) if builder . respond_to? method
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/Guid.html b/doc/Diaspora/Guid.html
deleted file mode 100644
index ca6dd3c1ea6..00000000000
--- a/doc/Diaspora/Guid.html
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
-
- Module: Diaspora::Guid
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Diaspora::Guid
-
-
-
-
-
-
-
-
-
-
-
-
-
- Included in:
- Comment , Conversation , Like , Message , Person , Post
-
-
-
- Defined in:
- lib/diaspora/guid.rb
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) included (model)
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-6
-7
-
-
- # File 'lib/diaspora/guid.rb', line 2
-
-def self . included ( model )
- model . class_eval do
- before_create :set_guid
- xml_attr :guid
- end
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) set_guid
-
-
-
-
-
-
-
-
-
-8
-9
-10
-
-
- # File 'lib/diaspora/guid.rb', line 8
-
-def set_guid
- self . guid ||= ActiveSupport :: SecureRandom . hex ( 8 )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/OstatusBuilder.html b/doc/Diaspora/OstatusBuilder.html
deleted file mode 100644
index d4b253b92f7..00000000000
--- a/doc/Diaspora/OstatusBuilder.html
+++ /dev/null
@@ -1,483 +0,0 @@
-
-
-
-
-
- Class: Diaspora::OstatusBuilder
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Diaspora::OstatusBuilder
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- Diaspora::OstatusBuilder
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Webhooks
-
-
-
-
-
- Defined in:
- lib/diaspora/ostatus_builder.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods included from Webhooks
-
#receive , #subscribers , #to_diaspora_xml , #x
-
-
Constructor Details
-
-
-
-
- - (OstatusBuilder ) initialize (user, posts)
-
-
-
-
-
-
-A new instance of OstatusBuilder
-
-
-
-
-
-
-
-
-
-
-
-
-
-24
-25
-26
-27
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 24
-
-def initialize ( user , posts )
- @user = user
- @posts = posts
-end
-
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create_body
-
-
-
-
-
-
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 66
-
-def create_body
- @posts . inject ( "" ) do | xml , curr |
- if curr . respond_to? ( :to_activity )
- xml + curr . to_activity ( :author = > @user . person )
- else
- xml
- end
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) create_endpoints
-
-
-
-
-
-
-
-
-
-58
-59
-60
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 58
-
-def create_endpoints
- "<link href=\"\#{AppConfig[:pubsub_server]}\" rel=\"hub\"/>\n<link href=\"\#{@user.public_url}.atom\" rel=\"self\" type=\"application/atom+xml\"/>\n"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-76
-77
-78
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 76
-
-def
- "</feed>\n"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-29
-30
-31
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 29
-
-def
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<feed xml:lang=\"en-US\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:thr=\"http://purl.org/syndication/thread/1.0\" xmlns:georss=\"http://www.georss.org/georss\" xmlns:activity=\"http://activitystrea.ms/spec/1.0/\" xmlns:media=\"http://purl.org/syndication/atommedia\" xmlns:poco=\"http://portablecontacts.net/spec/1.0\" xmlns:ostatus=\"http://ostatus.org/schema/1.0\" xmlns:statusnet=\"http://status.net/schema/api/1/\">\n<generator uri=\"\#{AppConfig[:pod_url]}\">Diaspora</generator>\n<id>\#{@user.public_url}.atom</id>\n<title>\#{x(@user.name)}'s Public Feed</title>\n<subtitle>Updates from \#{x(@user.name)} on Diaspora</subtitle>\n<logo>\#{@user.person.profile.image_url(:thumb_small)}</logo>\n<updated>\#{Time.now.xmlschema}</updated>\n"
-end
-
-
-
-
-
-
-
-
-
- - (Object ) create_subject
-
-
-
-
-
-
-
-
-
-43
-44
-45
-
-
- # File 'lib/diaspora/ostatus_builder.rb', line 43
-
-def create_subject
- "<author>\n<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>\n<name>\#{x(@user.name)}</name>\n<uri>\#{AppConfig[:pod_url]}people/\#{@user.person.id}</uri>\n<link rel=\"alternate\" type=\"text/html\" href=\"\#{@user.public_url}\" />\n<poco:preferredUsername>\#{x(@user.username)}</poco:preferredUsername>\n<poco:displayName>\#{x(@user.person.name)}</poco:displayName>\n<link rel=\"avatar\" type=\"image/jpeg\" media:width=\"100\" media:height=\"100\" href=\"\#{@user.profile.image_url}\"/>\n</author>\n"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/UserModules/Querying.html b/doc/Diaspora/UserModules/Querying.html
deleted file mode 100644
index cec8968394a..00000000000
--- a/doc/Diaspora/UserModules/Querying.html
+++ /dev/null
@@ -1,775 +0,0 @@
-
-
-
-
-
- Module: Diaspora::UserModules::Querying
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Diaspora::UserModules::Querying
-
-
-
-
-
-
-
-
-
-
-
-
-
- Included in:
- Diaspora::UserModules
-
-
-
- Defined in:
- lib/diaspora/user/querying.rb
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) all_aspect_ids
-
-
-
-
-
-
-
-
-
-89
-90
-91
-
-
- # File 'lib/diaspora/user/querying.rb', line 89
-
-def all_aspect_ids
- self . aspects . all . collect { | x | x . id }
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspects_with_person (person)
-
-
-
-
-
-
-
-
-
-79
-80
-81
-
-
- # File 'lib/diaspora/user/querying.rb', line 79
-
-def aspects_with_person person
- contact_for ( person ) . aspects
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspects_with_post (post_id)
-
-
-
-
-
-
-
-
-
-58
-59
-60
-
-
- # File 'lib/diaspora/user/querying.rb', line 58
-
-def aspects_with_post ( post_id )
- self . aspects . joins ( :aspect_visibilities ) . where ( :aspect_visibilities = > { :post_id = > post_id } )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) contact_for (person)
-
-
-
-
-
-
-
-
-
-54
-55
-56
-57
-
-
- # File 'lib/diaspora/user/querying.rb', line 54
-
-def contact_for ( person )
- return nil unless person
- contact_for_person_id ( person . id )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) contact_for_person_id (person_id)
-
-
-
-
-
-
-
-
-
-62
-63
-64
-
-
- # File 'lib/diaspora/user/querying.rb', line 62
-
-def contact_for_person_id ( person_id )
- Contact . where ( :user_id = > self . id , :person_id = > person_id ) . includes ( :person = > :profile ) . first
-end
-
-
-
-
-
-
-
-
-
- - (Object ) contacts_in_aspects (aspects)
-
-
-
-
-
-
-
-
-
-83
-84
-85
-86
-87
-
-
- # File 'lib/diaspora/user/querying.rb', line 83
-
-def contacts_in_aspects aspects
- aspects . inject ( [ ] ) do | contacts , aspect |
- contacts | aspect . contacts
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) find_visible_post_by_id (id, opts = {})
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-
-
- # File 'lib/diaspora/user/querying.rb', line 9
-
-def find_visible_post_by_id ( id , opts = { } )
- post = Post . where ( :id = > id ) . joins ( :contacts ) . where ( :contacts = > { :user_id = > self . id } ) . where ( opts ) . first
- post ||= Post . where ( :id = > id , :author_id = > self . person . id ) . where ( opts ) . first
- post ||= Post . where ( :id = > id , :public = > true ) . where ( opts ) . first
-end
-
-
-
-
-
-
-
-
-
- - (Object ) people_in_aspects (requested_aspects, opts = {})
-
-
-
-
-
-
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
- # File 'lib/diaspora/user/querying.rb', line 66
-
-def people_in_aspects ( requested_aspects , opts = { } )
- allowed_aspects = self . aspects & requested_aspects
- person_ids = contacts_in_aspects ( allowed_aspects ) . collect { | contact | contact . person_id }
- people = Person . where ( :id = > person_ids )
-
- if opts [ :type ] == 'remote'
- people = people . where ( :owner_id = > nil )
- elsif opts [ :type ] == 'local'
- people = people . where ( 'people.owner_id IS NOT NULL' )
- end
- people
-end
-
-
-
-
-
-
-
-
-
- - (Object ) posts_from (person)
-
-
-
-
-
-
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
- # File 'lib/diaspora/user/querying.rb', line 93
-
-def posts_from ( person )
- return self . person . posts . where ( :pending = > false ) . order ( "created_at DESC" ) if person == self . person
- con = Contact . arel_table
- p = Post . arel_table
- post_ids = [ ]
- if contact = self . contact_for ( person )
- post_ids = Post . connection . execute ( contact . post_visibilities . where ( :hidden = > false ) . select ( 'post_visibilities.post_id' ) . to_sql ) . map { | r | r . first }
- end
- post_ids += Post . connection . execute ( person . posts . where ( :public = > true ) . select ( 'posts.id' ) . to_sql ) . map { | r | r . first }
-
- Post . where ( :id = > post_ids , :pending = > false ) . select ( 'DISTINCT posts.*' ) . order ( "posts.created_at DESC" )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) visible_photos (opts = {})
-
-
-
-
-
-
-
-
-
-50
-51
-52
-
-
- # File 'lib/diaspora/user/querying.rb', line 50
-
-def visible_photos ( opts = { } )
- visible_posts ( opts . merge ( :type = > 'Photo' ) )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) visible_posts (opts = {})
-
-
-
-
-
-
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
- # File 'lib/diaspora/user/querying.rb', line 15
-
-def visible_posts ( opts = { } )
- defaults = {
- :type = > [ 'StatusMessage' , 'Photo' ] ,
- :order = > 'updated_at DESC' ,
- :limit = > 15 ,
- :hidden = > false
- }
- opts = defaults . merge ( opts )
-
- order_field = opts [ :order ] . split . first . to_sym
- order_with_table = 'posts.' + opts [ :order ]
-
- opts [ :max_time ] = Time . at ( opts [ :max_time ] ) if opts [ :max_time ] . is_a? ( Integer )
- opts [ :max_time ] ||= Time . now + 1
-
- select_clause = 'DISTINCT posts.id, posts.updated_at AS updated_at, posts.created_at AS created_at'
-
- posts_from_others = Post . joins ( :contacts ) . where ( :pending = > false , :type = > opts [ :type ] , :post_visibilities = > { :hidden = > opts [ :hidden ] } , :contacts = > { :user_id = > self . id } )
- posts_from_self = self . person . posts . where ( :pending = > false , :type = > opts [ :type ] )
-
- if opts [ :by_members_of ]
- posts_from_others = posts_from_others . joins ( :contacts = > :aspect_memberships ) . where (
- :aspect_memberships = > { :aspect_id = > opts [ :by_members_of ] } )
- posts_from_self = posts_from_self . joins ( :aspect_visibilities ) . where ( :aspect_visibilities = > { :aspect_id = > opts [ :by_members_of ] } )
- end
-
- posts_from_others = posts_from_others . select ( select_clause ) . limit ( opts [ :limit ] ) . order ( order_with_table ) . where ( Post . arel_table [ order_field ] . lt ( opts [ :max_time ] ) )
- posts_from_self = posts_from_self . select ( select_clause ) . limit ( opts [ :limit ] ) . order ( order_with_table ) . where ( Post . arel_table [ order_field ] . lt ( opts [ :max_time ] ) )
-
- all_posts = "(#{posts_from_others.to_sql}) UNION ALL (#{posts_from_self.to_sql}) ORDER BY #{opts[:order]} LIMIT #{opts[:limit]}"
- post_ids = Post . connection . execute ( all_posts ) . map { | r | r . first }
-
- Post . where ( :id = > post_ids ) . select ( 'DISTINCT posts.*' ) . limit ( opts [ :limit ] ) . order ( order_with_table )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/WebSocket.html b/doc/Diaspora/WebSocket.html
deleted file mode 100644
index ca8e8d9b1a8..00000000000
--- a/doc/Diaspora/WebSocket.html
+++ /dev/null
@@ -1,671 +0,0 @@
-
-
-
-
-
- Module: Diaspora::WebSocket
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Diaspora::WebSocket
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/diaspora/web_socket.rb
-
-
-
-
-
-
Constant Summary
-
-
-
- REDIS_CONNECTION_SET =
-
-
- 'ws-uids'
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) ensure_channel (uid)
-
-
-
-
-
-
-
-
-
-42
-43
-44
-
-
- # File 'lib/diaspora/web_socket.rb', line 42
-
-def self . ensure_channel ( uid )
- @channels [ uid ] ||= [ EM :: Channel . new , 0 ]
-end
-
-
-
-
-
-
-
-
-
- + (Object ) initialize_channels
-
-
-
-
-
-
-
-
-
-20
-21
-22
-
-
- # File 'lib/diaspora/web_socket.rb', line 20
-
-def self . initialize_channels
- @channels = { }
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) is_connected? (uid)
-
-
-
-
-
-
-
-
-
-
-56
-57
-58
-
-
- # File 'lib/diaspora/web_socket.rb', line 56
-
-def self . is_connected? ( uid )
- redis . sismember ( REDIS_CONNECTION_SET , uid )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) length
-
-
-
-
-
-
-
-
-
-13
-14
-15
-
-
- # File 'lib/diaspora/web_socket.rb', line 13
-
-def self . length
- redis . llen :websocket
-end
-
-
-
-
-
-
-
-
-
- + (Object ) next
-
-
-
-
-
-
-
-
-
-24
-25
-26
-
-
- # File 'lib/diaspora/web_socket.rb', line 24
-
-def self . next
- redis . rpop ( :websocket )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) push_to_user (uid, data)
-
-
-
-
-
-
-
-
-
-28
-29
-30
-31
-
-
- # File 'lib/diaspora/web_socket.rb', line 28
-
-def self . push_to_user ( uid , data )
- Rails . logger . debug "event=socket-push uid=#{uid}"
- @channels [ uid ] [ 0 ] . push ( data ) if @channels [ uid ]
-end
-
-
-
-
-
-
-
-
-
- + (Object ) queue_to_user (uid, data)
-
-
-
-
-
-
-
-
-
-16
-17
-18
-
-
- # File 'lib/diaspora/web_socket.rb', line 16
-
-def self . queue_to_user ( uid , data )
- redis . lpush ( :websocket , { :uid = > uid , :data = > data } . to_json )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) redis
-
-
-
-
-
-
-
-
-
-10
-11
-12
-
-
- # File 'lib/diaspora/web_socket.rb', line 10
-
-def self . redis
- @redis ||= Resque . redis
-end
-
-
-
-
-
-
-
-
-
- + (Object ) subscribe (uid, ws)
-
-
-
-
-
-
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-
-
- # File 'lib/diaspora/web_socket.rb', line 33
-
-def self . subscribe ( uid , ws )
- Rails . logger . info "event=socket-subscribe uid=#{uid} channels=#{self.length}"
- self . ensure_channel ( uid )
- @channels [ uid ] [ 0 ] . subscribe { | msg | ws . send msg }
- @channels [ uid ] [ 1 ] += 1
-
- redis . sadd ( REDIS_CONNECTION_SET , uid )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) unsubscribe (uid, sid)
-
-
-
-
-
-
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-
-
- # File 'lib/diaspora/web_socket.rb', line 46
-
-def self . unsubscribe ( uid , sid )
- Rails . logger . info "event=socket-unsubscribe sid=#{sid} uid=#{uid} channels=#{self.length}"
- @channels [ uid ] [ 0 ] . unsubscribe ( sid ) if @channels [ uid ]
- @channels [ uid ] [ 1 ] -= 1
- if @channels [ uid ] [ 1 ] <= 0
- @channels . delete ( uid )
- redis . srem ( REDIS_CONNECTION_SET , uid )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Diaspora/Webhooks.html b/doc/Diaspora/Webhooks.html
deleted file mode 100644
index 73bf2fcc85a..00000000000
--- a/doc/Diaspora/Webhooks.html
+++ /dev/null
@@ -1,321 +0,0 @@
-
-
-
-
-
- Module: Diaspora::Webhooks
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Diaspora::Webhooks
-
-
-
-
-
-
-
-
-
-
-
-
-
- Included in:
- Comment , Conversation , OstatusBuilder , Like , Message , Post , Profile , RelayableRetraction , Request , Retraction
-
-
-
- Defined in:
- lib/diaspora/webhooks.rb
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) receive (user, person)
-
-
-
-
-
-
-
-
-
-23
-24
-25
-
-
- # File 'lib/diaspora/webhooks.rb', line 23
-
-def receive ( user , person )
- raise 'you must override receive in order to enable federation on this model'
-end
-
-
-
-
-
-
-
-
-
- - (Object ) subscribers (user)
-
-
-
-
-
-
-
-
-
-19
-20
-21
-
-
- # File 'lib/diaspora/webhooks.rb', line 19
-
-def subscribers ( user )
- raise 'you must override subscribers in order to enable federation on this model'
-end
-
-
-
-
-
-
-
-
-
- - (Object ) to_diaspora_xml
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-
-
- # File 'lib/diaspora/webhooks.rb', line 9
-
-def to_diaspora_xml
- xml = "<XML>"
- xml += "<post>#{to_xml.to_s}</post>"
- xml += "</XML>"
-end
-
-
-
-
-
-
-
-
-
- - (Object ) x (input)
-
-
-
-
-
-
-
-
-
-15
-16
-17
-
-
- # File 'lib/diaspora/webhooks.rb', line 15
-
-def x ( input )
- input . to_s . to_xs
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Encryptor.html b/doc/Encryptor.html
deleted file mode 100644
index 662bee0b4ed..00000000000
--- a/doc/Encryptor.html
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
- Module: Encryptor
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Encryptor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/encryptor.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
Defined Under Namespace
-
-
-
- Modules: Private , Public
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/Base.html b/doc/Job/Base.html
deleted file mode 100644
index 61e5767da5b..00000000000
--- a/doc/Job/Base.html
+++ /dev/null
@@ -1,267 +0,0 @@
-
-
-
-
-
- Class: Job::Base
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::Base
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- Job::Base
-
-
- show all
-
-
-
-
-
-
- Extended by:
- ResqueJobLogging
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/base.rb
-
-
-
-
-
-
Direct Known Subclasses
-
DeleteAccount , HttpMulti , HttpPost , InviteUserByEmail , MailAlsoCommented , MailCommentOnPost , MailLiked , MailMentioned , MailPrivateMessage , MailStartedSharing , NotifyLocalUsers , PostToService , ProcessPhoto , PublishToHub , Receive , ReceiveLocalBatch , ReceiveSalmon , ResendInvitation , SocketWebfinger , UpdateServiceUsers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
application_trace , around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform (*args)
-
-
-
-
-
-
-
-
-
-5
-6
-7
-8
-
-
- # File 'app/models/jobs/base.rb', line 5
-
-def self . perform ( * args )
- ActiveRecord :: Base . verify_active_connections!
- self . perform_delegate ( * args )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) perform_delegate (*args)
-
-
-
-
-
-
-
-
-
-
-
-
-10
-11
-
-
- # File 'app/models/jobs/base.rb', line 10
-
-def self . perform_delegate ( * args )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/HttpMulti.html b/doc/Job/HttpMulti.html
deleted file mode 100644
index 04b89886eb0..00000000000
--- a/doc/Job/HttpMulti.html
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
- Class: Job::HttpMulti
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::HttpMulti
-
-
-
-
-
-
-
- Inherits:
-
- Base
-
-
- Object
-
- Base
-
- Job::HttpMulti
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/http_multi.rb
-
-
-
-
-
-
Constant Summary
-
-
-
- Hydra =
-
-
- Typhoeus :: Hydra
-
-
- Request =
-
-
- Typhoeus :: Request
-
-
- MAX_RETRIES =
-
-
- 3
-
-
- OPTS =
-
-
- { :max_redirects = > 3 , :timeout = > 5000 , :method = > :post }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Base
-
perform
-
-
-
-
-
-
-
-
-
-
#application_trace , #around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform_delegate (user_id, enc_object_xml, person_ids, retry_count = 0)
-
-
-
-
-
-
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
- # File 'app/models/jobs/http_multi.rb', line 16
-
-def self . perform_delegate ( user_id , enc_object_xml , person_ids , retry_count = 0 )
- user = User . find ( user_id )
- people = Person . where ( :id = > person_ids )
-
- salmon = Salmon :: SalmonSlap . create ( user , Base64 . decode64 ( enc_object_xml ) )
-
- failed_request_people = [ ]
-
- hydra = Hydra . new
- people . each do | person |
-
- url = person . receive_url
- xml = salmon . xml_for ( person )
-
- request = Request . new ( url , OPTS . merge ( :params = > { :xml = > CGI :: escape ( xml ) } ) )
-
- request . on_complete do | response |
- if response . code >= 300 && response . code < 400
- if response . [ 'Location' ] == response . request . url . sub ( 'http://' , 'https://' )
- location = URI . parse ( response . [ 'Location' ] )
- newuri = "#{location.scheme}://#{location.host}"
- newuri += ":#{location.port}" unless [ "80" , "443" ] . include? ( location . port . to_s )
- newuri += "/"
- person . url = newuri
- person . save
- end
- end
- unless response . success?
- Rails . logger . info ( "event=http_multi_fail sender_id=#{user_id} recipient_id=#{person.id} url=#{response.effective_url} response_code='#{response.code}' xml='#{Base64.decode64(enc_object_xml)}'" )
- failed_request_people << person . id
- end
- end
-
- hydra . queue request
- end
- hydra . run
-
- unless failed_request_people . empty?
- if retry_count < MAX_RETRIES
- Resque . enqueue ( Job :: HttpMulti , user_id , enc_object_xml , failed_request_people , retry_count + 1 )
- else
- Rails . logger . info ( "event=http_multi_abandon sender_id=#{user_id} failed_recipient_ids='[#{person_ids.join(', ')}] xml='#{Base64.decode64(enc_object_xml)}'" )
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/MailMentioned.html b/doc/Job/MailMentioned.html
deleted file mode 100644
index 0f91303a974..00000000000
--- a/doc/Job/MailMentioned.html
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
- Class: Job::MailMentioned
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::MailMentioned
-
-
-
-
-
-
-
- Inherits:
-
- Base
-
-
- Object
-
- Base
-
- Job::MailMentioned
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/mail_mentioned.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Base
-
perform
-
-
-
-
-
-
-
-
-
-
#application_trace , #around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform_delegate (recipient_id, actor_id, target_id)
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-
-
- # File 'app/models/jobs/mail_mentioned.rb', line 9
-
-def self . perform_delegate ( recipient_id , actor_id , target_id )
-
- Notifier . mentioned ( recipient_id , actor_id , target_id ) . deliver
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/ReceiveSalmon.html b/doc/Job/ReceiveSalmon.html
deleted file mode 100644
index f4b18a2eacc..00000000000
--- a/doc/Job/ReceiveSalmon.html
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
- Class: Job::ReceiveSalmon
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::ReceiveSalmon
-
-
-
-
-
-
-
- Inherits:
-
- Base
-
-
- Object
-
- Base
-
- Job::ReceiveSalmon
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/receive_salmon.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Base
-
perform
-
-
-
-
-
-
-
-
-
-
#application_trace , #around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform_delegate (user_id, xml)
-
-
-
-
-
-
-
-
-
-11
-12
-13
-14
-15
-
-
- # File 'app/models/jobs/receive_salmon.rb', line 11
-
-def self . perform_delegate ( user_id , xml )
- user = User . find ( user_id )
- zord = Postzord :: Receiver . new ( user , :salmon_xml = > xml )
- zord . perform
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/SocketWebfinger.html b/doc/Job/SocketWebfinger.html
deleted file mode 100644
index 58cc69c385b..00000000000
--- a/doc/Job/SocketWebfinger.html
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-
- Class: Job::SocketWebfinger
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::SocketWebfinger
-
-
-
-
-
-
-
- Inherits:
-
- Base
-
-
- Object
-
- Base
-
- Job::SocketWebfinger
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/socket_webfinger.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Base
-
perform
-
-
-
-
-
-
-
-
-
-
#application_trace , #around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform_delegate (user_id, account, opts = {})
-
-
-
-
-
-
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
- # File 'app/models/jobs/socket_webfinger.rb', line 11
-
-def self . perform_delegate ( user_id , account , opts = { } )
- finger = Webfinger . new ( account )
- begin
- result = finger . fetch
- result . socket_to_user ( user_id , opts )
- rescue
- Diaspora :: WebSocket . queue_to_user ( user_id ,
- { :class = > 'people' ,
- :status = > 'fail' ,
- :query = > account ,
- :response = > I18n . t ( 'people.webfinger.fail' , :handle = > account ) } . to_json )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Job/UpdateServiceUsers.html b/doc/Job/UpdateServiceUsers.html
deleted file mode 100644
index ac05219fe00..00000000000
--- a/doc/Job/UpdateServiceUsers.html
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
- Class: Job::UpdateServiceUsers
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Job::UpdateServiceUsers
-
-
-
-
-
-
-
- Inherits:
-
- Base
-
-
- Object
-
- Base
-
- Job::UpdateServiceUsers
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/jobs/update_service_users.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Base
-
perform
-
-
-
-
-
-
-
-
-
-
#application_trace , #around_perform_log_job
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) perform_delegate (service_id)
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-
-
- # File 'app/models/jobs/update_service_users.rb', line 9
-
-def self . perform_delegate ( service_id )
- service = Service . find ( service_id )
- service . save_friends
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Like.html b/doc/Like.html
deleted file mode 100644
index 4f75be7f59a..00000000000
--- a/doc/Like.html
+++ /dev/null
@@ -1,540 +0,0 @@
-
-
-
-
-
- Class: Like
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Like
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Like
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::Guid , Diaspora::Relayable , Diaspora::Socketable , Diaspora::Webhooks , ROXML
-
-
-
-
-
- Defined in:
- app/models/like.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#socket_to_user , #unsocket_from_user
-
-
-
-
-
-
-
-
-
-
#after_receive , included , #initialize_signatures , #parent_guid , #parent_guid= , #receive , #relayable? , #signature_valid? , #subscribers , #verify_parent_author_signature
-
-
-
-
-
-
-
-
-
-
#sign_with_key , #signable_accessors , #signable_string , #verify_signature
-
-
-
-
-
-
-
-
-
-
included , #set_guid
-
-
-
-
-
-
-
-
-
-
#receive , #subscribers , #to_diaspora_xml , #x
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) diaspora_handle
-
-
-
-
-
-
-
-
-
-24
-25
-26
-
-
- # File 'app/models/like.rb', line 24
-
-def diaspora_handle
- self . author . diaspora_handle
-end
-
-
-
-
-
-
-
-
-
- - (Object ) diaspora_handle= (nh)
-
-
-
-
-
-
-
-
-
-28
-29
-30
-
-
- # File 'app/models/like.rb', line 28
-
-def diaspora_handle= nh
- self . author = Webfinger . new ( nh ) . fetch
-end
-
-
-
-
-
-
-
-
-
- - (Object ) notification_type (user, person)
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'app/models/like.rb', line 44
-
-def notification_type ( user , person )
- Notifications :: Liked if self . post . author == user . person && user . person != person
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent
-
-
-
-
-
-
-
-
-
-36
-37
-38
-
-
- # File 'app/models/like.rb', line 36
-
-def parent
- self . post
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent= (parent)
-
-
-
-
-
-
-
-
-
-40
-41
-42
-
-
- # File 'app/models/like.rb', line 40
-
-def parent= parent
- self . post = parent
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent_class
-
-
-
-
-
-
-
-
-
-32
-33
-34
-
-
- # File 'app/models/like.rb', line 32
-
-def parent_class
- Post
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Mention.html b/doc/Mention.html
deleted file mode 100644
index 23a4cdb208f..00000000000
--- a/doc/Mention.html
+++ /dev/null
@@ -1,300 +0,0 @@
-
-
-
-
-
- Class: Mention
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Mention
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Mention
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/mention.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) delete_notification
-
-
-
-
-
-
-
-
-
-22
-23
-24
-
-
- # File 'app/models/mention.rb', line 22
-
-def delete_notification
- Notification . where ( :target_type = > self . class . name , :target_id = > self . id ) . delete_all
-end
-
-
-
-
-
-
-
-
-
- - (Object ) notification_type (*args)
-
-
-
-
-
-
-
-
-
-18
-19
-20
-
-
- # File 'app/models/mention.rb', line 18
-
-def notification_type ( * args )
- Notifications :: Mentioned
-end
-
-
-
-
-
-
-
-
-
- - (Object ) notify_recipient
-
-
-
-
-
-
-
-
-
-13
-14
-15
-16
-
-
- # File 'app/models/mention.rb', line 13
-
-def notify_recipient
- Rails . logger . info "event=mention_sent id=#{self.id} to=#{person.diaspora_handle} from=#{post.author.diaspora_handle}"
- Notification . notify ( person . owner , self , post . author ) unless person . remote?
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Message.html b/doc/Message.html
deleted file mode 100644
index e8029e04274..00000000000
--- a/doc/Message.html
+++ /dev/null
@@ -1,674 +0,0 @@
-
-
-
-
-
- Class: Message
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Message
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Message
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::Guid , Diaspora::Relayable , Diaspora::Webhooks , ROXML
-
-
-
-
-
- Defined in:
- app/models/message.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
included , #initialize_signatures , #parent_guid , #parent_guid= , #receive , #relayable? , #signature_valid? , #subscribers , #verify_parent_author_signature
-
-
-
-
-
-
-
-
-
-
#sign_with_key , #signable_accessors , #signable_string , #verify_signature
-
-
-
-
-
-
-
-
-
-
#receive , #subscribers , #to_diaspora_xml , #x
-
-
-
-
-
-
-
-
-
-
included , #set_guid
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) after_receive (user, person)
-
-
-
-
-
-
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
- # File 'app/models/message.rb', line 60
-
-def after_receive ( user , person )
- if vis = ConversationVisibility . where ( :conversation_id = > self . conversation_id , :person_id = > user . person . id ) . first
- vis . unread += 1
- vis . save
- self
- else
- raise NotVisibleException ( "Attempting to access a ConversationVisibility that does not exist!" )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) conversation_guid
-
-
-
-
-
-
-
-
-
-38
-39
-40
-
-
- # File 'app/models/message.rb', line 38
-
-def conversation_guid
- self . conversation . guid
-end
-
-
-
-
-
-
-
-
-
- - (Object ) conversation_guid= (guid)
-
-
-
-
-
-
-
-
-
-42
-43
-44
-45
-46
-
-
- # File 'app/models/message.rb', line 42
-
-def conversation_guid= guid
- if cnv = Conversation . find_by_guid ( guid )
- self . conversation_id = cnv . id
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) diaspora_handle
-
-
-
-
-
-
-
-
-
-30
-31
-32
-
-
- # File 'app/models/message.rb', line 30
-
-def diaspora_handle
- self . author . diaspora_handle
-end
-
-
-
-
-
-
-
-
-
- - (Object ) diaspora_handle= (nh)
-
-
-
-
-
-
-
-
-
-34
-35
-36
-
-
- # File 'app/models/message.rb', line 34
-
-def diaspora_handle= nh
- self . author = Webfinger . new ( nh ) . fetch
-end
-
-
-
-
-
-
-
-
-
- - (Object ) notification_type (user, person)
-
-
-
-
-
-
-
-
-
-70
-71
-72
-
-
- # File 'app/models/message.rb', line 70
-
-def notification_type ( user , person )
- Notifications :: PrivateMessage unless user . person == person
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent
-
-
-
-
-
-
-
-
-
-52
-53
-54
-
-
- # File 'app/models/message.rb', line 52
-
-def parent
- self . conversation
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent= (parent)
-
-
-
-
-
-
-
-
-
-56
-57
-58
-
-
- # File 'app/models/message.rb', line 56
-
-def parent= parent
- self . conversation = parent
-end
-
-
-
-
-
-
-
-
-
- - (Object ) parent_class
-
-
-
-
-
-
-
-
-
-48
-49
-50
-
-
- # File 'app/models/message.rb', line 48
-
-def parent_class
- Conversation
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/MessagesController.html b/doc/MessagesController.html
deleted file mode 100644
index cd87911b3b6..00000000000
--- a/doc/MessagesController.html
+++ /dev/null
@@ -1,270 +0,0 @@
-
-
-
-
-
- Class: MessagesController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: MessagesController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- ApplicationHelper
-
-
-
-
-
- Defined in:
- app/controllers/messages_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#bookmarklet , #direction_for , #get_javascript_strings_for , #hard_link , #how_long_ago , #info_text , #mine? , #object_fields , #object_path , #owner_image_link , #owner_image_tag , #person_image_link , #person_image_tag , #person_link , #post_yield_tag , #profile_photo , #rtl? , #timeago , #type_partial
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
- # File 'app/controllers/messages_controller.rb', line 12
-
-def create
- cnv = Conversation . joins ( :conversation_visibilities ) . where ( :id = > params [ :conversation_id ] ,
- :conversation_visibilities = > { :person_id = > current_user . person . id } ) . first
-
- if cnv
- message = Message . new ( :conversation_id = > cnv . id , :text = > params [ :message ] [ :text ] , :author = > current_user . person )
-
- if message . save
- Rails . logger . info ( "event=create type=comment user=#{current_user.diaspora_handle} status=success message=#{message.id} chars=#{params[:message][:text].length}" )
- Postzord :: Dispatch . new ( current_user , message ) . post
-
- redirect_to conversations_path ( :conversation_id = > cnv . id )
- else
- render :nothing = > true , :status = > 422
- end
- else
- render :nothing = > true , :status = > 422
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Notification.html b/doc/Notification.html
deleted file mode 100644
index 76016cd2ca3..00000000000
--- a/doc/Notification.html
+++ /dev/null
@@ -1,431 +0,0 @@
-
-
-
-
-
- Class: Notification
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Notification
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Notification
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::Socketable
-
-
-
-
-
- Defined in:
- app/models/notification.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#socket_to_user , #unsocket_from_user
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) for (recipient, opts = {})
-
-
-
-
-
-
-
-
-
-14
-15
-16
-
-
- # File 'app/models/notification.rb', line 14
-
-def self . for ( recipient , opts = { } )
- self . where ( opts . merge! ( :recipient_id = > recipient . id ) ) . order ( 'updated_at desc' )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) notify (recipient, target, actor)
-
-
-
-
-
-
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
- # File 'app/models/notification.rb', line 18
-
-def self . notify ( recipient , target , actor )
- if target . respond_to? : notification_type
- if note_type = target . notification_type ( recipient , actor )
- if ( target . is_a? ) || ( target . is_a? Like )
- n = note_type . concatenate_or_create ( recipient , target . post , actor , note_type )
- else
- n = note_type . make_notification ( recipient , target , actor , note_type )
- end
- n . email_the_user ( target , actor ) if n
- n . socket_to_user ( recipient , :actor = > actor ) if n
- n
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) email_the_user (target, actor)
-
-
-
-
-
-
-
-
-
-33
-34
-35
-
-
- # File 'app/models/notification.rb', line 33
-
-def email_the_user ( target , actor )
- self . recipient . mail ( self . mail_job , self . recipient_id , actor . id , target . id )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) mail_job
-
-
-
-
-
-
-
-
-
-
-38
-39
-40
-
-
- # File 'app/models/notification.rb', line 38
-
-def mail_job
- raise NotImplementedError . new ( 'Subclass this.' )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/NotificationActor.html b/doc/NotificationActor.html
deleted file mode 100644
index fc039b6724e..00000000000
--- a/doc/NotificationActor.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
- Class: NotificationActor
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: NotificationActor
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- NotificationActor
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/notification_actor.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Notifications/AlsoCommented.html b/doc/Notifications/AlsoCommented.html
deleted file mode 100644
index f59f84b83f0..00000000000
--- a/doc/Notifications/AlsoCommented.html
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
-
-
- Class: Notifications::AlsoCommented
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Notifications::AlsoCommented
-
-
-
-
-
-
-
- Inherits:
-
- Notification
-
-
- Object
-
- Notification
-
- Notifications::AlsoCommented
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/notifications/also_commented.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) mail_job
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'app/models/notifications/also_commented.rb', line 2
-
-def mail_job
- Job ::
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-5
-6
-7
-
-
- # File 'app/models/notifications/also_commented.rb', line 5
-
-def
- 'notifications.also_commented'
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Notifications/Liked.html b/doc/Notifications/Liked.html
deleted file mode 100644
index 4b67513e2e6..00000000000
--- a/doc/Notifications/Liked.html
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
-
-
- Class: Notifications::Liked
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Notifications::Liked
-
-
-
-
-
-
-
- Inherits:
-
- Notification
-
-
- Object
-
- Notification
-
- Notifications::Liked
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/notifications/liked.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) mail_job
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'app/models/notifications/liked.rb', line 2
-
-def mail_job
- Job :: MailLiked
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-5
-6
-7
-
-
- # File 'app/models/notifications/liked.rb', line 5
-
-def
- 'notifications.liked'
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Notifications/Mentioned.html b/doc/Notifications/Mentioned.html
deleted file mode 100644
index 21262f5981d..00000000000
--- a/doc/Notifications/Mentioned.html
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
-
-
- Class: Notifications::Mentioned
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Notifications::Mentioned
-
-
-
-
-
-
-
- Inherits:
-
- Notification
-
-
- Object
-
- Notification
-
- Notifications::Mentioned
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/notifications/mentioned.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) mail_job
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'app/models/notifications/mentioned.rb', line 2
-
-def mail_job
- Job :: MailMentioned
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-5
-6
-7
-
-
- # File 'app/models/notifications/mentioned.rb', line 5
-
-def
- 'notifications.mentioned'
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Notifications/StartedSharing.html b/doc/Notifications/StartedSharing.html
deleted file mode 100644
index 2ebad493aa7..00000000000
--- a/doc/Notifications/StartedSharing.html
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
- Class: Notifications::StartedSharing
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Notifications::StartedSharing
-
-
-
-
-
-
-
- Inherits:
-
- Notification
-
-
- Object
-
- Notification
-
- Notifications::StartedSharing
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/notifications/started_sharing.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) email_the_user (target, actor)
-
-
-
-
-
-
-
-
-
-10
-11
-12
-
-
- # File 'app/models/notifications/started_sharing.rb', line 10
-
-def email_the_user ( target , actor )
- super ( target . sender , actor )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) mail_job
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'app/models/notifications/started_sharing.rb', line 2
-
-def mail_job
- Job :: MailStartedSharing
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-6
-7
-8
-
-
- # File 'app/models/notifications/started_sharing.rb', line 6
-
-def
- 'notifications.started_sharing'
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Oink.html b/doc/Oink.html
deleted file mode 100644
index 41a6ade24c6..00000000000
--- a/doc/Oink.html
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-
- Module: Oink
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Oink
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/active_record_instantiation_logs.rb
-
-
-
-
-
Defined Under Namespace
-
-
-
- Modules: InstanceTypeCounter , OinkInstanceTypeCounterInstanceMethods
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) extended_active_record!
-
-
-
-
-
-
-
-
-
-11
-12
-13
-
-
- # File 'lib/active_record_instantiation_logs.rb', line 11
-
-def self . extended_active_record!
- @oink_extended_active_record = true
-end
-
-
-
-
-
-
-
-
-
- + (Boolean ) extended_active_record?
-
-
-
-
-
-
-
-
-
-
-7
-8
-9
-
-
- # File 'lib/active_record_instantiation_logs.rb', line 7
-
-def self . extended_active_record?
- @oink_extended_active_record
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Oink/OinkInstanceTypeCounterInstanceMethods.html b/doc/Oink/OinkInstanceTypeCounterInstanceMethods.html
deleted file mode 100644
index dd0b40528ab..00000000000
--- a/doc/Oink/OinkInstanceTypeCounterInstanceMethods.html
+++ /dev/null
@@ -1,277 +0,0 @@
-
-
-
-
-
- Module: Oink::OinkInstanceTypeCounterInstanceMethods
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Oink::OinkInstanceTypeCounterInstanceMethods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/active_record_instantiation_logs.rb
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) included (klass)
-
-
-
-
-
-
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
- # File 'lib/active_record_instantiation_logs.rb', line 49
-
-def self . included ( klass )
- klass . class_eval do
-
- @@instantiated = { }
- @@total = nil
- @@time = 0 .0
-
- def self . reset_instance_type_count
- @@time = 0 .0
- @@instantiated = { }
- @@total = nil
- end
-
- def self . increment_instance_type_count ( time )
- @@instantiated [ base_class . name ] ||= 0
- @@instantiated [ base_class . name ] += 1
- @@time += time
- end
-
- def self . instantiated_hash
- @@instantiated
- end
-
- def self . instantiation_time
- @@time
- end
-
- def self . total_objects_instantiated
- @@total ||= @@instantiated . values . sum
- end
-
- unless Oink . extended_active_record?
- class << self
- alias_method :instantiate_before_oink , :instantiate
-
- def instantiate ( * args , & block )
- value = nil
- time = Benchmark . realtime {
- value = instantiate_before_oink ( * args , & block )
- } * 1000
- increment_instance_type_count ( time )
- value
- end
- end
-
- alias_method :initialize_before_oink , :initialize
-
- def initialize ( * args , & block )
- value = nil
- time = Benchmark . realtime {
- value = initialize_before_oink ( * args , & block )
- } * 1000
- self . class . increment_instance_type_count ( time )
- value
- end
-
- Oink . extended_active_record!
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PeopleHelper.html b/doc/PeopleHelper.html
deleted file mode 100644
index 1f5b967758d..00000000000
--- a/doc/PeopleHelper.html
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-
-
-
- Module: PeopleHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: PeopleHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/helpers/people_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) birthday_format (bday)
-
-
-
-
-
-
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
- # File 'app/helpers/people_helper.rb', line 23
-
-def birthday_format ( bday )
- if bday . year == 1000
- I18n . l bday , :format = > I18n . t ( 'date.formats.birthday' )
- else
- I18n . l bday , :format = > I18n . t ( 'date.formats.birthday_with_year' )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) request_partial (single_aspect_form)
-
-
-
-
-
-
-
-
-
-7
-8
-9
-10
-11
-12
-13
-
-
- # File 'app/helpers/people_helper.rb', line 7
-
-def request_partial single_aspect_form
- if single_aspect_form
- 'requests/new_request_with_aspect_to_person'
- else
- 'requests/new_request_to_person'
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) search_or_index
-
-
-
-
-
-
-
-
-
-15
-16
-17
-18
-19
-20
-21
-
-
- # File 'app/helpers/people_helper.rb', line 15
-
-def search_or_index
- if params [ :q ]
- I18n . t 'people.helper.results_for' , :params = > params [ :q ]
- else
- I18n . t "people.helper.people_on_pod_are_aware_of"
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Person.html b/doc/Person.html
deleted file mode 100644
index 19821ef50a8..00000000000
--- a/doc/Person.html
+++ /dev/null
@@ -1,1658 +0,0 @@
-
-
-
-
-
- Class: Person
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Person
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Person
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::Guid , Diaspora::Socketable , Encryptor::Public , ROXML
-
-
-
-
-
- Defined in:
- app/models/person.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
included , #set_guid
-
-
-
-
-
-
-
-
-
-
#socket_to_user , #unsocket_from_user
-
-
-
-
-
-
-
-
-
-
#aes_encrypt , #encrypt , #encrypt_aes_key , #gen_aes_key
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) by_account_identifier (identifier)
-
-
-
-
-
-
-database calls
-
-
-
-
-
-
-
-
-
-
-
-
-
-153
-154
-155
-156
-
-
- # File 'app/models/person.rb', line 153
-
-def self . by_account_identifier ( identifier )
- identifier = identifier . strip . downcase . gsub ( 'acct:' , '' )
- self . where ( :diaspora_handle = > identifier ) . first
-end
-
-
-
-
-
-
-
-
-
- + (Object ) create_from_webfinger (profile, hcard)
-
-
-
-
-
-
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-
-
- # File 'app/models/person.rb', line 163
-
-def self . create_from_webfinger ( profile , hcard )
- return nil if profile . nil? || ! profile . valid_diaspora_profile?
- new_person = Person . new
- new_person . serialized_public_key = profile . public_key
- new_person . guid = profile . guid
- new_person . diaspora_handle = profile . account
- new_person . url = profile . seed_location
-
-
- Rails . logger . info ( "event=webfinger_marshal valid=#{new_person.valid?} target=#{new_person.diaspora_handle}" )
- new_person . url = hcard [ :url ]
- new_person . assign_new_profile_from_hcard ( hcard )
- new_person . save!
- new_person . profile . save!
- new_person
-end
-
-
-
-
-
-
-
-
-
- + (Object ) local_by_account_identifier (identifier)
-
-
-
-
-
-
-
-
-
-158
-159
-160
-161
-
-
- # File 'app/models/person.rb', line 158
-
-def self . local_by_account_identifier ( identifier )
- person = self . by_account_identifier ( identifier )
- ( person . nil? || person . remote? ) ? nil : person
-end
-
-
-
-
-
-
-
-
-
- + (Object ) name_from_attrs (first_name, last_name, diaspora_handle)
-
-
-
-
-
-
-
-
-
-94
-95
-96
-
-
- # File 'app/models/person.rb', line 94
-
-def self . name_from_attrs ( first_name , last_name , diaspora_handle )
- first_name . blank? ? diaspora_handle : "#{first_name.to_s} #{last_name.to_s}"
-end
-
-
-
-
-
-
-
-
-
- + (Object ) public_search (query, opts = {})
-
-
-
-
-
-
-
-
-
-81
-82
-83
-84
-85
-
-
- # File 'app/models/person.rb', line 81
-
-def self . public_search ( query , opts = { } )
- return [ ] if query . to_s . blank? || query . to_s . length < 3
- sql , tokens = self . search_query_string ( query )
- Person . searchable . where ( sql , * tokens )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) search (query, user)
-
-
-
-
-
-
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
- # File 'app/models/person.rb', line 70
-
-def self . search ( query , user )
- return [ ] if query . to_s . blank? || query . to_s . length < 3
-
- sql , tokens = self . search_query_string ( query )
- Person . searchable . where ( sql , * tokens ) . joins (
- "LEFT OUTER JOIN `contacts` ON `contacts`.user_id = #{user.id} AND `contacts`.person_id = `people`.id"
- ) . includes ( :profile
- ) . order ( "contacts.user_id DESC" , "profiles.last_name ASC" , "profiles.first_name ASC" )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) search_query_string (query)
-
-
-
-
-
-
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
- # File 'app/models/person.rb', line 46
-
-def self . search_query_string ( query )
- where_clause = "profiles.first_name LIKE ? OR\nprofiles.last_name LIKE ? OR\npeople.diaspora_handle LIKE ? OR\nprofiles.first_name LIKE ? OR\nprofiles.last_name LIKE ?\n"
- sql = ""
- tokens = [ ]
-
- query_tokens = query . to_s . strip . split ( " " )
- query_tokens . each_with_index do | raw_token , i |
- token = "#{raw_token}%"
- up_token = "#{raw_token.titleize}%"
- sql << " OR " unless i == 0
- sql << where_clause
- tokens . concat ( [ token , token , token ] )
- tokens . concat ( [ up_token , up_token ] )
- end
- [ sql , tokens ]
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) as_json (opts = {})
-
-
-
-
-
-
-
-
-
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-
-
- # File 'app/models/person.rb', line 196
-
-def as_json ( opts = { } )
- opts ||= { }
- if ( opts [ :format ] == :twitter )
- {
- :id = > self . guid ,
- :screen_name = > self . diaspora_handle ,
- :name = > self . name ,
- :created_at = > self . created_at ,
- :profile_image_url = > self . profile . image_url ( :thumb_small ) ,
- :profile = > self . profile . as_json ( opts )
- }
- else
- { :id = > self . guid ,
- :name = > self . name ,
- :avatar = > self . profile . image_url ( :thumb_small ) ,
- :handle = > self . diaspora_handle ,
- :url = > "/people/#{self.id}" }
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) assign_new_profile_from_hcard (hcard)
-
-
-
-
-
-
-
-
-
-180
-181
-182
-183
-184
-185
-186
-187
-
-
- # File 'app/models/person.rb', line 180
-
-def assign_new_profile_from_hcard ( hcard )
- self . profile = Profile . new ( :first_name = > hcard [ :given_name ] ,
- :last_name = > hcard [ :family_name ] ,
- :image_url = > hcard [ :photo ] ,
- :image_url_medium = > hcard [ :photo_medium ] ,
- :image_url_small = > hcard [ :photo_small ] ,
- :searchable = > hcard [ :searchable ] )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) downcase_diaspora_handle
-
-
-
-
-
-
-
-
-
-24
-25
-26
-
-
- # File 'app/models/person.rb', line 24
-
-def downcase_diaspora_handle
- diaspora_handle . downcase! unless diaspora_handle . blank?
-end
-
-
-
-
-
-
-
-
-
- - (Object ) exported_key
-
-
-
-
-
-
-
-
-
-143
-144
-145
-
-
- # File 'app/models/person.rb', line 143
-
-def exported_key
- serialized_public_key
-end
-
-
-
-
-
-
-
-
-
- - (Object ) exported_key= (new_key)
-
-
-
-
-
-
-
-
-
-147
-148
-149
-150
-
-
- # File 'app/models/person.rb', line 147
-
-def exported_key= new_key
- raise "Don't change a key" if serialized_public_key
- serialized_public_key = new_key
-end
-
-
-
-
-
-
-
-
-
- - (Object ) first_name
-
-
-
-
-
-
-
-
-
-98
-99
-100
-101
-102
-103
-104
-
-
- # File 'app/models/person.rb', line 98
-
-def first_name
- @first_name ||= if profile . nil? || profile . first_name . nil? || profile . first_name . blank?
- self . diaspora_handle . split ( '@' ) . first
- else
- profile . first_name . to_s
- end
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) has_photos?
-
-
-
-
-
-
-
-
-
-
-219
-220
-221
-
-
- # File 'app/models/person.rb', line 219
-
-def has_photos?
- self . posts . where ( :type = > "Photo" ) . exists?
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) local?
-
-
-
-
-
-
-
-
-
-
-192
-193
-194
-
-
- # File 'app/models/person.rb', line 192
-
-def local?
- ! remote?
-end
-
-
-
-
-
-
-
-
-
- - (Object ) name (opts = {})
-
-
-
-
-
-
-
-
-
-87
-88
-89
-90
-91
-92
-
-
- # File 'app/models/person.rb', line 87
-
-def name ( opts = { } )
- if self . profile . nil?
- fix_profile
- end
- @name ||= Person . name_from_attrs ( self . profile . first_name , self . profile . last_name , self . diaspora_handle )
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) owns? (obj)
-
-
-
-
-
-
-
-
-
-
-106
-107
-108
-
-
- # File 'app/models/person.rb', line 106
-
-def owns? ( obj )
- self == obj . author
-end
-
-
-
-
-
-
-
-
-
- - (Object ) public_key
-
-
-
-
-
-
-
-
-
-139
-140
-141
-
-
- # File 'app/models/person.rb', line 139
-
-def public_key
- OpenSSL :: PKey :: RSA . new ( serialized_public_key )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) public_key_hash
-
-
-
-
-
-
-
-
-
-135
-136
-137
-
-
- # File 'app/models/person.rb', line 135
-
-def public_key_hash
- Base64 . encode64 OpenSSL :: Digest :: SHA256 . new ( self . exported_key ) . to_s
-end
-
-
-
-
-
-
-
-
-
- - (Object ) public_url
-
-
-
-
-
-
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-
-
- # File 'app/models/person.rb', line 126
-
-def public_url
- if self . owner
- username = self . owner . username
- else
- username = self . diaspora_handle . split ( "@" ) [ 0 ]
- end
- "#{url}public/#{username}"
-end
-
-
-
-
-
-
-
-
-
- - (Object ) receive_url
-
-
-
-
-
-
-
-
-
-122
-123
-124
-
-
- # File 'app/models/person.rb', line 122
-
-def receive_url
- "#{url}receive/users/#{self.guid}/"
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) remote?
-
-
-
-
-
-
-
-
-
-
-189
-190
-191
-
-
- # File 'app/models/person.rb', line 189
-
-def remote?
- owner_id . nil?
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-216
-217
-
-
- # File 'app/models/person.rb', line 216
-
-def ( format = :json )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) url
-
-
-
-
-
-
-
-
-
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-
-
- # File 'app/models/person.rb', line 110
-
-def url
- begin
- uri = URI . parse ( @attributes [ 'url' ] )
- url = "#{uri.scheme}://#{uri.host}"
- url += ":#{uri.port}" unless [ "80" , "443" ] . include? ( uri . port . to_s )
- url += "/"
- rescue Exception = > e
- url = @attributes [ 'url' ]
- end
- url
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Photo.html b/doc/Photo.html
deleted file mode 100644
index 65d0e001bf9..00000000000
--- a/doc/Photo.html
+++ /dev/null
@@ -1,979 +0,0 @@
-
-
-
-
-
- Class: Photo
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Photo
-
-
-
-
-
-
-
- Inherits:
-
- Post
-
-
- Object
-
- ActiveRecord::Base
-
- Post
-
- Photo
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/photo.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2009, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods inherited from Post
-
#activity_streams? , #diaspora_handle , #diaspora_handle= , #receive , #subscribers , #user_refs
-
-
-
-
-
-
-
-
-
-
included , #set_guid
-
-
-
-
-
-
-
-
-
-
#receive , #subscribers , #to_diaspora_xml , #x
-
-
-
-
-
-
-
-
-
-
-
#bookmarklet , #direction_for , #get_javascript_strings_for , #hard_link , #how_long_ago , #info_text , #mine? , #object_fields , #object_path , #owner_image_link , #owner_image_tag , #person_image_link , #person_image_tag , #person_link , #post_yield_tag , #profile_photo , #rtl? , #timeago , #type_partial
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) diaspora_initialize (params = {})
-
-
-
-
-
-
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-
-
- # File 'app/models/photo.rb', line 33
-
-def self . diaspora_initialize ( params = { } )
- photo = super ( params )
- image_file = params . delete ( :user_file )
- photo . random_string = ActiveSupport :: SecureRandom . hex ( 10 )
- photo . unprocessed_image . store! image_file
- photo . update_remote_path
- photo
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) as_json (opts = {})
-
-
-
-
-
-
-
-
-
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-
-
- # File 'app/models/photo.rb', line 101
-
-def as_json ( opts = { } )
- {
- :photo = > {
- :id = > self . id ,
- :url = > self . url ,
- :thumb_small = > self . url ( :thumb_small ) ,
- :text = > self . text
- }
- }
-end
-
-
-
-
-
-
-
-
-
- - (Object ) ensure_user_picture
-
-
-
-
-
-
-
-
-
-75
-76
-77
-78
-79
-80
-81
-
-
- # File 'app/models/photo.rb', line 75
-
-def ensure_user_picture
- profiles = Profile . where ( :image_url = > url ( :thumb_large ) )
- profiles . each { | profile |
- profile . image_url = nil
- profile . save
- }
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) mutable?
-
-
-
-
-
-
-
-
-
-
-97
-98
-99
-
-
- # File 'app/models/photo.rb', line 97
-
-def mutable?
- true
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) not_processed?
-
-
-
-
-
-
-
-
-
-
-42
-43
-44
-
-
- # File 'app/models/photo.rb', line 42
-
-def not_processed?
- processed_image . path . nil?
-end
-
-
-
-
-
-
-
-
-
- - (Object ) ownership_of_status_message
-
-
-
-
-
-
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-
-
- # File 'app/models/photo.rb', line 24
-
-def ownership_of_status_message
- message = StatusMessage . find_by_guid ( self . status_message_guid )
- if self . status_message_guid && message
- self . diaspora_handle == message . diaspora_handle
- else
- true
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) process
-
-
-
-
-
-
-
-
-
-91
-92
-93
-94
-95
-
-
- # File 'app/models/photo.rb', line 91
-
-def process
- return false if self . processed? || ( ! unprocessed_image . path . nil? && unprocessed_image . path . include? ( '.gif' ) )
- processed_image . store! ( unprocessed_image )
- save!
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) processed?
-
-
-
-
-
-
-
-
-
-
-46
-47
-48
-
-
- # File 'app/models/photo.rb', line 46
-
-def processed?
- ! processed_image . path . nil?
-end
-
-
-
-
-
-
-
-
-
- - (Object ) queue_processing_job
-
-
-
-
-
-
-
-
-
-87
-88
-89
-
-
- # File 'app/models/photo.rb', line 87
-
-def queue_processing_job
- Resque . enqueue ( Job :: ProcessPhoto , self . id )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) thumb_hash
-
-
-
-
-
-
-
-
-
-83
-84
-85
-
-
- # File 'app/models/photo.rb', line 83
-
-def thumb_hash
- { :thumb_url = > url ( :thumb_medium ) , :id = > id , :album_id = > nil }
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update_remote_path
-
-
-
-
-
-
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
- # File 'app/models/photo.rb', line 50
-
-def update_remote_path
- unless self . unprocessed_image . url . match ( /^https?:\/\// )
- pod_url = AppConfig [ :pod_url ] . dup
- pod_url . chop! if AppConfig [ :pod_url ] [ -1 , 1 ] == '/'
- remote_path = "#{pod_url}#{self.unprocessed_image.url}"
- else
- remote_path = self . unprocessed_image . url
- end
-
- name_start = remote_path . rindex '/'
- self . remote_photo_path = "#{remote_path.slice(0, name_start)}/"
- self . remote_photo_name = remote_path . slice ( name_start + 1 , remote_path . length )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) url (name = nil)
-
-
-
-
-
-
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
- # File 'app/models/photo.rb', line 64
-
-def url ( name = nil )
- if remote_photo_path
- name = name . to_s + '_' if name
- remote_photo_path + name . to_s + remote_photo_name
- elsif not_processed?
- unprocessed_image . url ( name )
- else
- processed_image . url ( name )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PhotosController.html b/doc/PhotosController.html
deleted file mode 100644
index 6ba55eb92d9..00000000000
--- a/doc/PhotosController.html
+++ /dev/null
@@ -1,847 +0,0 @@
-
-
-
-
-
- Class: PhotosController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: PhotosController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/photos_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
- # File 'app/controllers/photos_controller.rb', line 40
-
-def create
- begin
- raise unless params [ :photo ] [ :aspect_ids ]
-
- if params [ :photo ] [ :aspect_ids ] == "all"
- params [ :photo ] [ :aspect_ids ] = current_user . aspects . collect { | x | x . id }
- elsif params [ :photo ] [ :aspect_ids ] . is_a? ( Hash )
- params [ :photo ] [ :aspect_ids ] = params [ :photo ] [ :aspect_ids ] . values
- end
-
- params [ :photo ] [ :user_file ] = file_handler ( params )
-
- @photo = current_user . build_post ( :photo , params [ :photo ] )
-
- if @photo . save
-
- aspects = current_user . aspects_from_ids ( params [ :photo ] [ :aspect_ids ] )
-
- unless @photo . pending
- current_user . add_to_streams ( @photo , aspects )
- current_user . dispatch_post ( @photo , :to = > params [ :photo ] [ :aspect_ids ] )
- end
-
- if params [ :photo ] [ :set_profile_photo ]
- profile_params = { :image_url = > @photo . url ( :thumb_large ) ,
- :image_url_medium = > @photo . url ( :thumb_medium ) ,
- :image_url_small = > @photo . url ( :thumb_small ) }
- current_user . update_profile ( profile_params )
- end
-
- respond_to do | format |
- format . json { render ( :layout = > false , :json = > { "success" = > true , "data" = > @photo } . to_json ) }
- end
- else
- respond_with @photo , :location = > photos_path , :error = > message
- end
-
- rescue TypeError
- message = I18n . t 'photos.create.type_error'
- respond_with @photo , :location = > photos_path , :error = > message
-
- rescue CarrierWave :: IntegrityError
- message = I18n . t 'photos.create.integrity_error'
- respond_with @photo , :location = > photos_path , :error = > message
-
- rescue RuntimeError = > e
- message = I18n . t 'photos.create.runtime_error'
- respond_with @photo , :location = > photos_path , :error = > message
- raise e
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) destroy
-
-
-
-
-
-
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-
-
- # File 'app/controllers/photos_controller.rb', line 118
-
-def destroy
- photo = current_user . posts . where ( :id = > params [ :id ] ) . first
-
- if photo
- current_user . retract ( photo )
-
- respond_to do | format |
- format . json { render :nothing = > true , :status = > 204 }
- format . html do
- flash [ :notice ] = I18n . t 'photos.destroy.notice'
- if photo . status_message_guid
- respond_with photo , :location = > photo . status_message
- else
- respond_with photo , :location = > person_photos_path ( current_user . person )
- end
- end
- end
- else
- respond_with photo , :location = > person_photos_path ( current_user . person )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) edit
-
-
-
-
-
-
-
-
-
-175
-176
-177
-178
-179
-180
-181
-
-
- # File 'app/controllers/photos_controller.rb', line 175
-
-def edit
- if @photo = current_user . posts . where ( :id = > params [ :id ] ) . first
- respond_with @photo
- else
- redirect_to person_photos_path ( current_user . person )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) index
-
-
-
-
-
-
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
- # File 'app/controllers/photos_controller.rb', line 10
-
-def index
- @post_type = :photos
- @person = Person . find_by_id ( params [ :person_id ] )
-
- if @person
- @profile = @person . profile
- @contact = current_user . contact_for ( @person )
- @is_contact = @person != current_user . person && @contact
- @aspects_with_person = [ ]
-
- if @contact
- @aspects_with_person = @contact . aspects
- @contacts_of_contact = @contact . contacts
- @contacts_of_contact_count = @contact . contacts . count
- else
- @contact = Contact . new
- @contacts_of_contact = [ ]
- @contacts_of_contact_count = 0
- end
-
- @posts = current_user . posts_from ( @person ) . where ( :type = > 'Photo' ) . paginate ( :page = > params [ :page ] )
-
- render 'people/show'
-
- else
- flash [ :error ] = I18n . t 'people.show.does_not_exist'
- redirect_to people_path
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) make_profile_photo
-
-
-
-
-
-
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
- # File 'app/controllers/photos_controller.rb', line 92
-
-def make_profile_photo
- author_id = current_user . person . id
- @photo = Photo . where ( :id = > params [ :photo_id ] , :author_id = > author_id ) . first
-
- if @photo
- profile_hash = { :image_url = > @photo . url ( :thumb_large ) ,
- :image_url_medium = > @photo . url ( :thumb_medium ) ,
- :image_url_small = > @photo . url ( :thumb_small ) }
-
- if current_user . update_profile ( profile_hash )
- respond_to do | format |
- format . js { render :json = > { :photo_id = > @photo . id ,
- :image_url = > @photo . url ( :thumb_large ) ,
- :image_url_medium = > @photo . url ( :thumb_medium ) ,
- :image_url_small = > @photo . url ( :thumb_small ) ,
- :author_id = > author_id } ,
- :status = > 201 }
- end
- else
- render :nothing = > true , :status = > 422
- end
- else
- render :nothing = > true , :status = > 422
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
- # File 'app/controllers/photos_controller.rb', line 140
-
-def show
- @photo = current_user . find_visible_post_by_id ( params [ :id ] , :type = > 'Photo' )
- if @photo
- @parent = StatusMessage . where ( :guid = > @photo . status_message_guid ) . includes ( :photos ) . first if @photo . status_message_guid
-
-
- if @parent
- @additional_photos = @photo . status_message . photos
- if @additional_photos
- @next_photo = @additional_photos [ @additional_photos . index ( @photo ) + 1 ]
- @prev_photo = @additional_photos [ @additional_photos . index ( @photo ) - 1 ]
- @next_photo ||= @additional_photos . first
- end
- else
- @parent = @photo
- end
-
- @object_aspect_ids = [ ]
- if @parent_aspects = @parent . aspects . where ( :user_id = > current_user . id )
- @object_aspect_ids = @parent_aspects . map { | a | a . id }
- end
-
- @ownership = current_user . owns? @photo
-
- respond_with @photo
- else
- begin
- redirect_to :back
- rescue
- redirect_to aspects_path
- end
- end
-
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update
-
-
-
-
-
-
-
-
-
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-
-
- # File 'app/controllers/photos_controller.rb', line 183
-
-def update
- photo = current_user . posts . where ( :id = > params [ :id ] ) . first
- if photo
- if current_user . update_post ( photo , params [ :photo ] )
- flash . now [ :notice ] = I18n . t 'photos.update.notice'
- respond_to do | format |
- format . js { render :json = > photo , :status = > 200 }
- end
- else
- flash . now [ :error ] = I18n . t 'photos.update.error'
- respond_to do | format |
- format . html { redirect_to [ :edit , photo ] }
- format . js { render :status = > 403 }
- end
- end
- else
- redirect_to person_photos_path ( current_user . person )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Post.html b/doc/Post.html
deleted file mode 100644
index 9a71a49848d..00000000000
--- a/doc/Post.html
+++ /dev/null
@@ -1,886 +0,0 @@
-
-
-
-
-
- Class: Post
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Post
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- Post
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- ApplicationHelper, Diaspora::Guid, Diaspora::Webhooks, ROXML
-
-
-
-
-
- Defined in:
- app/models/post.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
Constant Summary
-
-
-
- @@per_page =
-
-
- 10
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) diaspora_initialize (params)
-
-
-
-
-
-
-
-
-
-48
-49
-50
-51
-52
-53
-54
-55
-
-
- # File 'app/models/post.rb', line 48
-
-def self . diaspora_initialize params
- new_post = self . new params . to_hash
- new_post . author = params [ :author ]
- new_post . public = params [ :public ] if params [ :public ]
- new_post . pending = params [ :pending ] if params [ :pending ]
- new_post . diaspora_handle = new_post . author . diaspora_handle
- new_post
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Boolean ) activity_streams?
-
-
-
-
-
-
-
-
-
-
-121
-122
-123
-
-
- # File 'app/models/post.rb', line 121
-
-def activity_streams?
- false
-end
-
-
-
-
-
-
-
-
-
- - (Object ) as_json (opts = {})
-
-
-
-
-
-
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-
-
- # File 'app/models/post.rb', line 57
-
-def as_json ( opts = { } )
- {
- :post = > {
- :id = > self . guid ,
- :author = > self . author . as_json ,
- }
- }
-end
-
-
-
-
-
-
-
-
-
- - (Object ) diaspora_handle
-
-
-
-
-
-
-
-
-
-32
-33
-34
-
-
- # File 'app/models/post.rb', line 32
-
-def diaspora_handle
- read_attribute ( :diaspora_handle ) || self . author . diaspora_handle
-end
-
-
-
-
-
-
-
-
-
- - (Object ) diaspora_handle= (nd)
-
-
-
-
-
-
-
-
-
-43
-44
-45
-46
-
-
- # File 'app/models/post.rb', line 43
-
-def diaspora_handle= nd
- self . author = Person . where ( :diaspora_handle = > nd ) . first
- write_attribute ( :diaspora_handle , nd )
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) mutable?
-
-
-
-
-
-
-
-
-
-
-66
-67
-68
-
-
- # File 'app/models/post.rb', line 66
-
-def mutable?
- false
-end
-
-
-
-
-
-
-
-
-
- - (void ) receive (user, person)
-
-
-
-
-
-
This method returns an undefined value.
-
-
-
-
-
-
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
- # File 'app/models/post.rb', line 85
-
-def receive ( user , person )
-
-
-
-
-
-
- local_post = Post . where ( :guid = > self . guid ) . first
- if local_post && local_post . author_id == self . author_id
- known_post = user . visible_posts . where ( :guid = > self . guid ) . first
- if known_post
- if known_post . mutable?
- known_post . update_attributes ( self . attributes )
- else
- Rails . logger . info ( "event=receive payload_type=#{self.class} update=true status=abort sender=#{self.diaspora_handle} reason=immutable existing_post=#{known_post.id}" )
- end
- else
- user . contact_for ( person ) . receive_post ( local_post )
- user . notify_if_mentioned ( local_post )
- Rails . logger . info ( "event=receive payload_type=#{self.class} update=true status=complete sender=#{self.diaspora_handle} existing_post=#{local_post.id}" )
- return local_post
- end
- elsif ! local_post
- if self . save
- user . contact_for ( person ) . receive_post ( self )
- user . notify_if_mentioned ( self )
- Rails . logger . info ( "event=receive payload_type=#{self.class} update=false status=complete sender=#{self.diaspora_handle}" )
- return self
- else
- Rails . logger . info ( "event=receive payload_type=#{self.class} update=false status=abort sender=#{self.diaspora_handle} reason=#{self.errors.full_messages}" )
- end
- else
- Rails . logger . info ( "event=receive payload_type=#{self.class} update=true status=abort sender=#{self.diaspora_handle} reason='update not from post owner' existing_post=#{self.id}" )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Array<Person> ) subscribers (user)
-
-
-
-
-
-
-The list of people that should receive this Post.
-
-
-
-
-
-
-
-
-
-
-
-74
-75
-76
-77
-78
-79
-80
-
-
- # File 'app/models/post.rb', line 74
-
-def subscribers ( user )
- if self . public?
- user . contact_people
- else
- user . people_in_aspects ( user . aspects_with_post ( self . id ) )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) user_refs
-
-
-
-
-
-
-
-
-
-35
-36
-37
-38
-39
-40
-41
-
-
- # File 'app/models/post.rb', line 35
-
-def user_refs
- if AspectVisibility . exists? ( :post_id = > self . id )
- self . post_visibilities . count + 1
- else
- self . post_visibilities . count
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PostsController.html b/doc/PostsController.html
deleted file mode 100644
index d62977a5437..00000000000
--- a/doc/PostsController.html
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
- Class: PostsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: PostsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/posts_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
- # File 'app/controllers/posts_controller.rb', line 10
-
-def show
- @post = Post . where ( :id = > params [ :id ] , :public = > true ) . includes ( :author , :comments = > :author ) . first
-
- if @post
- @landing_page = true
- @person = @post . author
- if @person . owner_id
- I18n . locale = @person . owner . language
- render "posts/#{@post.class.to_s.underscore}" , :layout = > true
- else
- flash [ :error ] = I18n . t ( 'posts.doesnt_exist' )
- redirect_to root_url
- end
- else
- flash [ :error ] = I18n . t ( 'posts.doesnt_exist' )
- redirect_to root_url
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PostsFake.html b/doc/PostsFake.html
deleted file mode 100644
index 27be032d5d4..00000000000
--- a/doc/PostsFake.html
+++ /dev/null
@@ -1,444 +0,0 @@
-
-
-
-
-
- Class: PostsFake
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: PostsFake
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- PostsFake
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/fake.rb
-
-
-
-
-
Defined Under Namespace
-
-
-
-
-
- Classes: Fake
-
-
-
-
-
-
Instance Attribute Summary (collapse )
-
-
-
-
-
- - (Object) people_hash
-
-
-
-
-
-
- readonly
-
-
-
-
-
-
-
-
-
-Returns the value of attribute people_hash.
-
-
-
-
-
-
-
-
-
- - (Object) post_fakes
-
-
-
-
-
-
- readonly
-
-
-
-
-
-
-
-
-
-Returns the value of attribute post_fakes.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
Constructor Details
-
-
-
-
- - (PostsFake ) initialize (posts)
-
-
-
-
-
-
-A new instance of PostsFake
-
-
-
-
-
-
-
-
-
-
-
-
-
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-
-
- # File 'lib/fake.rb', line 5
-
-def initialize ( posts )
- author_ids = [ ]
- posts . each do | p |
- author_ids << p . author_id
- p . . each do | c |
- author_ids << c . author_id
- end
- end
-
- people = Person . where ( :id = > author_ids ) . includes ( :profile )
- @people_hash = { }
- people . each { | person | @people_hash [ person . id ] = person }
-
- @post_fakes = posts . map do | post |
- f = Fake . new ( post , self )
- f . = post . . map do | |
- Fake . new ( , self )
- end
- f
- end
-end
-
-
-
-
-
-
-
-
-
-
Instance Attribute Details
-
-
-
-
-
-
-
- - (Object ) people_hash
-
-
-
-
-
-
-Returns the value of attribute people_hash
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'lib/fake.rb', line 2
-
-def people_hash
- @people_hash
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) post_fakes
-
-
-
-
-
-
-Returns the value of attribute post_fakes
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-
-
- # File 'lib/fake.rb', line 2
-
-def post_fakes
- @post_fakes
-end
-
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) models
-
-
-
-
-
-
-
-
-
-27
-28
-29
-
-
- # File 'lib/fake.rb', line 27
-
-def models
- self . post_fakes . map { | a | a . model }
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PostsFake/Fake.html b/doc/PostsFake/Fake.html
deleted file mode 100644
index 97de69cfa4f..00000000000
--- a/doc/PostsFake/Fake.html
+++ /dev/null
@@ -1,629 +0,0 @@
-
-
-
-
-
- Class: PostsFake::Fake
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: PostsFake::Fake
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- PostsFake::Fake
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/fake.rb
-
-
-
-
-
-
-
Instance Attribute Summary (collapse )
-
-
-
-
-
- - (Object) comments
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute comments.
-
-
-
-
-
-
-
-
-
- - (Object) model
-
-
-
-
-
-
- readonly
-
-
-
-
-
-
-
-
-
-Returns the value of attribute model.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
Constructor Details
-
-
-
-
- - (Fake ) initialize (model, fakes_collection)
-
-
-
-
-
-
-A new instance of Fake
-
-
-
-
-
-
-
-
-
-
-
-
-
-34
-35
-36
-37
-
-
- # File 'lib/fake.rb', line 34
-
-def initialize ( model , fakes_collection )
- @fakes_collection = fakes_collection
- @model = model
-end
-
-
-
-
-
-
-
-
-
Dynamic Method Handling
-
- This class handles dynamic methods through the method_missing method
-
-
-
-
-
-
- - (Object ) method_missing (method, *args)
-
-
-
-
-
-
-
-
-
-55
-56
-57
-
-
- # File 'lib/fake.rb', line 55
-
-def method_missing ( method , * args )
- @model . send ( method , * args )
-end
-
-
-
-
-
-
-
-
-
-
Instance Attribute Details
-
-
-
-
-
-
-
-
-Returns the value of attribute comments
-
-
-
-
-
-
-
-
-
-
-
-
-
-32
-33
-34
-
-
- # File 'lib/fake.rb', line 32
-
-def
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) model
-
-
-
-
-
-
-Returns the value of attribute model
-
-
-
-
-
-
-
-
-
-
-
-
-
-33
-34
-35
-
-
- # File 'lib/fake.rb', line 33
-
-def model
- @model
-end
-
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) author
-
-
-
-
-
-
-
-
-
-47
-48
-49
-
-
- # File 'lib/fake.rb', line 47
-
-def author
- @fakes_collection . people_hash [ @model . author_id ]
-end
-
-
-
-
-
-
-
-
-
- - (Object ) id
-
-
-
-
-
-
-
-
-
-39
-40
-41
-
-
- # File 'lib/fake.rb', line 39
-
-def id
- @model . id
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) respond_to? (*args)
-
-
-
-
-
-
-
-
-
-
-51
-52
-53
-
-
- # File 'lib/fake.rb', line 51
-
-def respond_to? ( * args )
- super ( * args ) || model . respond_to? ( * args )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) to_s
-
-
-
-
-
-
-
-
-
-43
-44
-45
-
-
- # File 'lib/fake.rb', line 43
-
-def to_s
- @model . id . to_s
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/ProcessedImage.html b/doc/ProcessedImage.html
deleted file mode 100644
index 34f8892b1b9..00000000000
--- a/doc/ProcessedImage.html
+++ /dev/null
@@ -1,305 +0,0 @@
-
-
-
-
-
- Class: ProcessedImage
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: ProcessedImage
-
-
-
-
-
-
-
- Inherits:
-
- CarrierWave::Uploader::Base
-
-
- Object
-
- CarrierWave::Uploader::Base
-
- ProcessedImage
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- CarrierWave::MiniMagick
-
-
-
-
-
- Defined in:
- app/uploaders/processed_image.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) extension_white_list
-
-
-
-
-
-
-
-
-
-12
-13
-14
-
-
- # File 'app/uploaders/processed_image.rb', line 12
-
-def extension_white_list
- %w(jpg jpeg png gif)
-end
-
-
-
-
-
-
-
-
-
- - (Object ) filename
-
-
-
-
-
-
-
-
-
-16
-17
-18
-
-
- # File 'app/uploaders/processed_image.rb', line 16
-
-def filename
- model . random_string + File . extname ( @filename ) if @filename
-end
-
-
-
-
-
-
-
-
-
- - (Object ) store_dir
-
-
-
-
-
-
-
-
-
-8
-9
-10
-
-
- # File 'app/uploaders/processed_image.rb', line 8
-
-def store_dir
- "uploads/images"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/PublicsController.html b/doc/PublicsController.html
deleted file mode 100644
index 2fe4aa9d478..00000000000
--- a/doc/PublicsController.html
+++ /dev/null
@@ -1,490 +0,0 @@
-
-
-
-
-
- Class: PublicsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: PublicsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::Parser
-
-
-
-
-
- Defined in:
- app/controllers/publics_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
from_xml
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) hcard
-
-
-
-
-
-
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-
-
- # File 'app/controllers/publics_controller.rb', line 17
-
-def hcard
- @person = Person . where ( :guid = > params [ :guid ] ) . first
- unless @person . nil? || @person . owner . nil?
- render 'publics/hcard'
- else
- render :nothing = > true , :status = > 404
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) host_meta
-
-
-
-
-
-
-
-
-
-26
-27
-28
-
-
- # File 'app/controllers/publics_controller.rb', line 26
-
-def host_meta
- render 'host_meta' , :content_type = > 'application/xrd+xml'
-end
-
-
-
-
-
-
-
-
-
- - (Object ) hub
-
-
-
-
-
-
-
-
-
-39
-40
-41
-
-
- # File 'app/controllers/publics_controller.rb', line 39
-
-def hub
- render :text = > params [ 'hub.challenge' ] , :status = > 202 , :layout = > false
-end
-
-
-
-
-
-
-
-
-
- - (Object ) receive
-
-
-
-
-
-
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
- # File 'app/controllers/publics_controller.rb', line 43
-
-def receive
- if params [ :xml ] . nil?
- render :nothing = > true , :status = > 422
- return
- end
-
- person = Person . where ( :guid = > params [ :guid ] ) . first
-
- if person . nil? || person . owner_id . nil?
- Rails . logger . error ( "Received post for nonexistent person #{params[:guid]}" )
- render :nothing = > true , :status = > 404
- return
- end
-
- @user = person . owner
- Resque . enqueue ( Job :: ReceiveSalmon , @user . id , CGI :: unescape ( params [ :xml ] ) )
-
- render :nothing = > true , :status = > 202
-end
-
-
-
-
-
-
-
-
-
- - (Object ) webfinger
-
-
-
-
-
-
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-
-
- # File 'app/controllers/publics_controller.rb', line 30
-
-def webfinger
- @person = Person . local_by_account_identifier ( params [ :q ] ) if params [ :q ]
- unless @person . nil?
- render 'webfinger' , :content_type = > 'application/xrd+xml'
- else
- render :nothing = > true , :status = > 404
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
deleted file mode 100644
index fe41f5cc24d..00000000000
--- a/doc/README_FOR_APP
+++ /dev/null
@@ -1,2 +0,0 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/doc/Rails.html b/doc/Rails.html
deleted file mode 100644
index a85690a4353..00000000000
--- a/doc/Rails.html
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
- Module: Rails
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: Rails
-
-
-
-
-
-
-
-
-
-
-
-
-
- Included in:
- SocketsController
-
-
-
- Defined in:
- lib/log_overrider.rb
-
-
-
-
-
Defined Under Namespace
-
-
-
- Modules: Rack
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/Salmon/SalmonSlap.html b/doc/Salmon/SalmonSlap.html
deleted file mode 100644
index 215169ad5ea..00000000000
--- a/doc/Salmon/SalmonSlap.html
+++ /dev/null
@@ -1,1404 +0,0 @@
-
-
-
-
-
- Class: Salmon::SalmonSlap
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: Salmon::SalmonSlap
-
-
-
-
-
-
-
- Inherits:
-
- Object
-
-
- Object
-
- Salmon::SalmonSlap
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- lib/salmon/salmon.rb
-
-
-
-
-
-
-
Instance Attribute Summary (collapse )
-
-
-
-
-
- - (Object) aes_key
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute aes_key.
-
-
-
-
-
-
-
-
-
- - (Object) author
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute author.
-
-
-
-
-
-
-
-
-
- - (Object) author_email
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute author_email.
-
-
-
-
-
-
-
-
-
- - (Object) data_type
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute data_type.
-
-
-
-
-
-
-
-
-
- - (Object) iv
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute iv.
-
-
-
-
-
-
-
-
-
- - (Object) magic_sig
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute magic_sig.
-
-
-
-
-
-
-
-
-
- - (Object) parsed_data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute parsed_data.
-
-
-
-
-
-
-
-
-
- - (Object) sig
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns the value of attribute sig.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
Instance Attribute Details
-
-
-
-
-
-
-
- - (Object ) aes_key
-
-
-
-
-
-
-Returns the value of attribute aes_key
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def aes_key
- @aes_key
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) author
-
-
-
-
-
-
-Returns the value of attribute author
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-47
-48
-49
-50
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def author
- if @author . nil?
- @author ||= Person . by_account_identifier @author_email
- raise "did you remember to async webfinger?" if @author . nil?
- end
- @author
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) author_email
-
-
-
-
-
-
-Returns the value of attribute author_email
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def author_email
- @author_email
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) data_type
-
-
-
-
-
-
-Returns the value of attribute data_type
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def data_type
- @data_type
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) iv
-
-
-
-
-
-
-Returns the value of attribute iv
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def iv
- @iv
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) magic_sig
-
-
-
-
-
-
-Returns the value of attribute magic_sig
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def magic_sig
- @magic_sig
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) parsed_data
-
-
-
-
-
-
-Returns the value of attribute parsed_data
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def parsed_data
- @parsed_data
-end
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object ) sig
-
-
-
-
-
-
-Returns the value of attribute sig
-
-
-
-
-
-
-
-
-
-
-
-
-
-44
-45
-46
-
-
- # File 'lib/salmon/salmon.rb', line 44
-
-def sig
- @sig
-end
-
-
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) b64_to_n (str)
-
-
-
-
-
-
-Decode a string containing URL safe Base64 into an integer Example:
-
-
- MagicSig . b64_to_n ( 'AQAB' )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-153
-154
-155
-156
-
-
- # File 'lib/salmon/salmon.rb', line 153
-
-def self . b64_to_n ( str )
- packed = decode64url ( str )
- packed . unpack ( 'B*' ) [ 0 ] . to_i ( 2 )
-end
-
-
-
-
-
-
-
-
-
- + (Object ) build_key (n, e)
-
-
-
-
-
-
-Take two integers e, n and create a new OpenSSL::PKey::RSA key with them
-Example:
-
-
- n = 9487834027867356975347184933768917275269369900665861930617802608089634337052392076689226301419587057117740995382286148368168197915234368486155306558161867
- e = 65537
- key = MagicSig . build_key ( n , e )
- key . public_encrypt ( ... )
- key . public_decrypt ( ... )
- key . verify ( ... )
-
-
-
-
-
-
-
-
-
-
-
-
-
-180
-181
-182
-183
-184
-185
-
-
- # File 'lib/salmon/salmon.rb', line 180
-
-def self . build_key ( n , e )
- key = OpenSSL :: PKey :: RSA . new
- key . n = n
- key . e = e
- key
-end
-
-
-
-
-
-
-
-
-
- + (Object ) create (user, activity)
-
-
-
-
-
-
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
- # File 'lib/salmon/salmon.rb', line 47
-
-def self . create ( user , activity )
- salmon = self . new
- salmon . author = user . person
- aes_key_hash = user . person . gen_aes_key
- salmon . aes_key = aes_key_hash [ 'key' ]
- salmon . iv = aes_key_hash [ 'iv' ]
- salmon . magic_sig = MagicSigEnvelope . create ( user , user . person . aes_encrypt ( activity , aes_key_hash ) )
- salmon
-end
-
-
-
-
-
-
-
-
-
- + (Object ) decode64url (str)
-
-
-
-
-
-
-Decode URL-safe-Base64. This implements
-
-
-
-
-
-
-
-
-
-
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
- # File 'lib/salmon/salmon.rb', line 123
-
-def self . decode64url ( str )
-
- sans_whitespace = str . gsub ( /\s/ , '' )
-
- string = sans_whitespace + '=' * ( ( 4 - sans_whitespace . size ) % 4 )
-
-
-
-
- Base64 . urlsafe_decode64 string
-end
-
-
-
-
-
-
-
-
-
- + (Object ) parse (xml, user)
-
-
-
-
-
-
-
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
- # File 'lib/salmon/salmon.rb', line 57
-
-def self . parse ( xml , user )
- slap = self . new
- doc = Nokogiri :: XML ( xml )
-
- sig_doc = doc . search ( 'entry' )
-
-
- = user . decrypt ( doc . search ( 'encrypted_header' ) . text )
- = Nokogiri :: XML ( )
- slap . author_email = . search ( 'uri' ) . text . split ( "acct:" ) . last
- slap . aes_key = . search ( 'aes_key' ) . text
- slap . iv = . search ( 'iv' ) . text
-
- slap . magic_sig = MagicSigEnvelope . parse sig_doc
-
- if 'base64url' == slap . magic_sig . encoding
-
- key_hash = { 'key' = > slap . aes_key , 'iv' = > slap . iv }
- slap . parsed_data = user . aes_decrypt ( decode64url ( slap . magic_sig . data ) , key_hash )
- slap . sig = slap . magic_sig . sig
- else
- raise ArgumentError , "Magic Signature data must be encoded with base64url, was #{slap.magic_sig.encoding}"
- end
-
- slap . data_type = slap . magic_sig . data_type
-
- raise ArgumentError , "Magic Signature data must be signed with RSA-SHA256, was #{slap.magic_sig.alg}" unless 'RSA-SHA256' == slap . magic_sig . alg
-
- slap
-end
-
-
-
-
-
-
-
-
-
- + (Object ) parse_key (str)
-
-
-
-
-
-
-Parse a string containing a magic-public-key into an OpenSSL::PKey::RSA
-key. Example:
-
-
- key = MagicSig . parse_key ( 'RSA.mVgY8RN6URBTstndvmUUPb4UZTdwvwmddSKE5z_jvKUEK6yk1u3rrC9yN8k6FilGj9K0eeUPe2hf4Pj-5CmHww.AQAB' )
- key . n
-
- key . e
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-166
-167
-168
-169
-
-
- # File 'lib/salmon/salmon.rb', line 166
-
-def self . parse_key ( str )
- n , e = str . match ( /^RSA.([^.]*).([^.]*)$/ ) [ 1 .. 2 ]
- build_key ( b64_to_n ( n ) , b64_to_n ( e ) )
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
-
-
-
-
-100
-101
-102
-
-
- # File 'lib/salmon/salmon.rb', line 100
-
-def
- = " <decrypted_header>\n <iv>\#{iv}</iv>\n <aes_key>\#{aes_key}</aes_key>\n <author>\n <name>\#{@author.name}</name>\n <uri>acct:\#{@author.diaspora_handle}</uri>\n </author>\n </decrypted_header>\n"
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) verified_for_key? (public_key)
-
-
-
-
-
-
-Check whether this envelope’s signature can be verified with the
-provided OpenSSL::PKey::RSA public_key. Example:
-
-
- env . verified_for_key? OpenSSL :: PKey :: RSA . new ( File . open ( 'public_key.pem' ) )
-
-
-
-
-
-
-
-
-
-
-
-
-141
-142
-143
-144
-145
-146
-
-
- # File 'lib/salmon/salmon.rb', line 141
-
-def verified_for_key? ( public_key )
- signature = Base64 . urlsafe_decode64 ( self . magic_sig . sig )
- signed_data = self . magic_sig . signable_string
-
- public_key . verify ( OpenSSL :: Digest :: SHA256 . new , signature , signed_data )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) xml_for (person)
-
-
-
-
-
-
-
-
-
-88
-89
-90
-91
-
-
- # File 'lib/salmon/salmon.rb', line 88
-
-def xml_for person
- xml = " <?xml version='1.0' encoding='UTF-8'?>\n <entry xmlns='http://www.w3.org/2005/Atom'>\n <encrypted_header>\#{person.encrypt(decrypted_header)}</encrypted_header>\n \#{@magic_sig.to_xml}\n </entry>\n"
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/SessionsController.html b/doc/SessionsController.html
deleted file mode 100644
index b68762ee27f..00000000000
--- a/doc/SessionsController.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
- Class: SessionsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: SessionsController
-
-
-
-
-
-
-
- Inherits:
-
- Devise::SessionsController
-
-
- Object
-
- Devise::SessionsController
-
- SessionsController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/sessions_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/SocketsController.html b/doc/SocketsController.html
deleted file mode 100644
index f4305cccff7..00000000000
--- a/doc/SocketsController.html
+++ /dev/null
@@ -1,350 +0,0 @@
-
-
-
-
-
- Class: SocketsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: SocketsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- ApplicationHelper , Rails , SocketsHelper
-
-
-
-
-
- Defined in:
- app/controllers/sockets_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#action_hash , #obj_id
-
-
-
-
-
-
-
-
-
-
#new_notification_link , #notification_message_for , #notification_people_link , #object_link , #peoples_names , #the_day , #the_month , #translation
-
-
-
-
-
-
-
-
-
-
#bookmarklet , #direction_for , #get_javascript_strings_for , #hard_link , #how_long_ago , #info_text , #mine? , #object_fields , #object_path , #owner_image_link , #owner_image_tag , #person_image_link , #person_image_tag , #person_link , #post_yield_tag , #profile_photo , #rtl? , #timeago , #type_partial
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) incoming (msg)
-
-
-
-
-
-
-
-
-
-10
-11
-12
-
-
- # File 'app/controllers/sockets_controller.rb', line 10
-
-def incoming ( msg )
- Rails . logger . info ( "Socket received connection to: #{msg}" )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) outgoing (user_or_id, object, opts = {})
-
-
-
-
-
-
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
- # File 'app/controllers/sockets_controller.rb', line 14
-
-def outgoing ( user_or_id , object , opts = { } )
- if user_or_id . instance_of? ( Fixnum )
- user_id = user_or_id
- else
- user_id = user_or_id . id
- @user = user_or_id
- end
- return unless Diaspora :: WebSocket . is_connected? ( user_id )
- @_request = ActionDispatch :: Request . new ( { } )
- Diaspora :: WebSocket . queue_to_user ( user_id , action_hash ( @user || User . find ( user_id ) , object , opts ) )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/SocketsHelper.html b/doc/SocketsHelper.html
deleted file mode 100644
index 7b03366a226..00000000000
--- a/doc/SocketsHelper.html
+++ /dev/null
@@ -1,418 +0,0 @@
-
-
-
-
-
- Module: SocketsHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: SocketsHelper
-
-
-
-
-
-
-
-
-
-
-
- Includes:
- ApplicationHelper , NotificationsHelper
-
-
-
-
- Included in:
- SocketsController
-
-
-
- Defined in:
- app/helpers/sockets_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#new_notification_link , #notification_message_for , #notification_people_link , #object_link , #peoples_names , #the_day , #the_month , #translation
-
-
-
-
-
-
-
-
-
-
#bookmarklet , #direction_for , #get_javascript_strings_for , #hard_link , #how_long_ago , #info_text , #mine? , #object_fields , #object_path , #owner_image_link , #owner_image_tag , #person_image_link , #person_image_tag , #person_link , #post_yield_tag , #profile_photo , #rtl? , #timeago , #type_partial
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) action_hash (user, object, opts = {})
-
-
-
-
-
-
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
- # File 'app/helpers/sockets_helper.rb', line 19
-
-def action_hash ( user , object , opts = { } )
- uid = user . id
- begin
- unless user . nil?
- old_locale = I18n . locale
- I18n . locale = user . language . to_s
- end
-
- if object . is_a? StatusMessage
- post_hash = { :post = > object ,
- :author = > object . author ,
- :photos = > object . photos ,
- :comments = > object . . map { | c |
- { :comment = > c ,
- :author = > c . author
- }
- } ,
- :current_user = > user ,
- :all_aspects = > user . aspects ,
- }
- v = render_to_string ( :partial = > 'shared/stream_element' , :locals = > post_hash )
- elsif object . is_a? Person
- person_hash = {
- :single_aspect_form = > opts [ "single_aspect_form" ] ,
- :person = > object ,
- :all_aspects = > user . aspects ,
- :contact = > user . contact_for ( object ) ,
- :current_user = > user }
- @all_aspects = user . aspects
- v = render_to_string ( :partial = > 'people/person' , :locals = > person_hash )
-
- elsif object . is_a?
- v = render_to_string ( :partial = > 'comments/comment' , :locals = > { :post = > object . post , :comment = > object , :person = > object . author , :current_user = > user } )
-
- elsif object . is_a? Like
- v = render_to_string ( :partial = > 'likes/likes' , :locals = > { :likes = > object . post . likes , :dislikes = > object . post . dislikes } )
-
- elsif object . is_a? Notification
- v = render_to_string ( :partial = > 'notifications/popup' , :locals = > { :note = > object , :person = > opts [ :actor ] } )
-
- else
- raise "#{object.inspect} with class #{object.class} is not actionhashable." unless object . is_a? Retraction
- end
- rescue Exception = > e
- Rails . logger . error ( "event=socket_render status=fail user=#{user.diaspora_handle} object=#{object.id.to_s}" )
- raise e
- end
- action_hash = { :class = > object . class . to_s . underscore . pluralize , :html = > v , :post_id = > obj_id ( object ) }
- action_hash . merge! opts
- if object . is_a? Photo
- action_hash [ :photo_hash ] = object . thumb_hash
- end
-
- if object . is_a?
- post = object . post
- action_hash [ :comment_id ] = object . id
- action_hash [ :my_post? ] = ( post . author . owner_id == uid )
- action_hash [ :post_guid ] = post . guid
-
- end
-
- if object . is_a? Like
- action_hash [ :post_guid ] = object . post . guid
- end
-
- action_hash [ :mine? ] = object . author && ( object . author . owner_id == uid ) if object . respond_to? ( :author )
-
- I18n . locale = old_locale unless user . nil?
-
- action_hash . to_json
-end
-
-
-
-
-
-
-
-
-
- - (Object ) obj_id (object)
-
-
-
-
-
-
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
- # File 'app/helpers/sockets_helper.rb', line 9
-
-def obj_id ( object )
- if object . respond_to? ( :post_id )
- object . post_id
- elsif object . respond_to? ( :post_guid )
- object . post_guid
- else
- object . id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/StatusMessagesController.html b/doc/StatusMessagesController.html
deleted file mode 100644
index e4b43b83417..00000000000
--- a/doc/StatusMessagesController.html
+++ /dev/null
@@ -1,601 +0,0 @@
-
-
-
-
-
- Class: StatusMessagesController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: StatusMessagesController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/status_messages_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) bookmarklet
-
-
-
-
-
-
-
-
-
-28
-29
-30
-31
-32
-33
-
-
- # File 'app/controllers/status_messages_controller.rb', line 28
-
-def bookmarklet
- @aspects = current_user . aspects
- @selected_contacts = @aspects . map { | aspect | aspect . contacts } . flatten . uniq
- @aspect_ids = @aspects . map { | x | x . id }
- render :layout = > nil
-end
-
-
-
-
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
- # File 'app/controllers/status_messages_controller.rb', line 35
-
-def create
- params [ :status_message ] [ :aspect_ids ] = params [ :aspect_ids ]
-
- photos = Photo . where ( :id = > [ * params [ :photos ] ] , :diaspora_handle = > current_user . person . diaspora_handle )
-
- public_flag = params [ :status_message ] [ :public ]
- public_flag . to_s . match ( /(true)|(on)/ ) ? public_flag = true : public_flag = false
- params [ :status_message ] [ :public ] = public_flag
-
- @status_message = current_user . build_post ( :status_message , params [ :status_message ] )
- aspects = current_user . aspects_from_ids ( params [ :aspect_ids ] )
-
- if ! photos . empty?
- @status_message . photos << photos
- end
- if @status_message . save
- Rails . logger . info ( "event=create type=status_message chars=#{params[:status_message][:text].length}" )
-
- current_user . add_to_streams ( @status_message , aspects )
- receiving_services = params [ :services ] . map { | s | current_user . services . where (
- :type = > "Services::" + s . titleize ) . first } if params [ :services ]
- current_user . dispatch_post ( @status_message , :url = > post_url ( @status_message ) , :services = > receiving_services )
- if ! photos . empty?
- for photo in photos
- was_pending = photo . pending
- if was_pending
- current_user . add_to_streams ( photo , aspects )
- current_user . dispatch_post ( photo )
- end
- end
- photos . update_all ( :pending = > false , :public = > public_flag )
- end
-
- if request . env [ 'HTTP_REFERER' ] . include? ( "people" )
- flash [ :notice ] = t ( 'status_messages.create.success' , :names = > @status_message . mentions . includes ( :person = > :profile ) . map { | mention | mention . person . name } . join ( ', ' ) )
- end
-
- respond_to do | format |
- format . js { render :create , :status = > 201 }
- format . html { redirect_to :back }
- format . mobile { redirect_to root_url }
- end
- else
- if ! photos . empty?
- photos . update_all ( :status_message_guid = > nil )
- end
- respond_to do | format |
- format . js {
- errors = @status_message . errors . full_messages . collect { | msg | msg . gsub ( /^Text/ , "" ) }
- render :json = > { :errors = > errors } , :status = > 422
- }
- format . html { redirect_to :back }
- end
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) destroy
-
-
-
-
-
-
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
- # File 'app/controllers/status_messages_controller.rb', line 91
-
-def destroy
- @status_message = current_user . posts . where ( :id = > params [ :id ] ) . first
- if @status_message
- current_user . retract ( @status_message )
- respond_to do | format |
- format . js { render 'destroy' }
- format . all { redirect_to root_url }
- end
- else
- Rails . logger . info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
- render :nothing = > true , :status = > 404
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) new
-
-
-
-
-
-
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
- # File 'app/controllers/status_messages_controller.rb', line 12
-
-def new
- @person = Person . find ( params [ :person_id ] )
- @aspect = :profile
- @contact = current_user . contact_for ( @person )
- @aspects_with_person = [ ]
- if @contact
- @aspects_with_person = @contact . aspects
- @aspect_ids = @aspects_with_person . map ( & :id )
- @contacts_of_contact = @contact . contacts
-
- render :layout = > nil
- else
- redirect_to :back
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-
-
- # File 'app/controllers/status_messages_controller.rb', line 105
-
-def show
- @status_message = current_user . find_visible_post_by_id params [ :id ]
- if @status_message
- @object_aspect_ids = @status_message . aspects . map { | a | a . id }
-
-
- if notification = Notification . where ( :recipient_id = > current_user . id , :target_id = > @status_message . id ) . first
- notification . unread = false
- notification . save
- end
-
- respond_with @status_message
- else
- Rails . logger . info ( :event = > :link_to_nonexistent_post , :ref = > request . env [ 'HTTP_REFERER' ] , :user_id = > current_user . id , :post_id = > params [ :id ] )
- flash [ :error ] = I18n . t ( 'status_messages.show.not_found' )
- redirect_to :back
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/StatusMessagesHelper.html b/doc/StatusMessagesHelper.html
deleted file mode 100644
index 955be614974..00000000000
--- a/doc/StatusMessagesHelper.html
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
- Module: StatusMessagesHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: StatusMessagesHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/helpers/status_messages_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) my_latest_message
-
-
-
-
-
-
-
-
-
-6
-7
-8
-9
-10
-11
-12
-
-
- # File 'app/helpers/status_messages_helper.rb', line 6
-
-def my_latest_message
- unless @latest_status_message . nil?
- return @latest_status_message . text
- else
- return I18n . t ( 'status_messages.helper.no_message_to_display' )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/TagsController.html b/doc/TagsController.html
deleted file mode 100644
index 9aff8454962..00000000000
--- a/doc/TagsController.html
+++ /dev/null
@@ -1,369 +0,0 @@
-
-
-
-
-
- Class: TagsController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: TagsController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/tags_controller.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) index
-
-
-
-
-
-
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
- # File 'app/controllers/tags_controller.rb', line 14
-
-def index
- if params [ :q ] && params [ :q ] . length > 1
- params [ :q ] . gsub! ( "#" , "" )
- params [ :limit ] = ! params [ :limit ] . blank? ? params [ :limit ] . to_i : 10
- @tags = ActsAsTaggableOn :: Tag . named_like ( params [ :q ] ) . limit ( params [ :limit ] - 1 )
- @array = [ ]
- @tags . each do | obj |
- @array << { :name = > ( "#" + obj . name ) ,
- :value = > ( "#" + obj . name ) }
- end
-
- @array << { :name = > ( '#' + params [ :q ] ) , :value = > ( "#" + params [ :q ] ) }
- @array . uniq!
-
- respond_to do | format |
- format . json {
- render ( :json = > @array . to_json , :status = > 200 )
- }
- end
- else
- respond_to do | format |
- format . json { render :nothing = > true , :status = > 422 }
- format . html { redirect_to tag_path ( 'partytimeexcellent' ) }
- end
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
- # File 'app/controllers/tags_controller.rb', line 41
-
-def show
- @aspect = :tag
- if current_user
- @posts = StatusMessage . joins ( :contacts ) . where ( :pending = > false ) . where (
- Contact . arel_table [ :user_id ] . eq ( current_user . id ) . or (
- StatusMessage . arel_table [ :public ] . eq ( true ) . or (
- StatusMessage . arel_table [ :author_id ] . eq ( current_user . person . id )
- )
- ) ) . select ( 'DISTINCT posts.*' )
- else
- @posts = StatusMessage . where ( :public = > true , :pending = > false )
- end
-
- @posts = @posts . tagged_with ( params [ :name ] )
-
- max_time = params [ :max_time ] ? Time . at ( params [ :max_time ] . to_i ) : Time . now
- @posts = @posts . where ( StatusMessage . arel_table [ :created_at ] . lt ( max_time ) )
-
- @posts = @posts . includes ( :comments , :photos ) . order ( 'posts.created_at DESC' ) . limit ( 15 )
-
- @posts = PostsFake . new ( @posts )
- = true
-
- if params [ :only_posts ]
- render :partial = > 'shared/stream' , :locals = > { :posts = > @posts }
- else
- profiles = Profile . tagged_with ( params [ :name ] ) . where ( :searchable = > true ) . select ( 'profiles.id, profiles.person_id' )
- @people = Person . where ( :id = > profiles . map { | p | p . person_id } ) . paginate ( :page = > params [ :page ] , :per_page = > 15 )
- @people_count = Person . where ( :id = > profiles . map { | p | p . person_id } ) . count
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/TokensController.html b/doc/TokensController.html
deleted file mode 100644
index 7a788edbc4e..00000000000
--- a/doc/TokensController.html
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
- Class: TokensController
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: TokensController
-
-
-
-
-
-
-
- Inherits:
-
- ApplicationController
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/controllers/tokens_controller.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#after_sign_in_path_for , #clear_gc_stats , #ensure_http_referer_is_set , #ensure_page , #grammatical_gender , #redirect_unless_admin , #set_git_header , #set_grammatical_gender , #set_header_data , #set_invites , #set_locale , #which_action_and_user
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) create
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-6
-
-
- # File 'app/controllers/tokens_controller.rb', line 2
-
-def create
- current_user . reset_authentication_token!
- current_user . authentication_token
- redirect_to token_path , :notice = > "Authentication token reset."
-end
-
-
-
-
-
-
-
-
-
- - (Object ) show
-
-
-
-
-
-
-
-
-
-7
-8
-
-
- # File 'app/controllers/tokens_controller.rb', line 7
-
-def show
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/User.html b/doc/User.html
deleted file mode 100644
index 00059267719..00000000000
--- a/doc/User.html
+++ /dev/null
@@ -1,2412 +0,0 @@
-
-
-
-
-
- Class: User
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: User
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- User
-
-
- show all
-
-
-
-
-
-
-
-
- Includes:
- Diaspora::UserModules , Encryptor::Private
-
-
-
-
-
- Defined in:
- app/models/user.rb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
- - (Object) accept_invitation! (opts = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) add_contact_to_aspect (contact, aspect)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) add_to_streams (post, aspects_to_insert)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Boolean) admin?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) aspects_from_ids (aspect_ids)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) build_comment (options = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-Commenting ########.
-
-
-
-
-
-
-
-
-
- - (Object) build_like (options = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) build_post (class_name, opts = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) build_relayable (model, options = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Boolean) can_add? (person)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) disconnect_everyone
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) dispatch_post (post, opts = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) encryption_key
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) invite_user (aspect_id, service, identifier, invite_message = "")
-
-
-
-
-
-
-
-
-
-
-
-
-
-Invitations############.
-
-
-
-
-
-
-
-
-
- - (Object) like_for (post)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Boolean) liked? (post)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) mail (job, *args)
-
-
-
-
-
-
-
-
-
-
-
-
-
-Mailer #######################.
-
-
-
-
-
-
-
-
-
- - (Object) move_contact (person, to_aspect, from_aspect)
-
-
-
-
-
-
-
-
-
-
-
-
-
-Aspects ######################.
-
-
-
-
-
-
-
-
-
- - (Object) notify_if_mentioned (post)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) remove_all_traces
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) remove_mentions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) remove_person
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) retract (post)
-
-
-
-
-
-
-
-
-
-
-
-
-
-Posts and Such ###############.
-
-
-
-
-
-
-
-
-
- - (Object) salmon (post)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) seed_aspects
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) set_current_language
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) setup (opts)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) strip_and_downcase_username
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) update_post (post, post_hash = {})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - (Object) update_profile (params)
-
-
-
-
-
-
-
-
-
-
-
-
-
-Profile ######################.
-
-
-
-
-
-
-
-
-
- - (Object) update_user_preferences (pref_hash)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#aes_decrypt , #decrypt , #get_aes_key
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#all_aspect_ids , #aspects_with_person , #aspects_with_post , #contact_for , #contact_for_person_id , #contacts_in_aspects , #find_visible_post_by_id , #people_in_aspects , #posts_from , #visible_photos , #visible_posts
-
-
-
-
-
-
-
-
-
-
#disconnect , #disconnected_by , #remove_contact , #share_with
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) build (opts = {})
-
-
-
-
-
-
-Helpers############
-
-
-
-
-
-
-
-
-
-
-
-
-
-272
-273
-274
-275
-276
-
-
- # File 'app/models/user.rb', line 272
-
-def self . build ( opts = { } )
- u = User . new ( opts )
- u . setup ( opts )
- u
-end
-
-
-
-
-
-
-
-
-
- + (Object ) find_for_database_authentication (conditions = {})
-
-
-
-
-
-
-
-
-
-80
-81
-82
-83
-84
-85
-86
-87
-
-
- # File 'app/models/user.rb', line 80
-
-def self . find_for_database_authentication ( conditions = { } )
- conditions = conditions . dup
- conditions [ :username ] = conditions [ :username ] . downcase
- if conditions [ :username ] =~ /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
- conditions [ :email ] = conditions . delete ( :username )
- end
- where ( conditions ) . first
-end
-
-
-
-
-
-
-
-
-
- + (Object ) generate_key
-
-
-
-
-
-
-
-
-
-308
-309
-310
-311
-
-
- # File 'app/models/user.rb', line 308
-
-def self . generate_key
- key_size = ( Rails . env == 'test' ? 512 : 4096 )
- OpenSSL :: PKey :: RSA :: generate key_size
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) accept_invitation! (opts = {})
-
-
-
-
-
-
-
-
-
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-
-
- # File 'app/models/user.rb', line 247
-
-def accept_invitation! ( opts = { } )
- log_string = "event=invitation_accepted username=#{opts[:username]} uid=#{self.id} "
- log_string << "inviter=#{invitations_to_me.first.sender.diaspora_handle} " if invitations_to_me . first
- begin
- if self . invited?
- self . setup ( opts )
- self . invitation_token = nil
- self . password = opts [ :password ]
- self . password_confirmation = opts [ :password_confirmation ]
- self . save!
- invitations_to_me . each { | invitation | invitation . share_with! }
- log_string << "success"
- Rails . logger . info log_string
-
- self . reload
- self
- end
- rescue Exception = > e
- log_string << "failure"
- Rails . logger . info log_string
- raise e
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) add_contact_to_aspect (contact, aspect)
-
-
-
-
-
-
-
-
-
-106
-107
-108
-109
-
-
- # File 'app/models/user.rb', line 106
-
-def add_contact_to_aspect ( contact , aspect )
- return true if AspectMembership . exists? ( :contact_id = > contact . id , :aspect_id = > aspect . id )
- contact . aspect_memberships . create! ( :aspect = > aspect )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) add_to_streams (post, aspects_to_insert)
-
-
-
-
-
-
-
-
-
-138
-139
-140
-141
-142
-143
-
-
- # File 'app/models/user.rb', line 138
-
-def add_to_streams ( post , aspects_to_insert )
- post . socket_to_user ( self , :aspect_ids = > aspects_to_insert . map { | x | x . id } ) if post . respond_to? :socket_to_user
- aspects_to_insert . each do | aspect |
- aspect . posts << post
- end
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) admin?
-
-
-
-
-
-
-
-
-
-
-317
-318
-319
-
-
- # File 'app/models/user.rb', line 317
-
-def admin?
- AppConfig [ :admins ] . present? && AppConfig [ :admins ] . include? ( self . username )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) aspects_from_ids (aspect_ids)
-
-
-
-
-
-
-
-
-
-145
-146
-147
-148
-149
-150
-151
-
-
- # File 'app/models/user.rb', line 145
-
-def aspects_from_ids ( aspect_ids )
- if aspect_ids == "all" || aspect_ids == :all
- self . aspects
- else
- aspects . where ( :id = > aspect_ids )
- end
-end
-
-
-
-
-
-
-
-
-
-
-Commenting ########
-
-
-
-
-
-
-
-
-
-
-
-
-
-165
-166
-167
-
-
- # File 'app/models/user.rb', line 165
-
-def ( options = { } )
- build_relayable ( , options )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) build_like (options = {})
-
-
-
-
-
-
-Liking ########
-
-
-
-
-
-
-
-
-
-
-
-
-
-170
-171
-172
-
-
- # File 'app/models/user.rb', line 170
-
-def build_like ( options = { } )
- build_relayable ( Like , options )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) build_post (class_name, opts = {})
-
-
-
-
-
-
-Posting ########
-
-
-
-
-
-
-
-
-
-
-
-
-
-112
-113
-114
-115
-116
-117
-118
-
-
- # File 'app/models/user.rb', line 112
-
-def build_post ( class_name , opts = { } )
- opts [ :author ] = self . person
- opts [ :diaspora_handle ] = opts [ :author ] . diaspora_handle
-
- model_class = class_name . to_s . camelize . constantize
- model_class . diaspora_initialize ( opts )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) build_relayable (model, options = {})
-
-
-
-
-
-
-
-
-
-157
-158
-159
-160
-161
-162
-
-
- # File 'app/models/user.rb', line 157
-
-def build_relayable ( model , options = { } )
- r = model . new ( options . merge ( :author_id = > self . person . id ) )
- r . set_guid
- r . initialize_signatures
- r
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) can_add? (person)
-
-
-
-
-
-
-
-
-
-
-89
-90
-91
-92
-93
-
-
- # File 'app/models/user.rb', line 89
-
-def can_add? ( person )
- return false if self . person == person
- return false if self . contact_for ( person ) . present?
- true
-end
-
-
-
-
-
-
-
-
-
- - (Object ) disconnect_everyone
-
-
-
-
-
-
-
-
-
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-
-
- # File 'app/models/user.rb', line 331
-
-def disconnect_everyone
- self . contacts . each do | contact |
- if contact . person . remote?
- self . disconnect ( contact )
- else
- contact . person . owner . disconnected_by ( self . person )
- remove_contact ( contact , :force = > true )
- end
- end
- self . aspects . destroy_all
-end
-
-
-
-
-
-
-
-
-
- - (Object ) dispatch_post (post, opts = {})
-
-
-
-
-
-
-
-
-
-120
-121
-122
-123
-
-
- # File 'app/models/user.rb', line 120
-
-def dispatch_post ( post , opts = { } )
- mailman = Postzord :: Dispatch . new ( self , post )
- mailman . post ( opts )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) encryption_key
-
-
-
-
-
-
-
-
-
-313
-314
-315
-
-
- # File 'app/models/user.rb', line 313
-
-def encryption_key
- OpenSSL :: PKey :: RSA . new ( serialized_private_key )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) invite_user (aspect_id, service, identifier, invite_message = "")
-
-
-
-
-
-
-Invitations############
-
-
-
-
-
-
-
-
-
-
-
-
-
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-
-
- # File 'app/models/user.rb', line 234
-
-def invite_user ( aspect_id , service , identifier , invite_message = "" )
- aspect = aspects . find ( aspect_id )
- if aspect
- Invitation . invite ( :service = > service ,
- :identifier = > identifier ,
- :from = > self ,
- :into = > aspect ,
- :message = > invite_message )
- else
- false
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) like_for (post)
-
-
-
-
-
-
-
-
-
-182
-183
-184
-185
-186
-187
-188
-189
-
-
- # File 'app/models/user.rb', line 182
-
-def like_for ( post )
- [ post . likes , post . dislikes ] . each do | likes |
- likes . each do | like |
- return like if like . author_id == self . person . id
- end
- end
- return nil
-end
-
-
-
-
-
-
-
-
-
- - (Boolean ) liked? (post)
-
-
-
-
-
-
-
-
-
-
-174
-175
-176
-177
-178
-179
-180
-
-
- # File 'app/models/user.rb', line 174
-
-def liked? ( post )
- if self . like_for ( post )
- return true
- else
- return false
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) mail (job, *args)
-
-
-
-
-
-
-Mailer #######################
-
-
-
-
-
-
-
-
-
-
-
-
-
-192
-193
-194
-195
-196
-197
-
-
- # File 'app/models/user.rb', line 192
-
-def mail ( job , * args )
- pref = job . to_s . gsub ( 'Job::Mail' , '' ) . underscore
- if ( self . disable_mail == false && ! self . user_preferences . exists? ( :email_type = > pref ) )
- Resque . enqueue ( job , * args )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) move_contact (person, to_aspect, from_aspect)
-
-
-
-
-
-
-Aspects ######################
-
-
-
-
-
-
-
-
-
-
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
- # File 'app/models/user.rb', line 96
-
-def move_contact ( person , to_aspect , from_aspect )
- return true if to_aspect == from_aspect
- contact = contact_for ( person )
-
- add_contact_to_aspect ( contact , to_aspect )
-
- membership = contact ? AspectMembership . where ( :contact_id = > contact . id , :aspect_id = > from_aspect . id ) . first : nil
- return ( membership && membership . destroy )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) notify_if_mentioned (post)
-
-
-
-
-
-
-
-
-
-132
-133
-134
-135
-136
-
-
- # File 'app/models/user.rb', line 132
-
-def notify_if_mentioned ( post )
- return unless self . contact_for ( post . author ) && post . respond_to? ( :mentions? )
-
- post . notify_person ( self . person ) if post . mentions? self . person
-end
-
-
-
-
-
-
-
-
-
- - (Object ) remove_all_traces
-
-
-
-
-
-
-
-
-
-321
-322
-323
-324
-325
-
-
- # File 'app/models/user.rb', line 321
-
-def remove_all_traces
- disconnect_everyone
- remove_mentions
- remove_person
-end
-
-
-
-
-
-
-
-
-
- - (Object ) remove_mentions
-
-
-
-
-
-
-
-
-
-343
-344
-345
-346
-347
-
-
- # File 'app/models/user.rb', line 343
-
-def remove_mentions
- Mention . where ( :person_id = > self . person . id ) . each do | mentioned_person |
- mentioned_person . delete
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) remove_person
-
-
-
-
-
-
-
-
-
-327
-328
-329
-
-
- # File 'app/models/user.rb', line 327
-
-def remove_person
- self . person . destroy
-end
-
-
-
-
-
-
-
-
-
- - (Object ) retract (post)
-
-
-
-
-
-
-Posts and Such ###############
-
-
-
-
-
-
-
-
-
-
-
-
-
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
-
- # File 'app/models/user.rb', line 200
-
-def retract ( post )
- if post . respond_to? ( :relayable? ) && post . relayable?
- aspects = post . parent . aspects
- retraction = RelayableRetraction . build ( self , post )
- else
- aspects = post . aspects
- retraction = Retraction . for ( post )
- end
-
- mailman = Postzord :: Dispatch . new ( self , retraction )
- mailman . post
-
- retraction . perform ( self )
-
- retraction
-end
-
-
-
-
-
-
-
-
-
- - (Object ) salmon (post)
-
-
-
-
-
-
-
-
-
-153
-154
-155
-
-
- # File 'app/models/user.rb', line 153
-
-def salmon ( post )
- Salmon :: SalmonSlap . create ( self , post . to_diaspora_xml )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) seed_aspects
-
-
-
-
-
-
-
-
-
-303
-304
-305
-306
-
-
- # File 'app/models/user.rb', line 303
-
-def seed_aspects
- self . aspects . create ( :name = > I18n . t ( 'aspects.seed.family' ) )
- self . aspects . create ( :name = > I18n . t ( 'aspects.seed.work' ) )
-end
-
-
-
-
-
-
-
-
-
- - (Object ) set_current_language
-
-
-
-
-
-
-
-
-
-76
-77
-78
-
-
- # File 'app/models/user.rb', line 76
-
-def set_current_language
- self . language = I18n . locale . to_s if self . language . blank?
-end
-
-
-
-
-
-
-
-
-
- - (Object ) setup (opts)
-
-
-
-
-
-
-
-
-
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-
-
- # File 'app/models/user.rb', line 278
-
-def setup ( opts )
- self . username = opts [ :username ]
- self . email = opts [ :email ]
- self . valid?
- errors = self . errors
- errors . delete :person
- return if errors . size > 0
-
- opts [ :person ] ||= { }
- unless opts [ :person ] [ :profile ] . is_a? ( Profile )
- opts [ :person ] [ :profile ] ||= Profile . new
- opts [ :person ] [ :profile ] = Profile . new ( opts [ :person ] [ :profile ] )
- end
-
- self . person = Person . new ( opts [ :person ] )
- self . person . diaspora_handle = "#{opts[:username]}@#{AppConfig[:pod_uri].host}"
- self . person . url = AppConfig [ :pod_url ]
-
-
- self . serialized_private_key = User . generate_key if self . serialized_private_key . blank?
- self . person . serialized_public_key = OpenSSL :: PKey :: RSA . new ( self . serialized_private_key ) . public_key
-
- self
-end
-
-
-
-
-
-
-
-
-
- - (Object ) strip_and_downcase_username
-
-
-
-
-
-
-
-
-
-69
-70
-71
-72
-73
-74
-
-
- # File 'app/models/user.rb', line 69
-
-def strip_and_downcase_username
- if username . present?
- username . strip!
- username . downcase!
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update_post (post, post_hash = {})
-
-
-
-
-
-
-
-
-
-125
-126
-127
-128
-129
-130
-
-
- # File 'app/models/user.rb', line 125
-
-def update_post ( post , post_hash = { } )
- if self . owns? post
- post . update_attributes ( post_hash )
- Postzord :: Dispatch . new ( self , post ) . post
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update_profile (params)
-
-
-
-
-
-
-Profile ######################
-
-
-
-
-
-
-
-
-
-
-
-
-
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-
-
- # File 'app/models/user.rb', line 218
-
-def update_profile ( params )
- if photo = params . delete ( :photo )
- photo . update_attributes ( :pending = > false ) if photo . pending
- params [ :image_url ] = photo . url ( :thumb_large )
- params [ :image_url_medium ] = photo . url ( :thumb_medium )
- params [ :image_url_small ] = photo . url ( :thumb_small )
- end
- if self . person . profile . update_attributes ( params )
- Postzord :: Dispatch . new ( self , profile ) . post
- true
- else
- false
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) update_user_preferences (pref_hash)
-
-
-
-
-
-
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
- # File 'app/models/user.rb', line 50
-
-def update_user_preferences ( pref_hash )
- if self . disable_mail
- UserPreference :: VALID_EMAIL_TYPES . each { | x | self . user_preferences . find_or_create_by_email_type ( x ) }
- self . disable_mail = false
- self . save
- end
-
- pref_hash . keys . each do | key |
- if pref_hash [ key ] == 'true'
- self . user_preferences . find_or_create_by_email_type ( key )
- else
- block = self . user_preferences . where ( :email_type = > key ) . first
- if block
- block . destroy
- end
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/UserPreference.html b/doc/UserPreference.html
deleted file mode 100644
index 692198b7204..00000000000
--- a/doc/UserPreference.html
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-
- Class: UserPreference
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class: UserPreference
-
-
-
-
-
-
-
- Inherits:
-
- ActiveRecord::Base
-
-
- Object
-
- ActiveRecord::Base
-
- UserPreference
-
-
- show all
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/models/user_preference.rb
-
-
-
-
-
-
Constant Summary
-
-
-
- VALID_EMAIL_TYPES =
-
-
- [ "mentioned" ,
-"comment_on_post" ,
-"private_message" ,
-"started_sharing" ,
-"also_commented" ,
-"liked" ]
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) must_be_valid_email_type
-
-
-
-
-
-
-
-
-
-14
-15
-16
-17
-18
-
-
- # File 'app/models/user_preference.rb', line 14
-
-def must_be_valid_email_type
- unless VALID_EMAIL_TYPES . include? ( self . email_type )
- errors . add ( :email_type , 'supplied mail type is not a valid or known email type' )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/UsersHelper.html b/doc/UsersHelper.html
deleted file mode 100644
index bd8b99409c2..00000000000
--- a/doc/UsersHelper.html
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
- Module: UsersHelper
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: UsersHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defined in:
- app/helpers/users_helper.rb
-
-
-
-
-
Overview
-
-
-Copyright © 2010, Diaspora Inc. This file is
-
-
- licensed under the Affero General Public License version 3 or later . See
- the COPYRIGHT file .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) first_name_or_username (user)
-
-
-
-
-
-
-
-
-
-6
-7
-8
-9
-
-
- # File 'app/helpers/users_helper.rb', line 6
-
-def first_name_or_username ( user )
- set_name = user . person . profile . first_name
- ( set_name . nil? || set_name . empty? ) ? user . username : user . person . profile . first_name
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/YoutubeTitles.html b/doc/YoutubeTitles.html
deleted file mode 100644
index 3c927ca37b7..00000000000
--- a/doc/YoutubeTitles.html
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
- Module: YoutubeTitles
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Module: YoutubeTitles
-
-
-
-
-
-
-
-
-
-
-
-
-
- Included in:
- Comment , StatusMessage
-
-
-
- Defined in:
- lib/youtube_titles.rb
-
-
-
-
-
-
Constant Summary
-
-
-
- YOUTUBE_ID_REGEX =
-
-
- /(?:https?:\/\/)(?:youtu\.be\/|(?:[a-z]{2,3}\.)?youtube\.com\/watch(?:\?|#!|.+&|.+&)v=)([\w-]{11})(?:\S*(#[^ ]+)|\S+)?/i m unless defined? YOUTUBE_ID_REGEX
-
-
-
-
-
-
-
-
-
-
-
- Class Method Summary
- (collapse )
-
-
-
-
-
- Instance Method Summary
- (collapse )
-
-
-
-
-
-
-
-
-
Class Method Details
-
-
-
-
-
- + (Object ) included (model)
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-6
-7
-8
-
-
- # File 'lib/youtube_titles.rb', line 2
-
-def self . included ( model )
- model . class_eval do
- before_save do
- get_youtube_title text
- end
- end if model . respond_to? ( :before_save )
-end
-
-
-
-
-
-
-
-
-
-
Instance Method Details
-
-
-
-
-
- - (Object ) get_youtube_title (text)
-
-
-
-
-
-
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
- # File 'lib/youtube_titles.rb', line 21
-
-def get_youtube_title text
- youtube_match = text . enum_for ( :scan , YOUTUBE_ID_REGEX ) . map { Regexp . last_match }
- return if youtube_match . empty?
-
- self . youtube_titles ||= { }
- youtube_match . each do | match_data |
- self . youtube_titles [ match_data [ 1 ] ] = CGI :: escape ( youtube_title_for ( match_data [ 1 ] ) )
- end
-end
-
-
-
-
-
-
-
-
-
- - (Object ) youtube_title_for (video_id)
-
-
-
-
-
-
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
- # File 'lib/youtube_titles.rb', line 10
-
-def youtube_title_for video_id
- http = Net :: HTTP . new ( 'gdata.youtube.com' , 80 )
- path = "/feeds/api/videos/#{video_id}?v=2"
- resp , data = http . get ( path , nil )
- title = data . match ( /<title>(.*)<\/title>/ )
- unless title . nil?
- title = title . to_s [ 7 .. -9 ]
- end
- title || I18n . t ( 'application.helper.video_title.unknown' )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/_index.html b/doc/_index.html
deleted file mode 100644
index 5fc8c42aa86..00000000000
--- a/doc/_index.html
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
- Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Documentation by YARD 0.7.1
-
-
Alphabetic Index
-
-
File Listing
-
-
-
-
Namespace Listing A-Z
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/class_list.html b/doc/class_list.html
deleted file mode 100644
index e1d2f7a4e11..00000000000
--- a/doc/class_list.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/css/common.css b/doc/css/common.css
deleted file mode 100644
index cf25c45233d..00000000000
--- a/doc/css/common.css
+++ /dev/null
@@ -1 +0,0 @@
-/* Override this file with custom rules */
\ No newline at end of file
diff --git a/doc/css/full_list.css b/doc/css/full_list.css
deleted file mode 100644
index f95e4e68e6b..00000000000
--- a/doc/css/full_list.css
+++ /dev/null
@@ -1,53 +0,0 @@
-body {
- margin: 0;
- font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
- font-size: 13px;
- height: 101%;
- overflow-x: hidden;
-}
-
-h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
-.clear { clear: both; }
-#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
-#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
-#full_list { padding: 0; list-style: none; margin-left: 0; }
-#full_list ul { padding: 0; }
-#full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; }
-#noresults { padding: 7px 12px; }
-#content.insearch #noresults { margin-left: 7px; }
-ul.collapsed ul, ul.collapsed li { display: none; }
-li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
-li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
-li { color: #888; cursor: pointer; }
-li.deprecated { text-decoration: line-through; font-style: italic; }
-li.r1 { background: #f0f0f0; }
-li.r2 { background: #fafafa; }
-li:hover { background: #ddd; }
-li small:before { content: "("; }
-li small:after { content: ")"; }
-li small.search_info { display: none; }
-a:link, a:visited { text-decoration: none; color: #05a; }
-li.clicked { background: #05a; color: #ccc; }
-li.clicked a:link, li.clicked a:visited { color: #eee; }
-li.clicked a.toggle { opacity: 0.5; background-position: bottom right; }
-li.collapsed.clicked a.toggle { background-position: top right; }
-#search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
-#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; }
-#nav a:link, #nav a:visited { color: #358; }
-#nav a:hover { background: transparent; color: #5af; }
-
-.frames #content h1 { margin-top: 0; }
-.frames li { white-space: nowrap; cursor: normal; }
-.frames li small { display: block; font-size: 0.8em; }
-.frames li small:before { content: ""; }
-.frames li small:after { content: ""; }
-.frames li small.search_info { display: none; }
-.frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
-.frames #content.insearch #search { background-position: center right; }
-.frames #search input { width: 110px; }
-.frames #nav { display: block; }
-
-#full_list.insearch li { display: none; }
-#full_list.insearch li.found { display: list-item; padding-left: 10px; }
-#full_list.insearch li a.toggle { display: none; }
-#full_list.insearch li small.search_info { display: block; }
diff --git a/doc/css/style.css b/doc/css/style.css
deleted file mode 100644
index 2c70d8fd3ea..00000000000
--- a/doc/css/style.css
+++ /dev/null
@@ -1,320 +0,0 @@
-body {
- padding: 0 20px;
- font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
- font-size: 13px;
-}
-body.frames { padding: 0 5px; }
-h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
-h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
-h1.title { margin-bottom: 10px; }
-h1.alphaindex { margin-top: 0; font-size: 22px; }
-h2 {
- padding: 0;
- padding-bottom: 3px;
- border-bottom: 1px #aaa solid;
- font-size: 1.4em;
- margin: 1.8em 0 0.5em;
-}
-h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; }
-.clear { clear: both; }
-.inline { display: inline; }
-.inline p:first-child { display: inline; }
-.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
-.docstring h1 { font-size: 1.2em; }
-.docstring h2 { font-size: 1.1em; }
-.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
-.summary_desc .object_link, .docstring .object_link { font-family: monospace; }
-
-/* style for */
-#filecontents li > p, .docstring li > p { margin: 0px; }
-#filecontents ul, .docstring ul { padding-left: 20px; }
-/* style for */
-#filecontents dl, .docstring dl { border: 1px solid #ccc; }
-#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
-#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
-#filecontents dd > p, .docstring dd > p { margin: 0px; }
-
-.note {
- color: #222;
- -moz-border-radius: 3px; -webkit-border-radius: 3px;
- background: #e3e4e3; border: 1px solid #d5d5d5; padding: 7px 10px;
- display: block;
-}
-.note.todo { background: #ffffc5; border-color: #ececaa; }
-.note.returns_void { background: #efefef; }
-.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
-.note.private { background: #ffffc5; border-color: #ececaa; }
-.note.title { text-transform: lowercase; padding: 1px 5px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
-.summary_signature + .note.title { margin-left: 7px; }
-h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
-.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
-.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
-.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
-.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
-.discussion .note { margin-top: 6px; }
-.discussion .note:first-child { margin-top: 0; }
-
-h3.inherited {
- font-style: italic;
- font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
- font-weight: normal;
- padding: 0;
- margin: 0;
- margin-top: 12px;
- margin-bottom: 3px;
- font-size: 13px;
-}
-p.inherited {
- padding: 0;
- margin: 0;
- margin-left: 25px;
-}
-
-#filecontents dl.box, dl.box {
- border: 0;
- width: 520px;
- font-size: 1em;
-}
-#filecontents dl.box dt, dl.box dt {
- float: left;
- display: block;
- width: 100px;
- margin: 0;
- text-align: right;
- font-weight: bold;
- background: transparent;
- border: 1px solid #aaa;
- border-width: 1px 0px 0px 1px;
- padding: 6px 0;
- padding-right: 10px;
-}
-#filecontents dl.box dd, dl.box dd {
- float: left;
- display: block;
- width: 380px;
- margin: 0;
- padding: 6px 0;
- padding-right: 20px;
- border: 1px solid #aaa;
- border-width: 1px 1px 0 0;
-}
-#filecontents dl.box .last, dl.box .last {
- border-bottom: 1px solid #aaa;
-}
-#filecontents dl.box .r1, dl.box .r1 { background: #eee; }
-
-ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
-#files { padding-left: 15px; font-size: 1.1em; }
-
-#files { padding: 0; }
-#files li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; }
-
-dl.constants { margin-left: 40px; }
-dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
-dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
-
-.summary_desc { margin-left: 32px; display: block; font-family: sans-serif; }
-.summary_desc tt { font-size: 0.9em; }
-dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
-dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
-dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
-dl.constants .discussion *:first-child { margin-top: 0; }
-dl.constants .discussion *:last-child { margin-bottom: 0; }
-
-.method_details { border-top: 1px dotted #aaa; margin-top: 15px; padding-top: 0; }
-.method_details.first { border: 0; }
-p.signature {
- font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
- padding: 6px 10px; margin-top: 18px;
- background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
-}
-p.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
-p.signature .overload { display: block; }
-p.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
-p.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
-p.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
-
-.tags h3 { font-size: 1em; margin-bottom: 0; }
-.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
-.tags ul li { margin-bottom: 3px; }
-.tags ul .name { font-family: monospace; font-weight: bold; }
-.tags ul .note { padding: 3px 6px; }
-.tags { margin-bottom: 12px; }
-
-.tags .examples h3 { margin-bottom: 10px; }
-.tags .examples h4 { padding: 0; margin: 0; margin-left: 15px; font-weight: bold; font-size: 0.9em; }
-
-.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
-.tags .overload .overload_item .signature {
- padding: 2px 8px;
- background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
-}
-.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
-.tags .overload .docstring { margin-top: 15px; }
-
-.defines { display: none; }
-
-#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
-
-.showSource { font-size: 0.9em; }
-.showSource a:link, .showSource a:visited { text-decoration: none; color: #666; }
-
-#content a:link, #content a:visited { text-decoration: none; color: #05a; }
-#content a:hover { background: #ffffa5; }
-.docstring { margin-right: 6em; }
-
-ul.summary {
- list-style: none;
- font-family: monospace;
- font-size: 1em;
- line-height: 1.5em;
-}
-ul.summary a:link, ul.summary a:visited {
- text-decoration: none; font-size: 1.1em;
-}
-ul.summary li { margin-bottom: 5px; }
-.summary .summary_signature {
- padding: 1px 10px;
- background: #eaeaff; border: 1px solid #dfdfe5;
- -moz-border-radius: 3px; -webkit-border-radius: 3px;
-}
-.summary_signature:hover { background: #eeeeff; cursor: pointer; }
-ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
-ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
-#content .summary_signature:hover a:link,
-#content .summary_signature:hover a:visited {
- background: transparent;
- color: #48f;
-}
-
-p.inherited a { font-family: monospace; font-size: 0.9em; }
-p.inherited { word-spacing: 5px; font-size: 1.2em; }
-
-p.children { font-size: 1.2em; }
-p.children a { font-size: 0.9em; }
-p.children strong { font-size: 0.8em; }
-p.children strong.modules { padding-left: 5px; }
-
-ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
-ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
-ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
-ul.fullTree li:first-child { padding-top: 0; background: transparent; }
-ul.fullTree li:last-child { padding-bottom: 0; }
-.showAll ul.fullTree { display: block; }
-.showAll .inheritName { display: none; }
-
-#search { position: absolute; right: 14px; top: 0px; }
-#search a:link, #search a:visited {
- display: block; float: left; margin-right: 4px;
- padding: 8px 10px; text-decoration: none; color: #05a;
- border: 1px solid #d8d8e5;
- -moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px;
- -webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px;
- background: #eaf0ff;
- -webkit-box-shadow: -1px 1px 3px #ddd;
-}
-#search a:hover { background: #f5faff; color: #06b; }
-#search a.active {
- background: #568; padding-bottom: 20px; color: #fff; border: 1px solid #457;
- -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
- -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
-}
-#search a.inactive { color: #999; }
-.frames #search { display: none; }
-.inheritanceTree, .toggleDefines { float: right; }
-
-#menu { font-size: 1.3em; color: #bbb; top: -5px; position: relative; }
-#menu .title, #menu a { font-size: 0.7em; }
-#menu .title a { font-size: 1em; }
-#menu .title { color: #555; }
-#menu a:link, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
-#menu a:hover { color: #05a; }
-#menu .noframes { display: none; }
-.frames #menu .noframes { display: inline; float: right; }
-
-#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
-#footer a:link, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
-#footer a:hover { color: #05a; }
-
-#listing ul.alpha { font-size: 1.1em; }
-#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
-#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
-#listing ul.alpha ul { margin: 0; padding-left: 15px; }
-#listing ul small { color: #666; font-size: 0.7em; }
-
-li.r1 { background: #f0f0f0; }
-li.r2 { background: #fafafa; }
-
-#search_frame {
- z-index: 9999;
- background: #fff;
- display: none;
- position: absolute;
- top: 36px;
- right: 18px;
- width: 500px;
- height: 80%;
- overflow-y: scroll;
- border: 1px solid #999;
- border-collapse: collapse;
- -webkit-box-shadow: -7px 5px 25px #aaa;
- -moz-box-shadow: -7px 5px 25px #aaa;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
-}
-
-#content ul.summary li.deprecated .summary_signature a:link,
-#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
-
-#toc {
- padding: 20px; padding-right: 30px; border: 1px solid #ddd; float: right; background: #fff; margin-left: 20px; margin-bottom: 20px;
- max-width: 300px;
- -webkit-box-shadow: -2px 2px 6px #bbb;
- -moz-box-shadow: -2px 2px 6px #bbb;
- z-index: 5000;
- position: relative;
-}
-#toc.nofloat { float: none; max-width: none; border: none; padding: 0; margin: 20px 0; -webkit-box-shadow: none; -moz-box-shadow: none; }
-#toc.nofloat.hidden { padding: 0; background: 0; margin-bottom: 5px; }
-#toc .title { margin: 0; }
-#toc ol { padding-left: 1.8em; }
-#toc li { font-size: 1.1em; line-height: 1.7em; }
-#toc > ol > li { font-size: 1.1em; font-weight: bold; }
-#toc ol > ol { font-size: 0.9em; }
-#toc ol ol > ol { padding-left: 2.3em; }
-#toc ol + li { margin-top: 0.3em; }
-#toc.hidden { padding: 10px; background: #f6f6f6; -webkit-box-shadow: none; -moz-box-shadow: none; }
-#filecontents h1 + #toc.nofloat { margin-top: 0; }
-
-/* syntax highlighting */
-.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
-#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
-#filecontents pre.code, .docstring pre.code { display: block; }
-.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
-#filecontents pre.code, .docstring pre.code,
-.tags .example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; }
-pre.code { color: #000; }
-pre.code .info.file { color: #555; }
-pre.code .val { color: #036A07; }
-pre.code .tstring_content,
-pre.code .heredoc_beg, pre.code .heredoc_end,
-pre.code .qwords_beg, pre.code .qwords_end,
-pre.code .tstring, pre.code .dstring { color: #036A07; }
-pre.code .fid, pre.code .id.new, pre.code .id.to_s,
-pre.code .id.to_sym, pre.code .id.to_f,
-pre.code .dot + pre.code .id,
-pre.code .id.to_i pre.code .id.each { color: #0085FF; }
-pre.code .comment { color: #0066FF; }
-pre.code .const, pre.code .constant { color: #585CF6; }
-pre.code .symbol { color: #C5060B; }
-pre.code .kw,
-pre.code .label,
-pre.code .id.require,
-pre.code .id.extend,
-pre.code .id.include { color: #0000FF; }
-pre.code .ivar { color: #318495; }
-pre.code .gvar,
-pre.code .id.backref,
-pre.code .id.nth_ref { color: #6D79DE; }
-pre.code .regexp, .dregexp { color: #036A07; }
-pre.code a { border-bottom: 1px dotted #bbf; }
diff --git a/doc/file.README.html b/doc/file.README.html
deleted file mode 100644
index e88c26a46e5..00000000000
--- a/doc/file.README.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
- File: README
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Diaspora
-
-
The privacy aware, personally controlled, do-it-all, open source social
-network.
-
-
THIS IS ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.
-IT IS FUN TO GET RUNNING, BUT EXPECT THINGS TO BE BROKEN.
-
-
Installation instructions
-
-
Installation instructions are here .
-
-
Thanks for helping battle test Diaspora.
-Please report any bugs you see at bugs.joindiaspora.com .
-
-
Contributing to Diaspora
-
-
You can find an introduction to the source code here .
-Bugs and pending features are on our issue tracker .
-A step-by-step guide to development using git can be found here .
-
-
Here are a few good places to start:
-
-
-Run "rake spec" to run our Rspec
-unit test suite.
-Run "rake cucumber" to run our Cucumber
-integration test suite. As you can see, we need more integration tests. Pick a feature and write one!
-Take a look at the issue tracker and pick a bug.
-Write a spec for it, so it's easy for another developer to fix it.
-
-
-
-
Catches must be tested, and all your tests should be green,
-unless you're marking an existing bug, before a pull request is sent.
-Unit tests should be in Rspec, and integration tests should be in Cucumber.
-
-
Please make your changes in a branch to ensure that new commits to your master are
-not included in the pull request, and to make it easier for us to merge your commits.
-
-
Please do not rebase our tree into yours.
-See here
-for when to rebase.
-
-
We need you to fill out a
-contributor agreement form
-before we can accept your patches. This dual license agreement allows
-us to release limited pieces of Diaspora under the MIT license. You can find it
-here .
-
-
Resources
-
-
Here is our bug tracker and our
-roadmap . Also, you can
-find see what the core team is up to here .
-
-
Ongoing discussion:
-
-
-
-
-
More general info and updates about the project can be found on
-our blog ,
-and on Twitter .
-Also, be sure to join the official mailing list .
-
-
If you wish to contact us privately about any exploits in Diaspora you may
-find, you can email
-exploits@joindiaspora.com , corresponding public key (keyID: 77485064) .
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/file_list.html b/doc/file_list.html
deleted file mode 100644
index 2ea5474e2ee..00000000000
--- a/doc/file_list.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/frames.html b/doc/frames.html
deleted file mode 100644
index b94ea508d82..00000000000
--- a/doc/frames.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
- Documentation by YARD 0.7.1
-
-
-
-
-
-
diff --git a/doc/index.html b/doc/index.html
deleted file mode 100644
index e88c26a46e5..00000000000
--- a/doc/index.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
- File: README
-
- — Documentation by YARD 0.7.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Diaspora
-
-
The privacy aware, personally controlled, do-it-all, open source social
-network.
-
-
THIS IS ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.
-IT IS FUN TO GET RUNNING, BUT EXPECT THINGS TO BE BROKEN.
-
-
Installation instructions
-
-
Installation instructions are here .
-
-
Thanks for helping battle test Diaspora.
-Please report any bugs you see at bugs.joindiaspora.com .
-
-
Contributing to Diaspora
-
-
You can find an introduction to the source code here .
-Bugs and pending features are on our issue tracker .
-A step-by-step guide to development using git can be found here .
-
-
Here are a few good places to start:
-
-
-Run "rake spec" to run our Rspec
-unit test suite.
-Run "rake cucumber" to run our Cucumber
-integration test suite. As you can see, we need more integration tests. Pick a feature and write one!
-Take a look at the issue tracker and pick a bug.
-Write a spec for it, so it's easy for another developer to fix it.
-
-
-
-
Catches must be tested, and all your tests should be green,
-unless you're marking an existing bug, before a pull request is sent.
-Unit tests should be in Rspec, and integration tests should be in Cucumber.
-
-
Please make your changes in a branch to ensure that new commits to your master are
-not included in the pull request, and to make it easier for us to merge your commits.
-
-
Please do not rebase our tree into yours.
-See here
-for when to rebase.
-
-
We need you to fill out a
-contributor agreement form
-before we can accept your patches. This dual license agreement allows
-us to release limited pieces of Diaspora under the MIT license. You can find it
-here .
-
-
Resources
-
-
Here is our bug tracker and our
-roadmap . Also, you can
-find see what the core team is up to here .
-
-
Ongoing discussion:
-
-
-
-
-
More general info and updates about the project can be found on
-our blog ,
-and on Twitter .
-Also, be sure to join the official mailing list .
-
-
If you wish to contact us privately about any exploits in Diaspora you may
-find, you can email
-exploits@joindiaspora.com , corresponding public key (keyID: 77485064) .
-
-
-
-
-
\ No newline at end of file
diff --git a/doc/js/app.js b/doc/js/app.js
deleted file mode 100644
index 97095cbf674..00000000000
--- a/doc/js/app.js
+++ /dev/null
@@ -1,205 +0,0 @@
-function createSourceLinks() {
- $('.method_details_list .source_code').
- before("[View source ] ");
- $('.toggleSource').toggle(function() {
- $(this).parent().next().slideDown(100);
- $(this).text("Hide source");
- },
- function() {
- $(this).parent().next().slideUp(100);
- $(this).text("View source");
- });
-}
-
-function createDefineLinks() {
- var tHeight = 0;
- $('.defines').after(" more... ");
- $('.toggleDefines').toggle(function() {
- tHeight = $(this).parent().prev().height();
- $(this).prev().show();
- $(this).parent().prev().height($(this).parent().height());
- $(this).text("(less)");
- },
- function() {
- $(this).prev().hide();
- $(this).parent().prev().height(tHeight);
- $(this).text("more...");
- });
-}
-
-function createFullTreeLinks() {
- var tHeight = 0;
- $('.inheritanceTree').toggle(function() {
- tHeight = $(this).parent().prev().height();
- $(this).parent().toggleClass('showAll');
- $(this).text("(hide)");
- $(this).parent().prev().height($(this).parent().height());
- },
- function() {
- $(this).parent().toggleClass('showAll');
- $(this).parent().prev().height(tHeight);
- $(this).text("show all");
- });
-}
-
-function fixBoxInfoHeights() {
- $('dl.box dd.r1, dl.box dd.r2').each(function() {
- $(this).prev().height($(this).height());
- });
-}
-
-function searchFrameLinks() {
- $('#method_list_link').click(function() {
- toggleSearchFrame(this, relpath + 'method_list.html');
- });
-
- $('#class_list_link').click(function() {
- toggleSearchFrame(this, relpath + 'class_list.html');
- });
-
- $('#file_list_link').click(function() {
- toggleSearchFrame(this, relpath + 'file_list.html');
- });
-}
-
-function toggleSearchFrame(id, link) {
- var frame = $('#search_frame');
- $('#search a').removeClass('active').addClass('inactive');
- if (frame.attr('src') == link && frame.css('display') != "none") {
- frame.slideUp(100);
- $('#search a').removeClass('active inactive');
- }
- else {
- $(id).addClass('active').removeClass('inactive');
- frame.attr('src', link).slideDown(100);
- }
-}
-
-function linkSummaries() {
- $('.summary_signature').click(function() {
- document.location = $(this).find('a').attr('href');
- });
-}
-
-function framesInit() {
- if (window.top.frames.main) {
- document.body.className = 'frames';
- $('#menu .noframes a').attr('href', document.location);
- $('html head title', window.parent.document).text($('html head title').text());
- }
-}
-
-function keyboardShortcuts() {
- if (window.top.frames.main) return;
- $(document).keypress(function(evt) {
- if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return;
- if (typeof evt.target !== "undefined" &&
- (evt.target.nodeName == "INPUT" ||
- evt.target.nodeName == "TEXTAREA")) return;
- switch (evt.charCode) {
- case 67: case 99: $('#class_list_link').click(); break; // 'c'
- case 77: case 109: $('#method_list_link').click(); break; // 'm'
- case 70: case 102: $('#file_list_link').click(); break; // 'f'
- default: break;
- }
- });
-}
-
-function summaryToggle() {
- $('.summary_toggle').click(function() {
- localStorage.summaryCollapsed = $(this).text();
- $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
- var next = $(this).parent().parent().next();
- if (next.hasClass('compact')) {
- next.toggle();
- next.next().toggle();
- }
- else if (next.hasClass('summary')) {
- var list = $('');
- list.html(next.html());
- list.find('.summary_desc, .note').remove();
- list.find('a').each(function() {
- $(this).html($(this).find('strong').html());
- $(this).parent().html($(this)[0].outerHTML);
- });
- next.before(list);
- next.toggle();
- }
- return false;
- });
- if (localStorage) {
- if (localStorage.summaryCollapsed == "collapse") $('.summary_toggle').click();
- else localStorage.summaryCollapsed = "expand";
- }
-}
-
-function fixOutsideWorldLinks() {
- $('a').each(function() {
- if (window.location.host != this.host) this.target = '_parent';
- });
-}
-
-function generateTOC() {
- if ($('#filecontents').length === 0) return;
- var _toc = $(' ');
- var show = false;
- var toc = _toc;
- var counter = 0;
- var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
- var i;
- if ($('#filecontents h1').length > 1) tags.unshift('h1');
- for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
- var lastTag = parseInt(tags[0][1], 10);
- $(tags.join(', ')).each(function() {
- if (this.id == "filecontents") return;
- show = true;
- var thisTag = parseInt(this.tagName[1], 10);
- if (this.id.length === 0) {
- var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
- if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
- this.id = proposedId;
- }
- if (thisTag > lastTag) {
- for (i = 0; i < thisTag - lastTag; i++) {
- var tmp = $(' '); toc.append(tmp); toc = tmp;
- }
- }
- if (thisTag < lastTag) {
- for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
- }
- toc.append(' ' + $(this).text() + ' ');
- lastTag = thisTag;
- });
- if (!show) return;
- html = '';
- $('#content').prepend(html);
- $('#toc').append(_toc);
- $('#toc .hide_toc').toggle(function() {
- $('#toc .top').slideUp('fast');
- $('#toc').toggleClass('hidden');
- $('#toc .title small').toggle();
- }, function() {
- $('#toc .top').slideDown('fast');
- $('#toc').toggleClass('hidden');
- $('#toc .title small').toggle();
- });
- $('#toc .float_toc').toggle(function() {
- $(this).text('float');
- $('#toc').toggleClass('nofloat');
- }, function() {
- $(this).text('left');
- $('#toc').toggleClass('nofloat');
- });
-}
-
-$(framesInit);
-$(createSourceLinks);
-$(createDefineLinks);
-$(createFullTreeLinks);
-$(fixBoxInfoHeights);
-$(searchFrameLinks);
-$(linkSummaries);
-$(keyboardShortcuts);
-$(summaryToggle);
-$(fixOutsideWorldLinks);
-$(generateTOC);
\ No newline at end of file
diff --git a/doc/js/full_list.js b/doc/js/full_list.js
deleted file mode 100644
index 9e03dd4574d..00000000000
--- a/doc/js/full_list.js
+++ /dev/null
@@ -1,150 +0,0 @@
-var inSearch = null;
-var searchIndex = 0;
-var searchCache = [];
-var searchString = '';
-
-function fullListSearch() {
- // generate cache
- searchCache = [];
- $('#full_list li').each(function() {
- var link = $(this).find('.object_link a');
- searchCache.push({name:link.text(), node:$(this), link:link});
- });
-
- $('#search input').keyup(function() {
- searchString = this.value.toLowerCase();
- if (searchString === "") {
- clearTimeout(inSearch);
- inSearch = null;
- $('#full_list, #content').removeClass('insearch');
- $('#full_list li').removeClass('found').each(function() {
-
- var link = $(this).find('.object_link a');
- link.text(link.text());
- });
- if (clicked) {
- clicked.parents('ul').each(function() {
- $(this).removeClass('collapsed').prev().removeClass('collapsed');
- });
- }
- highlight();
- }
- else {
- if (inSearch) clearTimeout(inSearch);
- searchIndex = 0;
- lastRowClass = '';
- $('#full_list, #content').addClass('insearch');
- $('#noresults').text('');
- searchItem();
- }
- });
-
- $('#search input').focus();
- $('#full_list').after("
");
-}
-
-var lastRowClass = '';
-function searchItem() {
- for (var i = 0; i < searchCache.length / 50; i++) {
- var item = searchCache[searchIndex];
- if (item.name.toLowerCase().indexOf(searchString) == -1) {
- item.node.removeClass('found');
- }
- else {
- item.node.css('padding-left', '10px').addClass('found');
- item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
- lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
- item.link.html(item.name.replace(new RegExp("(" +
- searchString.replace(/([\/.*+?|()\[\]{}\\])/g, "\\$1") + ")", "ig"),
- '$1 '));
- }
-
- if (searchCache.length === searchIndex + 1) {
- searchDone();
- return;
- }
- else {
- searchIndex++;
- }
- }
- inSearch = setTimeout('searchItem()', 0);
-}
-
-function searchDone() {
- highlight(true);
- if ($('#full_list li:visible').size() === 0) {
- $('#noresults').text('No results were found.').hide().fadeIn();
- }
- else {
- $('#noresults').text('');
- }
- $('#content').removeClass('insearch');
- clearTimeout(inSearch);
- inSearch = null;
-}
-
-clicked = null;
-function linkList() {
- $('#full_list li, #full_list li a:last').click(function(evt) {
- if ($(this).hasClass('toggle')) return true;
- if (this.tagName.toLowerCase() == "li") {
- var toggle = $(this).children('a.toggle');
- if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
- toggle.click();
- return false;
- }
- }
- if (clicked) clicked.removeClass('clicked');
- var win = window.top.frames.main ? window.top.frames.main : window.parent;
- if (this.tagName.toLowerCase() == "a") {
- clicked = $(this).parent('li').addClass('clicked');
- win.location = this.href;
- }
- else {
- clicked = $(this).addClass('clicked');
- win.location = $(this).find('a:last').attr('href');
- }
- return false;
- });
-}
-
-function collapse() {
- if (!$('#full_list').hasClass('class')) return;
- $('#full_list.class a.toggle').click(function() {
- $(this).parent().toggleClass('collapsed').next().toggleClass('collapsed');
- highlight();
- return false;
- });
- $('#full_list.class ul').each(function() {
- $(this).addClass('collapsed').prev().addClass('collapsed');
- });
- $('#full_list.class').children().removeClass('collapsed');
- highlight();
-}
-
-function highlight(no_padding) {
- var n = 1;
- $('#full_list li:visible').each(function() {
- var next = n == 1 ? 2 : 1;
- $(this).removeClass("r" + next).addClass("r" + n);
- if (!no_padding && $('#full_list').hasClass('class')) {
- $(this).css('padding-left', (10 + $(this).parents('ul').size() * 15) + 'px');
- }
- n = next;
- });
-}
-
-function escapeShortcut() {
- $(document).keydown(function(evt) {
- if (evt.which == 27) {
- $('#search_frame', window.top.document).slideUp(100);
- $('#search a', window.top.document).removeClass('active inactive');
- $(window.top).focus();
- }
- });
-}
-
-$(escapeShortcut);
-$(fullListSearch);
-$(linkList);
-$(collapse);
diff --git a/doc/js/jquery.js b/doc/js/jquery.js
deleted file mode 100644
index f78f96a12f1..00000000000
--- a/doc/js/jquery.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.5.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Thu Mar 31 15:28:23 2011 -0400
- */
-(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;ca ";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML=" ";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1>$2>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1>$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/
-
-
-
-
-
-
-
-
-
-
-