Compare commits

...

1841 Commits

Author SHA1 Message Date
maxwell
adbd23ec50 more tests for mailing. the bug was i think we have to restart the resque workers 2011-03-14 11:32:59 -07:00
maxwell
28fc093a01 fix bug in user edit mailer view 2011-03-14 11:32:59 -07:00
MrZYX
01e3b3cc26 updated locales 2011-03-14 18:43:45 +01:00
maxwell
d91fda656c Revert "js hack to see bigger version of photo thumbnails in the stream without being abnoxious"
This reverts commit ab997e2d21.
2011-03-14 09:51:06 -07:00
MrZYX
e8bb4c2d66 added preload='none' to the audio tag (#928) 2011-03-14 13:07:27 +01:00
Sarah Mei
03f90a999d refactor aspects controller spec 2011-03-13 21:32:59 -07:00
Sarah Mei
1d6a69ea82 refactor photos controller spec 2011-03-13 20:54:47 -07:00
Sarah Mei
1702081af7 refactor querying spec a bit 2011-03-13 20:08:53 -07:00
MrZYX
a544a189ff updated locales 2011-03-13 21:21:27 +01:00
MrZYX
2a5d41cc82 fixed translations for comments 2011-03-13 21:16:43 +01:00
MrZYX
5cae971ba1 added some languages 2011-03-13 13:20:20 +01:00
MrZYX
6ba0083337 updated locales 2011-03-13 13:19:12 +01:00
MrZYX
6af21e00ca Merge branch '913-new-bug' of https://github.com/kiranh/diaspora into pull 2011-03-12 13:03:40 +01:00
MrZYX
fb6e32e3bf Merge branch 'master' of https://github.com/williamtheaker/diaspora into pull 2011-03-12 13:02:00 +01:00
MrZYX
63caff1f40 updated locales 2011-03-12 12:55:37 +01:00
William Theaker
67affa2f5f wrench 2011-03-12 02:57:15 -05:00
Kiran Soumya
7c3a173010 Bug Fix for #913 with Rspec and Cucumber test cases, for a scenario, where a user is mentioned on a post and when that user closes his account, then his contacts cannot see their homepages due to this post 2011-03-12 11:08:40 +05:30
MrZYX
ed8d4db3a8 some reformatting/refactor of en.yml. This might break some translations but I think I've catched the most ones, at least the most important ones 2011-03-12 03:27:28 +01:00
maxwell
e52d14f1e9 attempting to fix bug #913 2011-03-11 17:43:55 -08:00
maxwell
ab997e2d21 js hack to see bigger version of photo thumbnails in the stream without being abnoxious 2011-03-11 17:16:43 -08:00
Jordi Mallach
59820d1994 Update Catalan translation to fd6545b. 2011-03-12 01:37:13 +01:00
Jordi Mallach
fd6545b609 Fix typos. 2011-03-12 01:30:07 +01:00
Jordi Mallach
2d5dc81854 Merge branch 'master' of git://github.com/diaspora/diaspora 2011-03-12 01:07:58 +01:00
Jordi Mallach
0745a5ed7c Catalan translation update. 2011-03-12 01:07:31 +01:00
maxwell
50d9d76562 update translations for email settings, and missing translation for aspect#new 2011-03-11 16:02:24 -08:00
MrZYX
1c94600b66 Merge branch 'master' of github.com:diaspora/diaspora 2011-03-12 01:00:49 +01:00
maxwell
b7eec2e843 update schema.rb 2011-03-11 15:54:05 -08:00
Jordi Mallach
00b0edcd39 Fix typo. 2011-03-12 00:53:44 +01:00
maxwell
d825eeaaa0 updated to listen to disable mail 2011-03-11 15:43:40 -08:00
maxwell
580f0576c8 added test for edit 2011-03-11 15:43:29 -08:00
maxwell
52b970098b add specs for updating email settings in the controller, and user#mail 2011-03-11 15:43:29 -08:00
maxwell
e9a843b095 email prefs are now saved. need more tests and use it in user#mail 2011-03-11 15:42:53 -08:00
maxwell
155290fb51 updating Gemfile.lock 2011-03-11 15:41:28 -08:00
Angjoo
5582c2b5f3 revert max width commit 2011-03-11 15:20:12 -08:00
Raphael Sofaer
0c31cc4259 quote string in migration! 2011-03-11 15:00:15 -08:00
Raphael Sofaer
98633658f4 delete from in migration 2011-03-11 14:59:01 -08:00
Raphael Sofaer
70e4a671a2 tags as array in migration 2011-03-11 14:57:46 -08:00
Raphael Sofaer
20d40b7440 fix execute command in migration 2011-03-11 14:56:25 -08:00
Raphael Sofaer
c256533a2f class, not instance method 2011-03-11 14:52:23 -08:00
Angjoo
2ff4af6800 fixed tab to spaces 2011-03-11 14:36:07 -08:00
Raphael Sofaer
7ac3692a92 Fix specs, migrate to downcase tags, still testing migration 2011-03-11 14:23:03 -08:00
Raphael Sofaer
8f1a6f502e Change equals to sort-of-equals 2011-03-11 14:23:03 -08:00
Angjoo
6e78d6f6c5 ajk ms css fix for header .container width 100% 2011-03-11 14:02:49 -08:00
Raphael Sofaer
9f368bf82f Change person show page to created_at ordering, since you're looking at that person's content 2011-03-11 10:15:17 -08:00
Raphael Sofaer
fbfd46a506 change peoplecontroller order, fix grammar in public default 2011-03-11 10:12:37 -08:00
MrZYX
879672576f fixed #919 2011-03-11 19:11:03 +01:00
MrZYX
b93084e04f updated locales 2011-03-11 17:28:14 +01:00
MrZYX
e3c5e7ba05 person -> author in app/views/comments/_comment.mobile.haml 2011-03-11 16:20:05 +01:00
MrZYX
c502e4591a do not confuse the terminology again, link #diaspora, not #diaspora-dev channel, link user mailing list 2011-03-11 15:46:12 +01:00
MrZYX
e4be5db881 there can be no reason to not set the locale 2011-03-11 15:37:33 +01:00
Maxwell Salzberg
14033e7b5f ajk ms or is a single pipe 2011-03-11 00:16:17 -08:00
Maxwell Salzberg
e2903a1251 get rid of the period, it might be screwing stuff up 2011-03-11 00:12:48 -08:00
Maxwell Salzberg
189b7fb5ac ajk ms only grab stream links 2011-03-11 00:01:01 -08:00
Maxwell Salzberg
2b38fe820f ajk ms escape period in ogg... also replace the parent so it is not inside an a tag 2011-03-10 23:52:22 -08:00
Maxwell Salzberg
cdab6a1a84 ajk ms add ogg to the audio tag linker 2011-03-10 23:33:20 -08:00
Sarah Mei
a80179e77f Fix requires for 1.9 build. Hopefully now it will just fail for perf reasons :p 2011-03-10 23:18:52 -08:00
danielgrippi
29d23d9f43 make audio tags display block in the stream 2011-03-10 21:54:29 -08:00
maxwell
5748639c08 sm ms audio tag 2011-03-10 21:33:42 -08:00
Michael Nutt
c7362707b3 fix js error; stream ajax success handler should expect json 2011-03-11 00:31:43 -05:00
Michael Nutt
ead1f80b08 websocket js handler should know about different notification types 2011-03-11 00:31:43 -05:00
Dan Hansen
d448436376 this refers to the dom element, not Embedder 2011-03-10 23:11:06 -06:00
Dan Hansen
b50217c98c clean up default.html 2011-03-10 23:06:34 -06:00
maxwell
ffa6b9879f added default development page so it doesnt look so terrible 2011-03-10 20:31:39 -08:00
zhitomirskiyi
35cabd469f fixed the merge for the author convention 2011-03-10 20:13:52 -08:00
zhitomirskiyi
9b00b2c786 Merge branch 'mnutt-9925139-user-shouldnt-mention-non-friends'
Conflicts:
	app/models/user.rb
	spec/integration/receiving_spec.rb
	spec/models/mention_spec.rb
	spec/models/status_message_spec.rb
2011-03-10 19:59:12 -08:00
danielgrippi
54130b49b7 Revert "fix a few invalid html tags"
This reverts commit 004d9b5028.
2011-03-10 19:42:37 -08:00
danielgrippi
9ad96726de just use tag search for now 2011-03-10 19:42:24 -08:00
Michael Nutt
004d9b5028 fix a few invalid html tags 2011-03-10 22:18:40 -05:00
Dan Hansen
490a2c6a9e remove extra protocol in the link 2011-03-10 21:16:45 -06:00
Raphael Sofaer
35903514f5 remove wasteful join 2011-03-10 18:53:23 -08:00
Raphael Sofaer
b86098055e Add tag search on public page 2011-03-10 18:37:45 -08:00
Raphael Sofaer
c35f143b29 always link to hashtag. 2011-03-10 18:37:45 -08:00
Raphael Sofaer
ea98b1ca81 Tags now link to meaningless query in PostsController 2011-03-10 18:37:45 -08:00
Raphael Sofaer
f19857cc40 Simplify regex madness 2011-03-10 18:37:45 -08:00
Raphael Sofaer
c1bcfef90c TAGS ARE SO COOL 2011-03-10 18:37:45 -08:00
Dan Hansen
10345b14a8 generate jasmine fixture with posts 2011-03-10 19:12:16 -06:00
Dan Hansen
c9545920f8 title on landing page 2011-03-10 18:40:54 -06:00
Dan Hansen
214c677169 process videos last so there aren't conflicts with other markdownify methods 2011-03-10 18:29:08 -06:00
Dan Hansen
d7c7775b6c fallback gracefully, break build if videos can't embed 2011-03-10 18:26:55 -06:00
Dan Hansen
93bdf1e91e add space before link 2011-03-10 18:01:08 -06:00
danielgrippi
2cf0503310 put text below photo in stream 2011-03-10 15:28:44 -08:00
Raphael Sofaer
05f9d79689 Fix public posts page when signed in 2011-03-10 15:26:55 -08:00
danielgrippi
1f3261b2ef make photos larger in the stream 2011-03-10 15:17:41 -08:00
Raphael Sofaer
8f929d2b85 Show local public posts in /p 2011-03-10 14:41:03 -08:00
Michael Nutt
9d1bb3ac21 fix feature for new markup 2011-03-10 16:42:07 -05:00
Michael Nutt
2b6070d325 features for comments 2011-03-10 16:42:07 -05:00
Michael Nutt
8837632dd9 User should be able to comment on their own photo 2011-03-10 16:42:07 -05:00
Michael Nutt
8c5621158d notification now only created when message is received, not when message is first saved 2011-03-10 16:41:03 -05:00
Raphael Sofaer
0416fa14b2 Just use /users/me to update open aspects 2011-03-10 13:03:45 -08:00
Raphael Sofaer
8a419a84a6 fix up some specs 2011-03-10 12:55:05 -08:00
Raphael Sofaer
ddbd5febb3 Make people pages publicly accessible 2011-03-10 12:55:05 -08:00
maxwell
7b0a354677 slight tweaks to pubsubhubub publishing 2011-03-10 12:17:34 -08:00
MrZYX
dd97f1b985 updated locales 2011-03-10 15:50:43 +01:00
MrZYX
58796dcde2 uhm, --amend 2011-03-10 15:35:40 +01:00
MrZYX
7bf256ecfa we need @all_aspects not only in html views 2011-03-10 15:29:49 +01:00
MrZYX
6d314e9394 fixed ostatus builder + spec 2011-03-10 15:17:56 +01:00
MrZYX
1e3533b1b1 made zh-TW as language available. Thanks to iongchun 2011-03-10 14:45:46 +01:00
maxwell
1baafac84b added content to rss feed 2011-03-09 19:11:09 -08:00
maxwell
90aac1d175 spec to have ostatus builder still build rss even if an object does not respond to activity 2011-03-09 18:54:09 -08:00
maxwell
af43a60b62 only grab statuses for public feed 2011-03-09 18:12:36 -08:00
Raphael Sofaer
9324aceefc typo 2011-03-09 18:04:09 -08:00
maxwell
337831bba2 move ostatus builder, actually added the file. 2011-03-09 18:01:48 -08:00
Raphael Sofaer
584684560e Make conversation delete clearer 2011-03-09 17:58:29 -08:00
Raphael Sofaer
e6836c46a7 Remove unnecessary includes, finish renaming set_header_data, only run set_header_data on html requests 2011-03-09 17:50:46 -08:00
Raphael Sofaer
f2cc51dd0d Take current user id out of avatar 2011-03-09 17:50:46 -08:00
maxwell
5b73e9ca06 rename ostatus builder spec to have the correct name 2011-03-09 17:35:21 -08:00
maxwell
1ac688f82c moved an ostatus builder query out to the controller, where it belongs, and corrected the order 2011-03-09 17:33:47 -08:00
maxwell
9d480b0961 remove status_message#public_message: we never use it 2011-03-09 17:14:37 -08:00
maxwell
f9279f9bbc fixed public route not fetching posts, also an error in status_message activity markup 2011-03-09 17:08:41 -08:00
Raphael Sofaer
eafa965504 Try explicitly querying rather than getting postvisibilities 2011-03-09 16:17:48 -08:00
Raphael Sofaer
3f5844aaa0 Integerify logged time 2011-03-09 16:17:29 -08:00
Raphael Sofaer
5cc7aa4496 Change some person_ids to author_ids 2011-03-09 15:28:27 -08:00
Raphael Sofaer
e38a136c49 don't quote floats 2011-03-09 15:28:08 -08:00
Raphael Sofaer
3c4ec6d39d LOG MORE STUFF 2011-03-09 14:29:49 -08:00
Raphael Sofaer
cf93bfc89b improve hash logger a bit 2011-03-09 14:06:48 -08:00
Raphael Sofaer
f8c0906db7 Instrumenting activerecord object instantiation to do some profiling 2011-03-09 13:54:28 -08:00
MrZYX
dc7a672d9f fixed some translations 2011-03-09 22:46:58 +01:00
danielgrippi
ee6932a3f7 added title to padlock on aspect edit pane 2011-03-09 12:15:23 -08:00
danielgrippi
d0569fb881 simplified functionality on aspect edit faceboxes 2011-03-09 12:00:49 -08:00
Raphael Sofaer
c259fc65f0 You can now pass hashes to the logger 2011-03-09 11:48:29 -08:00
MrZYX
deeb8044f5 handle the case that admins is unset in the app_config.yml 2011-03-09 20:03:46 +01:00
MrZYX
b21ea3c85a downcase usernames from the admins section in the AppConfig 2011-03-09 18:34:30 +01:00
MrZYX
ef58c5f13d fixed #911 2011-03-09 16:12:44 +01:00
MrZYX
a5d170ef1c updated locales 2011-03-09 15:53:52 +01:00
MrZYX
5631e45b6d --amend 2011-03-09 15:49:16 +01:00
MrZYX
0d1133cd51 fixed some translations
do not escape html in private_message text only email
2011-03-09 15:33:46 +01:00
zhitomirskiyi
c697df4b5a markdownafy the private message text 2011-03-08 23:12:04 -08:00
danielgrippi
dda477410d use conversations_url() with a param in private message emails 2011-03-08 22:11:34 -08:00
danielgrippi
1f5edb1d92 Merge branch 'private_messages'
Conflicts:
	app/controllers/status_messages_controller.rb
	app/models/data_point.rb
	app/models/status_message.rb
	db/schema.rb
	lib/fake.rb
	public/stylesheets/sass/application.sass
	spec/models/mention_spec.rb
2011-03-08 21:23:41 -08:00
danielgrippi
81f0cd7f07 fixed double-javascript loading on people/show 2011-03-08 20:42:56 -08:00
danielgrippi
ac738df8f5 added missing translation 2011-03-08 19:22:49 -08:00
zhitomirskiyi
c252cfa025 added the email notification, the notification is not persisted, fixed the receive callback spec 2011-03-08 18:24:56 -08:00
danielgrippi
d38e3a6b29 added translations to all conversation/message views. tweaked css 2011-03-08 15:51:46 -08:00
zhitomirskiyi
84198e4750 Merge branch 'private_messages' of github.com:diaspora/diaspora into private_messages 2011-03-08 11:57:49 -08:00
zhitomirskiyi
9490538e44 checking for relayable in the dispatcher and the receiver 2011-03-08 11:55:17 -08:00
MrZYX
5f841b9add do not escape html in text only emails 2011-03-08 20:45:02 +01:00
danielgrippi
78e30ff459 update unread count in conversation visibility when hitting conversationscontroller#show 2011-03-08 11:43:58 -08:00
MrZYX
7b5b980095 link to public feed of the person on the profile person show page instead of to the one of current_user
fixed #700
fixed #864
fixed #774
2011-03-08 20:30:48 +01:00
zhitomirskiyi
8bcf1b49c7 notifier for the messages, we're so close 2011-03-08 10:53:49 -08:00
MrZYX
fd0bc8a09a updated locales 2011-03-08 15:38:18 +01:00
danielgrippi
fb5e5cc341 cleaned up new message facebox 2011-03-07 20:14:22 -08:00
danielgrippi
fca5310c77 dispatch the conversation in ConversationsController 2011-03-07 17:54:25 -08:00
Raphael Sofaer
b7c3f93d25 Use delegation in PostFake, use render => :collection in stream 2011-03-07 12:20:46 -08:00
danielgrippi
97aff09140 added autocomplete on message 'to' field, minor css tweaks to inbox 2011-03-07 11:22:59 -08:00
Raphael Sofaer
6e7bdf7cad don't change photos while commenting 2011-03-07 10:32:31 -08:00
Raphael Sofaer
8c1cb0d6e8 Comment button needs to be moved into comment box line 2011-03-07 10:27:54 -08:00
Raphael Sofaer
a45f46828a re-enable commenting box on show page without comments, but it looks kind of ugly 2011-03-07 10:18:50 -08:00
Raphael Sofaer
909a198380 Post photos without text 2011-03-07 10:03:43 -08:00
zhitomirskiyi
80a3a3446a pulling in 2011-03-06 21:37:27 -08:00
zhitomirskiyi
e537104fb4 pulling in 2011-03-06 21:36:03 -08:00
Raphael Sofaer
e00a033e9e Update rspec-instafail, test git headers 2011-03-06 10:18:37 -08:00
Raphael Sofaer
981c37d286 Merge branch 'master' of github.com:diaspora/diaspora 2011-03-06 09:58:28 -08:00
MrZYX
c79b55f520 updated locales 2011-03-05 16:32:01 +01:00
danielgrippi
8fafc48d32 more private message wip. 2011-03-04 18:17:49 -08:00
danielgrippi
d50863cc90 added the ability to message someone from their profile page 2011-03-04 11:28:09 -08:00
danielgrippi
48fff29bf6 fixed conversation receive. made visibilities on conversation :dependent => :destroy 2011-03-04 11:19:01 -08:00
Raphael Sofaer
a865373bfa Adjust readme 2011-03-04 10:30:10 -08:00
MrZYX
06ff32d8d5 updated locales 2011-03-04 14:43:44 +01:00
danielgrippi
5f55dfa1bc private message inbox wip 2011-03-03 17:32:26 -08:00
Raphael Sofaer
eb9705c82d Adjust batch invite text 2011-03-03 17:23:20 -08:00
Raphael Sofaer
435451bc5b admins can resend invitations 2011-03-03 16:59:33 -08:00
MrZYX
f0ba62be59 replaced ▼ with ▼, this fixes #904 and shouldn't harm anything. 2011-03-03 21:32:44 +01:00
MrZYX
ae0595bca8 fixed #903 2011-03-03 21:25:01 +01:00
Raphael Sofaer
3d0831f2b2 Merge remote branch 'mnutt/photo_upload_status' 2011-03-03 11:43:16 -08:00
Raphael Sofaer
da12954d22 Move statusmessage create view out to partial 2011-03-03 11:10:44 -08:00
zhitomirskiyi
2522ab7ee4 refactoring the conversation views, wip 2011-03-03 10:39:32 -08:00
MrZYX
8ab54076f8 updated locales 2011-03-02 22:45:31 +01:00
Raphael Sofaer
1afc83f356 Revert "memprof"
This reverts commit 8ee81314d6.
2011-03-02 13:34:29 -08:00
Raphael Sofaer
685130cbd4 Take out n-query on home page 2011-03-02 13:34:06 -08:00
zhitomirskiyi
9d7611f8d8 addedthe controllers and the views for the message and the conversation inbox, going to pull in some left nav styling 2011-03-02 12:27:57 -08:00
Raphael Sofaer
770091e82b Don't retrieve all the user's contacts again unnecessarily 2011-03-02 12:11:25 -08:00
Raphael Sofaer
8ee81314d6 memprof 2011-03-02 11:47:13 -08:00
Raphael Sofaer
9d92161430 Make migrations compatible with postgres 2011-03-02 11:05:16 -08:00
zhitomirskiyi
f58c477673 added the forgotten files 2011-03-01 23:55:11 -08:00
Sarah Mei
ba6afa50e8 Removing extra csrf tag. Thx feanor12. 2011-03-01 22:25:05 -08:00
Sarah Mei
1590b69569 WTF. Seriously. It works with 1.9 now though. 2011-03-01 21:43:49 -08:00
Sarah Mei
d183150fa9 Upgrade launchy. 2011-03-01 21:41:28 -08:00
zhitomirskiyi
3812612c86 added a validation of participant, as well as messages controller spec wip 2011-03-01 19:24:07 -08:00
Raphael Sofaer
68f0f7ec21 Add rcov task 2011-03-01 18:12:42 -08:00
danielvincent
21fd546cd0 posts now have authors instead of people 2011-03-01 18:05:05 -08:00
Raphael Sofaer
0cb218bba0 Delete statistic and data point models 2011-03-01 16:54:12 -08:00
danielvincent
11309574cf messages are now relayable, a comment has an author as opposed to a person. 2011-03-01 12:39:42 -08:00
danielvincent
c62e9db397 private messages wip 2011-03-01 12:28:34 -08:00
danielvincent
f4e6d0d82b broke out some comment logic to a replayable module 2011-03-01 12:28:33 -08:00
zhitomirskiyi
bd908a9b95 conversations federate 2011-03-01 12:25:55 -08:00
danielvincent
1072806d8f PrivateMessage -> Conversation, Message. 2011-03-01 12:25:55 -08:00
danielvincent
a179bac689 fixed migrations, added unread to PrivateMessageVisibilities 2011-03-01 12:25:54 -08:00
danielvincent
979d9d7fb4 added delete actions for private messages 2011-03-01 12:14:31 -08:00
danielvincent
090c412690 touched up AspectMembership resource 2011-03-01 12:14:31 -08:00
danielvincent
c5801ffb37 basic views / controller actions for private messages 2011-03-01 12:14:31 -08:00
danielvincent
9fe0320881 added PrivateMessage and PrivateMessageVisibility models and migrations 2011-03-01 12:14:31 -08:00
Raphael Sofaer
a7f149e399 Possible performance gain from not hitting posts relation 2011-03-01 11:42:57 -08:00
Raphael Sofaer
00cca370ad Add translation key method, should be replaced with separate partials. 2011-03-01 11:03:58 -08:00
Raphael Sofaer
1c1fba63e7 Refactor notification to have subclasses, just a start 2011-03-01 10:30:29 -08:00
Raphael Sofaer
809ee8a678 Started notifications refactor 2011-03-01 10:30:29 -08:00
MrZYX
00ebf6469b it can happen that the http referer is nil when we expect it to be set (for example if the user has a privacy extension enabled 2011-03-01 18:38:40 +01:00
MrZYX
31f5500b11 removed RAILS_ENV=test example from config/server.sh 2011-03-01 17:28:35 +01:00
Michael Nutt
ac2c50b33f denote that fileuploader has been modified 2011-02-28 20:37:41 -05:00
Raphael Sofaer
ebfebb16d7 Fix integration spec 2011-02-28 17:22:40 -08:00
Raphael Sofaer
a11507d30c Take out typos for real this time 2011-02-28 16:40:03 -08:00
Raphael Sofaer
a0a901a675 fix typo 2011-02-28 16:27:47 -08:00
Raphael Sofaer
810220bc97 clear disconnected records in migration 2011-02-28 16:24:09 -08:00
Raphael Sofaer
98d8d9e0da Add the migration 2011-02-28 15:31:12 -08:00
Raphael Sofaer
d8956a7cd5 Add foreign key constraints 2011-02-28 15:18:35 -08:00
MrZYX
98999b1703 updated locales 2011-02-28 22:15:15 +01:00
Raphael Sofaer
8a4ca3af0e fix error on account deletion 2011-02-28 11:24:31 -08:00
Michael Nutt
1bfbb4b605 make mention helper text and file upload status line up 2011-02-27 12:45:32 -05:00
Michael Nutt
208a47162c add onAllComplete event to fileupload.js; hide mention helper during upload 2011-02-27 12:44:56 -05:00
Michael Nutt
b6dc32959c place thumbnails inside status message form and add spacing 2011-02-27 02:04:43 -05:00
Michael Nutt
43e10307a6 fix broken jquery autoresize plugin 2011-02-27 02:03:55 -05:00
Sarah Mei
5e69f7d9a2 Upgrade arel, for some reason. 2011-02-26 16:02:10 -08:00
Sarah Mei
f28a6a9f80 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-26 15:59:16 -08:00
MrZYX
0fc5f1c043 log the 'received comment but no corresponding post' case 2011-02-26 16:50:47 +01:00
Sarah Mei
1adcc4cc99 fix jasmine specs 2011-02-26 16:50:35 +01:00
MrZYX
b47714f881 updated locales 2011-02-26 16:50:25 +01:00
MrZYX
5bcc3acbbb save the correct url on redirect in http_multi job; be tolerant about messed up urls in the db 2011-02-26 16:50:08 +01:00
Sarah Mei
cd8deca4bb fix jasmine specs 2011-02-26 06:16:34 -08:00
MrZYX
a42c1225d1 updated locales 2011-02-26 14:31:54 +01:00
MrZYX
1832743e5f Merge branch 'master' of github.com:diaspora/diaspora 2011-02-26 14:23:52 +01:00
MrZYX
afecfe5e93 save the correct url on redirect in http_multi job; be tolerant about messed up urls in the db 2011-02-26 14:22:14 +01:00
maxwell
782dc55d63 remove puts, fix admins controller test 2011-02-26 14:22:13 +01:00
Dan Hansen
a9ab842242 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-25 18:56:21 -06:00
Dan Hansen
c1e679ff8d fix syntax error and spec 2011-02-25 18:56:03 -06:00
maxwell
e6f11a39b5 remove puts, fix admins controller test 2011-02-25 15:28:32 -08:00
Dan Hansen
3538bda06d fix email subject wording 2011-02-25 16:56:21 -06:00
maxwell
b95c9b2e66 actually send email from admin interface inviter 2011-02-25 14:54:07 -08:00
Dan Hansen
c9af2e87aa service icons and public icon use pointer cursor 2011-02-25 16:48:13 -06:00
Raphael Sofaer
22d83ec502 update http_multi to adjust urls when you get a redirect 2011-02-25 14:46:21 -08:00
Raphael Sofaer
f3202e15d6 add follow_location to typhoeus default jobs 2011-02-25 13:38:24 -08:00
Paweł Wilk
c5e0bc40bb Inflection aliases updated 2011-02-25 22:09:54 +01:00
MrZYX
ee96dea398 update i18n-inflector to 2.5.1; correct Polski to polski; fixed locales; thanks siefca 2011-02-25 21:41:32 +01:00
Raphael Sofaer
d8d89cb6c2 actually put in the cert bundle 2011-02-25 12:23:38 -08:00
Raphael Sofaer
62b164458b Adding recipe for putting startcom bundle in centos ca bundle 2011-02-25 12:18:22 -08:00
Raphael Sofaer
7693c162c2 LOG MORE, better logging in http_multi failures 2011-02-25 12:16:17 -08:00
MrZYX
9fdf1e599f updated locales 2011-02-25 15:58:34 +01:00
MrZYX
d4fb1d8af6 added README to rails-i18n directory 2011-02-25 14:35:18 +01:00
Sarah Mei
40fa91ead9 Start refactor of comment_spec. 2011-02-24 20:46:05 -08:00
zhitomirskiyi
83576d75ef stubbing the httpmulti in the test, now you can post to services individually 2011-02-24 17:50:01 -08:00
zhitomirskiyi
c27e2de478 removed pending test 2011-02-24 17:31:54 -08:00
zhitomirskiyi
ec93faa2c4 added the post to services icon on every page added a manage icon and moved the RSS link to the public explain 2011-02-24 17:31:54 -08:00
zhitomirskiyi
adfcc59631 can now select individual services to be added 2011-02-24 17:31:54 -08:00
zhitomirskiyi
e61cc2fd34 made the postzord take the services in individually 2011-02-24 17:31:54 -08:00
zhitomirskiyi
126925f28f wip 2011-02-24 17:31:54 -08:00
zhitomirskiyi
78b242b110 removed post to services since we are not using it 2011-02-24 17:31:54 -08:00
Raphael Sofaer
50cd06129a Adjust expected string in mention spec' 2011-02-24 16:01:36 -08:00
Raphael Sofaer
c030e8b21e Move the @ inside the mention links 2011-02-24 15:52:47 -08:00
Raphael Sofaer
40dea1f625 LOG MORE, when http to another pod fails 2011-02-24 15:52:37 -08:00
Raphael Sofaer
126a4b2547 LOG MORE, on resque job errors 2011-02-24 13:11:57 -08:00
Raphael Sofaer
736783abd7 You can't call post.person when post is nil. We should probably just reject and delete the invalid notifications in the controller, keeping them in the view is aggravating 2011-02-24 11:13:25 -08:00
Raphael Sofaer
22c4ebd6de return a string from a stub 2011-02-24 10:36:06 -08:00
MrZYX
ff796efce0 updated locales 2011-02-24 16:25:43 +01:00
MrZYX
62badaa0df updated catalan locale 2011-02-24 16:24:05 +01:00
Raphael Sofaer
e964490a9a Escape xml before dispatch 2011-02-23 16:06:55 -08:00
Raphael Sofaer
faf026dec6 Update dispatcher to use HttpMulti job 2011-02-23 16:06:55 -08:00
Raphael Sofaer
69a98a2f5a Make curl script more idempotent, make mysql run script use mysqld directly so it responds to -d 2011-02-23 16:06:55 -08:00
Raphael Sofaer
2c5fc1bdd9 Add some idempotency stuff 2011-02-23 16:06:55 -08:00
Raphael Sofaer
d75bc10ac0 Working on curl chef script 2011-02-23 16:06:55 -08:00
maxwell
936b997dff fixed curl cookbook 2011-02-23 16:06:55 -08:00
maxwell
bb5d5fc2c0 typhoeus fixes and a few changes to the chef scripts 2011-02-23 16:06:55 -08:00
maxwell
638311125f typhoeus should now be in. there is a new dependancy on curl and the curl dev headers, so install 2011-02-23 16:06:55 -08:00
maxwell
c9dd2d5b50 add files 2011-02-23 16:06:54 -08:00
maxwell
8f6922bcf9 multihttp job and spec 2011-02-23 16:06:54 -08:00
MrZYX
ea6dc0eb9a updated locales 2011-02-24 00:39:00 +01:00
MrZYX
d32fe1ea08 updated Gemfile.lock 2011-02-24 00:34:18 +01:00
MrZYX
98cdee97c0 Merge branch '619-gender-aware-translations' of https://github.com/siefca/diaspora into inflections
Conflicts:
	Gemfile
	app/controllers/application_controller.rb
	app/controllers/posts_controller.rb
	app/controllers/publics_controller.rb
2011-02-24 00:33:34 +01:00
zhitomirskiyi
e106ec6a79 added post author to the subject of the also commented email as well as the notification 2011-02-23 13:03:11 -08:00
zhitomirskiyi
97e00f9ee3 changed the delete to a destroy on retraction, also removed a puts 2011-02-23 12:00:42 -08:00
maxwell
16e8ecc72c fixing debugging statement in smcontroller, also fix the spec 2011-02-22 22:38:23 -08:00
maxwell
e446dcaeb5 make sm_controller show the error in the js 2011-02-22 22:21:48 -08:00
maxwell
5bce2d1615 remove mongomapper error handler in photos_controller#create 2011-02-22 22:02:58 -08:00
maxwell
ec21230756 make status_message_controller#create return the error message 2011-02-22 22:01:08 -08:00
Dan Hansen
e4ba498d70 whoops 2011-02-22 23:21:50 -06:00
Dan Hansen
f41bc0c14d <3z 2011-02-22 23:19:57 -06:00
Sarah Mei
06a992a088 Modify REE garbage collection settings for speedier tests. 2011-02-22 21:00:08 -08:00
Raphael Sofaer
74b8921c09 make video urls have correct href 2011-02-22 18:51:40 -08:00
Raphael Sofaer
17f41f1291 Make login-error shadow more readable 2011-02-22 18:08:46 -08:00
Raphael Sofaer
efd95df029 Don't install ruby-debug in rubinius, wtf why does rubiniues declare 1.8? 2011-02-22 18:08:46 -08:00
Raphael Sofaer
15a1eb8afc Add Rubinius's generated files 2011-02-22 18:08:45 -08:00
maxwell
eb9a943724 parinoid checks for admin page thx dangold 2011-02-22 15:43:10 -08:00
Dan Hansen
801382714a remove jquery 1.4.2, we never use it 2011-02-22 13:59:10 -06:00
Dan Hansen
9ef6606f80 load jquery from google only if local copy fails 2011-02-22 13:41:05 -06:00
MrZYX
e943d6ae5e updated locales 2011-02-22 16:12:06 +01:00
MrZYX
3d034668fd Revert "updated locales"
This reverts commit 85c346b520.
2011-02-22 16:07:31 +01:00
MrZYX
85c346b520 updated locales 2011-02-22 13:59:23 +01:00
MrZYX
65447e63ec Catalan locale update from Jordi Mallach 2011-02-22 13:51:38 +01:00
Dan Hansen
e04685e7ab remove unused javascript that's in a view 2011-02-21 23:25:38 -06:00
Sarah Mei
33c7400919 clean up fixture builder 2011-02-21 20:06:54 -08:00
Sarah Mei
dcf7e57a1d Use standard carrierwave gem instead of deleted git repo. This may break photo uploading, but better that than breaking bundle install. 2011-02-21 13:54:08 -08:00
Sarah Mei
814ef38fa9 Don't actually need 36 notifications. 2011-02-21 13:20:39 -08:00
MrZYX
feb47df97e total refactor of version header. X-Git-Update: ISO 8601 formated date of the last commit, X-Git-Revision: sha1 hash of the last commit 2011-02-21 17:13:11 +01:00
MrZYX
e02c3eafc0 Merge branch 'xheader' of https://github.com/diasporg/diaspora into xheader 2011-02-21 16:12:24 +01:00
MrZYX
e4ae0ddf67 updated locales 2011-02-21 15:32:32 +01:00
Sarah Mei
49adf5034f Revert javascript move 2011-02-20 20:05:40 -08:00
Sarah Mei
fe3c67a662 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-20 14:56:03 -08:00
Sarah Mei
26779889d0 To run specs without perf tests: rake spec SPEC_OPTS="--tag ~performance" 2011-02-20 14:40:51 -08:00
danielvincent
3d6d742def move js to body bottom 2011-02-20 16:31:06 -05:00
MrZYX
166f75d883 I think I fixed #882 2011-02-20 22:10:27 +01:00
MrZYX
da244f8438 reintroduced remember me on the login page 2011-02-20 21:49:08 +01:00
MrZYX
ab706f4127 fixed sort by css for languages different from english 2011-02-20 19:00:13 +01:00
MrZYX
abf385d79d collapsed langcodes_alias_map.yml and languages.yml into locale_settings.yml 2011-02-20 14:35:24 +01:00
MrZYX
5ac91d771a fixed #507 2011-02-20 13:55:54 +01:00
MrZYX
77cac72ed5 fixed #306 2011-02-20 13:34:22 +01:00
MrZYX
47d2b752c2 updated locales 2011-02-20 13:14:35 +01:00
MrZYX
2b625c468a Merge branch '874-wrong-time-ago-on-notifications' of https://github.com/grzuy/diaspora 2011-02-20 13:03:33 +01:00
MrZYX
af14fa76a1 fixed #881 2011-02-20 13:00:30 +01:00
Sarah Mei
183c840108 And this is why we pair. ::sigh::
(Revert silly change to aspects#index spec.)
2011-02-20 01:54:06 -08:00
Sarah Mei
8c1fc12d82 Don't use sleep when you want different timestamps on your posts. Just set created_at directly. 2011-02-20 01:47:10 -08:00
Sarah Mei
ad141bc5a2 rm -f the fixture builder yml file, to avoid the no-such-file warnings. 2011-02-20 01:17:28 -08:00
Sarah Mei
ee8796fc79 I should know better than to commit after midnight when I'm soloing.
(Let's require the support files in the right order.)
2011-02-20 01:08:13 -08:00
Sarah Mei
dc499293b3 Took 90 seconds off the build. Fixture builder FTFW.
Cleaned up spec_helper - moved stuff into support files.
2011-02-20 00:35:51 -08:00
Sarah Mei
b7815f0d84 I want to know what's making the build take almost 20 minutes. 2011-02-19 23:30:34 -08:00
Gonzalo Rodriguez
ea3b719253 Fixed notifications time-ago calculation 2011-02-20 05:13:34 -02:00
Sarah Mei
5a23907143 Fix cucumber feature for deleting posts. 2011-02-19 22:35:10 -08:00
Sarah Mei
b0d98b9ce8 Add people#show specs around showing the right set of posts. 2011-02-19 22:17:45 -08:00
Sarah Mei
77adc02cbd Fix spec failure related to presence of app config settings. Also, you can't test application controller directly. 2011-02-19 22:17:22 -08:00
Sarah Mei
51df11aafc Fix build failure related to addition of default scope on Contact 2011-02-19 21:44:37 -08:00
Sarah Mei
edf15aa5bd Add specs for people#show when you're viewing your own page 2011-02-19 21:13:30 -08:00
Sarah Mei
11a4544882 Refactor people controller specs to be more sensible 2011-02-19 12:15:37 -08:00
MrZYX
3a26673298 fixed the spec I broke… 2011-02-19 17:55:31 +01:00
MrZYX
aa6ac41d68 remeber sort order 2011-02-19 17:06:26 +01:00
MrZYX
7ab287c3e1 forgot to add a link to the webchat 2011-02-19 14:48:00 +01:00
MrZYX
dcaa84f73d added #diaspora IRC channel to README.md 2011-02-19 14:43:31 +01:00
MrZYX
17c3f0a0ee fixed last bug from #544 2011-02-19 14:41:37 +01:00
MrZYX
11f95ee596 fixed broken css for other languages at account settings page 2011-02-19 14:27:45 +01:00
Jonne Hass
02f7f10ef1 Minimal fix to admins_controller.rb 2011-02-19 04:49:05 -08:00
MrZYX
a13a7ad5c1 fixed some css glitches at the #share_with popup 2011-02-19 13:17:21 +01:00
MrZYX
17daf3c7ca fixed the position of the share button 2011-02-19 13:05:24 +01:00
MrZYX
096e5e577b updated locales 2011-02-19 12:00:07 +01:00
MrZYX
124ac738ea 'sort by:'translatable 2011-02-19 11:39:28 +01:00
Gonzalo Rodriguez
778afa2889 Update locale before loading flash notice on user language update 2011-02-19 02:25:03 -02:00
zhitomirskiyi
199d5fbdc1 the alt text now displays the correct number of contacts in an aspect 2011-02-18 17:44:47 -08:00
zhitomirskiyi
61dd5a835a default scope on contact 2011-02-18 17:38:02 -08:00
maxwell
43f17b3ed8 made toggle for post time on aspects#index 2011-02-18 16:47:44 -08:00
maxwell
3c8a87783f stream order can take created at to be sorted by origin post time 2011-02-18 16:07:22 -08:00
maxwell
37a699ace1 stream order can take created at to be sorted by origin post time 2011-02-18 16:01:04 -08:00
zhitomirskiyi
6dc35c516a added two pending specs for mnutt 2011-02-18 13:15:48 -08:00
maxwell
a1fdd3cdf9 i think the ci app_config has some setup i am unaware of, so this makes it not depend on that setting 2011-02-18 12:38:29 -08:00
maxwell
585ca4820b make redirect_to test more explicit, hopefully 1.9.2 will like it slightly more 2011-02-18 11:58:04 -08:00
maxwell
0bf3cae54a MS IZ added spec from admin page, moved it to its own controller where it belongs 2011-02-18 11:35:24 -08:00
maxwell
c3e101112d add missing translation 2011-02-18 10:32:21 -08:00
MrZYX
ece7cddc51 added license to javascripts.en.yml; better langcodes_alias_map.yml; .gitignore users.yaml fixture 2011-02-18 17:22:19 +01:00
MrZYX
05a7b88899 I need this to run the specs… dunno why 2011-02-18 17:22:19 +01:00
MrZYX
666c040c1d updated locales 2011-02-18 17:21:11 +01:00
Raphael Sofaer
5823da8d25 Make translation failure error out, there are at least 1 uncovered translation failures (share with lightbox) 2011-02-18 11:12:20 -05:00
MrZYX
cc84e349de fixed cucumber for cd7e4d6e8f 2011-02-18 13:36:24 +01:00
maxwell
e3b298c5d4 this may be temp. i want to see if ci passes; Revert "I18n: Workaround for a weired caching issue when multiple users are logged in"
This reverts commit dfa5d875c5.
2011-02-17 19:01:42 -08:00
maxwell
2540c5adb9 adding person and profile to show 2011-02-17 18:15:35 -08:00
zhitomirskiyi
8196ee33dd making instantiating an empty contact 2011-02-17 18:05:22 -08:00
zhitomirskiyi
23754ec3fb added the files 2011-02-17 18:05:21 -08:00
zhitomirskiyi
a68dfbcabc removed the share_with route 2011-02-17 18:05:21 -08:00
zhitomirskiyi
16b7ec3990 pulled out share_with to be contact new and contact show 2011-02-17 18:05:21 -08:00
zhitomirskiyi
25671f07c7 refactor of a line 2011-02-17 18:05:21 -08:00
zhitomirskiyi
ba779e18d6 aspect memberships are now dependant delete_all on contact 2011-02-17 18:05:21 -08:00
zhitomirskiyi
1e6bf9c80e MS IZ the cucumber now passes 2011-02-17 18:05:21 -08:00
maxwell
7ace73b84b iz ms wip fixing contactController destroy 2011-02-17 18:05:21 -08:00
maxwell
8c2e6dd8cb aspect membership refactor complete 2011-02-17 18:05:21 -08:00
maxwell
c6eb5d0340 IZ MS; refactored aspect_membership_controller, moved and updated views accordingly 2011-02-17 18:05:21 -08:00
maxwell
8ae23f5705 wip 2011-02-17 18:05:21 -08:00
maxwell
17a801394e work in progress. need to update the views for the controller changes 2011-02-17 18:05:21 -08:00
maxwell
6858e2e543 crazy ugly admin interface so an admin can invite people, and search for user accounts for basic debugging 2011-02-17 18:00:59 -08:00
Raphael Sofaer
2304827569 Only save the connected person if it has changed 2011-02-17 20:30:38 -05:00
danielvincent
fc9d9a4c55 make the invite friends dialog more obvious 2011-02-17 15:58:37 -05:00
Raphael Sofaer
51bc26c3df Fix notificationscontroller spec 2011-02-17 15:27:50 -05:00
MrZYX
2394d40603 fixed Gemfile for ruby 1.9.1 2011-02-17 18:52:12 +01:00
MrZYX
edef56c84a ruby 1.9 ftw (thanks jrichardlai) 2011-02-17 16:20:27 +01:00
MrZYX
026ced5276 updated locales 2011-02-17 15:46:53 +01:00
MrZYX
b7ce51d206 Merge branch '680-error-on-login-goes-away-quickly' of https://github.com/grzuy/diaspora into flashmsg 2011-02-17 15:34:42 +01:00
MrZYX
dc74aed79b I </3 those performance specs… 2011-02-17 15:23:29 +01:00
Raphael Sofaer
ef9ab553bf require the called migration within the undo migration 2011-02-17 00:35:33 -05:00
Raphael Sofaer
ff4a049d2d It turns out that we need to rewrite validates_uniqueness_of :case_sensitive => false 2011-02-16 23:49:35 -05:00
Raphael Sofaer
cd7e4d6e8f Requests create a read, rather than unread, notification 2011-02-16 23:44:25 -05:00
Raphael Sofaer
6cf8de94a7 take secret token stuff out of chef scripts 2011-02-16 22:46:43 -05:00
Gonzalo Rodriguez
11e431f640 Add flash message above the login form 2011-02-16 23:37:28 -02:00
MrZYX
dfa5d875c5 I18n: Workaround for a weired caching issue when multiple users are logged in 2011-02-16 22:40:18 +01:00
danielvincent
a636ceec7f search does not wildcard on both sides of search term; is less dumb. 2011-02-16 12:41:45 -05:00
MrZYX
2161c1dd72 updated locales 2011-02-16 15:42:23 +01:00
danielvincent
41f077e039 posts are ordered by recent comment activity instead of time created 2011-02-16 02:04:46 -05:00
Dan Hansen
e2ec4c0424 possibly fix the problem with js i18n that occurs on joindiaspora 2011-02-15 22:43:06 -06:00
zhitomirskiyi
90897099bd not double saving photos 2011-02-15 17:24:35 -08:00
maxwell
d1b91e1eac wip, profiles controller and specs, with cucumber failures 2011-02-15 14:17:25 -08:00
David Morley
151b23f77b remove modulization part 2011-02-15 11:11:40 -08:00
David Morley
e3df222d0e move file 2011-02-15 10:42:02 -08:00
MrZYX
f7de3a216a fixed a translation 2011-02-15 15:02:36 +01:00
MrZYX
7fb6c5bcb9 updated locales 2011-02-15 13:43:45 +01:00
MrZYX
ba439b9413 Merge branch '559-posting-empty-messages' of https://github.com/grzuy/diaspora into sharebutton 2011-02-15 13:08:59 +01:00
Gonzalo Rodriguez
2b3926c629 Disable share button when whitespaces on status message input. 2011-02-15 09:50:39 -02:00
Dan Hansen
42fd9a19da now sarahmei can watch revolution OS too! will write tests soon 2011-02-14 23:59:03 -06:00
Paweł Wilk
7f4e048cad Updated to newest version of the i18n-inflector-rails gem 2011-02-15 01:57:10 +01:00
MrZYX
54feaca998 redirect to the start page if there's no referer in photos#show 2011-02-14 22:25:21 +01:00
MrZYX
b4b3fd2bb3 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-14 21:50:54 +01:00
MrZYX
fbaf9d6e84 fixed translation in request accepted mail 2011-02-14 21:50:38 +01:00
maxwell
4111a0ae4e make notifications return json for MuGMaN 2011-02-14 11:59:58 -08:00
MrZYX
614aa3056a updated locales 2011-02-14 17:46:13 +01:00
danielvincent
164fe1c1b5 adjust column width, leading, serifs, etc. in stream for better readability. 2011-02-13 15:27:14 -08:00
zhitomirskiyi
50ea657cd2 put it back for reference 2011-02-13 15:14:27 -08:00
zhitomirskiyi
9f78156206 broke out the en activerecord validations translations to their respective file 2011-02-13 15:09:05 -08:00
MrZYX
965f4e2ea5 another weired case where a photo can have a .status_message_id but no .status_message 2011-02-13 21:08:32 +01:00
MrZYX
20e1316491 it can somehow happen that a person has no profile. somehow. idk why. 2011-02-13 19:29:04 +01:00
MrZYX
86cc7a0d35 added some languages 2011-02-13 13:36:06 +01:00
MrZYX
654be58a87 moved gl-ES to gl and added it to languages.yml 2011-02-13 13:18:58 +01:00
MrZYX
81369176f1 updated locales 2011-02-13 12:02:03 +01:00
MrZYX
935b934b7a Merge branch 'pubphoto' of https://github.com/diasporg/diaspora 2011-02-13 11:56:20 +01:00
danielvincent
ca0d52c8e2 log character counts of status messages and comments 2011-02-13 00:17:34 -08:00
Raphael Sofaer
cac8c586de Forgot that emails are no longer db-unique 2011-02-12 22:44:09 -08:00
Raphael Sofaer
8fabe0f402 Checking in the migration helps. 2011-02-12 22:41:30 -08:00
Raphael Sofaer
753a113aa9 New splunk logs indicate we need more indicies 2011-02-12 21:47:55 -08:00
David Morley
9b88eef832 add photos.show.original_post 2011-02-12 16:11:37 -08:00
Dennis Schubert
2dcbb9bb12 Moved MySQL-recipe to own file and start/stop the service to create the MySQL-system-tables (this should finally fix mysql-recipe) 2011-02-13 01:09:33 +01:00
Dennis Schubert
1a4f580716 Merge branch 'jammitfix' of https://github.com/diasporg/diaspora into diasporg-jammitfix 2011-02-13 00:44:50 +01:00
Raphael Sofaer
10805c1187 Log stacktrace lines from diaspora/lib as well as diaspora/app 2011-02-12 15:43:08 -08:00
David Morley
166039f37a x-git header for pod versioning 2011-02-12 15:20:57 -08:00
David Morley
d030343048 turn off gzip on jammit 2011-02-12 15:08:45 -08:00
David Morley
6df0a25327 fix link to facebox 2011-02-12 14:57:35 -08:00
Raphael Sofaer
6a0a945986 Switch dispatch_post and add_to_streams 2011-02-12 13:36:46 -08:00
MrZYX
3fc2dfb31a Merge branch 'master' of github.com:diaspora/diaspora 2011-02-12 21:31:51 +01:00
MrZYX
cd2d7db7b2 workaround from https://rails.lighthouseapp.com/projects/8994/tickets/5329-using-i18nwith_locale-in-actionmailer-raises-systemstackerror 2011-02-12 21:31:14 +01:00
Raphael Sofaer
8dc3e5efa8 restrict log lines a little further 2011-02-12 12:09:50 -08:00
MrZYX
e76c5068d1 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-12 21:08:06 +01:00
MrZYX
6f4ffee1e4 small fix to logging 2011-02-12 21:07:46 +01:00
Sarah Mei
84d596ee47 Clean up the public/uploads folder after ci runs. 2011-02-12 09:16:12 -08:00
MrZYX
a572637e4c fix a translation 2011-02-12 18:06:56 +01:00
MrZYX
3c089506ff localize emails 2011-02-12 17:35:12 +01:00
MrZYX
8639e08920 updated locales 2011-02-12 14:41:13 +01:00
zhitomirskiyi
936a51578a renamed log line 2011-02-11 23:42:50 -08:00
zhitomirskiyi
971a319764 contacts size 2011-02-11 23:41:21 -08:00
Raphael Sofaer
de475ec4eb Take error out of posting status messages with photos 2011-02-11 19:20:19 -08:00
Raphael Sofaer
3e2c9b4b94 set photo-message relations based on guid on federation 2011-02-11 18:47:26 -08:00
Raphael Sofaer
e43cd3a8da Make error in migration more descriptive 2011-02-11 18:25:58 -08:00
Raphael Sofaer
02a66466fe Abort migration if there are post-visibilities left, so that the db is not left with no index 2011-02-11 18:25:58 -08:00
Raphael Sofaer
31fef1a55d typo in table name 2011-02-11 18:25:58 -08:00
Raphael Sofaer
316292c914 mysql2 result is not an array 2011-02-11 18:25:58 -08:00
Raphael Sofaer
2faf3fe10d delete dup pvs in migration 2011-02-11 18:25:58 -08:00
Raphael Sofaer
88da878c97 Move migration to avoid conflict 2011-02-11 18:25:57 -08:00
Raphael Sofaer
ff0f37ceea eliminate one source of dup pvs 2011-02-11 18:25:57 -08:00
maxwell
2784f641ba fix 500 when viewing a nonexsitaint status message 2011-02-11 18:13:01 -08:00
Raphael Sofaer
d202200a88 tweak copy 2011-02-11 18:04:00 -08:00
maxwell
fd6d6350c8 make html status message create redirect, also correctly name status_messageS_controller_spec.rb 2011-02-11 18:00:23 -08:00
maxwell
e78ab6bca1 make html status message create redirect, also correctly name status_messageS_controller_spec.rb 2011-02-11 18:00:07 -08:00
maxwell
c6bdbc987a strip whitespace on comments 2011-02-11 17:54:37 -08:00
maxwell
4b47de5b9e do not 500 on public photo viewing, also redirect if there is no photo rather than 500ing 2011-02-11 17:47:29 -08:00
zhitomirskiyi
34dbc5a872 added mention created logging statement 2011-02-11 17:36:21 -08:00
zhitomirskiyi
ea3afa6720 added the mention explanation text 2011-02-11 17:31:23 -08:00
maxwell
dc08efacf9 strip mention html for services 2011-02-11 17:13:48 -08:00
Raphael Sofaer
c173bf5104 reorder log line in SQL event 2011-02-11 16:29:38 -08:00
zhitomirskiyi
2b650e6b6d removed person can't be blank error message 2011-02-11 16:29:19 -08:00
Raphael Sofaer
a9eef6018c log bits of caller and a hashcode of caller, we'll probably want to take out logging caller as it may be slow 2011-02-11 15:55:02 -08:00
Raphael Sofaer
ac667b7ecd No SystemTimer on windows 2011-02-11 13:20:47 -08:00
zhitomirskiyi
9f239789b9 can remote the person from the last aspect from edit contact pane 2011-02-11 12:58:01 -08:00
Raphael Sofaer
fcad60d908 Delete empty spec file 2011-02-11 12:18:59 -08:00
Raphael Sofaer
bc22851dd2 Add a little bit of info to create_invitee logging 2011-02-11 12:09:02 -08:00
zhitomirskiyi
3b2d323448 fixed the notifications to call the base_class 2011-02-11 11:49:47 -08:00
Raphael Sofaer
c1844c9be2 Merge remote branch 'lfortin/js-formatting'
Conflicts:
	public/javascripts/web-socket-receiver.js
2011-02-11 11:31:30 -08:00
Raphael Sofaer
cb73922a26 Take extra / out of view, thanks NPerry 2011-02-11 11:23:32 -08:00
Raphael Sofaer
b413513999 Merge remote branch 'rtzn/master' 2011-02-11 11:13:01 -08:00
Raphael Sofaer
8db6f49e64 Log all sql 2011-02-11 11:12:03 -08:00
zhitomirskiyi
6441977a7c added the post author name to the text also commented email 2011-02-11 10:31:20 -08:00
MrZYX
3dbfc85aa9 updated locales 2011-02-11 17:20:07 +01:00
zhitomirskiyi
0e9fdeeab0 destroy 2011-02-10 19:55:30 -08:00
zhitomirskiyi
4033c19323 destroy_all so that the callbacks are called 2011-02-10 19:50:21 -08:00
zhitomirskiyi
34e2b657fd mend 2011-02-10 19:44:25 -08:00
zhitomirskiyi
66fea22f60 mend 2011-02-10 19:24:16 -08:00
zhitomirskiyi
36d7973005 fixed the problem where notifications are not keeping track of the target id as well as making notifications for a mention be destroyed when a post is 2011-02-10 19:23:01 -08:00
zhitomirskiyi
057dcc218d locked the excon version 2011-02-10 17:50:46 -08:00
zhitomirskiyi
f857d87475 fixed photos not being updated 2011-02-10 16:59:30 -08:00
Raphael Sofaer
d17b4340e9 Log milliseconds, not microseconds 2011-02-10 16:02:26 -08:00
Raphael Sofaer
bb58544a70 Add logging for GC (slight slowdown, but worth it for the data) 2011-02-10 15:52:00 -08:00
Raphael Sofaer
0b6375ae63 Increase comment size limit 2011-02-10 15:51:59 -08:00
Raphael Sofaer
d6f886fbe2 Double comment length limit 2011-02-10 15:51:59 -08:00
maxwell
a27b1b2648 make the mention in html email not a link 2011-02-10 14:43:23 -08:00
maxwell
c6e0379a00 fixing engrish in translation 2011-02-10 14:02:36 -08:00
Raphael Sofaer
25aa4255dc Add unix timestamp to request log 2011-02-10 13:57:16 -08:00
zhitomirskiyi
ca7b4e5477 fixed the build 2011-02-10 13:42:31 -08:00
zhitomirskiyi
717d2e09c9 fixed the translation in the email 2011-02-10 12:39:05 -08:00
zhitomirskiyi
d1771bbe17 notifications for mentions 2011-02-10 12:39:05 -08:00
zhitomirskiyi
7b1abacfe6 wip 2011-02-10 12:39:05 -08:00
Raphael Sofaer
f1fe913527 Change up logging a little bit 2011-02-10 11:52:00 -08:00
Raphael Sofaer
7a6d1d3378 add shadow/transparency to autocompletion. removed a hide()/show() from publisher hide and show functions. 2011-02-10 11:09:14 -08:00
Raphael Sofaer
a307519e94 Put avatar on cmment form all the time, fix socketed comment form 2011-02-10 11:05:12 -08:00
Raphael Sofaer
f1c63939f9 Revert "added sliding animation to stream elements, shadow on autocomplete box."
This reverts commit dc760f9583.
2011-02-10 10:36:30 -08:00
MrZYX
4997fbdbd9 updated locales 2011-02-10 15:41:43 +01:00
zhitomirskiyi
1296dde15b this should speed up the finder 2011-02-09 22:39:13 -08:00
danielvincent
dc760f9583 added sliding animation to stream elements, shadow on autocomplete box. 2011-02-09 20:07:25 -08:00
zhitomirskiyi
4105f90aaa forgot to add 2011-02-09 19:07:02 -08:00
Raphael Sofaer
5eb487ed20 204, not 201 2011-02-09 18:04:44 -08:00
zhitomirskiyi
1da965616b added an option to remove a contact from the last aspect, after a prompt 2011-02-09 17:47:27 -08:00
Raphael Sofaer
acd55cf7d6 Put keycodes.js in jasmine 2011-02-09 17:42:53 -08:00
maxwell
b24272474d document s3 in app_config.yml.example 2011-02-09 17:42:21 -08:00
Raphael Sofaer
04f33c8034 Render an empty 201 in users update with a js request 2011-02-09 17:22:45 -08:00
Raphael Sofaer
aaaa00f1c9 Fix cucumber features 2011-02-09 16:34:03 -08:00
Raphael Sofaer
bd38d1436e Today we learned about the order of operations 2011-02-09 16:07:25 -08:00
Raphael Sofaer
7409cd8a27 remove extra sass rule, add db:seed 2011-02-09 16:07:25 -08:00
Raphael Sofaer
7b3a2b07ee Removed n-query, created mentions table 2011-02-09 16:07:25 -08:00
Raphael Sofaer
056bebd4f4 Autocompletion contacts now change with changing aspect selection 2011-02-09 16:07:25 -08:00
Raphael Sofaer
c11ffe93c0 Actually close the publisher on and with Publisher.close() 2011-02-09 16:07:25 -08:00
Raphael Sofaer
cb67c14a51 Make cap deploy follow a branch in deploy_config.yml 2011-02-09 16:07:24 -08:00
Raphael Sofaer
f8cec95d7a no authentication, n-query in stream 2011-02-09 16:07:24 -08:00
Raphael
0000185875 Status messages now process mentions and output links 2011-02-09 16:07:24 -08:00
Raphael Sofaer
99f84de368 Javascript for mentions is functional 2011-02-09 16:07:24 -08:00
Raphael Sofaer
70c61270dc Fix up and down arrows 2011-02-09 16:07:24 -08:00
Raphael Sofaer
0ec2d918bb adding keycodes file, moving keyup stuff to keydown 2011-02-09 16:07:24 -08:00
danielvincent
2b25823253 autocomplete wip. separated keyup and keydown. wip. 2011-02-09 16:07:24 -08:00
danielvincent
6eafd73d2c publisher does inline mentions and sets the cursor to the end of the newly inserted result 2011-02-09 16:07:24 -08:00
danielvincent
3efc31c68f mention js working minus tracking keypresses with the hidden message field. 2011-02-09 16:07:24 -08:00
danielvincent
7d21f7bfdd publisher autocomplete correctly adds name into status_message_fake textarea 2011-02-09 16:07:24 -08:00
danielvincent
77403596aa mentions in publisher autocomplete within context 2011-02-09 16:07:24 -08:00
Raphael Jedidiah Sofaer
150f676332 Do a bunch of work on publisher autocompletion JS 2011-02-09 16:07:23 -08:00
Raphael
216a2c3cdb write formatted_message 2011-02-09 16:07:23 -08:00
Raphael Sofaer
51e129b5c6 Don't call hashes_for_people if it is a json request in search 2011-02-09 16:05:02 -08:00
zhitomirskiyi
dbf1452968 fixed an outdated integration test 2011-02-09 15:59:17 -08:00
zhitomirskiyi
e75c285049 added created_at 2011-02-09 15:07:47 -08:00
Sarah Mei
d872467d2c Add fuubar for nicer spec output 2011-02-09 14:46:12 -08:00
Sarah Mei
10d96be3c3 someone forgot to check in schema.rb? 2011-02-09 14:45:31 -08:00
zhitomirskiyi
e4d9ec64cd moved tests and slayed the profile not updating bug 2011-02-09 13:33:42 -08:00
MrZYX
4328f72bfb fixed piwik 2011-02-09 19:37:05 +01:00
MrZYX
f0650a6135 updated locales 2011-02-09 17:05:47 +01:00
Nicolas Berens
60b08b9b08 Merge remote branch 'upstream/master' 2011-02-09 06:56:07 +01:00
zhitomirskiyi
41d21c78ef mend 2011-02-08 18:53:18 -08:00
zhitomirskiyi
6be63b88f0 added the pending request to the finder 2011-02-08 18:53:18 -08:00
danielvincent
80117d8ab6 added piwik and ga options to mobile layout 2011-02-08 17:39:41 -08:00
zhitomirskiyi
eecf1d5d82 fixed cucumber, localization, and css 2011-02-08 17:14:37 -08:00
zhitomirskiyi
4e96d11cd0 Revert "refactored local person person friend finder functionality to use the partial"
This reverts commit 9f4035ab019803fc53844e70884b0519142deb18.

Conflicts:

	app/views/services/_remote_friend.html.haml
	app/views/users/getting_started/_step_3.html.haml

refactored invitations, added them to the last page

fixed styling on adding an aspect to the aspect list

added a facebook for person edit aspect memberships

touched up and simplified sign-up flow

fix styling on step 3
2011-02-08 16:40:33 -08:00
zhitomirskiyi
d147da1b4a invitation text
setting the invites

added requests to the fb hash

finder has options

remove the requester from the list

typo

making a block

another typo

remove the if statement for the notifications

checking on the right field

translations and correct indenting

fixed stuff added

added a temp puts

added a temp puts

now actually referencing the service

not double nesting

remove stream element

updated remote friends to old style

removed it from the h1 block

putting the stream element back
2011-02-08 16:40:32 -08:00
zhitomirskiyi
df4ebb286d accept invitation feature passing
wip, added a form to add aspect to the contact list

added files

typo

render the partial

remote friend

specifying the provider for the route

refactored local person person friend finder functionality to use the partial

typo

trying to use the stream
2011-02-08 16:40:28 -08:00
zhitomirskiyi
a398184081 WIP 2011-02-08 16:35:33 -08:00
zhitomirskiyi
7241177421 translating the warning about removing the person from the last aspect 2011-02-08 15:44:12 -08:00
zhitomirskiyi
a06ba9105b uniqueness of aspect name through user non case sensitive 2011-02-08 14:52:47 -08:00
maxwell
a649d18cd7 add tests to see if timestamps are updated on recevie...they are not 2011-02-08 14:07:25 -08:00
Nicolas Berens
024ecc1752 Fixed small layout glitch 2011-02-08 17:11:09 +01:00
MrZYX
6e0e46435e localize dates 2011-02-08 16:26:56 +01:00
MrZYX
2c06397fd9 updated locales 2011-02-08 15:06:12 +01:00
danielvincent
151999c582 reference the right thing in mobile views 2011-02-06 23:49:22 -08:00
danielvincent
01cfeb65b2 fixed build 2011-02-06 23:42:01 -08:00
danielvincent
bf20e5a9e8 remove some js assets from mobile 2011-02-06 23:09:04 -08:00
danielvincent
42993de739 added back to comments; avatar. 2011-02-06 09:26:24 -08:00
MrZYX
b26e214001 updated locales 2011-02-06 16:04:06 +01:00
zhitomirskiyi
c2d26e21c3 added a mobile invitation acceptance view, skipping getting started for now 2011-02-05 20:19:47 -08:00
zhitomirskiyi
e3170504b8 using blank instead of checking for nil, since mongo import make these bank 2011-02-05 16:53:14 -08:00
zhitomirskiyi
80da5917fa gave more space to the already invited span 2011-02-05 15:56:08 -08:00
zhitomirskiyi
59f0dca7c7 Revert "publisher is now a hot widget"
This reverts commit 8039ab312a.
2011-02-05 15:24:20 -08:00
zhitomirskiyi
4a925d192f refactored the api 2011-02-05 15:01:05 -08:00
zhitomirskiyi
78c30b847e added files 2011-02-05 15:01:04 -08:00
zhitomirskiyi
b49f54144e resending of invitation in resque and works 2011-02-05 15:01:04 -08:00
zhitomirskiyi
2c1c2a4a8a WIP 2011-02-05 15:01:04 -08:00
zhitomirskiyi
83a9e916e4 resending of invitation in resque and works 2011-02-05 15:01:04 -08:00
zhitomirskiyi
da6e16b3a4 WIP 2011-02-05 15:01:04 -08:00
Dan Hansen
8039ab312a publisher is now a hot widget 2011-02-05 16:47:43 -06:00
Dan Hansen
d533f46cd7 update widget regardless of scroll count 2011-02-04 15:21:42 -06:00
MrZYX
5b1737b817 updated locales 2011-02-04 19:11:39 +01:00
maxwell
ce010c24ec update jquery mobile to a3 2011-02-03 20:41:38 -08:00
maxwell
ee02a073cd toggle mobile site, when mobile device 2011-02-03 18:43:56 -08:00
maxwell
35bc4e3aad attempt to rebind infield labels on comment form 2011-02-03 18:43:56 -08:00
Dan Hansen
22c1743886 only use more button have inf scroll happens 3 times 2011-02-03 20:38:49 -06:00
zhitomirskiyi
1fbcb3c3e5 added a special case for share bc js being slow 2011-02-03 16:16:45 -08:00
maxwell
1ed737c3b9 make aspects a link, and remove a big db query from the view 2011-02-03 16:15:51 -08:00
maxwell
9879a6eb99 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-03 15:21:59 -08:00
zhitomirskiyi
41bb7a8564 blank instead of nil 2011-02-03 15:16:00 -08:00
maxwell
84325edeb8 Revert "added prune method"
This reverts commit 7078937311.
2011-02-03 15:10:54 -08:00
maxwell
7078937311 added prune method 2011-02-03 14:47:04 -08:00
danielvincent
7668e8d262 fix mobile_fu/ipad issue 2011-02-03 14:11:26 -08:00
zhitomirskiyi
d905021252 comment emails have text 2011-02-03 13:07:26 -08:00
danielvincent
8269e4b300 touched up photo show and status message show pages 2011-02-03 13:05:25 -08:00
danielvincent
9922c42f5e corrected searchbox autocomplete width 2011-02-03 12:59:03 -08:00
Raphael
460f25e848 run gladiac's migration, rename migration file so it finds class 2011-02-03 11:55:36 -08:00
Raphael
8c9aa2242b Merge remote branch 'gladiac/835-fixed-mysql-migration' 2011-02-03 11:30:14 -08:00
MrZYX
9ae6ba4d66 updated locales 2011-02-03 15:35:59 +01:00
Raphael
636242283b Fix cucumber features 2011-02-02 18:49:45 -08:00
Raphael
7c59a5b4bd Schema changed on rebuild 2011-02-02 18:24:53 -08:00
Raphael
3114672989 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-02 18:13:03 -08:00
Sarah Mei
e7cf5fc841 Fix/expand cucumber feature for new user signup.
Replace "wait for aspects page"-type steps with general wait for step.
2011-02-02 17:17:00 -08:00
Raphael
8a2e0eef7c No semicolons in names 2011-02-02 16:57:04 -08:00
maxwell
7bfaf462c8 zomg actually set the db and use it 2011-02-02 15:33:19 -08:00
maxwell
450696fa60 added db to variables 2011-02-02 15:31:55 -08:00
maxwell
228c1a85e8 add equals 2011-02-02 15:12:51 -08:00
maxwell
f97c4ae5c9 adding loading of user and password from database.yml 2011-02-02 15:09:19 -08:00
maxwell
94135827ce add mysql dump cron and task 2011-02-02 14:55:13 -08:00
Raphael
cd8d9989cf Refactor publisher JS, use hidden field for submitting 2011-02-02 14:27:14 -08:00
Sarah Mei
a687f26961 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-02 14:22:20 -08:00
Sarah Mei
b84836ed95 Merging close_account.feature and closes_account.feature 2011-02-02 14:22:07 -08:00
maxwell
3b77663481 people controller takes so much time on CI 2011-02-02 13:37:54 -08:00
maxwell
34a0abe0c8 fix 500 on mobile notifications page 2011-02-02 13:14:34 -08:00
Dan Hansen
286dcef0f0 only hide pagination in #main_stream divs 2011-02-02 14:14:47 -06:00
Raphael
ff3f376c07 Fix cucumber feature 2011-02-02 11:56:39 -08:00
Raphael
3fb6b0e072 Fix saved state cucumber feature 2011-02-02 11:52:56 -08:00
Andreas Schneider
aa6d616d69 db: person_id can only be updated if index is updated too.
This fixes the following error:

Mysql2::Error: Duplicate entry '0' for key
'index_profiles_on_person_id': ALTER TABLE `profiles` CHANGE `person_id`
`person_id` int(11) NOT NULL
2011-02-02 20:37:55 +01:00
Andreas Schneider
e63b605b2a db: Create limited varchar to be able to add index. 2011-02-02 20:37:55 +01:00
Andreas Schneider
8bdc3ec35a db: Alter the import tables to avoid a mysql bug. 2011-02-02 20:37:55 +01:00
Andreas Schneider
2ddd810dea db: Fixed the migration of the database.
The limit down to 127 is needed cause of a long time bug in mysql. The
error message looks like this when creating an index.

Mysql2::Error: Specified key was too long; max key length is 1000 bytes

So with utf8 (3 bytes for one char) you exceed this with two
varchar(255).

See http://bugs.mysql.com/bug.php?id=4541
2011-02-02 20:37:55 +01:00
danielvincent
693ad112ba stream element sockets in non-mobile 2011-02-02 11:29:37 -08:00
Sarah Mei
73ea3c60a0 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-02 11:14:36 -08:00
Sarah Mei
9a6fca87ff Re-enable running a single cucumber feature on the command line 2011-02-02 11:13:59 -08:00
Dan Hansen
82db655a56 make the markup between _comment and _stream_element more consistent, fix embedder in comments 2011-02-02 12:55:16 -06:00
Sarah Mei
9a618d4dc0 Try removing all cached gems for REE before bundle installing on CI 2011-02-02 09:52:20 -08:00
Sarah Mei
a8d6fcd952 remove gem cache before bundle install on ci 2011-02-02 08:55:56 -08:00
Sarah Mei
1de4976915 remove histories table from schema.rb. this is why you don't edit or revert migrations >.< 2011-02-02 08:54:57 -08:00
MrZYX
99cf9904f9 put jquery-ui back in as we need it for /aspects/manage at least 2011-02-02 16:56:50 +01:00
MrZYX
5ed587ddcd updated locales 2011-02-02 16:23:12 +01:00
maxwell
d040380e57 fix data conversion spec, ILYA 2011-02-01 22:27:07 -08:00
maxwell
d4f99ca080 move search init to search.js, because mobile does not have search to init 2011-02-01 22:13:52 -08:00
maxwell
67ed035f21 make notifications updated_at rather than created at 2011-02-01 21:45:36 -08:00
zhitomirskiyi
6694485388 added the cucumber feature back in 2011-02-01 18:13:48 -08:00
zhitomirskiyi
34e5ba99bc removed the image or default 2011-02-01 18:11:02 -08:00
zhitomirskiyi
358bf0a856 fix migration on open aspects boolean 2011-02-01 17:56:16 -08:00
zhitomirskiyi
21e3c2ae73 Merge branch 'open-aspects'
Conflicts:
	app/controllers/aspects_controller.rb
	app/controllers/home_controller.rb
	app/helpers/application_helper.rb
	db/migrate/20110201013408_add_open_aspects_to_user.rb
	spec/controllers/aspects_controller_spec.rb
	spec/controllers/home_controller_spec.rb
2011-02-01 17:32:08 -08:00
zhitomirskiyi
59f1bff046 storing it as a boolean in the aspect 2011-02-01 17:25:15 -08:00
zhitomirskiyi
7f026e8271 now updating the open aspects in js 2011-02-01 16:58:33 -08:00
Raphael
06a6cf7fac Adjust autocomplete options and css 2011-02-01 15:07:03 -08:00
Raphael
bbe47fbb55 Correct limit on search autocomplete 2011-02-01 14:35:14 -08:00
MrZYX
423cd7807b Merge branch 'master' of github.com:diaspora/diaspora 2011-02-01 22:45:28 +01:00
MrZYX
7ca8391739 Javascript I18n: fallback to DEFAULT_LANGUAGE for missing keys 2011-02-01 22:45:02 +01:00
Raphael
cfd6639f4d Revert "Merge branch 'open-aspects'"
This reverts commit 181bd823c4, reversing
changes made to 2c3ed2ab73.
2011-02-01 13:15:20 -08:00
MrZYX
15329af94d made "Search for" translatable 2011-02-01 21:55:28 +01:00
zhitomirskiyi
bc058332d3 commented on post email now includes the comment 2011-02-01 12:54:05 -08:00
zhitomirskiyi
27f1231479 Merge branch 'master' of github.com:diaspora/diaspora 2011-02-01 12:11:49 -08:00
zhitomirskiyi
181bd823c4 Merge branch 'open-aspects' 2011-02-01 12:10:12 -08:00
zhitomirskiyi
55403d9bea the saved aspects works properly now 2011-02-01 12:07:18 -08:00
Raphael
7d18e2bcd8 Finish autocomplete 2011-02-01 11:56:56 -08:00
Raphael
518642d0d7 Move image_url defaulting logic into profile 2011-02-01 11:56:56 -08:00
Raphael
7be232e33e autocomplete wip 2011-02-01 11:56:56 -08:00
Raphael
9080649180 Starting work on an autocomplete feature 2011-02-01 11:56:56 -08:00
maxwell
2c3ed2ab73 making this feature fail because the publisher is not shown, by rendering this test in a browser 2011-02-01 10:09:50 -08:00
MrZYX
9600378178 Merge branch 'cucumber_fixes' of https://github.com/dangold1138/diaspora 2011-02-01 17:01:55 +01:00
MrZYX
d8f5607509 updated locales 2011-02-01 16:56:29 +01:00
Dan Hansen
cdb5cf37e7 show publisher if it was closed when you select another aspect 2011-02-01 00:40:11 -06:00
maxwell
06013fabec fix sm show 2011-01-31 21:50:06 -08:00
maxwell
13f482f3fe Merge branch 'master' of github.com:diaspora/diaspora 2011-01-31 21:45:05 -08:00
maxwell
aeb33432af Revert "WIP"
This reverts commit 8898650842.
2011-01-31 21:41:23 -08:00
maxwell
7bb7bb396a Revert "persists open aspects across logins also fixed the status message controller spec broken in master"
This reverts commit 9e7f03236e.
2011-01-31 21:41:05 -08:00
Sarah Mei
59a6c3b3a0 Fix import database errors by not importing notifications 2011-01-31 21:36:10 -08:00
Dan Hansen
13608fbdad hide pagination links, deja vu, max? 2011-01-31 23:13:23 -06:00
Dan Goldenberg
2567a9441e Added notification.feature 2011-01-31 18:42:34 -08:00
Dan Goldenberg
58bc4f7387 fixed the viewing a requests profile scenario 2011-01-31 18:42:34 -08:00
zhitomirskiyi
9e7f03236e persists open aspects across logins also fixed the status message controller spec broken in master 2011-01-31 18:37:20 -08:00
zhitomirskiyi
8898650842 WIP 2011-01-31 18:37:20 -08:00
zhitomirskiyi
789ff679a9 persists open aspects across logins also fixed the status message controller spec broken in master 2011-01-31 18:31:41 -08:00
zhitomirskiyi
a68bdd6118 WIP 2011-01-31 15:52:56 -08:00
Raphael
c56eaadfa0 Make person profile a little bit aware of an incoming request 2011-01-31 15:47:01 -08:00
Raphael
0e2243e620 use capture and captures to detect thins in /service 2011-01-31 15:28:43 -08:00
Raphael
e3a5102624 incoming request on person show should just link to share_with 2011-01-31 15:28:43 -08:00
Raphael
906de27922 Make notifications/read_all non-ajax, link back to index page 2011-01-31 15:28:43 -08:00
Raphael
a2bb8515f9 Update cap scripts to have separate staging and production environments, use bundler 2011-01-31 15:28:43 -08:00
zhitomirskiyi
a6c1b5bf59 mark notification as read on the status message show page 2011-01-31 15:26:20 -08:00
zhitomirskiyi
7a667abc73 unread true on notification receive 2011-01-31 15:09:01 -08:00
zhitomirskiyi
d6ab633e2c Merge branch 'notification-migration' 2011-01-31 14:41:15 -08:00
Dan Hansen
2e03c7f9f6 forgot to remove these files from my previous commit 2011-01-31 15:23:04 -06:00
Dan Hansen
3746d296b0 fix dom traversing for embedder 2011-01-31 15:15:30 -06:00
zhitomirskiyi
a789be737a also making sure that the notification actor id is unique in the keep delete table 2011-01-31 11:42:49 -08:00
zhitomirskiyi
2d078a212a remove mongo id from the notifications table 2011-01-31 11:31:59 -08:00
zhitomirskiyi
7cb23fd803 added a select for the actor id to group by it 2011-01-31 11:27:56 -08:00
zhitomirskiyi
03e8aa31f4 fixed notifications migration 2011-01-31 11:02:51 -08:00
MrZYX
391a9b0de5 translate contacts in _header.haml 2011-01-31 19:48:36 +01:00
zhitomirskiyi
ac50a0119a spec for not raising on already existant actor 2011-01-31 10:23:26 -08:00
MrZYX
0c802677c4 updated locales 2011-01-31 14:33:10 +01:00
Dan Goldenberg
63e2ef4a31 Fixed yogurt spelling 2011-01-31 00:49:41 -08:00
Sarah Mei
c40a266910 Deploy with capistrano. 2011-01-30 22:00:32 -08:00
Sarah Mei
c0bb1e8c7c Adding config/deploy_config.yml to gitignore 2011-01-30 21:53:50 -08:00
Sarah Mei
25dc3bab8f removing config/deploy_config.yml from git 2011-01-30 21:52:38 -08:00
zhitomirskiyi
cfef9a747e all green 2011-01-30 20:10:34 -08:00
Dan Hansen
a5365559d7 specs for view.flashes.render 2011-01-30 16:01:28 -06:00
zhitomirskiyi
a4988a28b4 WIP 2011-01-30 10:00:03 -08:00
Dan Hansen
0c94660806 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-30 11:43:31 -06:00
Dan Hansen
313f87ebb9 make the ajax loader appear in a box 2011-01-30 11:43:17 -06:00
MrZYX
3b3807e8df updated locales 2011-01-30 10:10:53 +01:00
MrZYX
f487df2961 added javascripts:timeago to the master file 2011-01-30 09:27:12 +01:00
MrZYX
9e457f30ae moved javascript translations to their own files 2011-01-30 09:24:57 +01:00
zhitomirskiyi
17dde3a7b9 farther along towards getting the specs to pass 2011-01-29 23:58:48 -08:00
zhitomirskiyi
17a2c9e311 moving over some code migration successful 2011-01-29 23:34:11 -08:00
zhitomirskiyi
3119fc660f another space 2011-01-29 20:56:21 -08:00
maxwell
6dffdd8152 don't remove these methods 2011-01-29 18:58:34 -08:00
zhitomirskiyi
2b4d27d2cf another typo 2011-01-29 18:53:13 -08:00
zhitomirskiyi
5d3e08227e whitespace 2011-01-29 18:46:05 -08:00
maxwell
348ae0b61d small hack to add some feedback when links are tapped on the mobile site. 2011-01-29 18:42:50 -08:00
zhitomirskiyi
05cab33dad notification migration need to try it out 2011-01-29 18:36:04 -08:00
Dan Hansen
55bee713e9 add more specs 2011-01-29 16:45:03 -06:00
Dan Hansen
7417dc5923 remove debugging statement, fix youtube phrasing 2011-01-29 16:41:28 -06:00
Dan Hansen
099e0a6e24 i18n is the first widget to be loaded, add video locales, embedder uses i18n, only render mustache template with i18n if the views are passed 2011-01-29 16:40:10 -06:00
Dan Hansen
a6530f4db1 fix yaml structure 2011-01-29 16:09:19 -06:00
Dan Hansen
4b1b7591a6 load diaspora.js and widgets right after vendor/*, return empty string if the value is not found 2011-01-29 16:07:12 -06:00
Dan Hansen
be2413b9a8 load timeago widget 2011-01-29 16:02:04 -06:00
Dan Hansen
5040a37a31 whoops, missed a semicolon 2011-01-29 15:59:39 -06:00
maxwell
5267365b4f move js strings to application helper 2011-01-29 13:54:28 -08:00
Dan Hansen
4484bf33fa fix javascript i18n specs 2011-01-29 13:31:45 -08:00
Dan Hansen
9046273ebd some specs for the i18n widget 2011-01-29 13:31:45 -08:00
Dan Hansen
b89a59ca55 update timeago usages 2011-01-29 13:30:32 -08:00
Dan Hansen
0831ad6e40 move i18n.loadLocale to the application template, remove localize controller & helper, renamed localize to get_javascript_strings_for and added it to the application helper 2011-01-29 13:29:54 -08:00
Dan Hansen
ee218ecd44 get rid of the hacky callbacks 2011-01-29 13:28:43 -08:00
Dan Hansen
3078156dbb javascript i18n wip 2011-01-29 13:28:43 -08:00
Dan Hansen
7089782ba1 things having to do with publisher belong in publisher.js not stream.js 2011-01-29 14:42:59 -06:00
Dan Hansen
d03119f7e9 Embedder is now a widget, show videos before comments 2011-01-29 13:22:34 -06:00
MrZYX
8150cd4317 remove mongodb from app_config.yml.example 2011-01-29 15:38:26 +01:00
MrZYX
f371ac9c74 updated locales 2011-01-29 15:07:10 +01:00
zhitomirskiyi
8c77f65cdb notes for later 2011-01-29 02:01:40 -08:00
zhitomirskiyi
d7f06b9e6e removed commented out non working migration code for now 2011-01-28 22:39:29 -08:00
zhitomirskiyi
74e0d03b8f wip' 2011-01-28 22:39:29 -08:00
zhitomirskiyi
9d4d0cecdb wip 2011-01-28 22:39:29 -08:00
zhitomirskiyi
f48d7a0826 wip 2011-01-28 22:37:38 -08:00
zhitomirskiyi
5940292840 build should be green now 2011-01-28 21:21:14 -08:00
Raphael
7302a54710 Fix translation missing error 2011-01-28 17:50:34 -08:00
danielvincent
e3f4ae1cc7 fixed button styling 2011-01-28 17:42:04 -08:00
Raphael
ac4880cb0d scope translations correctly 2011-01-28 17:39:41 -08:00
Raphael
d545900759 Delete comments of a deleted person, until we implement tombstoning 2011-01-28 17:34:32 -08:00
zhitomirskiyi
9d091bbf6a facebook invitations actually work 2011-01-28 17:22:18 -08:00
Raphael
07850c7cb2 fix fb finder, flesh out test 2011-01-28 17:13:20 -08:00
Raphael
8151f3b540 correct partial name 2011-01-28 16:54:30 -08:00
Raphael
7339e46bfb Moving remote friend view out to a partial 2011-01-28 16:42:43 -08:00
zhitomirskiyi
a8ac403e30 share with action for people who are already on diaspora 2011-01-28 16:37:11 -08:00
Raphael
605e70f095 Do application side join to retrieve contacts for fb finder, rather than n query 2011-01-28 16:26:52 -08:00
danielvincent
ae8686ef25 add which_action_and_user to application_controller 2011-01-28 16:15:50 -08:00
Raphael
2dfb9f9618 remove unused method 2011-01-28 15:18:22 -08:00
zhitomirskiyi
c3a30bb481 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-28 13:46:33 -08:00
zhitomirskiyi
3b68fc3e9a the friend finder is respecting of searchable 2011-01-28 13:45:58 -08:00
denschub
ba532536e3 Fixed bug in sod-thin.yml 2011-01-28 22:17:12 +01:00
denschub
9040d60977 Added mysql to deamontools-recipe 2011-01-28 22:17:12 +01:00
denschub
9001728772 Fixed bugs in nginx.conf-template 2011-01-28 22:17:12 +01:00
denschub
65d581770e Added mysql-install 2011-01-28 22:17:12 +01:00
Raphael
ca76572eae Include profile in services finder 2011-01-28 12:49:30 -08:00
Raphael
dde8fd65e5 Fix build 2011-01-28 12:18:56 -08:00
danielvincent
d04a8bff09 changes weren't added last commit 2011-01-28 12:04:24 -08:00
danielvincent
80fbfd77e8 socketed stream elements now don't come in as their mobile partial 2011-01-28 12:02:36 -08:00
Raphael
767e58bf94 Correct email picture url 2011-01-28 11:43:15 -08:00
Raphael
5967ce25fd add spec for youtube_titles 2011-01-28 11:43:15 -08:00
zhitomirskiyi
3f42c5bdb9 fixed cucumber features 2011-01-28 11:26:08 -08:00
zhitomirskiyi
ced2c18da1 remove caching the footer due to localization issues 2011-01-27 14:17:50 -08:00
zhitomirskiyi
f5ad03f5d9 added visiblity for new aspect on getting started 2011-01-27 13:58:59 -08:00
zhitomirskiyi
897786bce4 able to send email invites if the pod is not fb connected 2011-01-27 13:53:53 -08:00
maxwell
0913389698 fix the null person ID bug in profile 2011-01-27 13:44:37 -08:00
zhitomirskiyi
3ebda174fb make aspect list visible option on new_aspect pane 2011-01-27 13:41:23 -08:00
zhitomirskiyi
dcf6469ded visible contacts option on aspect edit pane 2011-01-27 13:41:22 -08:00
Raphael
94ae7a678b Placeholder views for contacts_visible in aspects 2011-01-27 13:41:22 -08:00
Raphael
a8306f9f37 don't select duplicate people 2011-01-27 13:41:22 -08:00
Raphael
31e4683183 Finished contacts of contacts for local users 2011-01-27 13:41:22 -08:00
Raphael
a23290986a add contacts_visible field in aspects 2011-01-27 13:41:22 -08:00
MrZYX
86ab893a63 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-27 21:04:12 +01:00
MrZYX
cbfefc8fc3 fixed some untranslatable strings, thanks to Nygu 2011-01-27 21:04:03 +01:00
Raphael
a6f8b2c14e Add splunk logging for errors 2011-01-27 11:44:35 -08:00
zhitomirskiyi
0fa0b7e950 fixed syntax error in mobile layout. removed ipad from mobile_fu 2011-01-27 11:30:15 -08:00
zhitomirskiyi
01ce26cbf3 fixed errror on services inviter action, specs 2011-01-27 10:58:09 -08:00
maxwell
a705824b0c make invites default to 5 again 2011-01-27 10:36:02 -08:00
MrZYX
bd6617ea55 Merge branch 'added_feature_close_account' of https://github.com/jairodiaz/diaspora 2011-01-27 19:22:31 +01:00
MrZYX
cf0a090704 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-27 19:22:03 +01:00
zhitomirskiyi
62c8685154 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-27 10:19:52 -08:00
zhitomirskiyi
c997f6ee05 fix finder controller action 2011-01-27 10:19:38 -08:00
MrZYX
9230bf5fe1 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-27 19:06:54 +01:00
maxwell
644dfb0fd3 remove sass cache 2011-01-27 09:53:31 -08:00
Philip Champon
0588dafe6b added enumeration to args and a spec to verify it 2011-01-27 12:46:02 -05:00
MrZYX
087e0389bb Merge branch '712-route-for-login' of https://github.com/TomK32/diaspora 2011-01-27 18:38:51 +01:00
MrZYX
60c0c4dc76 Merge branch '819-checks-for-redis-conf-in-usr-local-etc' of https://github.com/Dorian/diaspora
Conflicts:
	script/server
2011-01-27 18:29:18 +01:00
MrZYX
45c590a3bf Merge branch 'fix_typo_at_default_language' of https://github.com/jairodiaz/diaspora 2011-01-27 18:27:23 +01:00
MrZYX
1c344f97f8 Merge branch 'fix-signin-button' of https://github.com/lfortin/diaspora 2011-01-27 18:25:50 +01:00
MrZYX
14f4e1aa57 some fixes to the translations of the mobile site 2011-01-27 18:20:25 +01:00
MrZYX
eba99c84ba made 'mark all as read' translatable 2011-01-27 17:13:27 +01:00
MrZYX
e9dddca86d updated locales 2011-01-27 17:04:39 +01:00
Dan Goldenberg
30baff22ea Added close_account feature and added scenarios to other features 2011-01-26 23:39:59 -08:00
zhitomirskiyi
0ba9889025 removed bug in finder view 2011-01-26 18:50:02 -08:00
zhitomirskiyi
2b8635f0aa hide share request button for people already on diaspora in friend finder (for now) 2011-01-26 18:44:17 -08:00
zhitomirskiyi
4fb271b3bb removed the aspect settings 2011-01-26 18:42:57 -08:00
Raphael
f892a00b99 Fix data conversion, fixture generation in publicscontroller 2011-01-26 18:39:09 -08:00
Raphael
b67aca0ffc Put in a lot of non nullable fields, edit the specs to match, drop a couple superfluous columns 2011-01-26 18:29:23 -08:00
zhitomirskiyi
a037575ebc added invites in the tests 2011-01-26 18:14:17 -08:00
zhitomirskiyi
1bb5f9f983 only allow invites if invite count > 0 for current user 2011-01-26 18:08:57 -08:00
zhitomirskiyi
bc81154c46 consolidated invite/invite friends sections on aspect/index 2011-01-26 18:05:42 -08:00
zhitomirskiyi
9bd6b11ddf made facebox wider, remove disable with, added default profile photo for those not connected to diaspora 2011-01-26 17:50:49 -08:00
zhitomirskiyi
8941448866 placed friend finder in facebox. added translations 2011-01-26 17:44:40 -08:00
zhitomirskiyi
49f5f15b98 properly call translations in services controller 2011-01-26 17:02:07 -08:00
zhitomirskiyi
a610618057 display resend link if already sent invitation in friend finder 2011-01-26 16:57:39 -08:00
zhitomirskiyi
906dd8d6d4 added the migration 2011-01-26 16:32:51 -08:00
zhitomirskiyi
9e22f4a6e6 checks if you already invited the person 2011-01-26 16:31:34 -08:00
zhitomirskiyi
1a911a8b99 translation of invitation message, better checking of existing users and unique index on user(invitation_service and invitation_identifier) 2011-01-26 16:01:57 -08:00
Paweł Wilk
1eb0d3bbab Depends on the version 0.2.x of i18n-inflector-rails which has some improvements 2011-01-27 00:32:03 +01:00
zhitomirskiyi
6242ac64ed removed unique index on email to a regular index in order to make inviting users through fb work (no email present) 2011-01-26 15:04:46 -08:00
zhitomirskiyi
be57170bf9 added the empty email spec 2011-01-26 14:22:04 -08:00
zhitomirskiyi
8bc857cf4d updated devise added a devise_invitable fork and performed migration 2011-01-26 13:46:50 -08:00
zhitomirskiyi
ab41a5f24a friend finder has invite buttons and aspect dropdowns 2011-01-26 13:03:53 -08:00
zhitomirskiyi
89a8817ce6 made service#invite redirect to the right place 2011-01-26 12:16:48 -08:00
zhitomirskiyi
3392f11b64 Job::InviteUser -> Job::InviteUserByEmail 2011-01-26 12:16:48 -08:00
zhitomirskiyi
5c5e450a1e Invitation.new_or_existing_user_by_email -> Invitation.new_or_existing_user_by_service_and_identifier 2011-01-26 12:16:47 -08:00
zhitomirskiyi
a92d5f41c9 added the migration to invitation_service and invitation_identifier 2011-01-26 12:16:47 -08:00
zhitomirskiyi
d595a64169 new interface to send invitation WIP 2011-01-26 12:16:47 -08:00
zhitomirskiyi
b3467b5d17 pending specs for facebook inviter 2011-01-26 12:16:47 -08:00
zhitomirskiyi
e56ba84094 friend finder basic styling 2011-01-26 12:16:47 -08:00
zhitomirskiyi
cf45f31712 facebook friend finder is now contact-aware 2011-01-26 12:16:47 -08:00
zhitomirskiyi
d976bf0966 fixed bug in facebook service finder 2011-01-26 12:16:46 -08:00
zhitomirskiyi
f3f38cf4fd fetch person object associated with facebook id in friend finder 2011-01-26 12:16:46 -08:00
zhitomirskiyi
8bc52cdb55 facebook friend finder gathers fb friends. 2011-01-26 12:16:46 -08:00
Raphael
e890d73de7 Remove mocha 2011-01-26 11:52:14 -08:00
Raphael
f9fbb63ecb Make 'not sharing' a button, eliminate xss in alert 2011-01-26 11:26:14 -08:00
Raphael
7399caa066 Fix require in ws server 2011-01-26 11:05:50 -08:00
Raphael
c57ef8853c un-wip delete post feature 2011-01-26 10:50:26 -08:00
Raphael
91bfdf0e75 Roll back infinite scroll plugin 2011-01-26 10:33:08 -08:00
Raphael
f3e655b10d Make disruptive cucumber feature wip 2011-01-25 18:25:33 -08:00
Raphael
e4ad229a5a Requestors are now high in search 2011-01-25 18:24:11 -08:00
maxwell
4e60d2b92e update inf. scroll; fix pagniation showing/not showing in all the wrong places 2011-01-25 17:38:29 -08:00
maxwell
43fa30248c show the pagination, because we like, need it. 2011-01-25 17:05:17 -08:00
Raphael
906cb36adf Fix double notifications on comments, write a bunch of comment dispatch tests. Alliterate. 2011-01-25 16:46:51 -08:00
maxwell
75f08f8cb9 limit results in people#show to 15 posts 2011-01-25 14:21:15 -08:00
maxwell
6b12c55278 fix cucumber failure 2011-01-25 14:07:17 -08:00
Raphael
1b6ae9406e Use raw sql 2011-01-25 12:27:57 -08:00
Raphael
def20a4d31 Make person_id on profile unique, delete duplicate profiles in migration 2011-01-25 12:10:24 -08:00
Raphael
5fe0613a97 Remove extra token from search 2011-01-25 10:47:11 -08:00
Raphael
d1b1db25ed That needed to be formatted differently 2011-01-25 10:09:15 -08:00
Raphael
d288160c7f Add link to text request_accepted email 2011-01-25 10:07:45 -08:00
maxwell
cef10c1228 added public button to the mobile publisher. make status message mobile redirect to back; also, include minifiyed jququery mobile css 2011-01-24 23:18:24 -08:00
zhitomirskiyi
2314c08265 current password requirement to change password 2011-01-24 22:39:57 -08:00
zhitomirskiyi
716899f919 don't dispatch locally on comments if you're the post owner 2011-01-24 19:13:48 -08:00
maxwell
d040de541a fix error in stream and puts in fake 2011-01-24 19:09:38 -08:00
maxwell
bc82dac61c make the more button work in the mobile site, also, i finally fixed the timeago stuff in the scroll 2011-01-24 19:09:37 -08:00
Raphael
2e50375eed Pretty sure that this delete a post feature is broken 2011-01-24 18:53:48 -08:00
zhitomirskiyi
8f05b638b3 holy crap fixed that comment dispatch bug 2011-01-24 18:21:27 -08:00
maxwell
ed1dc584d1 make aspects#index slow for ci 2011-01-24 18:03:14 -08:00
maxwell
a28a861509 fix url helpers on fakes 2011-01-24 18:01:40 -08:00
maxwell
8b3beba93f adding login page to mobile, and adding timeago WIP 2011-01-24 17:36:47 -08:00
zhitomirskiyi
e9e01e965e fixed error with comments saving twice on the same pod 2011-01-24 17:24:29 -08:00
maxwell
1b3c58c2c2 Use a fake to not allocate an AR model for every reference to a person 2011-01-24 15:13:52 -08:00
zhitomirskiyi
4217aa75e0 swapped back icon in mobile header for list icon 2011-01-24 12:45:30 -08:00
zhitomirskiyi
7bec92b7bf mobile sass 2011-01-24 12:36:30 -08:00
zhitomirskiyi
2c230fb80d added menu notifications page aspect name header. 2011-01-24 12:23:52 -08:00
Dan Hansen
b533d31fad make the footer not so useless 2011-01-24 12:23:51 -08:00
danielvincent
21465c8f32 various mobile tweaks. logout link actually logs out 2011-01-24 12:22:18 -08:00
danielvincent
7ac0e9eb49 wip 2011-01-24 12:22:18 -08:00
danielvincent
383876ddf4 mobile stream sass tweaks 2011-01-24 12:22:18 -08:00
danielvincent
1631452669 added in link to search page 2011-01-24 12:22:18 -08:00
danielvincent
b983746888 force all links to not be bold. 2011-01-24 12:22:17 -08:00
danielvincent
39c5189c1f everything ported from pre-mysql mobile stuff. things missing: search page, aspect switcher, notification badge. 2011-01-24 12:22:17 -08:00
maxwell
4b63a14198 updating schema 2011-01-24 12:18:38 -08:00
Dan Hansen
0d905a7124 i18n locale fix 2011-01-24 03:14:19 -06:00
Dan Hansen
161759b99a fix 789 2011-01-24 02:40:24 -06:00
Dan Hansen
8293016348 make the footer not so useless 2011-01-23 23:53:17 -06:00
Adam McDonald
89d43ef4d7 Updated the server script to support Redis when it has been installed via MacPorts. Also, fixed an echo error with it not being displayed correctly. 2011-01-23 12:47:13 -08:00
Sarah Mei
0b39359d1c Standardize how we're requiring config/environment 2011-01-23 12:42:09 -08:00
danielvincent
c96098540b ask a question in the publisher. (not removing previous translation & method just yet). 2011-01-23 11:06:08 -08:00
Dan Hansen
ace9e8c3d8 whoops, add license to embedder.js and it's spec 2011-01-22 23:43:48 -06:00
Dan Hansen
bdf559bb2b remove video embedding from stream.js, use embedder.js 2011-01-22 23:40:08 -06:00
danielvincent
6eb208adb5 fixed cucumber feature to reflect ui change in publisher 2011-01-22 20:04:59 -08:00
danielvincent
77042f9d47 publisher always shows textarea. outline publisher textarea in blue 2011-01-22 18:49:50 -08:00
Sarah Mei
46dcd07f39 Oops, debugging statement 2011-01-22 15:59:30 -08:00
Sarah Mei
d4cb5b8dad Don't cache authenticity tokens 2011-01-22 15:56:31 -08:00
Dan Hansen
90f5192055 refactor process_youtube, escape vimeo titles 2011-01-22 16:26:45 -06:00
zhitomirskiyi
5ebd10e43f removing photo from publisher works 2011-01-22 13:48:26 -08:00
zhitomirskiyi
b7f78335e1 mousedown and fixed sass 2011-01-22 13:48:25 -08:00
zhitomirskiyi
ff375b71cb works need a middle stage 2011-01-22 13:48:25 -08:00
danielvincent
338e17ff87 cache login form & footer 2011-01-22 13:30:31 -08:00
lfortin
a07430c088 fixed 'sign in' button width 2011-01-22 15:32:46 -05:00
Dan Hansen
45444316cb Merge branch 'master' of github.com:diaspora/diaspora 2011-01-22 12:40:36 -06:00
Dan Hansen
b209fd0c2c our spec would complain about the data of the ajax request not being there, move it into the callback instead 2011-01-22 12:40:20 -06:00
MrZYX
c9524e9b3a we don't need to exit if jammit fails 2011-01-22 19:36:10 +01:00
MrZYX
8bb257d4db updated locales 2011-01-22 18:11:35 +01:00
MrZYX
7ba38d80f1 some untested improvments to script/server 2011-01-22 17:55:10 +01:00
MrZYX
cadcc3e7c3 some browers (Firefox for example) have no pushState, so disable it for those for now 2011-01-22 16:43:34 +01:00
MrZYX
852be182f5 made 'start sharing' translatable 2011-01-22 16:29:39 +01:00
Dan Hansen
8619a2035c green for the night 2011-01-22 01:16:52 -06:00
Dan Hansen
67100aa7bb fix the build 2011-01-22 00:39:53 -06:00
Sarah Mei
225e5fc9d7 This much untested code makes me sad. But I fixed the bug whereby no rake tasks worked because of the require line. 2011-01-21 22:03:21 -08:00
Dan Hansen
a3bc8932d4 fixes for the alert widget, widgets.init didn't execute correctly because of the context 2011-01-21 20:09:34 -06:00
Dan Hansen
c23811e1ab flash the user whether or not that person was moved to a different aspect 2011-01-21 20:02:42 -06:00
Raphael
eea5b0a748 fix hcard link in webfinger profile 2011-01-21 15:03:11 -08:00
zhitomirskiyi
01a4327c2b use google API instead of highcharts due to licensing 2011-01-21 13:00:08 -08:00
zhitomirskiyi
41993fe5da use highcharts.js for stats 2011-01-21 12:19:05 -08:00
maxwell
495154b2b5 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-21 11:15:40 -08:00
zhitomirskiyi
190daa76dd getting rid of gruff and it's imagemagic deps. made graphs on stats pending. 2011-01-21 11:11:58 -08:00
maxwell
4bff854a04 pass params to super 2011-01-21 11:11:00 -08:00
danielvincent
c5bf7b523f use history.pushstate to preserve filters on page refresh 2011-01-21 11:11:00 -08:00
zhitomirskiyi
403490364a fixed datapoint_spec. fixed labels on graph 2011-01-21 10:50:53 -08:00
zhitomirskiyi
46cb9dd346 before auth filter 2011-01-21 10:39:10 -08:00
zhitomirskiyi
46b94bc130 all the specs pass with before each 2011-01-21 10:29:07 -08:00
zhitomirskiyi
56831cec63 stats WIP 2011-01-21 10:29:07 -08:00
zhitomirskiyi
69d6de2fe7 added views and graph generation for statistics 2011-01-21 10:29:07 -08:00
zhitomirskiyi
f89c442730 statistics class does distributions and averages on its DataPoints 2011-01-21 10:29:07 -08:00
zhitomirskiyi
55bfbfd5b0 added users_with_posts_today to DataPoint 2011-01-21 10:29:07 -08:00
zhitomirskiyi
ecb059b661 added Statistic and DataPoint models 2011-01-21 10:29:06 -08:00
zhitomirskiyi
0dc0af015f added methods to statistics rake task 2011-01-21 10:29:06 -08:00
MrZYX
4eb31f1fd2 updated locales 2011-01-21 16:11:47 +01:00
danielvincent
8af2fc7bcc fix in calculating selected states on aspect filters 2011-01-21 01:16:34 -08:00
danielvincent
22d4083c8c use history.pushstate to preserve filters on page refresh 2011-01-21 01:10:29 -08:00
danielvincent
abfd9c355c make login seem faster. 2011-01-20 22:55:44 -08:00
Maxwell Salzberg
fe0f16812f ci sucks 2011-01-20 18:57:20 -08:00
maxwell
16b892ccec we really need to make our db case insensitive 2011-01-20 18:39:03 -08:00
Raphael
7d4d08c59f Add cache control public to public/assets 2011-01-20 16:45:01 -08:00
Raphael
a688e47934 Make sure invites is not set to nil 2011-01-20 15:59:23 -08:00
Raphael
591915a2cd Add some includes to a query 2011-01-20 15:22:35 -08:00
Raphael
88fa595d59 Move seed_aspects to after accept_invitation 2011-01-20 15:03:33 -08:00
Raphael
19a86eb5a3 Remove useless transaction_id from request logs 2011-01-20 15:03:33 -08:00
maxwell
b21b0adca7 remove single user redirect 2011-01-20 15:02:46 -08:00
maxwell
c6a3cff644 make the recover password error message slightly more informitive for people who signed up for invites but have not yet received them yet 2011-01-20 12:48:28 -08:00
Raphael
7217bba7e7 Allow no 2 character queries 2011-01-20 12:18:42 -08:00
Raphael
661d5e41a1 Join on contacts correctly in search 2011-01-20 12:05:25 -08:00
Raphael
4deec0cb38 Fix call to search in controller 2011-01-20 10:28:27 -08:00
Raphael
971c88da5e Sort search results by friend status 2011-01-20 10:20:17 -08:00
MrZYX
4886dbe035 replaced user with username in the database.yml example 2011-01-20 15:19:14 +01:00
danielvincent
db32074439 underline a:hover, remove active state for touch devices 2011-01-19 23:34:12 -08:00
danielvincent
3d89e1f203 login page cleanup. totally simple. changed link color to something less jarring 2011-01-19 23:06:54 -08:00
Maxwell Salzberg
a612f55739 aspects needs more time on ci 2011-01-19 19:12:46 -08:00
Raphael
5eb0bf6736 Speed up person show 2011-01-19 18:45:45 -08:00
Raphael
0f978b983a be more generous to CI with times 2011-01-19 18:20:40 -08:00
Raphael
2c68bb0305 Remove n-query problem from contact_list 2011-01-19 18:06:35 -08:00
Raphael
e97081e8cd Delete some pending specs, fix a minor bug 2011-01-19 17:11:33 -08:00
zhitomirskiyi
1d228fa819 stats rake file now works with mysql; production 2011-01-19 17:04:46 -08:00
Raphael
a5b4dd2604 fix js bug, add spec 2011-01-19 16:58:01 -08:00
maxwell
cd92b1dccb put timeago in document ready, not outside 2011-01-19 16:18:10 -08:00
Raphael
ad48f4796c Remove warning in aspectscontroller 2011-01-19 16:08:14 -08:00
Raphael
3c6dd3d721 Remove XSS in profile 2011-01-19 16:08:14 -08:00
danielvincent
4b74796c07 16 pictures on aspect listings 2011-01-19 16:06:35 -08:00
maxwell
120c07ddf5 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-19 16:04:54 -08:00
maxwell
35432880b2 adding timeago when the inf. scroll is involked 2011-01-19 16:04:46 -08:00
Raphael
f35f0212dd Show the right contacts 2011-01-19 15:54:49 -08:00
zhitomirskiyi
122f182a4c limit to 16 in the view 2011-01-19 15:52:52 -08:00
Raphael
a444198843 Remove mongo from chef 2011-01-19 15:39:09 -08:00
Dorian
3976489984 Checks for redis.conf in /usr/local (by justthisguy) 2011-01-19 23:42:23 +01:00
zhitomirskiyi
9c1184bd29 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-19 14:30:55 -08:00
zhitomirskiyi
fc6d641643 correct requires 2011-01-19 14:30:34 -08:00
Raphael
2578ac15b6 Add some indicies 2011-01-19 14:29:22 -08:00
zhitomirskiyi
aeab29aa38 removed the backup crons 2011-01-19 14:20:06 -08:00
maxwell
e7a065a521 make jobs have a base class, which will verify the activerecord connection before trying the job 2011-01-19 14:10:42 -08:00
maxwell
934f56b553 make description text darker and more readable on getting started 2011-01-19 13:31:25 -08:00
maxwell
465dd9ba96 check to see if rails is already loaded in a couple of places 2011-01-19 13:30:12 -08:00
MrZYX
3dcb3d3e2c updated locales 2011-01-19 21:41:43 +01:00
MrZYX
7f8ee17b40 pass @contacts to partial in aspects/index.js.erb 2011-01-19 21:09:06 +01:00
Sarah Mei
dd3f8f4bee Add compound index to post_visibilities 2011-01-19 00:19:16 -08:00
Sarah Mei
b43c29745b Fix build by turning off transactional fixtures in the import spec. 2011-01-19 00:16:11 -08:00
maxwell
6e65f3408d Merge branch 'master' of github.com:diaspora/diaspora
Conflicts:
	spec/models/jobs/socket_webfinger_spec.rb
2011-01-18 22:47:04 -08:00
maxwell
72e10cfad6 remove the fixtures everytime, until we actually figure out how to do this right. also clean up some spec helper includes to prevent everything getting included many times 2011-01-18 22:45:43 -08:00
maxwell
02ab24335a remove the fixtures everytime, until we actually figure out how to do this right. also clean up some spec helper includes to prevent everything getting included many times 2011-01-18 22:39:14 -08:00
maxwell
85b824babc Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 22:12:11 -08:00
maxwell
7a02a31440 fix invitations#new, and a post spec which was mongo specific 2011-01-18 22:11:58 -08:00
Raphael
3935d978ac Take some queries out of views 2011-01-18 19:11:01 -08:00
zhitomirskiyi
960058803a Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 17:23:03 -08:00
zhitomirskiyi
21bccedf9b notification eagerly load the target 2011-01-18 17:22:48 -08:00
danielvincent
4f25dfa6d3 publics controller merge fix 2011-01-18 17:14:32 -08:00
zhitomirskiyi
5ac194911f Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 17:07:03 -08:00
zhitomirskiyi
e7a4c47f0a include target for notification 2011-01-18 17:06:54 -08:00
danielvincent
849a5476ab Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 17:06:15 -08:00
danielvincent
3dd2384458 Merge branch 'fixturebuilder'
Conflicts:
	spec/controllers/people_controller_spec.rb
	spec/controllers/publics_controller_spec.rb
	spec/lib/diaspora/parser_spec.rb
2011-01-18 17:05:44 -08:00
Raphael
38dd58315d typo 2011-01-18 17:04:22 -08:00
danielvincent
1fa39ad20d fixed issue in attack_vectors_spec 2011-01-18 16:58:59 -08:00
zhitomirskiyi
38a3193a61 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 16:58:04 -08:00
zhitomirskiyi
63590e2e7e restore hashes for person for person#index. since request relations are one way, the building the hash is perhaps simpler than alternitives" 2011-01-18 16:57:34 -08:00
danielvincent
511a48adde fixed publicscontroller specs 2011-01-18 16:52:11 -08:00
Raphael
3b394c1c89 One more defualt scope out 2011-01-18 16:48:02 -08:00
Raphael
e6e2ba9cfb Take out default scopes 2011-01-18 16:46:52 -08:00
zhitomirskiyi
ef1b7644f3 got rid of more hash from 2011-01-18 16:38:31 -08:00
zhitomirskiyi
3e6a271ad8 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-18 16:22:03 -08:00
zhitomirskiyi
004094d66f fixed the querying in the controllers got rid of hashes 2011-01-18 16:21:14 -08:00
Raphael
85bae12a00 Query on guid, not id 2011-01-18 16:07:58 -08:00
Raphael
6ccf8a4d2d Fixed connecting spec, magic import failure disappearance 2011-01-18 16:05:50 -08:00
Raphael
9e5cf1e1a4 Fix person receive urls 2011-01-18 15:21:04 -08:00
Raphael
bad7399eeb Remove yml files from git 2011-01-18 15:18:58 -08:00
Raphael
88ebd14799 Fixture builder working, need to make specs not require a clean db 2011-01-18 14:53:46 -08:00
Raphael
1353929d44 Made specs work with fixtures, spec_helper needs work 2011-01-18 13:31:10 -08:00
zhitomirskiyi
d0074d0d8a no more mongo check in script server 2011-01-18 11:01:09 -08:00
zhitomirskiyi
41c83a7e19 mousedown so that new tab opening would make notification go down 2011-01-18 10:51:05 -08:00
zhitomirskiyi
0cb9f1c0d7 focus publisher on reshare 2011-01-18 10:51:05 -08:00
Raphael
ac3d037dc4 Comments controller spec using fixtures 2011-01-18 10:48:06 -08:00
Raphael
b580b7bd2c Putting fixtures in specs... 2011-01-18 10:42:50 -08:00
Raphael
fdc9534fc7 Fix specs in the presence of fixture_builder 2011-01-18 10:25:26 -08:00
Raphael
345d346224 Initial fixture_builder 2011-01-18 10:00:48 -08:00
Raphael
d0af03b723 Merge remote branch 'dorian/820-typo-in-script-server' 2011-01-17 20:08:50 -08:00
Raphael
d0fb37e264 fix database yml example 2011-01-17 20:04:50 -08:00
Raphael
28b7302c9e Specify type again 2011-01-17 19:42:49 -08:00
Raphael
eee9561656 Specify type 2011-01-17 19:40:14 -08:00
Raphael
6474ca9540 display photos correctly 2011-01-17 19:34:33 -08:00
maxwell
0c24510682 remove an invalid spec 2011-01-17 18:33:30 -08:00
zhitomirskiyi
8d86585928 profile spec passes 2011-01-17 18:22:54 -08:00
zhitomirskiyi
8818a9bb6f Merge branch 'master' of github.com:diaspora/diaspora 2011-01-17 18:04:21 -08:00
zhitomirskiyi
c28b5a22fb here you go 2011-01-17 18:03:15 -08:00
Raphael
8bd784e5ab Fix aspect edit 2011-01-17 17:36:36 -08:00
zhitomirskiyi
3f21a05e3e remove s3 setting 2011-01-17 16:46:39 -08:00
Raphael
a6ff90ad20 removing database.yml 2011-01-17 16:17:08 -08:00
zhitomirskiyi
86c2686b9a a little begin rescue magic for uploading to s3 2011-01-17 15:56:06 -08:00
zhitomirskiyi
390e19ecdd some sod modz 2011-01-17 15:56:06 -08:00
zhitomirskiyi
47671ac332 no pod_url 2011-01-17 15:56:06 -08:00
zhitomirskiyi
995d285fdd ssl s3, attrs 2011-01-17 15:56:06 -08:00
zhitomirskiyi
0c8aca3ef8 rebasing 2011-01-17 15:56:06 -08:00
zhitomirskiyi
7ef89acf81 added the redirect to the nginx conf 2011-01-17 15:56:06 -08:00
zhitomirskiyi
0f9dc4954a added a task to upload 2011-01-17 15:56:06 -08:00
danielvincent
7477a22421 safeguard on absolutify rake task 2011-01-17 15:56:06 -08:00
danielvincent
7f87825186 fixed nil error in migration when dealing with remote images 2011-01-17 15:56:06 -08:00
danielvincent
1d52e06532 added rake task and spec for absolutifying existing image links 2011-01-17 15:56:06 -08:00
danielvincent
2eb1901073 s3 support minus rake migration. 2011-01-17 15:56:06 -08:00
Dorian
29ec257e14 Typo in script/server : redis.cont → redis.conf 2011-01-18 00:44:21 +01:00
Raphael
bd4efe8c2d Escape youtube titles 2011-01-17 15:39:46 -08:00
zhitomirskiyi
baac8199da MS IZ proper file requiring 2011-01-17 15:27:38 -08:00
zhitomirskiyi
3d4cf4d8d5 IZ MS required a file needed by the import 2011-01-17 14:56:30 -08:00
zhitomirskiyi
fc92779ddc redirect after contact destroy 2011-01-17 14:46:38 -08:00
zhitomirskiyi
be92f3866c IZ MS fix 500 on commnet notificaions 2011-01-17 14:46:38 -08:00
Raphael
68f2528f23 production in database yml example 2011-01-17 14:38:06 -08:00
Raphael
db417abc18 Fix person show 2011-01-17 14:30:57 -08:00
Raphael
a7e30adc28 Better test for unique contacts 2011-01-17 14:23:50 -08:00
Raphael
4ba58d8132 Simplify hashes_for_contacts 2011-01-17 14:23:50 -08:00
Raphael
6410355d71 Fix aspect edit page 2011-01-17 14:23:50 -08:00
Raphael
6eb0dfb43f Improve User#posts_from 2011-01-17 14:23:50 -08:00
zhitomirskiyi
79b613b0e5 MS IZ notifications now contain helpful test 2011-01-17 14:07:21 -08:00
Maxwell Salzberg
254c411bd9 prevent searching with spaces 2011-01-17 13:48:52 -08:00
Raphael
72785a69cb Correct ordering problem in posts_from 2011-01-17 12:21:38 -08:00
Raphael
36781481bb Pulling in changes from master 2011-01-17 11:41:15 -08:00
Jairo Diaz
133828edeb fixed typo for default_language at environment.rb 2011-01-16 16:14:24 -05:00
MrZYX
f17ba7b4eb updated locales 2011-01-16 19:52:11 +01:00
Sarah Mei
dff4119765 Expose gem upgrade failures in CI. 2011-01-15 21:03:03 -08:00
Sarah Mei
bb04224187 Add db:migrate to cruise task for mysql branch 2011-01-15 19:39:01 -08:00
Miguel Diaz
482f0bd91d Added new feature test: closes account 2011-01-15 20:34:01 -05:00
Sarah Mei
910ae49fca Lock down gem versions & github refs in mysql branch because it's got that same damn aws problem. 2011-01-15 15:23:34 -08:00
Sarah Mei
2c91bfca96 Fix spec that fails under ruby 1.9. 2011-01-15 15:00:45 -08:00
Paweł Wilk
60bed99c3b Dependency fixed 2011-01-15 23:34:01 +01:00
Sarah Mei
eeba0e7a63 Remove a spec that tests a method that doesn't exist anymore. 2011-01-15 14:28:15 -08:00
Sarah Mei
795f715833 Fix notification spec to stub the right association. 2011-01-15 14:20:25 -08:00
root
4bc061117a Private Issue - Cucumber test for closing an account 2011-01-15 16:46:10 -05:00
Sarah Mei
fb136d22d0 Fix 1.8 build by rolling back aws gem. Fix 1.9 build by rolling back mongo_mapper to a previous ref. Prevent this from happening (as much) in the future by locking down versions in the Gemfile. 2011-01-15 10:44:24 -08:00
Sarah Mei
8b7bfd540d Expose gem upgrade failures on CI. Build will break. Next checkin will fix it. :) 2011-01-15 10:04:39 -08:00
danielvincent
e2fdad02f1 css fixes, incl. timeago style fix on stream_element 2011-01-14 22:12:31 -08:00
Raphael
f87ddffc64 2 failures left in merge 2011-01-14 16:35:41 -08:00
zhitomirskiyi
a00fbb1717 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-14 16:11:37 -08:00
Raphael
738e8c65c8 Merge almost complete, 4 failures 2011-01-14 16:00:10 -08:00
maxwell
bc8821fdc5 Revert "some fixes for the alert widget"
This reverts commit 4e40c19342.
2011-01-14 14:28:03 -08:00
Dan Hansen
4e40c19342 some fixes for the alert widget 2011-01-14 15:13:09 -06:00
Dan Hansen
8103e66ea3 didn't mean to commit some changes in aspect-edit.js 2011-01-14 14:57:26 -06:00
Dan Hansen
d4f30ded1b Diaspora.js 2.0, added an official widget, don't use native alerts anymore 2011-01-14 14:54:44 -06:00
zhitomirskiyi
aba03ed5b0 added the locales for timeago 2011-01-14 11:46:38 -08:00
Dan Hansen
4ccf51b3d3 fix real time aspect name changing 2011-01-14 13:29:55 -06:00
Raphael
d76121b147 Add charset to example database.yml 2011-01-14 10:54:02 -08:00
Raphael
3f7b89ac86 Commit horrifying db cleanup script 2011-01-14 10:52:26 -08:00
Raphael
8f91689b3f Require config environment rather than the environment rake task 2011-01-14 10:48:01 -08:00
maxwell
a0489112b7 made show page times smaller 2011-01-14 10:21:38 -08:00
maxwell
c8dd16b60c make english translation ffor also commented on less akward 2011-01-14 09:49:29 -08:00
Paweł Wilk
ee59f36b77 Added grammatical inflection support using I18n Inflector with Rails plug-in 2011-01-14 18:33:15 +01:00
Raphael
ae57c7a232 Stop testing on created_at, because I am so not updating the fixtures and we do have to export the times. 2011-01-13 19:59:01 -08:00
Raphael
d6cae5862d The cool kids store birthdays in unix time 2011-01-13 19:29:44 -08:00
Raphael
300e055933 It turns out comments weren't importing because I didn't write the code to make them import. 2011-01-13 18:48:32 -08:00
Raphael
f2a27ea970 Another try at getting the youtube titles in 2011-01-13 18:15:44 -08:00
maxwell
641b805da2 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 17:31:44 -08:00
maxwell
f509367a40 fix the 404 page to show the dun goofed guy 2011-01-13 17:31:18 -08:00
zhitomirskiyi
2c58630995 rails autoescapes in the link_to 2011-01-13 17:16:53 -08:00
Raphael
597a7a8a03 Revert "Serialize youtube titles to yaml to ActiveRecord can read them"
This reverts commit b42bffa6fa.
2011-01-13 17:16:06 -08:00
Raphael
2f4be3c9c4 Revert "keep nil nil"
This reverts commit fb12f5de52.
2011-01-13 17:15:43 -08:00
Raphael
fb12f5de52 keep nil nil 2011-01-13 17:03:55 -08:00
maxwell
27162e59b8 adding new js file to jasmine 2011-01-13 17:00:08 -08:00
Raphael
b42bffa6fa Serialize youtube titles to yaml to ActiveRecord can read them 2011-01-13 16:51:09 -08:00
maxwell
600e67d5d1 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 16:31:35 -08:00
maxwell
f97a9fa017 added timeago jquery plugin. we now need to figure out a js translation scheme 2011-01-13 16:29:13 -08:00
Raphael
f79c08b235 Add indicies 2011-01-13 16:17:11 -08:00
Raphael
7abd1aceca Add a couple indicies 2011-01-13 15:13:42 -08:00
zhitomirskiyi
560d9fe37f Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 15:11:33 -08:00
zhitomirskiyi
54d4f4350d one event 2011-01-13 15:11:00 -08:00
maxwell
602ec3d707 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 14:49:47 -08:00
maxwell
fc09b0fb40 add a max char count to commnets (500) 2011-01-13 14:49:17 -08:00
maxwell
b4fae58f12 just say no to 404 facebox errors 2011-01-13 14:48:30 -08:00
zhitomirskiyi
9e332a6188 comma 2011-01-13 14:40:48 -08:00
zhitomirskiyi
1a995d5f03 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 13:36:18 -08:00
zhitomirskiyi
97e5c3cb2c typo 2011-01-13 13:36:03 -08:00
maxwell
8c0a8c6af8 increase header zindex so things don't fly over it 2011-01-13 13:31:43 -08:00
maxwell
b116362c5d notifications for local comments 2011-01-13 13:02:02 -08:00
zhitomirskiyi
99931cdf41 splunking some stats 2011-01-13 12:54:18 -08:00
maxwell
f1d0a8ae35 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 10:19:56 -08:00
zhitomirskiyi
1748827f0a photos show spec passes 2011-01-13 10:19:17 -08:00
maxwell
c002692657 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-13 09:45:56 -08:00
Dan Hansen
f807bc25d1 whitelist certain keyCodes, e.g. tab, fixes #795 2011-01-13 01:24:05 -06:00
Dan Hansen
43658b4923 only show prev/next if there is more than one photo, fixes #813 2011-01-13 01:03:37 -06:00
Sarah Mei
9c87fff295 Log specs don't check for specific number of renders. 2011-01-12 22:43:45 -08:00
Dan Hansen
ce4fe1938c remove references to fancybox, we use facebox 2011-01-13 00:24:10 -06:00
Sarah Mei
e456c9d880 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-12 21:57:43 -08:00
Sarah Mei
57141fc305 Pull logging out to a shared behavior. Remove 4 pending specs. 2011-01-12 21:57:05 -08:00
Dan Hansen
61512ef7b0 youtube videos shove above comments and under the status -- i'm back\! 2011-01-12 23:05:20 -06:00
zhitomirskiyi
9b6faa5644 added a notificaions read button 2011-01-12 16:24:14 -08:00
maxwell
c29ebdabba pending photos now stick to the publisher when adding or removing aspects... the home page however is a full reload, and some weird things happen when you switch from home 2011-01-12 15:47:14 -08:00
maxwell
f8d524c983 fix infield labels not rebinding on stream filter, and changed padding to margin for the user badge so the bottom boder does not go over the new request message 2011-01-12 13:50:55 -08:00
maxwell
c832201bd9 remove trailing bracket from aspects#edit pane 2011-01-12 11:00:22 -08:00
maxwell
f9634c0b0c Merge branch 'master' of github.com:diaspora/diaspora 2011-01-12 10:48:06 -08:00
maxwell
1661158f95 IZ MS fix a nasty bug where status messages with posts were not persisted in a users aspects stream. also, fixed the code link for joindiaspora.com 2011-01-12 10:47:39 -08:00
maxwell
67fc4b3157 IZ MS fix a nasty bug where status messages with posts were not persisted in a users aspects stream. also, fixed the code link for joindiaspora.com 2011-01-12 10:35:05 -08:00
MrZYX
137cde185f unscope contacts 2011-01-12 16:03:19 +01:00
MrZYX
1319099cf3 made some strings translatable 2011-01-12 15:58:10 +01:00
MrZYX
40fc8efec9 updated locales 2011-01-12 15:57:07 +01:00
Sarah Mei
756471be43 Fix 1.9 build. MAXWELL. 2011-01-11 19:58:27 -08:00
maxwell
73821859e6 require pubsubhubub in the job' 2011-01-11 16:24:59 -08:00
maxwell
49b172f192 up with convention, down with case. pubsubhubbub now adhears to ruby caseing, rather than its own name weirdness 2011-01-11 15:04:03 -08:00
maxwell
5609422a7b Merge branch 'master' of github.com:diaspora/diaspora 2011-01-11 14:40:11 -08:00
maxwell
32d1d26e22 updated some dependancies 2011-01-11 14:39:44 -08:00
Raphael
3684546335 Require pubsubhubbub 2011-01-11 14:34:30 -08:00
maxwell
1f9813ce58 add autotest growl, if thats how you roll 2011-01-11 14:29:17 -08:00
maxwell
85295015ee DG MS tests now green, plus autotest works again 2011-01-11 14:23:19 -08:00
maxwell
25f388d903 MS DG made receive encapsulated in an object 2011-01-11 14:23:19 -08:00
maxwell
23de681cb8 DG MS moved receive methods to their respective models 2011-01-11 14:23:18 -08:00
maxwell
220c6894fa --amend 2011-01-11 14:23:18 -08:00
maxwell
daab8e80ce basic receive cleanup 2011-01-11 14:23:18 -08:00
Raphael
6bb132b25e Revert 'Create a separate webfinger service.' We'll come back to it when we figure out the error. 2011-01-11 14:18:25 -08:00
Raphael
021bbc12ba No guarantee that there aree join table rows for any given model 2011-01-11 12:04:57 -08:00
Raphael
f8be5a284c Don't use the environment rake task, just require the environment 2011-01-11 11:05:21 -08:00
Sarah Mei
68eedd578a mysql timezones: PWND. 2011-01-10 20:40:27 -08:00
Raphael
6ba587155a explicit require in rake file 2011-01-10 18:48:12 -08:00
Raphael
b9afd6012c export should require environment 2011-01-10 18:45:02 -08:00
Raphael
0b265012bc Make task for full migration 2011-01-10 18:42:34 -08:00
Raphael
ee20b00f58 Only the time zone errors are left, and those could probably be ignored 2011-01-10 18:30:52 -08:00
Raphael
079151eeea Set target_id on notifications 2011-01-10 17:30:37 -08:00
Raphael
30f98aec3c Set notification target type after importing 2011-01-10 17:07:16 -08:00
Raphael
f1e8b5c01d Found problem in notification import, need to finish post and notification polymorphic stuff 2011-01-10 16:57:15 -08:00
Raphael
c90f3cb1ef export more things from mongo 2011-01-10 16:36:48 -08:00
Raphael
f277fb3bb8 Specs for post_visibilities and notifications imports 2011-01-10 15:55:59 -08:00
Raphael
f4465c9d32 Naive import of posts, still need to set status_message_id on photos 2011-01-10 15:41:53 -08:00
Raphael
fefc4ba60e Posts are the next model to import, then postvisibility, then notifications 2011-01-10 13:22:05 -08:00
Raphael
92aecb3bec Start profile import, fixtures are wrong 2011-01-10 12:25:13 -08:00
Raphael
47ed820dea Invitations and requests importing 2011-01-10 11:51:34 -08:00
Alec Leamas
1e3d70f98b Add public/well-known dir for the moment. 2011-01-10 20:47:20 +01:00
Raphael
52f1ce81fb No syntax errors, but invitation and request importing still not working 2011-01-10 11:34:04 -08:00
Sarah Mei
f273d6938e Fix pagination spec - we don't care which 25 things are returned, just that 25 are returned. 2011-01-09 20:44:23 -08:00
Sarah Mei
545fbe4679 Fix jasmine specs by replacing fancybox with facebox, and changing expectation to match new view. 2011-01-09 19:41:18 -08:00
Sarah Mei
38102ebda7 Revert "Mount application on proper location" - changes cause app to fail when there's no trailing / on the pod_url.
This reverts commit 18827b40d1.
2011-01-09 18:32:01 -08:00
Sarah Mei
b865c20b2d Backing out sub-uri changes 2011-01-09 18:29:43 -08:00
Alec Leamas
e09771d9b4 Create a separate webfinger service. 2011-01-09 23:38:36 +01:00
Alec Leamas
e01fb62eeb Expose and refer to assets on the sub_uri.
When using sub-uri, create a symlink in public/ making the assets
available at the sub-uri. Modify environment.rb so that asset paths
refers to this sub-uri path. Closes http://bugs.joindiaspora.com/issues/391
and http://bugs.joindiaspora.com/issues/737 when application mounted
on suburi (i. e., prev patch)
2011-01-09 23:38:03 +01:00
Alec Leamas
18827b40d1 Mount application on proper location
Uses mapping in config.ru to respect sub-uri settings in pod_uri.
2011-01-09 23:37:47 +01:00
Raphael
555932d67e Import invitations 2011-01-09 02:25:35 -08:00
danielvincent
685b809248 resque requires a job to be assigned to a queue. enable resque logging on posting to a hub 2011-01-08 18:13:54 -08:00
danielvincent
c16d0c46a2 comments do not queue up jobs for local users. 2011-01-08 17:53:01 -08:00
Sarah Mei
22f7d1d48b Unix timestamps (output by mongo) are in milliseconds, but MySQL datetimes only have fidelity to seconds.
As a result we have to divide the exported value by 1000 before importing it (which coincidentally is the same as truncating the last 3 digits).
The remaining 8-hour difference is a time zone thing - haven't solved that one yet.
2011-01-08 17:18:09 -08:00
danielvincent
f2f3059d72 fixed aspects/manage css/js bug. aspect listings on aspects/index show at max 2 lines of ppl 2011-01-08 17:17:37 -08:00
danielvincent
6cc5d6e3ab fixed all rspec/cucumber 2011-01-08 16:53:16 -08:00
danielvincent
6ca0b0014b fade in aspect badges on stream 2011-01-08 15:24:03 -08:00
danielvincent
55fa1646c7 swapped out delete text for 'x' on stream_elements. controls fade in on hover 2011-01-08 15:06:25 -08:00
danielvincent
9cf1f5a023 fixed reshare with filters 2011-01-08 13:11:55 -08:00
danielvincent
cadba3f2b7 fixed specs with a reload. added header gradient for firefox 2011-01-08 13:11:55 -08:00
danielvincent
c5e0c616b5 share with pane styles fixed 2011-01-08 13:11:54 -08:00
danielvincent
98ceb1ca6b fixups on people/show. make photos scroll over header on show pages. 2011-01-08 13:11:54 -08:00
danielvincent
c74dc120df fixed all cucumber tests 2011-01-08 13:11:54 -08:00
danielvincent
98bcad5c59 visual fixes on people/show. contact count on aspect filters. contact list searches again. 2011-01-08 13:11:54 -08:00
danielvincent
2e472ded94 new notification/request text on aspects/index 2011-01-08 13:11:54 -08:00
danielvincent
71ca93720b contact lists functional on aspects/index. edit panes facebox in from header 2011-01-08 13:11:53 -08:00
danielvincent
c9307305b3 collapsed aspect_listing and contact_listing on aspects/index 2011-01-08 13:11:53 -08:00
danielvincent
3ff4b67ff0 touched up stream_element and comment partial 2011-01-08 13:11:53 -08:00
danielvincent
f44b3cbe3d contacts now ajax in on aspect filtering on aspect/index. fixed missing partial error on aspect_badge. 2011-01-08 13:11:53 -08:00
danielvincent
422f17a648 switched out fancybox for facebox (THANK GOD). added aspect edit panes to aspects/index. removed some partials. 2011-01-08 13:11:53 -08:00
danielvincent
e1b6f4f074 aspect filters shown selected on photo and statusmessage show pages 2011-01-08 13:11:53 -08:00
danielvincent
8c82a5974a aspect badge links work across all pages, ajax stream on index. aspect info lightbox placeholder 2011-01-08 13:11:53 -08:00
danielvincent
14ca5e1cc1 stricter url fix in aspect-filters 2011-01-08 13:11:53 -08:00
danielvincent
5358ac32a1 photos can be posted to multiple aspects. header nav works from pages other than aspect/index. 2011-01-08 13:11:52 -08:00
danielvincent
0a07dd16b5 posts are properly socketed on filtered streams 2011-01-08 13:11:52 -08:00
danielvincent
b029475421 aspects now have edit pages accessible through the top nav 2011-01-08 13:11:52 -08:00
danielvincent
44d3c4bacd fixed inf scroll on filters issue. one spec failing in AspectsController. 2011-01-08 13:11:52 -08:00
danielvincent
d0b25814b1 publisher retains text when filtering stream 2011-01-08 13:11:52 -08:00
danielvincent
a773450650 aspect show fix 2011-01-08 13:11:52 -08:00
danielvincent
e6ae5e13e2 publisher works through ajax filters 2011-01-08 13:11:52 -08:00
danielvincent
f02c13ee73 filters are now working in ajax. inf. scroll and publisher pending ajax. 2011-01-08 13:11:52 -08:00
danielvincent
c64865d32e header touchup 2011-01-08 13:11:51 -08:00
danielvincent
f1564d068a pass @all_aspects as opposed to @aspects in stream 2011-01-08 13:11:51 -08:00
danielvincent
a9195d7730 aspect filters now functional on aspects/index 2011-01-08 13:11:51 -08:00
danielvincent
79b7f62520 filter logic in aspects_controller#index 2011-01-08 13:11:51 -08:00
Sarah Mei
9411ba31b0 Reduce spurious cucumber failures by turning off jquery effects with drag & drop, and increasing timeout when waiting for ajax callbacks to complete. 2011-01-08 12:58:43 -08:00
Andreas Schneider
0c58d9814b mailer: Added support for /usr/sbin/sendmail.
This fixes bug #788.
2011-01-08 18:57:24 +01:00
Sarah Mei
9baf7ff157 Merge branch 'integration_test_1#' of https://github.com/jairodiaz/diaspora into jairodiaz-integration_test_1# 2011-01-08 09:48:18 -08:00
MrZYX
d3eb463896 updated locales 2011-01-08 16:54:53 +01:00
Raphael
e8d46982d8 Aspect memberships now importing 2011-01-07 16:58:39 -08:00
Maxwell Salzberg
24942d2f77 remove all keydown tests 2011-01-07 16:54:55 -08:00
maxwell
c7fb3d7296 remove keydown test since we do not do that anymore 2011-01-07 16:39:27 -08:00
Raphael
6abedf5f87 Contacts now importing 2011-01-07 16:28:52 -08:00
maxwell
3641470399 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-07 16:15:25 -08:00
maxwell
047217f50c fixed test to have postzord only socket on comments.... need to figure out a better way to abstract this exception... 2011-01-07 16:15:13 -08:00
Raphael
aa624b4df0 People now importing, additional failing tests on imported times 2011-01-07 16:09:08 -08:00
danielvincent
6342dff96d fixed enter js bug on comments. removed enter hotkey on publisher completely. 2011-01-07 15:53:39 -08:00
Raphael
8885b8a354 Services now importing 2011-01-07 15:19:04 -08:00
maxwell
36d6864b40 only locally socket comments 2011-01-07 15:17:18 -08:00
Raphael
9bd2de06ee Services need a mongo_id 2011-01-07 15:14:45 -08:00
Raphael
62486a17b6 Aspects imported correctly 2011-01-07 14:54:50 -08:00
maxwell
8f1f01f0a3 if you write jobs, you should use them in you app 2011-01-07 14:03:46 -08:00
Raphael
1187c13170 Import for users, test for aspects import 2011-01-07 13:25:50 -08:00
zhitomirskiyi
868cb1efc1 checking that filepath exists 2011-01-07 10:57:37 -08:00
Raphael
ff44003ea3 Import some more times 2011-01-07 10:56:46 -08:00
Raphael
686713dc4b assert on type before typecasting, do not tolerate empty strings where NULL should be. 2011-01-07 10:49:07 -08:00
zhitomirskiyi
c8e161f1cf photo backups are now in 4.5 gb chunks 2011-01-07 09:37:45 -08:00
Jairo Diaz
d0c1c087f4 removed @wip tag in feature to avoid clash with others 2011-01-07 10:27:47 -05:00
Jairo Diaz
524149c9b2 Added test for changing password 2011-01-07 10:21:52 -05:00
Alec Leamas
c1de6a3312 Pkg update 2011-01-07 11:34:32 +01:00
maxwell
3fa0af8b56 make the test slightly less pedantic 2011-01-06 18:19:15 -08:00
maxwell
a82e59077b pass opts to the postman when creating a post 2011-01-06 17:49:24 -08:00
Raphael
0f8b8bbd5b update the down for the import table migration 2011-01-06 17:44:38 -08:00
maxwell
49225568cb moar tests for pubsubjob 2011-01-06 17:34:40 -08:00
zhitomirskiyi
86154ba348 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-06 17:26:42 -08:00
zhitomirskiyi
3e569c0c30 using set comparison instead of strict array comp. 2011-01-06 17:26:30 -08:00
Raphael
abdb5f7587 serialized hashes need a NULLIF, as do many other fields, probably 2011-01-06 17:26:08 -08:00
maxwell
153c4925d6 test for pubsubhububb jobs 2011-01-06 17:19:13 -08:00
zhitomirskiyi
8f2cad776b Merge branch 'master' of github.com:diaspora/diaspora 2011-01-06 17:14:59 -08:00
zhitomirskiyi
a92a374b96 added the files and fixed the tests 2011-01-06 17:14:39 -08:00
Raphael
89a41826c1 Started raw post import 2011-01-06 17:01:17 -08:00
zhitomirskiyi
249b62445f added the files 2011-01-06 16:51:34 -08:00
Raphael
7c3c17a418 Move fantasy_resque to the fake_resque file, add services to the mysql export fixture 2011-01-06 16:34:28 -08:00
maxwell
cff387d651 make sure receive unescapes the payload before sending it to the job 2011-01-06 16:30:22 -08:00
Raphael
e46b3e6cf3 Import raw services, I think we need to change the name of the type field (is it supposed to be in provider?) other than that, only posts remain. 2011-01-06 16:23:18 -08:00
zhitomirskiyi
0c8e6b0ba1 Merge branch 'master' of github.com:diaspora/diaspora 2011-01-06 15:56:20 -08:00
zhitomirskiyi
3fae950905 also commented notification and sending ids into resque so that it works 2011-01-06 15:56:03 -08:00
Raphael
7668276a99 Set booleans correctly 2011-01-06 15:42:34 -08:00
Raphael
770e90064d nullif fixes raw person import 2011-01-06 15:16:32 -08:00
Raphael
283a5501be Boolean values aren't importing; we may need SET statements for them 2011-01-06 14:58:42 -08:00
Raphael
7c4d35cf28 raw import of notifications, failing to pull in unread 2011-01-06 14:37:59 -08:00
Raphael
564dd993b7 raw import of Invitation 2011-01-06 14:30:38 -08:00
Raphael
a1419b9dc0 Person#owner_mongo_id should be null if the csv has an empty string 2011-01-06 14:16:51 -08:00
danielvincent
8074e481a3 stream fix on aspects/show 2011-01-06 13:51:59 -08:00
maxwell
5818227904 adding job for posting to services 2011-01-06 13:13:09 -08:00
maxwell
1d5b6fa675 unstubing and restubbing before doing pubsubhubub 2011-01-06 12:50:48 -08:00
Raphael
9ba43b148f Move resque modifications out to spec/support 2011-01-06 12:33:12 -08:00
Raphael
8d62ad8896 Add some reloads 2011-01-06 12:33:12 -08:00
Raphael
0284f0fd6d Write fixture for mysql export 2011-01-06 12:33:12 -08:00
Raphael
f4d176011d Got some fixtures in, comment import specs are passing 2011-01-06 12:20:42 -08:00
maxwell
f02ed1e3c4 unstubing and restubbing before doing pubsubhubub 2011-01-06 12:19:36 -08:00
maxwell
11808e3233 adding tests for pubsub client' 2011-01-06 11:47:16 -08:00
Raphael
3df36721d6 Move attribute lists out to base, so they are together and we can use them in the import 2011-01-06 10:31:45 -08:00
Sarah Mei
75ac7e91c8 Refactor ImportToMysql; add import_raw. Add rake task for import.
Remove unique constraint on index on mongo_requests.
2011-01-05 23:54:22 -08:00
maxwell
27d8cc8003 added sync pubsubhubbub publisher client. we now should not longer require eventmachine, (in the server process, the websocket still requires it). this should also be in a job 2011-01-05 19:02:43 -08:00
maxwell
8b3a193156 added copyright notice to jobs 2011-01-05 18:52:43 -08:00
Raphael
925184110d Make postzord a module 2011-01-05 18:31:19 -08:00
maxwell
beaeac2d42 comment out debug 2011-01-05 17:52:21 -08:00
maxwell
a7d651236f make the postman work across everything. remove lots of now useless methods 2011-01-05 17:44:08 -08:00
maxwell
5e58eba240 new years resolution: commit more. make the websocket take user objects, rather then just ids, since postman now gets all of them at once, rather than querying them n times 2011-01-05 17:43:25 -08:00
maxwell
7ea6b4dd8d more cleanup 2011-01-05 17:43:25 -08:00
maxwell
8819d288c4 i am greeen 2011-01-05 17:43:25 -08:00
maxwell
80edb498f2 --amend 2011-01-05 17:43:25 -08:00
maxwell
3fe30cde12 removed message handler, postzord::dispatch is almost done, now i need to rip a bunch of methods out 2011-01-05 17:43:25 -08:00
Raphael
ff1cad6e63 raw import for requests 2011-01-05 17:38:00 -08:00
Raphael
0d80ded2d3 Raw import for post_visibilities 2011-01-05 17:25:11 -08:00
zhitomirskiyi
ce470e74ee notification calls email notification 2011-01-05 17:21:55 -08:00
zhitomirskiyi
02ca5793bc checking the string 2011-01-05 17:21:54 -08:00
Raphael
a02eb39bf1 error in profile export 2011-01-05 17:03:22 -08:00
Raphael
7b721836c8 Add the fixtures I've been using, fix a problem in person export 2011-01-05 16:49:04 -08:00
Raphael
b34acfd4eb Add contact raw import, fixtures have no comments 2011-01-05 16:40:16 -08:00
danielvincent
3363f84161 fixes photo overflow issue on photos/show 2011-01-05 16:00:00 -08:00
Raphael
e4ef2641f8 raw import of aspects and aspect memberships 2011-01-05 15:40:04 -08:00
zhitomirskiyi
67be774b7a setting the comment 2011-01-05 15:35:40 -08:00
zhitomirskiyi
82852db5ec added the files this time 2011-01-05 15:04:28 -08:00
zhitomirskiyi
7254db5cbc Revert "Revert "added comment on post mail method""
This reverts commit c9b3066599.
2011-01-05 14:59:15 -08:00
zhitomirskiyi
c9b3066599 Revert "added comment on post mail method"
This reverts commit c00226238b.
2011-01-05 14:56:04 -08:00
zhitomirskiyi
c00226238b added comment on post mail method 2011-01-05 14:55:17 -08:00
Raphael
079e2f4cb2 Get a little further in importing times 2011-01-05 11:51:36 -08:00
zhitomirskiyi
2f06ec1dca don't display notificatification badge div if there is no notification count (permalink works) 2011-01-05 10:07:22 -08:00
zhitomirskiyi
c7ecab4933 the new request email links back to the pod 2011-01-05 09:35:47 -08:00
MrZYX
ae623f03a7 updated locales 2011-01-05 16:53:32 +01:00
Sarah Mei
bed82d68ab how about we don't accidentally delete Rails.root, mmmkay? 2011-01-04 22:54:19 -08:00
Sarah Mei
7f86a9e1ba ImportToMysql now loads users.csv. Spec currently failing on datetime conversion. 2011-01-04 22:43:32 -08:00
Sarah Mei
80867bbc54 Make directory settable. 2011-01-04 21:08:28 -08:00
Sarah Mei
55191c6838 Move more stuff in to DataConversion::Base, refactor method names. Add spec for importer. 2011-01-04 20:28:10 -08:00
Sarah Mei
7453130c63 Namespacin'. 2011-01-04 20:12:11 -08:00
Sarah Mei
a4c01e4df1 More logging (w/ elapsed time) on mysql export. 2011-01-04 19:40:15 -08:00
Raphael
d64fd2d222 Don't redirect to root_url on aspect destroy 2011-01-04 18:00:49 -08:00
Raphael
429087ef83 Merge remote branch 'tomk/729-retain-input-on-failure' 2011-01-04 16:39:07 -08:00
Raphael
83d6b95c46 Merge remote branch 'nickvdb/763-notifications-paginate' 2011-01-04 16:18:46 -08:00
Raphael
0e55b0bf44 Merge remote branch 'tomk/721-wrong-person-link-when-creating-comment' 2011-01-04 16:14:39 -08:00
Raphael
adb238c7d1 Merge remote branch 'tomk/717-rake-statistics' 2011-01-04 16:13:28 -08:00
Raphael
8d5dc5d27b Merge remote branch 'tomk/ui-cosmetics' 2011-01-04 16:02:11 -08:00
Raphael
6102217a88 Don't display the invitations link unless the user has invitations, thanks Pasta 2011-01-04 15:59:53 -08:00
zhitomirskiyi
f134cfd43f moved the test to the controller 2011-01-04 15:44:55 -08:00
Raphael
06d7ddbe0d Hopefully get rid of some problems with deleted accounts moving forward 2011-01-04 15:36:42 -08:00
Raphael
c643346589 Making it easier to maybe put .inspect on all the accesses to the json export 2011-01-04 14:25:40 -08:00
Raphael
894a008daa Hopefully finish export to csv 2011-01-04 11:59:25 -08:00
Raphael
16d7ccdf0b fix youtube title stting 2011-01-04 11:48:02 -08:00
zhitomirskiyi
d3daa32558 mark a notification as read when you ignore a request 2011-01-04 11:27:25 -08:00
Raphael
936f7fdb3d newlines are in the data, probably easiest to use a different separator in the CSV 2011-01-04 11:24:11 -08:00
Raphael
0966889ab9 continue work on mongo export 2011-01-04 10:58:22 -08:00
MrZYX
b528802dc8 updated locales 2011-01-03 15:32:03 +01:00
lfortin
62585aa445 more JS formatting 2011-01-02 19:41:20 -05:00
lfortin
efb711963f in JS, avoid global variables as much as possible 2011-01-02 19:24:38 -05:00
Alec Leamas
4905b21286 Pkg update 2011-01-02 21:32:07 +01:00
Alec Leamas
457c330f68 Pkg update 2011-01-02 19:41:24 +01:00
Alec Leamas
22a696bcf8 Print warnings on stderr, where they belong. 2011-01-02 16:07:19 +01:00
zhitomirskiyi
20efe06ad5 capturing mousedown instead of click to handle open in other tab 2011-01-01 21:14:36 -08:00
zhitomirskiyi
212a6dfeee logging both the stout and the sterr 2011-01-01 20:43:47 -08:00
danielvincent
055fbe3e00 stream is now a div. generalized some partial extentions for mobile site. 2011-01-01 23:09:18 -05:00
MrZYX
9db2d8854f fixed #781 2011-01-01 23:55:12 +01:00
MrZYX
cdf1722247 updated locales 2011-01-01 17:14:26 +01:00
MrZYX
a71b81eacd renamed en-shaw to en_shaw 2011-01-01 02:22:35 +01:00
Philip Champon
607fea6722 Handling bug http://bugs.joindiaspora.com/issues/767
Added email argument to task, warn and replace if address resolves to
an invalid user@domain one.
2010-12-31 14:53:32 +01:00
MrZYX
3338397822 added en-shaw to languages.yml 2010-12-31 13:11:34 +01:00
MrZYX
0faeb70ec3 updated locales 2010-12-31 13:06:35 +01:00
zhitomirskiyi
94e0427ffa Merge branch 'master' of github.com:diaspora/diaspora 2010-12-30 14:28:41 -08:00
zhitomirskiyi
9f227b3b0a manual logging in the backup, since Rails.logger is nil 2010-12-30 14:27:35 -08:00
Alec Leamas
3f2d48b26e handling http/https references
See discussion in c92f80b2eb
2010-12-30 23:22:43 +01:00
MrZYX
4596759628 added ga to languages.yml 2010-12-30 14:41:08 +01:00
MrZYX
3133ade245 fixed indentation error in devise.ga.yml 2010-12-30 14:38:14 +01:00
MrZYX
892bc2bc1a Merge branch '99translations' of ../diaspora-fork 2010-12-30 14:29:39 +01:00
MrZYX
a7467dedb8 updated locales 2010-12-30 14:29:36 +01:00
MrZYX
c7458f107a fixed syntax error in devise.ga.yml 2010-12-30 14:28:13 +01:00
MrZYX
37964892ce Merge branch 'irish-language' of https://github.com/joedavis/diaspora 2010-12-30 14:24:24 +01:00
Thomas R. Koll
be270c4696 Adding rake statistics:genders to list all genders with profile count 2010-12-30 14:18:12 +01:00
Joe Davis
cca1b207bd finished translating 2010-12-30 12:58:27 +00:00
Thomas R. Koll
61d0f0ea65 Feature #717: Adding rake tasks to print statistics on users and content
Adds following rake tasks:
  rake statistics:users
  rake statistics:content
2010-12-30 13:38:26 +01:00
Raphael
4e44b197c2 Begin writing migration from mongo to mysql 2010-12-29 18:15:13 -08:00
Thomas R. Koll
5c7d39505a Fixes #721 when creating a comment (ajax) the link to your own profile is fucked up and instead it linked to the user id 2010-12-30 00:48:43 +01:00
Thomas R. Koll
367d2756be Fixes #713: Set a pointer cursor for "add photos" input field 2010-12-30 00:17:59 +01:00
Thomas R. Koll
6ea9b36cc9 Applying fix as suggested by duke 2010-12-30 00:07:29 +01:00
Raphael
0328c1677c Get rid of a reference to Mongo 2010-12-29 11:28:22 -08:00
Raphael
64c31af529 GREEN 2010-12-29 11:18:10 -08:00
Thomas R. Koll
5e1f5ff5b1 Starting spec for rails.js 2010-12-29 17:43:50 +01:00
Thomas R. Koll
869cbdf9e9 * Localizeable "Rename aspect" button
* Don't list emails_delivered if there are none yet
* Don't show drag_to_add button if there are no @remote_requests
2010-12-29 17:00:08 +01:00
Nick van der Burgt
3faff76b0c Reverted the changes in ie.js 2010-12-29 16:11:34 +01:00
Nick van der Burgt
c45fa2d402 Revert changes 2010-12-29 16:06:06 +01:00
MrZYX
154fa77bd6 updated locales 2010-12-29 12:49:30 +01:00
Nick van der Burgt
8bbb142c85 Set a limit on the second page 2010-12-29 12:32:24 +01:00
Nick van der Burgt
46e9be88d1 Wrote spec test for notifications pagination 2010-12-29 12:27:39 +01:00
Nick van der Burgt
e0f583d7d3 Fixed mistake of running will_paginate on @people instead of @notifications 2010-12-29 10:51:42 +01:00
Alec Leamas
6a90646eaa Nullifying test garbage in last patch 2010-12-29 10:46:29 +01:00
Alec Leamas
8d218e7871 suburi cucumber test.
Adds the features/uri-features test directory, testing sub-uri
deployment. These tests uses script/server since much of this code is
about configuring the server.  They are not run by "rake cucumber", to
run them use "bundle exec rake cucumber features/uri-test".

Tests requires a working app_config.yml setup with pod_url =
"http://localhost:3000/diaspora"

Patches cucumber.yml to always load step definitions from features/**, see
http://thoughtsincomputation.com/posts/cucumber-step-definitions-and-autorequire-hell
2010-12-29 10:31:25 +01:00
Alec Leamas
c92f80b2eb Cleaning up some paths.
Handling root_url if not ending w /, using http: for all cross-site
references.
2010-12-29 10:10:26 +01:00
Alec Leamas
215d6a8504 Build test diaspora_handle properly. 2010-12-29 10:10:08 +01:00
Sarah Mei
e2804dbbcb Replace old references to request.from with request.sender 2010-12-28 22:56:53 -08:00
Sarah Mei
2184af09d9 Patch database_cleaner to actually, you know, work. 2010-12-28 22:23:27 -08:00
Sarah Mei
f18439fa14 ZOMG specs pass on mysql!
Make '_type' column on services into 'type'.
2010-12-28 21:08:54 -08:00
Sarah Mei
fd74b79b61 do clean before each scenario so db doesn't get into borked state 2010-12-28 20:58:16 -08:00
Sarah Mei
a1b92f5224 Merge javascript formatting changes. 2010-12-28 20:31:49 -08:00
Sarah Mei
c1e036d4f7 Merge branch 'mysql' of github.com:diaspora/diaspora into mysql 2010-12-28 20:04:34 -08:00
Sarah Mei
6f1aee990c Database is cleaned between scenarios. Progress? 2010-12-28 20:03:58 -08:00
zhitomirskiyi
bd05e97c29 requiring the websocket lib file 2010-12-28 19:53:45 -08:00
zhitomirskiyi
ddf95e2750 couple more passing cucumber stories, changed the queries on request and notification 2010-12-28 19:14:47 -08:00
Thomas R. Koll
06d80d0e57 Issue #729: Failed posts and comments don't retain text
The forms were cleared on a submit event instead of a ajax:success
2010-12-28 23:46:34 +01:00
Joe Davis
eb84561dcd almost finished 2010-12-28 21:59:34 +00:00
Nick van der Burgt
b33056f72b Fixed a small mistake 2010-12-28 22:03:13 +01:00
Nick van der Burgt
c7f3a9abfd Pagination for the notifications 2010-12-28 21:54:41 +01:00
Nick van der Burgt
507a273716 Modified IE to be compatible in the future 2010-12-28 21:54:41 +01:00
Nick van der Burgt
2e9aab137f Added some more HTML5 elements so no suprises in the future 2010-12-28 21:54:41 +01:00
Raphael
4fec1bf717 1 failure left in mysql specs 2010-12-28 11:38:26 -08:00
Alec Leamas
122d1142b9 Fixing "Can't modify frozen string" error messages from rake db:first_user 2010-12-28 18:07:09 +01:00
zhitomirskiyi
be9101b51f Merge branch 'mysql' of github.com:diaspora/diaspora into mysql 2010-12-27 22:23:58 -08:00
zhitomirskiyi
11153cf2ca a couple more passing specs 2010-12-27 22:23:41 -08:00
Sarah Mei
787d550a1f Fix StatusMessagesController. Refactor specs to take out stuff that's tested elsewhere. MOAR REFAKTRNG PLZ. Is ugly. 2010-12-27 21:48:51 -08:00
Nick van der Burgt
00973e6ad6 Changed Chrome Frame back on 2010-12-27 19:13:41 +01:00
Nick van der Burgt
e6127c6aa9 Included ie.js into the layout 2010-12-27 17:33:50 +01:00
Nick van der Burgt
13b33ee864 Added ie.js file 2010-12-27 17:29:10 +01:00
Nick van der Burgt
980914bc87 Turned of Chrome Frame message thing 2010-12-27 17:27:29 +01:00
Raphael
3d7d8b51d2 Add a spec to user, fix a cucumber step for mysql 2010-12-26 21:05:48 -08:00
Raphael
5a1bd13831 Fix a couple more specs in mysql 2010-12-26 20:52:15 -08:00
Raphael
34b5566333 Merge branch 'mysql' of github.com:diaspora/diaspora into mysql 2010-12-26 20:37:28 -08:00
Raphael
a6dcaa2327 Photo specs passing, 9 failures left in mysql 2010-12-26 20:33:21 -08:00
Raphael
3e7e99831a 14 failures after updating mysql branch to master 2010-12-26 17:25:07 -08:00
Raphael
b642cd6840 Merging master into mysql 2010-12-26 16:30:17 -08:00
MrZYX
dbccb6d0de updated locales 2010-12-26 22:26:55 +01:00
Jonne Hass
647c02d38d updated danish locale - thanks Halfdan Mouritzen & friends 2010-12-26 22:13:40 +01:00
Sarah Mei
0e2fa40539 cucumber not quite as jacked on mysql 2010-12-26 12:46:48 -08:00
MrZYX
74b5281a75 Merge branch '761-aspect-name-double-escaped-in-page-title' of https://github.com/Dorian/diaspora into dorian 2010-12-26 21:44:04 +01:00
MrZYX
f92eb1735f Merge branch '756-status-not-formatted-in-photo-page' of https://github.com/Dorian/diaspora into dorian 2010-12-26 21:43:23 +01:00
Dorian
346217ea46 Bug #761 : Aspect name double escaped in page title 2010-12-26 03:59:15 +01:00
Dorian
89ce11456a Markdownify message in photo page 2010-12-26 03:06:19 +01:00
Dorian
b348f094ab Test for XSS in comment 2010-12-26 02:16:53 +01:00
Dorian
d6e72cd2bb Escape person.name in comment 2010-12-26 02:16:53 +01:00
danielvincent
3e9cce2a4b bigger avatars in stream. 2010-12-25 19:32:48 -05:00
danielvincent
7827968b52 removing <p> from statusmessage partial 2010-12-25 19:18:42 -05:00
danielvincent
0fb102a2ec right/left arrow keys functional on photo#show 2010-12-25 19:14:24 -05:00
danielvincent
30dd11b9fa mark notifications as read and update badge 2010-12-25 16:27:09 -05:00
danielvincent
4ff9622bfc notifications now properly socket (not a hack through comments like before). notification badge updates on new messages. 2010-12-25 16:07:31 -05:00
MrZYX
8b29e99cf8 updated locales 2010-12-25 15:22:43 +01:00
Sarah Mei
de502bf67c Convert aspect-edit-spec.js to use actual DOM fixtures generated by AspectsControllerSpec. 2010-12-24 18:39:20 -08:00
Sarah Mei
d0774022b0 adding file for terminitor: automatic terminal-opening utility 2010-12-24 17:29:10 -08:00
Sarah Mei
a1ea193fb9 Methods to generate jasmine fixtures in controller specs, and methods to load those fixtures in jasmine specs. 2010-12-24 16:08:45 -08:00
Michael Sofaer and Raphael Sofaer
7175200779 Fix a spec, need to move to a computer with firefox. 2010-12-24 15:17:24 -08:00
Sarah Mei
9c50f900ed Merry Christmas! I got you someting green.
Remove callback to decrementRequestCounter in aspect-edit.js, since we don't have a request counter on that page anymore. The callback was failing, so the ajax request was never officially completing. Cucumber hates that.
I am going to add jasmine fixture generation in the controller specs, so that next time, a jasmine test will fail in this situation.
Also: clean up manages_aspects.feature.
2010-12-24 14:14:24 -08:00
Michael Sofaer and Raphael Sofaer
30d60021f4 11 Controller specs remain in mysql. ALMOST DONE 2010-12-24 14:12:55 -08:00
Sarah Mei
a13136a4dc Clean up first_user rake tasks; create add_user rake task 2010-12-24 13:46:25 -08:00
Sarah Mei
5ae16c15a3 Fix bug in :pod_uri generation. 2010-12-24 13:00:06 -08:00
Sarah Mei
1f67cc2485 Replace APP_CONFIG with lib/app_config.rb so that it's testable. 2010-12-24 12:31:09 -08:00
Sarah Mei
aeaabd29f1 run specs before cucumber in default rake task 2010-12-24 10:41:20 -08:00
Michael Sofaer and Raphael Sofaer
82b226712f Posting spec green 2010-12-24 09:58:11 -08:00
MrZYX
6ba2e0b68d Merge branch '760-XSS-with-person-name' of https://github.com/Dorian/diaspora into Dorian-760-XSS-with-person-name 2010-12-24 15:56:00 +01:00
Dorian
5cbccda33a Spec for not allowing user to do the XSS 2010-12-24 15:49:26 +01:00
MrZYX
2f135f2579 updated locales 2010-12-24 15:41:54 +01:00
Dorian
293445225a Don't let user put HTML in alt and title image attribute of avatar 2010-12-24 15:33:04 +01:00
Michael Sofaer and Raphael Sofaer
331e6645c6 Just don't use count with select DISTINCT 2010-12-24 00:31:36 -08:00
Michael Sofaer and Raphael Sofaer
426651d827 Fixed a few more specs, having trouble getting AR to return the count of distinct (once for all aspects a post is visible in) posts a user can see 2010-12-24 00:23:37 -08:00
Michael Sofaer and Raphael Sofaer
22a5832c01 Fix retraction related failures in mysql 2010-12-23 23:04:04 -08:00
zhitomirskiyi
7796776135 vimeo works, does not yet fetch the title 2010-12-23 15:36:29 -08:00
Michael Sofaer and Raphael Sofaer
44093c9342 Status message spec now passes 2010-12-23 12:56:49 -08:00
MrZYX
07a074edb6 updated locales 2010-12-23 14:50:20 +01:00
Sarah Mei
2b7eeffd5b Fix searching in mysql. It now does one query for all tokens. And person_spec is green! 2010-12-22 22:24:04 -08:00
Raphael
924bcca0e2 Isolated problem in status message marshalling, mysql 2010-12-22 21:34:45 -08:00
Raphael
d01fbeac04 33 failures left in mysql 2010-12-22 16:37:41 -08:00
Raphael
55492535c6 Fix some more specs, aspects controller is green in mysql 2010-12-22 14:15:45 -08:00
zhitomirskiyi
1bc168d075 focusing a publisher on reshare 2010-12-22 09:51:50 -08:00
Raphael
baf0533466 logical failures on person spec, 25 failing model specs 2010-12-21 18:59:28 -08:00
danielvincent
9b6d40544c fixed _comments bug on show pages 2010-12-21 17:36:14 -08:00
Raphael
cbda6b8c58 58 failures with mysql 2010-12-21 17:14:52 -08:00
danielvincent
7cb9760a1e show comments toggle like fb 2010-12-21 16:56:32 -08:00
danielvincent
dae5906b6a ownership render bug fixed on photoshow 2010-12-21 16:56:32 -08:00
Raphael
319452537e Below 70 failures, GUIDs are next 2010-12-21 15:46:15 -08:00
Jeff Dickey & Michael Sofaer
fd96a6dbc4 Add Michael and Jeff to pairs file 2010-12-21 14:59:47 -08:00
maxwell
ec826e8c05 Revert "fix for js selector"
This reverts commit 0da4466da2.
2010-12-21 12:56:38 -08:00
maxwell
c2c6c00db8 a bad fix for a 500 on notification show when the post is deleted 2010-12-21 12:55:07 -08:00
maxwell
0da4466da2 fix for js selector 2010-12-21 12:55:07 -08:00
danielvincent
a0e85dfea2 added missing translations to photo#show 2010-12-21 12:49:40 -08:00
danielvincent
2150cb505e fixed person_photo_path 2010-12-21 12:44:33 -08:00
danielvincent
a6c5f420fa giving more pixels to photos on their show pages 2010-12-21 12:39:37 -08:00
danielvincent
4e3fe166d1 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-21 10:31:24 -08:00
danielvincent
a1f3ab3046 mark requests as read when a user responds to the request 2010-12-21 10:31:18 -08:00
MrZYX
e10af7fc8a made "Notifications" translatable 2010-12-21 19:18:29 +01:00
danielvincent
c17425b7fb fixed one cuke 2010-12-21 10:09:46 -08:00
Sarah Mei
f6dcb6b993 gitignoring database.yml 2010-12-20 20:13:27 -08:00
Sarah Mei
a4764e87e0 Moving database.yml to database.yml.example 2010-12-20 20:12:38 -08:00
Raphael
659dfd36ed Querying spec passes, 63 model spec failures 2010-12-20 18:49:07 -08:00
maxwell
43824c4b33 pushing for dan 2010-12-20 18:45:23 -08:00
maxwell
081e85f224 Revert "Extended sub-uri support." for now....
This reverts commit 9cd08bac67.
2010-12-20 18:12:12 -08:00
maxwell
6d4696faf0 MS DG notifications are now pretty decent 2010-12-20 18:05:31 -08:00
maxwell
152670a72b notification badge now in header 2010-12-20 18:05:31 -08:00
Raphael
f043c9cc7e Took MongoMapper out of the bundle, trying to fix querying. 2010-12-20 16:53:56 -08:00
Alec Leamas
9cd08bac67 Extended sub-uri support.
Adds new routing in routes.rb based on pod_uri. Assets are handled by a symlink
in public when using sub-uri. Various clean-up, removing thin and socket port
settings from server.sh (these are now taken from pod_uri and socket_port).

Basic functionality when setting a sub_uri like http://example.org/diaspora
now seems OK. Closes .http://joindiaspora.com/issues/737, and partially
http://joindiaspora.com/issues/391. Ports are yet to be defined and handled
in this context.

Conflicts:

	app/views/layouts/application.html.haml
	config/routes.rb
2010-12-21 01:13:15 +01:00
Raphael
049670654e Connecting spec passes with mysql 2010-12-20 14:22:44 -08:00
Raphael
dcf630fd9a Request spec passes, no more scope on requests 2010-12-20 13:59:46 -08:00
Raphael
4c47d8334c Add PostVisibility model, some more specs working 2010-12-20 13:23:05 -08:00
Julian Osman
42c602df2f Issue #735: Image link fixed and CSS corrected 2010-12-20 12:09:30 -08:00
maxwell
e0883fb176 remove object_id for notifications thx sarahmei for pointing out my evil ways 2010-12-20 12:06:50 -08:00
maxwell
ed0e739ac3 updated rails, and incorrect respond_to :location calls. you must supply an object with respond_with 2010-12-20 11:22:52 -08:00
Sarah Mei
c1bfbd358e Fix 1.9 build. Apparently mongo mapper in 1.9 does not like contacts(:pending => false) - it has to be contacts.where(:pending => false). And now you know. 2010-12-20 02:50:38 -08:00
Sarah Mei
850dcfd322 Updated versions of carrierwave, aws, cucumber, culerity, gherkin, haml, mail, rspec, rspec-core, rspec-expectations, rspec-mocks, and rspec-rails. What could possibly go wrong? 2010-12-20 02:49:44 -08:00
Raphael
d44e76a6aa Down to 250 failures in mysql 2010-12-20 00:36:48 -08:00
danielvincent
6c12a4c562 photo show page shows more photo. 2010-12-19 21:53:57 -08:00
zhitomirskiyi
e3f7bd319b 25 more passing tests 2010-12-19 21:41:46 -08:00
maxwell
533ff2fc39 improve selector for inf. scroll 2010-12-19 19:30:33 -08:00
maxwell
d5819e3c9e fix the ajax-loader for scroll on non root page 2010-12-19 19:15:16 -08:00
maxwell
c22894ff2a limit number of notifications in notifications#index 2010-12-19 19:05:45 -08:00
danielvincent
6d63a5d3c5 fixed user#move_contact. from/to aspects were incorrectly ordered in method call in aspect_controller. 2010-12-19 17:50:07 -08:00
Raphael
51083e9659 Another 50 passes in mysql 2010-12-19 13:57:46 -08:00
Raphael
0c67e271df Services are in mysql, contact_for and add_contact_to_aspect work again 2010-12-19 13:11:41 -08:00
Raphael
232de40457 Only service hasn't been migrated, there are a good 100 passing examples in mysql 2010-12-19 12:27:32 -08:00
MrZYX
6357cd3b95 updated locales - added slovenian and hungarian to languages.yml 2010-12-19 15:01:59 +01:00
MrZYX
b52718e913 small translation fix 2010-12-19 14:41:47 +01:00
MrZYX
1b6f341348 made linking more robust, this fixes #732 2010-12-19 13:49:46 +01:00
danielvincent
bb0375d2f8 uploaded photos show in the publisher textarea instead of outside and above. fixed comment textarea on show pages. 2010-12-18 22:40:42 -08:00
zhitomirskiyi
4425c3df83 reshare now works as expected opens the publisher and has the share button 2010-12-18 22:30:12 -08:00
Mike Sofaer, Raphael Sofaer & Sarah Mei
3fe2924a60 WIP moving to mysql 2010-12-18 21:16:39 -08:00
lfortin
0393ac5a6f more JS formatting 2010-12-19 00:15:00 -05:00
danielvincent
01e557ba7a put ajax:success for publisher where it belongs 2010-12-18 20:31:02 -08:00
danielvincent
d5916c9287 removed comment button from sight 2010-12-18 20:26:27 -08:00
Mike Sofaer, Raphael Sofaer & Sarah Mei
5c21e220ff post_spec now passes with mysql 2010-12-18 20:23:16 -08:00
danielvincent
a42a773d3d dim service icons when not public. remove 'make public' label, now checkbox title. 2010-12-18 20:00:13 -08:00
danielvincent
ee9e187e5c fixed build, add photos has a solid border 2010-12-18 19:45:50 -08:00
danielvincent
7b4da22617 shift+enter for a newline, enter for submission. inversion of current implementation. 2010-12-18 18:49:10 -08:00
Mike Sofaer, Raphael Sofaer & Sarah Mei
58f757b91d profile_spec is passing with mysql... baby steps. 2010-12-18 18:45:55 -08:00
Mike Sofaer, Raphael Sofaer & Sarah Mei
c43cd7bf7a add Mike to .pairs 2010-12-18 18:44:45 -08:00
danielvincent
78a50756c6 publisher collapsed by default on all pages. removed button styling from add photos button. publisher only collapses on ajax success. comment buttons use show() instead of fadeIn(). 2010-12-18 18:28:00 -08:00
Raphael
36b622c998 Fix build 2010-12-18 15:22:56 -08:00
Raphael
02f745900f Get rid of youtube-title failure 2010-12-18 15:16:05 -08:00
MrZYX
6afba8fb7b updated locales 2010-12-18 16:07:49 +01:00
MrZYX
c3a79f7298 some fixes to translations 2010-12-18 15:25:21 +01:00
Alec Leamas
5e4219b09e Pkg update 2010-12-18 15:18:48 +01:00
maxwell
f1ae312e75 changes for person show page 2010-12-18 02:10:00 -08:00
maxwell
bcca61af6b infinate scroll 2010-12-18 01:33:33 -08:00
Raphael
a64fa0839f Hide notifications link until we take out queries from it 2010-12-17 20:19:02 -08:00
maxwell
427cf18324 fix birthday spec 2010-12-17 19:41:42 -08:00
maxwell
84c041ba6a aspects streams now ajax 2010-12-17 19:41:42 -08:00
danielvincent
f6701f2262 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-17 19:29:17 -08:00
Raphael
a64d8943b4 Pulled in spec refactor, thanks blackxored 2010-12-17 18:49:34 -08:00
maxwell
b3c63a3cc0 you can now unset the year of your birthday" 2010-12-17 18:05:13 -08:00
maxwell
96b907122b only show profile fields if they are filled out. 2010-12-17 17:40:08 -08:00
maxwell
13407f700e fix test 2010-12-17 17:25:11 -08:00
maxwell
2e85a9fe66 notifications now can be read 2010-12-17 17:06:49 -08:00
maxwell
c749d81fe9 putting a link to notifications, make them unread in the controller when you view the index 2010-12-17 17:06:48 -08:00
maxwell
807187ded9 /notifications is now pretty cool 2010-12-17 17:06:48 -08:00
Raphael
2545de6470 Revert "i can haz right timezone?"
This reverts commit 6d233e5eed.
2010-12-17 16:44:57 -08:00
Raphael
fe85e4cc75 Fix daemontools resque worker run script 2010-12-17 14:33:57 -08:00
danielvincent
6afb7a6bd5 Revert "added configuration for cloudfile cdn"
This reverts commit 0d5ac3bd36.
2010-12-17 14:30:02 -08:00
Raphael
b8648f631a Use ree in the chef scripts, might revert later 2010-12-17 12:49:44 -08:00
danielvincent
0d5ac3bd36 added configuration for cloudfile cdn 2010-12-17 12:26:20 -08:00
danielvincent
9ef9b3f0c3 log backup rake tasks 2010-12-17 12:26:20 -08:00
Raphael
60c5f03645 Merge remote branch 'pupeno/master' 2010-12-17 11:57:17 -08:00
maxwell
6d233e5eed i can haz right timezone? 2010-12-17 11:52:52 -08:00
maxwell
3c3e03993a make the two links on comment notifications clearer 2010-12-17 11:48:08 -08:00
maxwell
5763b441be fixing order of Notification.for 2010-12-17 11:37:33 -08:00
maxwell
39deac62fb in words is not a helper 2010-12-17 11:05:58 -08:00
J. Pablo Fernández
5b9ec61c6e Install bzip2 when bootstrapping, rvm needs it. 2010-12-17 08:22:32 -03:00
lfortin
77c102cce6 more JS formatting 2010-12-16 23:46:28 -05:00
maxwell
0bdb6aaab5 more notification stuff 2010-12-16 19:00:32 -08:00
maxwell
d56093666e fix for local passing optimization 2010-12-16 18:42:13 -08:00
maxwell
92bbe4cd4c added link to changelog, updated notifications 2010-12-16 18:28:22 -08:00
danielvincent
a41f45b846 contact count on home page 2010-12-16 18:21:06 -08:00
danielvincent
bc9352eabd fix id/string error in receive local job 2010-12-16 18:21:06 -08:00
maxwell
b8a0abd122 updating notification views 2010-12-16 18:07:43 -08:00
Raphael
bd64cb723f to_s args before trying to slice them 2010-12-16 17:58:11 -08:00
maxwell
e7cca604e6 refactored notifications 2010-12-16 17:30:35 -08:00
Raphael
647c48d530 Set auto_flushing to 1 explicitly 2010-12-16 17:26:46 -08:00
danielvincent
2758ea1625 fixed issue with diaspora handles not displaying in streams 2010-12-16 17:24:25 -08:00
danielvincent
28a22d9fc3 increase session timeout from 10 minutes to 1 day 2010-12-16 17:24:25 -08:00
Raphael
4da97be84b Add benchmarks and logging to resque jobs 2010-12-16 16:48:36 -08:00
danielvincent
f3ced6d96c randomize collections of similar contacts on people#show 2010-12-16 16:37:13 -08:00
danielvincent
b4b6189321 time out a user session via devise after 10 minutes of inactivity 2010-12-16 15:50:00 -08:00
Raphael
719081473e Fix log statements in Encryptable 2010-12-16 15:22:26 -08:00
Raphael
5e6c14fce8 Simplify connect_users for a huge test speedup 2010-12-16 14:47:37 -08:00
danielvincent
1465024f10 skipping receive process for incoming local posts, calling receive_object directly 2010-12-16 14:39:19 -08:00
Raphael
d2199fa1eb Profile of requestor should be visible; no outgoing request instance variable needed 2010-12-16 14:09:55 -08:00
Raphael
eb56521a66 Don't query inside of loops... 2010-12-16 12:25:31 -08:00
Raphael
fdcbe36ae9 Fix chromeframe call 2010-12-16 11:54:17 -08:00
danielvincent
f821f49db1 added similar contacts to contact pages 2010-12-16 11:49:08 -08:00
Raphael
72c377fa73 No chrome frame in 8 or 9, will take some time to make it less abrupt/confusing/unavoidable later, and give a notification to people using 8 that the site is broken in 8 2010-12-16 11:46:57 -08:00
Raphael
b467d12d83 Fix spec in peoplecontroller 2010-12-16 11:37:16 -08:00
maxwell
f00e0ada78 do a bad thing in the helper to get comment links 2010-12-16 11:23:57 -08:00
maxwell
20ca2e2e93 make Notification.for return a query, not evaluate.. also limit notifications pulled back to 25 2010-12-16 11:16:09 -08:00
maxwell
6101f57d62 fix a couple of broken links in our readme, thx dmorley 2010-12-16 11:04:17 -08:00
maxwell
58ce05cf0e fix a config option in chef script 2010-12-16 10:49:24 -08:00
maxwell
1274dbbf5d Merge branch 'master' of github.com:diaspora/diaspora 2010-12-16 10:16:39 -08:00
maxwell
1451db6cd8 fixed rspec build 2010-12-16 10:15:16 -08:00
danielvincent
43810907f5 show all contacts in edit aspect pane 2010-12-16 10:00:18 -08:00
Alec Leamas
e7f1190705 Pkg update (lost in git space) 2010-12-16 17:45:05 +01:00
Alec Leamas
472d1c8c84 Pkg update (bugfix) 2010-12-16 17:12:20 +01:00
Alec Leamas
a525669a4e Pkg update (installation is also needed) 2010-12-16 15:43:48 +01:00
Alec Leamas
02477ed27a Trying to cope with #722 for the moment.
Issue warning if there already is a running redis server, typically
the system server installed with the redis[-server] package.

See http://bugs.joindiaspora.com/issues/722
2010-12-16 12:19:10 +01:00
Alec Leamas
220e9ebd2c Pkg update (major process control revision)
Never trust your test scripts... this has been an insane mess, and although
improved more bugs should be anticipated in this area. Sigh.
2010-12-16 11:51:46 +01:00
zhitomirskiyi
08c1142e4a logging the number of open channels 2010-12-15 21:16:50 -08:00
maxwell
226d95ec2c Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 19:15:26 -08:00
Raphael
837ad20045 unpend spec in aspects controller spec 2010-12-15 18:11:09 -08:00
maxwell
d5ba34f245 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 18:05:54 -08:00
Raphael
e881edab96 Fix missing partials on last commit, you can now accept a request from the requestor's profile page 2010-12-15 18:05:18 -08:00
maxwell
8d91771cb2 xml escape things 2010-12-15 18:05:09 -08:00
Raphael
3b727dc887 Add share_with fancybox on search page, fix a couple of queries 2010-12-15 17:45:12 -08:00
maxwell
cb5982704e dont url escape, xml escape 2010-12-15 17:43:46 -08:00
maxwell
8ec85d3b12 basic notifications 2010-12-15 17:31:36 -08:00
Laurent
4515ba631f some JS refactoring 2010-12-15 19:25:35 -05:00
Raphael
b22398951e Send requests from the aspect list on the person show page 2010-12-15 14:48:14 -08:00
Raphael
80a9b97f8d add_person_to_aspect is now add_contact_to_aspect, some methods now take models rather than ids 2010-12-15 14:48:14 -08:00
zhitomirskiyi
d34964651c if aspect is not dropped it redirects back for consistency 2010-12-15 14:44:10 -08:00
zhitomirskiyi
4256ea34b6 rename aspect on the aspect show page 2010-12-15 14:15:07 -08:00
maxwell
9555fae33d no notifications on retractions 2010-12-15 13:14:46 -08:00
maxwell
61b2bbbd7d Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 12:28:09 -08:00
maxwell
d5edc9b477 CGI::escaping for proper, good juju activity streams 2010-12-15 12:27:52 -08:00
MrZYX
14f2341ae1 updated locales 2010-12-15 21:26:27 +01:00
zhitomirskiyi
2abcd8d147 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 12:11:58 -08:00
maxwell
b6754d92b7 adding basic notification class 2010-12-15 12:11:47 -08:00
maxwell
a7d36615e6 adding basic notification class 2010-12-15 12:11:37 -08:00
Maxwell Salzberg
555542da31 remove extra slash 2010-12-15 12:01:20 -08:00
zhitomirskiyi
1212b34706 fadeOut on delete 2010-12-15 11:58:38 -08:00
Maxwell Salzberg
f8c2f15bb1 use the full pod_url in the template 2010-12-15 11:48:13 -08:00
Dan Hansen & Sarah Mei
82e2f23f91 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 14:29:33 -05:00
Raphael
e539688e1c Fix rake db:reset 2010-12-15 11:28:50 -08:00
Raphael
bd31ff3ee3 Fix request validations, build. 2010-12-15 10:48:29 -08:00
maxwell
d75084c8d0 remove GS from 500 page 2010-12-15 10:16:33 -08:00
Dan Hansen & Sarah Mei
b372e813f3 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-15 01:21:44 -05:00
Dan Hansen & Sarah Mei
fbfe28bcfa added vimeo method, still needs support from lib/youtube_titles.rb. updated locales 2010-12-15 01:20:53 -05:00
Dan Hansen & Sarah Mei
c4a7745c88 Refactored the markdownify method. 2010-12-15 01:00:20 -05:00
Raphael
94fe0b4049 Do the update in JS 2010-12-14 21:54:18 -08:00
Raphael
bc35388d1f Use find_each 2010-12-14 20:58:22 -08:00
zhitomirskiyi
1d1faea9e7 tiny typo 2010-12-14 19:50:22 -08:00
danielvincent
2cf332e120 Remove sent boolean from requests, finish migration 2010-12-14 19:27:18 -08:00
danielvincent
dea8d248e2 user only pushes to non-pending contacts 2010-12-14 19:11:35 -08:00
danielvincent
f1ee32145d Remove pending_requests from user, just use Request.from and Request.to. 2010-12-14 19:00:03 -08:00
maxwell
0119de4afc adding task to fix users with periods 2010-12-14 18:45:10 -08:00
maxwell
6bd42874e8 adding a task to fix person object with spaces in their name 2010-12-14 17:36:27 -08:00
maxwell
5d336d20e8 spelling fix 2010-12-14 17:36:27 -08:00
maxwell
d24be269f2 small refactor of admin mail. don't call deliver in the method 2010-12-14 17:36:26 -08:00
danielvincent
aef5abf631 Correct some queries, look at incoming requests in search, explicit pending false in activate_contact 2010-12-14 17:33:07 -08:00
danielvincent
b1c0facfe6 initiating a request now just creates a pending contact instead of persisting a request 2010-12-14 17:11:43 -08:00
Raphael
06b7b1c99a WIP pending contacts 2010-12-14 17:11:42 -08:00
Raphael
251cdec2ec Add full request cycle cucumber feature 2010-12-14 17:11:42 -08:00
maxwell
c38fbd27e4 prevent gifs thru getting through javascript uploader 2010-12-14 13:31:06 -08:00
Raphael
d3850292d5 Don't query current_user.contacts on every action 2010-12-14 12:38:48 -08:00
Raphael
e63a8a4bfa Take contact.person query out of the views, only query people once in hashes_for_aspects 2010-12-14 12:11:36 -08:00
danielvincent
fd9d1332fc break service http into its own queue 2010-12-14 11:43:26 -08:00
maxwell
0bd13ec106 use blank instead of empty for the person#name helper 2010-12-14 11:30:06 -08:00
maxwell
2bc849fa90 only show permalink if the post is infact public. also, make destroy delete 2010-12-13 18:45:54 -08:00
maxwell
e3e3fd13e5 no trailing slash on pod url on login page. it just looks weird 2010-12-13 18:21:50 -08:00
zhitomirskiyi
7e3b2c6afd removed the query from the contact list partial 2010-12-13 17:53:27 -08:00
maxwell
8ba619029e adding about text on invite accept page 2010-12-13 17:24:33 -08:00
danielvincent
d6bb5291bc Revert "Merge branch '348-change-email' of https://github.com/mblog/diaspora into mblog-348-change-email"
This reverts commit 2ac54eeffe, reversing
changes made to 3a13657087.
2010-12-13 17:16:56 -08:00
maxwell
c2ad170506 re add 'remember me' button 2010-12-13 17:05:35 -08:00
Raphael
d44df7e977 put remove contact link under aspect membership 2010-12-13 16:40:05 -08:00
Raphael
02d76441e4 Merge branch 'aspect-list-on-profile' 2010-12-13 16:12:29 -08:00
Raphael
baa04ceac7 Add aspect list to contact page 2010-12-13 15:58:08 -08:00
maxwell
bcaeabdb87 remove some fields from our log that I dont want to see and dont help with managing a seed 2010-12-13 15:50:01 -08:00
maxwell
42c22cedf9 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-13 14:38:47 -08:00
maxwell
d9f25473d2 fix a bug with the notifier and attachment 2010-12-13 14:28:21 -08:00
maxwell
d73ce4d8cf making image names more generic 2010-12-13 14:02:20 -08:00
maxwell
8eb9ab1781 making image names more generic 2010-12-13 14:02:11 -08:00
MrZYX
045ba7c419 Merge branch 'email-validation' of https://github.com/themasch/diaspora into themasch-email-validation 2010-12-13 22:49:50 +01:00
MrZYX
2ac54eeffe Merge branch '348-change-email' of https://github.com/mblog/diaspora into mblog-348-change-email 2010-12-13 22:48:58 +01:00
MrZYX
3a13657087 fix for #557 2010-12-13 22:23:19 +01:00
mblog
d0355fdd43 Feature #348: Change Email 2010-12-13 22:14:52 +01:00
maxwell
502db347cc removed homepage detail into a partial, which you should redefine 2010-12-13 12:52:23 -08:00
maxwell
4fe42044ac removed homepage detail into a partial, which you should redefine 2010-12-13 12:52:08 -08:00
Raphael
f861955d80 profile.image_url is set to :thumb_large in update_profile 2010-12-13 12:11:54 -08:00
danielvincent
68a51448e5 comment link shows up again on contact pages 2010-12-13 10:19:04 -08:00
Alec Leamas
0f05d3e6f4 Pkg update
Features: working ubuntu README (old was a mess...)
2010-12-13 16:57:20 +01:00
MrZYX
c97af9cd03 pulled locals from 99translations 2010-12-13 16:20:05 +01:00
Mark Schmale
9a873aa760 added fix for Bug #695 to email-validation 2010-12-13 15:54:35 +01:00
Mark Schmale
4cc62ffaca added spec for email validation 2010-12-13 15:46:19 +01:00
Mark Schmale
d163875577 added email validation. The border of the input field becomes red if the input seems to be invalid. 2010-12-13 15:46:19 +01:00
MrZYX
2946fea85a Merge branch 'themasch-bug_659_cross_browser_charcode' 2010-12-13 15:34:30 +01:00
MrZYX
8c234fbaa4 forgot to add a new file 2010-12-13 15:19:16 +01:00
MrZYX
a89aa9c5ab Merge branch 'bug_659_cross_browser_charcode' of https://github.com/themasch/diaspora into themasch-bug_659_cross_browser_charcode 2010-12-13 15:16:49 +01:00
MrZYX
a8d0d50173 pulled locales from rails-i18n. This overides the fix made to en-US.yml, please send it upstream 2010-12-13 15:11:22 +01:00
MrZYX
1284fcc92d fix for #699 2010-12-13 15:04:11 +01:00
Mark Schmale
f5038cdc3c replaced charCode by keyCode. On every browser, keyCode is filled
with the Unicode Character Code when used in keypress.
charCode is only supported in some browsers.
2010-12-13 11:55:54 +01:00
Dan Hansen
390587777f more vendor prefix fixes 2010-12-13 01:21:54 -05:00
Dan Hansen
7c7254bf64 Vendor prefix police 2010-12-13 01:08:03 -05:00
Sarah Mei
3eaf7c48e6 white space police 2010-12-12 13:43:01 -08:00
Sarah Mei
7cd8e0f16b Fix jasmine specs so that they fail when they're supposed to. 2010-12-12 12:57:11 -08:00
MrZYX
f2719e4c94 updated locales - as always all the honor goes to the people at 99translations 2010-12-12 17:11:31 +01:00
MrZYX
6cacfde6a6 two fixes to translations 2010-12-12 15:55:51 +01:00
danielvincent
2f2f8fef8a delete/reshare only if current_user on stream_element 2010-12-12 01:41:54 -08:00
danielvincent
f7a7dff53b allow for newlines in profile bio 2010-12-12 00:50:30 -08:00
danielvincent
d19353ed8f added newline support to markdownify 2010-12-12 00:44:54 -08:00
Dan Hansen
6353f5f035 in firefox if you clicked the A with your handle and didnt hover over it it'd turn black because of screen.css:39 2010-12-12 01:49:13 -05:00
Dan Hansen
02bb2fa19f hide reshare menu if you click somewhere it's not 2010-12-12 01:38:28 -05:00
Dan Hansen
8b1c8d6a1b moz vendor prefix typo fix for .circle 2010-12-12 01:33:38 -05:00
Dan Hansen
c843b508c9 add vendor prefixes for the border radius on #new_request_pane 2010-12-12 01:29:05 -05:00
Dan Hansen
be9a7edf4d vendor prefixes for border radius on #new_request_pane 2010-12-12 01:17:20 -05:00
Dan Hansen
55b16b00f4 Firefox sends charCode 0 when backspace is pressed 2010-12-12 01:09:47 -05:00
danielvincent
52a3996ad0 textareas auto expand 2010-12-11 22:18:03 -08:00
Dan Hansen
3b5ee72ed8 added that in the wrong place 2010-12-12 00:09:15 -05:00
Dan Hansen
20e2c2ed25 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-12 00:06:10 -05:00
Dan Hansen
aa40af24c9 fix http://bit.ly/fQLxaK ugliness 2010-12-12 00:05:55 -05:00
danielvincent
6c4ead4ac7 make favicon more like apple-touch-icon 2010-12-11 21:00:34 -08:00
Raphael
627561737c Just get rid of some whitespace 2010-12-11 20:34:25 -08:00
danielvincent
b4170dc991 badges on stream elements. say 'all aspects' instead of listing out all user's aspect names 2010-12-11 20:28:40 -08:00
maxwell
91c331d630 fix to limit size of request box 2010-12-11 16:28:37 -08:00
MrZYX
0d70f78a12 small translation fix 2010-12-11 22:03:06 +01:00
Sarah Mei
0230a9bd37 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-11 12:32:44 -08:00
Sarah Mei
646603ffe0 Don't show rake output when running migrations_spec 2010-12-11 12:32:33 -08:00
danielvincent
c9b498d59c resolved 500 page on getting_started#step_3 2010-12-11 12:05:58 -08:00
danielvincent
fd2cbc1cf4 added invite link to search page 2010-12-10 18:28:51 -08:00
danielvincent
6f62161442 invitation emails stripped of whitespace from form 2010-12-10 18:10:24 -08:00
danielvincent
2c5d5d9328 show already invited users on invitation#new 2010-12-10 18:05:08 -08:00
MrZYX
0b57ccd47f fixed require 2010-12-10 21:49:09 +01:00
Raphael
2c141baf78 Capitalization... 2010-12-10 12:12:34 -08:00
Raphael
4bb9370c5d Correctly stub the websocket redis method 2010-12-10 11:53:18 -08:00
maxwell
076d0e5edd Merge branch 'master' of github.com:diaspora/diaspora 2010-12-10 11:47:20 -08:00
maxwell
c774685d52 users can now disable email notfications 2010-12-10 11:47:10 -08:00
Raphael
461171f6d6 Take magent out of the initializer 2010-12-10 11:28:55 -08:00
Raphael
0e77577fbd Websocket now uses redis 2010-12-10 11:25:38 -08:00
danielvincent
8de5c5babd fixing request bar on aspects#manage 2010-12-10 10:12:30 -08:00
maxwell
95c31b18e2 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-10 09:58:03 -08:00
maxwell
533b2e45f2 updating queue order to have socket webfinger 2010-12-10 09:57:49 -08:00
MrZYX
1c306289f1 pulled locales. thank you contributors 2010-12-10 18:31:39 +01:00
MrZYX
36043845ca fixed requires for ruby 1.9 2010-12-10 17:25:02 +01:00
MrZYX
0374ee436e fixed untranslatable strings 2010-12-10 16:52:35 +01:00
Alec Leamas
eacee54846 Replace APP_CONFIG[:terse_pod_url] with uri object.
Adds a new APP_CONFIG[:pod_uri] item, an uri object parsed from
pod_url. Replace all occurrences of APP_CONFIG[:terse_pod_url] with
APP_CONFIG[:pod_uri].host. Closes http://bugs.joindiaspora.com/issues/684,
using the well-defined semantics of the uri object.

The pod_url is normalized using module URI's functions, always with a
trailing /.

The diaspora-handle will always reflect the pod_url with this patch
i. e., a pod_url like www.dpod.se will give the handle xx@www.dpod.se;
previous code stripped the www. prefix. If this is a problem, it
should be addressed by another setting, since one cannot presume that
www.domain.tld resolves to the same address as domain.tld.
2010-12-10 14:29:19 +01:00
maxwell
416a36ea9a ugh 2010-12-09 20:32:39 -08:00
maxwell
23e635bf20 i am an idiot 2010-12-09 20:30:38 -08:00
maxwell
78979bca6a Merge branch 'master' of github.com:diaspora/diaspora 2010-12-09 20:25:00 -08:00
maxwell
645519be32 require twitter and facebook? 2010-12-09 20:24:45 -08:00
danielvincent
abcd3ca5b0 time ago in words down to seconds 2010-12-09 20:13:46 -08:00
danielvincent
624cb45ee2 fixed aspect nav FF bug 2010-12-09 20:09:21 -08:00
danielvincent
5731f32cfe add correct page titles 2010-12-09 20:09:20 -08:00
Raphael
fc73c02c3a Fix hashes_for_person spec 2010-12-09 20:01:37 -08:00
maxwell
58dafd6792 get rid of post in service 2010-12-09 20:00:56 -08:00
maxwell
1ad3dee0dc another warning message in migration 2010-12-09 19:29:25 -08:00
maxwell
30e86c9d6a add further warning 2010-12-09 19:29:25 -08:00
maxwell
dfbc01ca7a added a test for the converter rake task 2010-12-09 19:29:25 -08:00
maxwell
bf56364019 tests for post to services resque job 2010-12-09 19:29:25 -08:00
maxwell
d81aa7dfe1 added specs for push_to_services, also rename the socket webfinger job spec because since it did not end with '_spec' it was not getting run 2010-12-09 19:29:25 -08:00
maxwell
9d37b2a749 small bugfixes for services refactor 2010-12-09 19:29:25 -08:00
maxwell
8fe2eb3180 starting migrations 2010-12-09 19:29:25 -08:00
maxwell
a4336a8e72 moar tests for services 2010-12-09 19:29:25 -08:00
maxwell
041e747db6 MSSM services are now broken out into seperate classes, and we cleaned up posting to them 2010-12-09 19:29:25 -08:00
Raphael
2be0666d80 Remove query from aspects manage, correct spec in User spec 2010-12-09 19:11:47 -08:00
Raphael
778c62e0b0 Use mail css partial 2010-12-09 19:11:47 -08:00
danielvincent
eaeb55f65b make aspect tabs look less cluttered 2010-12-09 19:04:03 -08:00
maxwell
3625a5f2f1 display a basic message for when nothing was searched for 2010-12-09 16:51:58 -08:00
maxwell
10ca0688f5 dont show get satisfaction unless you are on joindiaspora.com 2010-12-09 16:35:31 -08:00
zhitomirskiyi
10141742e5 Doing the query in mongo 2010-12-09 15:53:37 -08:00
Raphael
e406426b81 select only profile on most Person queries 2010-12-09 15:04:40 -08:00
maxwell
13740da9b9 fix for people controller where Person.search was returning a non-deterministic order of people 2010-12-09 14:37:07 -08:00
maxwell
b54a72c240 Revert "Revert "fixed commenting bug on current user's profile page""
This reverts commit 166202d0b2.
2010-12-09 13:57:43 -08:00
maxwell
5fb782a988 added post guid for local notifications 2010-12-09 13:56:53 -08:00
maxwell
166202d0b2 Revert "fixed commenting bug on current user's profile page"
This reverts commit 8264c58e3e.
2010-12-09 13:53:23 -08:00
danielvincent
8264c58e3e fixed commenting bug on current user's profile page 2010-12-09 13:42:11 -08:00
Raphael
3a4caca397 Fix photo uploading in profile photos, style photo upload button better 2010-12-09 13:06:31 -08:00
Raphael
b8589c457d Refactor people edit page, now using form_tag 2010-12-09 13:03:30 -08:00
zhitomirskiyi
23d2a92bf1 pushing the profile to to all the contacts 2010-12-09 11:51:35 -08:00
danielvincent
fa9caf00ca added tooltip text to public icon 2010-12-08 19:07:08 -08:00
danielvincent
aa628c090d highlight public posts in the stream 2010-12-08 18:59:02 -08:00
danielvincent
cdd225c076 don't show new comment form on a non-contact's post 2010-12-08 18:23:30 -08:00
danielvincent
faf27fe05a Merge branch 'master' of github.com:diaspora/diaspora 2010-12-08 17:06:39 -08:00
danielvincent
46793179db people#show displays shows public posts for non-contacts as well 2010-12-08 16:53:24 -08:00
maxwell
10df61a504 order of birthday is now correct for US english, also, you birthday actually sticks on the getting started page 2010-12-08 16:35:48 -08:00
maxwell
e4e3a7493c fixed a bug where reshare text was truncated 2010-12-08 15:09:41 -08:00
maxwell
69f42667b3 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-08 14:34:53 -08:00
maxwell
d6c5a88836 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-08 14:34:31 -08:00
Alec Leamas
7510d06211 Pkg update
Handling new services reasonably on ubuntu/fedora. Open issues
includes pod_url setup.
2010-12-08 23:27:29 +01:00
Alec Leamas
6b00ca238f Fixing also logfile in redis.conf
Not tested on BSD/Darwin, might need polish for these.
2010-12-08 23:26:07 +01:00
maxwell
6d6e4f92bb Merge branch 'master' of github.com:diaspora/diaspora 2010-12-08 14:21:40 -08:00
maxwell
1f8f07f48d added slightly better error message on aspect update failure 2010-12-08 14:21:14 -08:00
maxwell
3dbb80bf9f added slightly better error message on aspect update failure 2010-12-08 14:14:49 -08:00
maxwell
f659ba58ef limit the new aspect form name to be less than 20 char in the form 2010-12-08 13:58:16 -08:00
maxwell
5f1f28923f fixed a comment counting bug, and the show_all_comments message when the comment count was three 2010-12-08 13:44:57 -08:00
maxwell
efee7682e2 aspect rename now works 2010-12-08 13:11:13 -08:00
MrZYX
9925aba066 Merge branch '676-bsd-sed' of https://github.com/flah00/diaspora into flah00-676-bsd-sed 2010-12-08 19:36:14 +01:00
MrZYX
806d193f64 updated locales 2010-12-08 19:21:13 +01:00
Alec Leamas
843405116f Redis.conf: handling read-only install... 2010-12-08 16:05:20 +01:00
danielvincent
497dcccb8f merge email and mail queues in resque 2010-12-07 23:40:07 -08:00
Philip Champon
ccbf51fdbe Issue 676: allow for correct calling of bsd sed 2010-12-08 01:03:55 -05:00
danielvincent
b94e6ae4a0 shift+enter submits new messages/comments 2010-12-07 21:30:29 -08:00
Hexagon
5c1c31b2b2 Final fix, really 2010-12-07 22:40:27 +01:00
Hexagon
d04e8eff00 Putting document.ready back 2010-12-07 22:38:02 +01:00
Hexagon
80c5c5c9f5 Cleaning up revert of #619 pull 2010-12-07 22:20:26 +01:00
MrZYX
b1663a710c updated locales. huge thank you to all contributors at 99translations 2010-12-07 21:32:15 +01:00
Alec Leamas
93d7e08fd8 Pkg update (mongodb setup) 2010-12-07 19:10:50 +01:00
Alec Leamas
23a5db1013 Creates and maintains a local redis.conf.
Creates config/redis.conf using mater copy in etc. FTM, disables
daemonizing, which doesn't fit script/server (or upstart/systemd).
2010-12-07 19:06:25 +01:00
Raphael
18319f8e42 Hopefully cut down the stream rendering time by memoizing the new comment form 2010-12-07 09:28:11 -08:00
Alec Leamas
2ab4d1664d Pkg update
Once again builds on all platforms. Open issues includes configuration
of mongodb and redis.
2010-12-07 15:30:39 +01:00
Raphael
f421f1327c Take nested queried out of aspects manage 2010-12-07 00:21:05 -08:00
danielvincent
d3483c1cd5 forgot to remove something... 2010-12-07 00:00:34 -08:00
danielvincent
de0ecff5b7 aspects first on home contact list. 2010-12-06 23:59:16 -08:00
Raphael
9442553504 Refactor aspectscontroller and aspect_contacts.haml 2010-12-06 17:20:21 -08:00
Raphael
14a9bc02f9 Move aspect_contacts in to aspects 2010-12-06 17:20:21 -08:00
Raphael
c034113a7c Refactor to aspect partial 2010-12-06 17:20:21 -08:00
danielvincent
9891577fa5 500 page now shows a getsatisfaction pane defaulted to problem tab 2010-12-06 16:03:02 -08:00
Raphael
8a19e9f961 Fix spec 2010-12-06 13:56:40 -08:00
Raphael
6aa7648787 Put send_contact_request_to back into the app 2010-12-06 13:45:12 -08:00
Raphael
32a2264af5 Refactor peoplecontroller index 2010-12-06 13:36:20 -08:00
Raphael
1f71474f0f Small copy change 2010-12-06 13:36:20 -08:00
maxwell
97c1ce54c1 fixed the batch emailer tests... sorry it took me so long 2010-12-06 10:56:04 -08:00
Alec Leamas
818ccf92b0 Bugfix (only visible on Ubuntu) 2010-12-06 18:18:49 +01:00
Alec Leamas
4926e185ef Making jammit tests in server consistent 2010-12-06 15:32:01 +01:00
Alec Leamas
521aa83b0c Create publiuc/source.tar.gz from current branch.
Also, give slow starters some more time.
2010-12-06 15:22:43 +01:00
Alec Leamas
36e6c9f68e Revert "Fixing server when no git files, not on master"
Wrong usecase. The real problem is always using the master branch.
There is no point using a files list, distributions will just
create the tar archive in advance.

This reverts commit 0541082804.
2010-12-06 14:49:32 +01:00
Alec Leamas
7aa7c29b46 Route redis output to log file,
On Fedora, logfile/loglevel in configuration file seems to be ignored
as of now.
2010-12-06 13:38:08 +01:00
Alec Leamas
0541082804 Fixing server when no git files, not on master
Allows server to run even if on another branch than master and/or
in a production scenario without git files available.
2010-12-06 13:36:24 +01:00
maxwell
9bc8934970 add test mode to emailer 2010-12-05 18:06:54 -08:00
danielvincent
460081bc2f don't condense comments on show pages 2010-12-05 17:21:57 -08:00
Raphael
3ef5ac5252 Add some specs to Invitation, use I18n in InvitationsController 2010-12-05 14:37:43 -08:00
Raphael
4b1c36ca04 Timestamp services 2010-12-05 14:37:00 -08:00
Raphael
5a5bd13ceb Take out extra person.save 2010-12-05 12:46:05 -08:00
MrZYX
6a4351378b fixed bug in the mailer that caused a invalid To: header in the mail 2010-12-05 20:48:18 +01:00
MrZYX
4df13d56e1 made that latest change translatable 2010-12-05 16:02:52 +01:00
MrZYX
b84b6ea9e4 some fixes to translations 2010-12-05 16:02:52 +01:00
MrZYX
81fd4b6992 updated locales from the rails i18n project 2010-12-05 14:24:00 +01:00
danielvincent
e9742acc32 reverting http_post to a working state 2010-12-05 02:08:29 -08:00
danielvincent
d7407b7aa6 request -> resource 2010-12-05 02:03:03 -08:00
danielvincent
737e6084df actually setting the timeout in restclient 2010-12-05 01:54:16 -08:00
Sarah Mei
ecc537c737 Stub Jobs::ReceiveSalmon.perform in controller test 2010-12-05 01:31:19 -08:00
danielvincent
648614aea5 add 4 sec timeout to restclient 2010-12-05 01:26:31 -08:00
maxwell
53b38a3bca fixing p-controller for real 2010-12-05 00:52:45 -08:00
maxwell
65c22020e8 fixing photo controllers spec 2010-12-05 00:45:13 -08:00
maxwell
2c09c35425 MS DG photos now delete sm if they are empty status messages, and status messages delete their photos 2010-12-05 00:45:13 -08:00
maxwell
a415ff5c5f fixed the build. made photos dependent destroy with parent status message 2010-12-05 00:45:13 -08:00
Raphael
cc3db3d2f3 Uhh... 2010-12-05 00:20:46 -08:00
Raphael
c320dae589 Add a cuke for being invited by someone 2010-12-05 00:15:37 -08:00
Raphael
36e1fb8b2c Fix a couple local-posting specs 2010-12-04 23:38:31 -08:00
Raphael
c99796f5db Extra spec on find_for_authentication 2010-12-04 23:15:22 -08:00
Raphael
c09c060ebb Beginning of user invitation acceptance feature 2010-12-04 23:07:52 -08:00
maxwell
03a5514400 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 23:06:58 -08:00
maxwell
0a8af9e72b DG MS some fixes for getting started 2010-12-04 23:05:47 -08:00
OhaiBBQ
4bbbbf6bb1 tipsy on sidebar avatars 2010-12-05 09:44:10 +03:00
Raphael
61e40debb5 Fix in find_for_authentication 2010-12-04 22:25:28 -08:00
maxwell
23c446c8bf Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 21:57:55 -08:00
Sarah Mei
9da69a4b01 Mobile log in form is usable. Also, added mixins for sass. 2010-12-04 20:45:52 -08:00
danielvincent
03961bce7b removed last reference to invitation fancybox 2010-12-04 20:06:24 -08:00
maxwell
fb310560df Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 19:37:47 -08:00
Michael Sofaer
9e575ea765 MS RS Get the fake queue working when it's nested, and push local dispatch onto the queues 2010-12-04 19:36:22 -08:00
danielvincent
4c4f5c6aa4 dispatch moved to resque. one failing test, globally stubbed out resque enqueue temporarily. TO AMEND. 2010-12-04 19:36:22 -08:00
maxwell
68e7fdf6b7 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 19:34:14 -08:00
maxwell
b56b2fbd1b added spec for periods in usernames; unpendify a couple of specs 2010-12-04 19:33:58 -08:00
Sarah Mei
fea6884acc Mobile homepage looks decent. 2010-12-04 19:30:14 -08:00
maxwell
b3ca504c40 no periods in username 2010-12-04 19:28:08 -08:00
OhaiBBQ
1b7749f282 typo on last commit 2010-12-05 06:21:06 +03:00
OhaiBBQ
05f54e0ebd Merge branch 'master' of github.com:diaspora/diaspora 2010-12-05 06:18:30 +03:00
OhaiBBQ
78ac693dcd only tipsy on avatars in left_pane and manage_aspect_zone 2010-12-05 06:17:14 +03:00
Sarah Mei
06cc99b19e git ignores mobile.css 2010-12-04 19:16:14 -08:00
Sarah Mei
c3736729c9 removing mobile.css from git 2010-12-04 19:16:14 -08:00
danielvincent
c4db32c253 adding jquery 1.4.4 back re sentientwaffle's fix. 2010-12-04 18:59:01 -08:00
sentientwaffle
b303cf6830 fixed issue with post deletion confirmation for the latest verison of jquery 2010-12-04 18:55:15 -08:00
Philip Champon
47ae57d4dd Issue #650: this closes the netstat on mac problem http://bugs.joindiaspora.com/issues/650 2010-12-04 18:52:07 -08:00
Philip Champon
213f1c5e42 fixed bsd netstat issue 2010-12-04 18:52:07 -08:00
maxwell
8fb97072df Merge branch '583-password-person-conflict' of https://github.com/flah00/diaspora into flah00-583-password-person-conflict 2010-12-04 18:40:17 -08:00
Sarah Mei
c9f7866955 Random extra spec for people_controller 2010-12-04 18:13:15 -08:00
maxwell
23eb192524 double the time that notifications are seen on the page 2010-12-04 17:45:52 -08:00
maxwell
55c0bd684b remove some puts 2010-12-04 17:43:15 -08:00
maxwell
e47730b63f Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 17:39:19 -08:00
danielvincent
105c788bf8 fixed comment js. fadeToggle is only supported in jquery >= 1.4.4 2010-12-04 17:37:57 -08:00
danielvincent
948707ea23 rolling back jquery. <= 1.4.3 has compatability issues with rails js helpers 2010-12-04 17:22:22 -08:00
Michael Sofaer
a522655a19 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 17:19:11 -08:00
Michael Sofaer
3ca89bde57 Put photos create spec back in. I am not going to check who left it pending. 2010-12-04 17:18:08 -08:00
danielvincent
4251a3a093 prompt to 'get the conversation started' on new aspect page fades out when first message in aspect is posted 2010-12-04 17:02:29 -08:00
maxwell
b9ab799569 ironing out invites 2010-12-04 16:49:45 -08:00
danielvincent
4daebfd147 archlinux env load fixed in resque 2010-12-04 16:35:05 -08:00
maxwell
b300adbef5 fixed a potentially bad bug with nil invite tokens 2010-12-04 16:13:44 -08:00
maxwell
4c3de52f68 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-04 16:03:54 -08:00
maxwell
8306cfffde add token back to invite form 2010-12-04 16:03:35 -08:00
danielvincent
d1ad2efed1 HttpPost job now follows redirects 2010-12-04 15:23:54 -08:00
danielvincent
177cc16e2f fixed the build 2010-12-04 14:26:13 -08:00
maxwell
88aa67dba7 actually put the post in the xml param where we expecting it. also, throw the errors so we know in whats going on in resque 2010-12-04 13:54:39 -08:00
OhaiBBQ
c55a867f61 fix build, .remove is the callback, don't call it immediately 2010-12-05 00:26:10 +03:00
danielvincent
addbaaeb70 JSON::Pure::Generator::State fix when using resque. huge thanks to this post: http://blog.ethanvizitei.com/2010/11/json-pure-ruins-my-morning.html 2010-12-04 13:16:30 -08:00
Iuri Kothe
7d847e16d0 Added missing translations 2010-12-04 18:16:56 -02:00
danielvincent
34a1a35bf1 skip getting started is not ajaxy 2010-12-04 12:06:08 -08:00
maxwell
544ab993ac only show the url when the post has photos 2010-12-04 11:58:34 -08:00
Iuri Kothe
f22289ae0a Added missing translations 2010-12-04 13:49:59 -02:00
OhaiBBQ
75e81577c6 Merge branch 'master' of git://github.com/diaspora/diaspora 2010-12-04 11:55:08 +03:00
OhaiBBQ
ba23bd7a0a Many JS improvements, moved a few things in view.js to stream.js, moved the clearForm plugin from view.js to rails.js (where we actually use it), refactored view.js and wrote specs 2010-12-04 11:54:59 +03:00
danielvincent
c68ebc1d14 removed comic sans from the entire codebase. marker felt remains on os x. 2010-12-04 00:29:15 -08:00
danielvincent
c29bc0ce65 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-03 23:40:25 -08:00
danielvincent
47b6d66b83 fixed proportions in stream, etc. 2010-12-03 23:38:29 -08:00
maxwell
c5f2e8bb2d now you can not invite yourself. we have a bug as send_contact_request_to was taken out but Invitation still used it 2010-12-03 22:58:37 -08:00
maxwell
7dce94814c fixing the invite user job 2010-12-03 22:41:16 -08:00
Sarah Mei
713c98ce51 don't require redis for cucumber 2010-12-03 20:49:41 -08:00
maxwell
94c7b86a55 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-03 19:34:12 -08:00
maxwell
0a831cfbf4 invites are now on the queue 2010-12-03 19:33:54 -08:00
danielvincent
5da5ee26bb two column aspect listing on manage page. made avatars smaller. 2010-12-03 16:22:20 -08:00
maxwell
0684c40660 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-03 15:51:44 -08:00
danielvincent
f9e4a744a5 put spec helper methods in spec_helper 2010-12-03 15:50:17 -08:00
maxwell
b8ece9381a fixing up public image show 2010-12-03 15:48:27 -08:00
danielvincent
a7823485c7 made http calls synchronous. messagehandler enqueues POSTs into resque. 2010-12-03 15:26:52 -08:00
maxwell
f4fa3191bc just call Jobs::Receive directly for now 2010-12-03 15:03:32 -08:00
maxwell
c99bc05886 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-03 13:58:12 -08:00
maxwell
85a85716c6 made user sign up and invitation accept slightly nicer, w/tipsy tooltips and instructions 2010-12-03 13:57:47 -08:00
danielvincent
6f1783664a load mailer in resque-workers 2010-12-03 12:07:39 -08:00
Philip Champon
2633dbc268 Issue 658: user object creation comes before person object creation,
preventing spurrious handle creation errors, if user creation
      fails
2010-12-03 14:59:35 -05:00
danielvincent
60ae7ff74f Take magent out of chef recipes 2010-12-03 11:52:48 -08:00
danielvincent
b9dbdd09fa start redis in script/server. removed magent. redis-server does not close on script/server kill 2010-12-03 11:51:04 -08:00
danielvincent
71cae6b89f Move request mail into resque 2010-12-03 11:51:04 -08:00
maxwell
8e8398fdea change the assets to only package in production mode 2010-12-03 11:39:38 -08:00
maxwell
3d066e09db Merge branch 'master' of github.com:diaspora/diaspora 2010-12-03 11:35:15 -08:00
maxwell
c43077d318 fixed twitter, added logging for constants, added job for local recieve 2010-12-03 11:34:42 -08:00
Raphael
3cb0064835 Take out server start logging for now, maybe put in a more useful one later" 2010-12-03 11:29:49 -08:00
Raphael
d35badd7ea Remove log rotator, it seems to be disrupting log_overrider 2010-12-03 11:02:28 -08:00
MrZYX
acc8803cee try at fixing specs for ruby 1.9, SystemTimer isn't needed anymore for 1.9 2010-12-03 16:33:28 +01:00
MrZYX
dd326699bd changed back consumer_token to consumer_key as its not only more consistent with twitters website it also causes less support (less users complaining that their twitter integration is broken) :) 2010-12-03 16:04:37 +01:00
MrZYX
a605ab482b made sender address in notifier.rb configurable. This fixes #657 2010-12-03 15:49:34 +01:00
Alec Leamas
acb3381dc6 Sticking to git: urls for git repos, as we always do.
Using a single type of url means just a single type of problems ;)
2010-12-03 12:20:48 +01:00
danielvincent
7fdbc9015b swapped new invitation lightbox for a proper page. 2010-12-03 00:57:53 -08:00
danielvincent
30668bf2e6 visual touchups 2010-12-02 23:19:30 -08:00
Raphael
7a89c1d3e4 Merge branch 'master' of github.com:diaspora/diaspora 2010-12-02 19:42:52 -08:00
Raphael
3ee246d873 Merge branch 'resque-receive'
Conflicts:
	Gemfile.lock
2010-12-02 19:42:05 -08:00
maxwell
9bd77916a8 Merge branch 'master' of github.com:diaspora/diaspora
Conflicts:
	public/stylesheets/sass/application.sass
2010-12-02 19:18:21 -08:00
maxwell
9ad9e205a5 upping zindex on photo button 2010-12-02 19:17:26 -08:00
Raphael
46e49c764d sorry 2010-12-02 19:16:52 -08:00
Raphael
2e87bece60 Final fixes for person socketing 2010-12-02 19:03:15 -08:00
maxwell
8aaedb4240 upping zindex on photo button 2010-12-02 19:02:33 -08:00
maxwell
579a288351 public posts are now accessible by your friends, and facebook and twitter include a permalink. we prob want to link shorten these bad boys(and it has a max length of 140 chars, with a permalink), also, facebook and twitter posting are sync, but that will make it more reliable 2010-12-02 18:48:50 -08:00
maxwell
11f04a060e frustrated 2010-12-02 18:48:50 -08:00
maxwell
b9131c0e46 pushing to my website for further debugging 2010-12-02 18:47:48 -08:00
maxwell
38d9d75162 posts now have public permalinks 2010-12-02 18:47:48 -08:00
danielvincent
756824d072 removed referring text from users#edit. render_views in both users_controller_spec and photos_controller_spec. 2010-12-02 18:42:21 -08:00
danielvincent
6c05d01177 enabling dragging and dropping between aspects on aspect manage. removed ability to remove a contact from aspects#manage after removing from a single aspect. fixed notification popup z-index. 2010-12-02 17:36:46 -08:00
Raphael
3c7172822e Require files needed for socketing from resque worker 2010-12-02 17:27:41 -08:00
Raphael
2ec5fae2e8 Require needed files for resque-worker 2010-12-02 16:56:14 -08:00
maxwell
2fbf2ddd6f you dont have a pending request from everyone 2010-12-02 16:09:55 -08:00
Raphael
07fdabbbd4 Seperate queues for jobs 2010-12-02 15:34:54 -08:00
Raphael
8798f05ff7 Revert "Revert redis merge to fix bugs on master"
This reverts commit 30698d674b.
2010-12-02 15:33:26 -08:00
Raphael
3688b3982f message queue should follow redirects 2010-12-02 15:23:26 -08:00
Raphael
30698d674b Revert redis merge to fix bugs on master 2010-12-02 15:20:27 -08:00
maxwell
7f5dc14726 fix dup comment showing with comments with more than three, also fixed veribage 2010-12-02 15:18:54 -08:00
Raphael
93da0ddd25 Add magent back in, still need to work out environment problems with resque workers 2010-12-02 13:18:35 -08:00
Raphael
4b43eaef6b Port 7894 for resque web client. HTTP basic looks in /usr/local/nginx/conf/htpasswd for user:pass. 2010-12-02 12:35:26 -08:00
Raphael
236fbc7cc7 Final adjustments to fix resque worker 2010-12-02 12:35:26 -08:00
Raphael
c76f38ca23 Write webfinger job for search 2010-12-02 12:35:26 -08:00
Raphael
6cfa6577a5 Add first resque job 2010-12-02 12:35:26 -08:00
Raphael
0b5bf40a8d Finish resque-web run line 2010-12-02 12:35:26 -08:00
Raphael
5fd854bd89 Just open 5678 for now 2010-12-02 12:35:26 -08:00
Raphael
e9ec8cea05 Update nginx conf 2010-12-02 12:35:26 -08:00
Raphael
edf703aa78 Correct resque run line 2010-12-02 12:35:26 -08:00
Raphael
952888713f Finish daemontools lines for resque 2010-12-02 12:35:26 -08:00
Raphael
cee5e4c26e Bring in resque recipes and rake tasks 2010-12-02 12:35:26 -08:00
danielvincent
8cb2a3a79a resque init, config, gemfile 2010-12-02 12:35:26 -08:00
Raphael
db0106f13c Rename EMWebfinger to Webfinger, clean up some related things 2010-12-02 12:35:25 -08:00
maxwell
be00a2f1b3 webfingering is now syncrounous 2010-12-02 12:35:25 -08:00
maxwell
9aa093a0a3 api compatabile, but ugly 2010-12-02 12:35:25 -08:00
Alec Leamas
732bde1834 Pkg update 2010-12-02 21:03:21 +01:00
818 changed files with 50241 additions and 21510 deletions

21
.gitignore vendored
View File

@@ -1,17 +1,26 @@
#trademark sillyness
app/views/home/_show.html.haml
app/views/home/_show.mobile.haml
public/images/ball_small.png
public/images/ball.png
# Configuration files
config/app_config.yml
config/fb_config.yml
config/oauth_keys.yml
config/initializers/secret_token.rb
config/redis.conf
config/deploy_config.yml
.bundle
vendor/bundle/*
config/database.yml
# Generated files
log/*
public/stylesheets/application.css
public/stylesheets/sessions.css
public/stylesheets/ui.css
spec/fixtures/users.yaml
public/stylesheets/*.css
public/diaspora
spec/fixtures/*.y*ml
spec/fixtures/*.fixture.*
coverage/*
# Uploded files and local files
public/uploads/*
@@ -35,3 +44,7 @@ bin/*
nbproject
patches-*
capybara-*.html
dump.rdb
#Rubinius's JIT
*.rbc

2
.pairs
View File

@@ -5,6 +5,8 @@ pairs:
ms: Maxwell Salzberg; maxwell
dh: Dan Hansen; ohaibbq
sm: Sarah Mei; sarah
mjs: Michael Sofaer; michael
jd: Jeff Dickey; dickeytk
email:
prefix: pair
domain: joindiaspora.com

6
.rspec
View File

@@ -1,3 +1,3 @@
--color
--require rspec/instafail
--format RSpec::Instafail
--format Fuubar
--profile
--color

94
Gemfile
View File

@@ -1,77 +1,87 @@
source 'http://rubygems.org'
gem 'rails', '3.0.1'
gem 'mysql2', '0.2.6'
gem 'rails', '3.0.3'
gem 'foreigner', '0.9.1'
gem 'bundler', '>= 1.0.0'
gem "chef", :require => false
gem 'chef', '0.9.12', :require => false
gem "nokogiri", "1.4.3.1"
gem 'nokogiri', '1.4.3.1'
#Security
gem 'devise', '1.1.3'
gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper'
gem 'devise_invitable','0.3.5'
gem 'devise_invitable', :git => 'git://github.com/zhitomirskiyi/devise_invitable.git', :branch => '0.3.5'
#Authentication
gem 'omniauth'
gem 'twitter', '0.9.12'
#Mongo
gem 'mongo_mapper', :branch => 'rails3', :git => 'git://github.com/jnunemaker/mongomapper.git'
gem 'bson_ext', '1.1'
gem 'bson', '1.1'
gem 'omniauth', '0.1.6'
gem 'twitter', :git => 'git://github.com/jnunemaker/twitter.git', :ref => 'ef122bbb280e229ed343'
#Views
gem 'haml'
gem 'haml', '3.0.25'
gem 'will_paginate', '3.0.pre2'
#Inflected translations
gem 'i18n-inflector-rails', '~> 1.0'
#Tags
gem 'acts-as-taggable-on', :git => 'git://github.com/diaspora/acts-as-taggable-on.git'
#Uncatagorized
gem 'roxml', :git => 'git://github.com/Empact/roxml.git'
gem 'addressable', :require => 'addressable/uri'
gem 'json'
gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.git'
gem 'roxml', :git => 'git://github.com/Empact/roxml.git', :ref => '7ea9a9ffd2338aaef5b0'
gem 'addressable', '2.2.2', :require => 'addressable/uri'
gem 'json', '1.4.6'
gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.git', :ref => '0b78aa7849fc90cf9e12'
#Standards
gem 'pubsubhubbub'
#EventMachine
gem 'em-http-request',:ref => 'bf62d67fc72d6e701be5', :git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
gem 'thin'
gem 'thin', '1.2.8', :require => false
#Websocket
gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket'
gem 'magent', :git => 'git://github.com/dcu/magent.git'
gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket', :ref => 'e278f5a1c4db60be7485'
#File uploading
gem 'carrierwave', :git => 'git://github.com/rsofaer/carrierwave.git' , :branch => 'master' #Untested mongomapper branch
gem 'mini_magick'
gem 'aws'
gem 'fastercsv', :require => false
gem 'jammit'
gem 'carrierwave', '0.5.2'
gem "fog", '0.3.25'
gem "excon", "0.2.4"
gem 'mini_magick', '3.2'
gem 'aws', '2.3.32' # upgrade to 2.4 breaks 1.8 >.<
gem 'fastercsv', '1.5.4', :require => false
gem 'jammit', '0.5.4'
gem 'rest-client', '1.6.1'
gem 'typhoeus'
#Backups
gem "cloudfiles", :require => false
gem 'cloudfiles', '1.4.10', :require => false
#Queue
gem 'resque', '1.10.0'
gem 'SystemTimer', '1.2.1' unless RUBY_VERSION.include? '1.9' || RUBY_PLATFORM =~ 'win32'
group :development do
gem 'capistrano', '2.5.19', :require => false
gem 'capistrano-ext', '1.2.1', :require => false
end
group :test, :development do
gem 'factory_girl_rails'
gem 'ruby-debug19' if RUBY_VERSION.include? "1.9"
gem 'ruby-debug' if RUBY_VERSION.include? "1.8"
gem 'factory_girl_rails', :require => false
gem 'ruby-debug-base19', '0.11.23' if RUBY_VERSION.include? '1.9.1'
gem 'ruby-debug19' if RUBY_VERSION.include? '1.9'
gem 'ruby-debug' if defined?(Rubinius).nil? && RUBY_VERSION.include?('1.8')
gem 'launchy'
end
group :test do
gem 'factory_girl_rails'
gem 'fixture_builder', '~> 0.2.0'
gem 'capybara', '~> 0.3.9'
gem 'cucumber-rails', '0.3.2'
gem 'rspec', '>= 2.0.0'
gem 'rspec-rails', '>= 2.0.0'
gem 'mocha'
gem 'database_cleaner', '0.5.2'
gem 'rcov'
gem 'database_cleaner', '0.6.0'
gem 'webmock', :require => false
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
gem 'mongrel', :require => false if RUBY_VERSION.include? "1.8"
gem 'rspec-instafail', :require => false
end
group :deployment do
#gem 'sprinkle', :git => 'git://github.com/rsofaer/sprinkle.git'
gem 'mongrel', :require => false if RUBY_VERSION.include? '1.8'
gem 'rspec-instafail', '>= 0.1.7', :require => false
gem 'fuubar'
end

View File

@@ -1,67 +1,55 @@
GIT
remote: git://github.com/Empact/roxml.git
revision: 7ea9a9ffd2338aaef5b04cb792060ae8c98f346a
ref: 7ea9a9ffd2338aaef5b0
specs:
roxml (3.1.6)
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
GIT
remote: git://github.com/collectiveidea/devise-mongo_mapper
revision: fa2f20310e0988295adc192255d3b1cedee1b412
remote: git://github.com/diaspora/acts-as-taggable-on.git
revision: c3592fe1a906f6ff1cd12766c5cf1152c51eec40
specs:
devise-mongo_mapper (0.0.1)
devise (~> 1.1.0)
GIT
remote: git://github.com/dcu/magent.git
revision: 663d493e0058901d8a2baec00e4d20e867b1359d
specs:
magent (0.5.2)
em-websocket
mongo
uuidtools
acts-as-taggable-on (2.0.6)
rails (>= 3.0)
GIT
remote: git://github.com/iain/http_accept_language.git
revision: 0b78aa7849fc90cf9e12586af162fa4c408a795d
ref: 0b78aa7849fc90cf9e12
specs:
http_accept_language (1.0.1)
GIT
remote: git://github.com/igrigorik/em-http-request.git
revision: bf62d67fc72d6e701be5037e239dd470194b8e45
ref: bf62d67fc72d6e701be5
specs:
em-http-request (0.2.13)
addressable (>= 2.0.0)
eventmachine (>= 0.12.9)
GIT
remote: git://github.com/igrigorik/em-websocket
revision: e278f5a1c4db60be7485859520a069e08bfe1247
ref: e278f5a1c4db60be7485
specs:
em-websocket (0.2.0)
addressable (>= 2.1.1)
eventmachine (>= 0.12.9)
GIT
remote: git://github.com/jnunemaker/mongomapper.git
revision: de8f8f3171f687f8d65b87ba7c7d3b1cb6e3bbe6
branch: rails3
remote: git://github.com/jnunemaker/twitter.git
revision: ef122bbb280e229ed34347c235c68aa9349d0d8e
ref: ef122bbb280e229ed343
specs:
mongo_mapper (0.8.6)
activemodel (~> 3.0.0)
activesupport (~> 3.0.0)
plucky (~> 0.3.6)
twitter (1.0.0)
faraday (~> 0.5.3)
faraday_middleware (~> 0.3.0)
hashie (~> 0.4.0)
multi_json (~> 0.0.5)
multi_xml (~> 0.2.0)
simple_oauth (~> 0.1.2)
GIT
remote: git://github.com/rsofaer/carrierwave.git
revision: c3dfbdda2fa227af91fe383bb126f59b991a318f
branch: master
remote: git://github.com/zhitomirskiyi/devise_invitable.git
revision: 85abb5fef4ab4f74db818ed3d8104c2f7d24b94e
branch: 0.3.5
specs:
carrierwave (0.5.0)
activesupport (~> 3.0)
devise_invitable (0.3.5)
devise (~> 1.1.0)
PATH
remote: vendor/gems/jasmine
@@ -77,46 +65,52 @@ PATH
GEM
remote: http://rubygems.org/
specs:
SystemTimer (1.2.1)
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (= 3.0.1)
mail (~> 2.2.5)
actionpack (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.6)
tzinfo (~> 0.3.23)
activemodel (3.0.1)
activesupport (= 3.0.1)
activemodel (3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
arel (~> 1.0.0)
i18n (~> 0.4)
activerecord (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activesupport (3.0.1)
activeresource (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
addressable (2.2.2)
arel (1.0.1)
activesupport (~> 3.0.0)
aws (2.3.26)
arel (2.0.9)
aws (2.3.32)
activesupport
http_connection
uuidtools
xml-simple
bcrypt-ruby (2.1.2)
bson (1.1)
bson_ext (1.1)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bunny (0.6.0)
capistrano (2.5.19)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.0.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
@@ -124,108 +118,135 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3)
carrierwave (0.5.2)
activesupport (~> 3.0)
cgi_multipart_eof_fix (2.5.0)
chef (0.9.12)
bunny (>= 0.6.0)
erubis
extlib
highline
json (>= 1.4.4, <= 1.4.6)
json (<= 1.4.6, >= 1.4.4)
mixlib-authentication (>= 1.1.0)
mixlib-cli (>= 1.1.0)
mixlib-config (>= 1.1.2)
mixlib-log (>= 1.2.0)
moneta
ohai (>= 0.5.7)
rest-client (>= 1.0.4, < 1.7.0)
rest-client (< 1.7.0, >= 1.0.4)
uuidtools
childprocess (0.1.4)
childprocess (0.1.7)
ffi (~> 0.6.3)
closure-compiler (0.3.3)
closure-compiler (1.0.0)
cloudfiles (1.4.10)
mime-types (>= 1.16)
columnize (0.3.2)
configuration (1.2.0)
crack (0.1.8)
cucumber (0.9.4)
builder (~> 2.1.2)
cucumber (0.10.0)
builder (>= 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.2.9)
gherkin (~> 2.3.2)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.12)
culerity (0.2.15)
daemons (1.1.0)
database_cleaner (0.5.2)
database_cleaner (0.6.0)
devise (1.1.3)
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
devise_invitable (0.3.5)
devise (~> 1.1.0)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
eventmachine (0.12.10)
excon (0.2.4)
extlib (0.9.15)
factory_girl (1.3.2)
factory_girl_rails (1.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
rails (>= 3.0.0.beta4)
faraday (0.5.3)
railties (>= 3.0.0)
faraday (0.5.4)
addressable (~> 2.2.2)
multipart-post (~> 1.0.1)
rack (>= 1.1.0, < 2)
fastercsv (1.5.3)
multipart-post (~> 1.1.0)
rack (< 2, >= 1.1.0)
faraday_middleware (0.3.2)
faraday (~> 0.5.4)
fastercsv (1.5.4)
fastthread (1.0.7)
ffi (0.6.3)
rake (>= 0.8.7)
fixture_builder (0.2.0)
fog (0.3.25)
builder
excon (>= 0.2.4)
formatador (>= 0.0.16)
json
mime-types
net-ssh (~> 2.0.23)
nokogiri (~> 1.4.3.1)
ruby-hmac
foreigner (0.9.1)
formatador (0.0.16)
fuubar (0.0.3)
rspec (~> 2.0)
rspec-instafail (~> 0.1.4)
ruby-progressbar (~> 0.0.9)
gem_plugin (0.2.3)
gherkin (2.2.9)
gherkin (2.3.3)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
haml (3.0.24)
haml (3.0.25)
hashie (0.4.0)
highline (1.6.1)
http_connection (1.4.0)
httparty (0.6.1)
crack (= 0.1.8)
i18n (0.4.2)
i18n (0.5.0)
i18n-inflector (2.5.1)
i18n (>= 0.4.1)
i18n-inflector-rails (1.0.3)
actionpack (~> 3.0)
i18n-inflector (~> 2.5)
railties (~> 3.0)
jammit (0.5.4)
closure-compiler (>= 0.1.0)
yui-compressor (>= 0.9.1)
json (1.4.6)
json_pure (1.4.6)
launchy (0.3.7)
json_pure (1.5.1)
launchy (0.4.0)
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
mail (2.2.10)
mail (2.2.15)
activesupport (>= 2.3.6)
i18n (~> 0.4.1)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
mini_magick (3.1)
mini_magick (3.2)
subexec (~> 0.0.4)
mixlib-authentication (1.1.4)
mixlib-log
mixlib-cli (1.2.0)
mixlib-config (1.1.2)
mixlib-log (1.2.0)
mocha (0.9.10)
rake
moneta (0.6.0)
mongo (1.1)
bson (>= 1.0.5)
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
daemons (>= 1.0.3)
fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3)
multi_json (0.0.5)
multipart-post (1.0.1)
multi_xml (0.2.1)
multipart-post (1.1.0)
mysql2 (0.2.6)
net-ldap (0.1.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.0.24)
net-ssh-gateway (1.0.1)
net-ssh (>= 1.99.1)
nokogiri (1.4.3.1)
oa-basic (0.1.6)
multi_json (~> 0.0.2)
@@ -251,12 +272,12 @@ GEM
rack-openid (~> 1.2.0)
ruby-openid-apps-discovery
oauth (0.4.4)
oauth2 (0.1.0)
oauth2 (0.1.1)
faraday (~> 0.5.0)
multi_json (~> 0.0.4)
ohai (0.5.8)
extlib
json (>= 1.4.4, <= 1.4.6)
json (<= 1.4.6, >= 1.4.4)
mixlib-cli
mixlib-config
mixlib-log
@@ -267,12 +288,7 @@ GEM
oa-enterprise (= 0.1.6)
oa-oauth (= 0.1.6)
oa-openid (= 0.1.6)
plucky (0.3.6)
mongo (~> 1.1)
polyglot (0.3.1)
pubsubhubbub (0.1.1)
em-http-request (>= 0.1.5)
eventmachine (>= 0.12.9)
pyu-ruby-sasl (0.0.3.2)
rack (1.2.1)
rack-mount (0.6.13)
@@ -280,125 +296,148 @@ GEM
rack-openid (1.2.0)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-test (0.5.6)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.1)
actionmailer (= 3.0.1)
actionpack (= 3.0.1)
activerecord (= 3.0.1)
activeresource (= 3.0.1)
activesupport (= 3.0.1)
bundler (~> 1.0.0)
railties (= 3.0.1)
railties (3.0.1)
actionpack (= 3.0.1)
activesupport (= 3.0.1)
rake (>= 0.8.4)
thor (~> 0.14.0)
rails (3.0.3)
actionmailer (= 3.0.3)
actionpack (= 3.0.3)
activerecord (= 3.0.3)
activeresource (= 3.0.3)
activesupport (= 3.0.3)
bundler (~> 1.0)
railties (= 3.0.3)
railties (3.0.3)
actionpack (= 3.0.3)
activesupport (= 3.0.3)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rcov (0.9.9)
redis (2.1.1)
redis-namespace (0.8.0)
redis (< 3.0.0)
resque (1.10.0)
json (~> 1.4.6)
redis-namespace (~> 0.8.0)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
rest-client (1.6.1)
mime-types (>= 1.16)
rspec (2.2.0)
rspec-core (~> 2.2)
rspec-expectations (~> 2.2)
rspec-mocks (~> 2.2)
rspec-core (2.2.1)
rspec-expectations (2.2.0)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-instafail (0.1.5)
rspec-mocks (2.2.0)
rspec-rails (2.2.1)
rspec-instafail (0.1.7)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.2.0)
rspec (~> 2.5.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
ruby-hmac (0.4.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
ruby-progressbar (0.0.9)
rubyntlm (0.1.1)
rubyzip (0.9.4)
selenium-client (1.2.18)
selenium-rc (2.2.4)
selenium-rc (2.3.2)
selenium-client (>= 1.2.18)
selenium-webdriver (0.1.1)
childprocess (= 0.1.4)
selenium-webdriver (0.1.3)
childprocess (~> 0.1.5)
ffi (~> 0.6.3)
json_pure
rubyzip
simple_oauth (0.1.4)
sinatra (1.2.0)
rack (~> 1.1)
tilt (< 2.0, >= 1.2.2)
subexec (0.0.4)
systemu (1.2.0)
term-ansicolor (1.0.5)
thin (1.2.7)
thin (1.2.8)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.2.2)
treetop (1.4.9)
polyglot (>= 0.3.1)
twitter (0.9.12)
hashie (~> 0.4.0)
httparty (~> 0.6.1)
multi_json (~> 0.0.4)
oauth (~> 0.4.3)
tzinfo (0.3.23)
uuidtools (2.1.1)
typhoeus (0.2.4)
mime-types
mime-types
tzinfo (0.3.24)
uuidtools (2.1.2)
vegas (0.1.8)
rack (>= 1.0.0)
warden (0.10.7)
rack (>= 1.0.0)
webmock (1.6.1)
webmock (1.6.2)
addressable (>= 2.2.2)
crack (>= 0.1.7)
will_paginate (3.0.pre2)
xml-simple (1.0.12)
yui-compressor (0.9.1)
xml-simple (1.0.14)
yui-compressor (0.9.4)
PLATFORMS
ruby
DEPENDENCIES
addressable
aws
bson (= 1.1)
bson_ext (= 1.1)
SystemTimer (= 1.2.1)
acts-as-taggable-on!
addressable (= 2.2.2)
aws (= 2.3.32)
bundler (>= 1.0.0)
capistrano (= 2.5.19)
capistrano-ext (= 1.2.1)
capybara (~> 0.3.9)
carrierwave!
chef
cloudfiles
carrierwave (= 0.5.2)
chef (= 0.9.12)
cloudfiles (= 1.4.10)
cucumber-rails (= 0.3.2)
database_cleaner (= 0.5.2)
database_cleaner (= 0.6.0)
devise (= 1.1.3)
devise-mongo_mapper!
devise_invitable (= 0.3.5)
em-http-request!
devise_invitable!
em-websocket!
excon (= 0.2.4)
factory_girl_rails
fastercsv
haml
fastercsv (= 1.5.4)
fixture_builder (~> 0.2.0)
fog (= 0.3.25)
foreigner (= 0.9.1)
fuubar
haml (= 3.0.25)
http_accept_language!
jammit
i18n-inflector-rails (~> 1.0)
jammit (= 0.5.4)
jasmine!
json
json (= 1.4.6)
launchy
magent!
mini_magick
mocha
mongo_mapper!
mini_magick (= 3.2)
mongrel
mysql2 (= 0.2.6)
nokogiri (= 1.4.3.1)
omniauth
pubsubhubbub
rails (= 3.0.1)
omniauth (= 0.1.6)
rails (= 3.0.3)
rcov
resque (= 1.10.0)
rest-client (= 1.6.1)
roxml!
rspec (>= 2.0.0)
rspec-instafail
rspec-instafail (>= 0.1.7)
rspec-rails (>= 2.0.0)
ruby-debug
thin
twitter (= 0.9.12)
thin (= 1.2.8)
twitter!
typhoeus
webmock
will_paginate (= 3.0.pre2)

View File

@@ -3,9 +3,8 @@
The privacy aware, personally controlled, do-it-all, open source social
network.
**THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.**
**PLEASE, DO NOT RUN IN PRODUCTION. IT IS FUN TO GET RUNNING, BUT EXPECT THINGS
TO BE BROKEN.**
**THIS IS ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.**
**IT IS FUN TO GET RUNNING, BUT EXPECT THINGS TO BE BROKEN.**
## Installation instructions
@@ -47,13 +46,13 @@ We need you to fill out a
before we can accept your patches. The agreement gives Diaspora joint
ownership of the patch so the copyright isn't scattered. You can find it
[here](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq).
We're currently working on revising it more details on what we're going for can be found [here](http://joindiaspora.com/licensing.html).
We're currently working on revising it more details on what we're going for can be found [here](http://blog.joindiaspora.com/licensing.html).
## Resources
Here is our [bug tracker](http://bugs.joindiaspora.com) and our
[roadmap](https://github.com/diaspora/diaspora/wiki/Roadmap). Also, you can
find see what the core team is upto [here](http://www.pivotaltracker.com/projects/61641).
find see what the core team is up to [here](http://www.pivotaltracker.com/projects/61641).
Ongoing discussion:
@@ -61,11 +60,13 @@ Ongoing discussion:
- [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev)
- [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss)
- [Diaspora Q&A site](http://diaspora.shapado.com/)
- [#diaspora IRC channel](irc://irc.freenode.net/#diaspora)
([join via the web client](http://webchat.freenode.net?channels=diaspora))
- [#diaspora-dev IRC channel](irc://irc.freenode.net/#diaspora-dev)
([join via the web client](http://webchat.freenode.net?channels=diaspora-dev))
More general info and updates about the project can be found on
[our blog](http://joindiaspora.com),
[our blog](http://blog.joindiaspora.com),
[and on Twitter](http://twitter.com/joindiaspora).
Also, be sure to join the official [mailing list](http://eepurl.com/Vebk).

View File

@@ -7,5 +7,6 @@
require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'resque/tasks'
Diaspora::Application.load_tasks

46
Termfile Normal file
View File

@@ -0,0 +1,46 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
# If you do
# terminitor start
# from the Diaspora root directory, it will open a new terminal window with
# 3 tabs: redis, resque, and jasmine.
#
# You need to install the terminitor gem. It's not in the Gemfile because it
# causes problems on some flavors of linux.
# gem install terminitor
#
# You should set REDIS_ROOT before running terminitor start.
# You might want to do that in your .bash_profile.
# export REDIS_ROOT=/full/path/to/redis/without/the/bin
# You can also set DIASPORA_ROOT in a similar way if you don't want it to be
# the directory this file is in.
#
# This will run on OS X and KDE.
def get_var_for(env_var_name)
if ENV[env_var_name].nil? || ENV[env_var_name].strip == ""
File.dirname(__FILE__)
else
ENV[env_var_name]
end
end
before { system "sudo ls" } # this ensures redis can start right away
window do
tab :name => "redis" do
run "cd #{get_var_for('REDIS_ROOT')}"
run "sudo ./bin/redis-server"
end
tab :name => "resque" do
run "cd #{get_var_for('DIASPORA_ROOT')}"
run "QUEUE=* rake resque:work"
end
tab :name => "jasmine" do
run "cd #{get_var_for('DIASPORA_ROOT')}"
run "rake jasmine"
end
end

View File

@@ -0,0 +1,27 @@
class AdminsController < ApplicationController
before_filter :authenticate_user!
before_filter :redirect_unless_admin
def user_search
user = params[:user] || {}
user = user.delete_if {|key, value| value.blank? }
params[:user] = user
if user.keys.count == 0
@users = []
else
@users = User.where(params[:user]).all || []
end
render 'user_search'
end
def admin_inviter
opts = {:service => 'email', :identifier => params[:identifier]}
existing_user = Invitation.find_existing_user('email', params[:identifier])
opts.merge!(:existing_user => existing_user) if existing_user
Invitation.create_invitee(opts)
flash[:notice] = "invitation sent to #{params[:identifier]}"
redirect_to '/admins/user_search'
end
end

View File

@@ -3,49 +3,101 @@
# the COPYRIGHT file.
class ApplicationController < ActionController::Base
#has_mobile_fu
has_mobile_fu
protect_from_forgery :except => :receive
# =>before_filter :mobile_except_ipad
before_filter :set_contacts_and_status, :except => [:create, :update]
before_filter :ensure_http_referer_is_set
before_filter :set_header_data, :except => [:create, :update]
before_filter :count_requests
before_filter :set_invites
before_filter :set_locale
before_filter :set_git_header if (AppConfig[:git_update] && AppConfig[:git_revision])
before_filter :which_action_and_user
prepend_before_filter :clear_gc_stats
before_filter :set_grammatical_gender
def set_contacts_and_status
if current_user
@aspect = nil
@aspects = current_user.aspects.fields(:name)
@aspects_dropdown_array = @aspects.collect{|x| [x.to_s, x.id]}
@contacts = current_user.contacts
end
inflection_method :grammatical_gender => :gender
def ensure_http_referer_is_set
request.env['HTTP_REFERER'] ||= '/aspects'
end
def mobile_except_ipad
if is_mobile_device?
if request.env["HTTP_USER_AGENT"].include? "iPad"
session[:mobile_view] = false
else
session[:mobile_view] = true
def set_header_data
if user_signed_in?
if request.format.html?
@aspect = nil
@object_aspect_ids = []
@notification_count = Notification.for(current_user, :unread =>true).count
@unread_message_count = ConversationVisibility.sum(:unread, :conditions => "person_id = #{current_user.person.id}")
end
@all_aspects = current_user.aspects
end
end
def count_requests
@request_count = current_user.requests_for_me.count if current_user
@request_count = Request.where(:recipient_id => current_user.person.id).count if current_user
end
def set_invites
if current_user
if user_signed_in?
@invites = current_user.invites
end
end
def set_locale
def set_git_header
headers['X-Git-Update'] = AppConfig[:git_update]
headers['X-Git-Revision'] = AppConfig[:git_revision]
end
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
def set_locale
if user_signed_in?
I18n.locale = current_user.language
else
I18n.locale = request.compatible_language_from AVAILABLE_LANGUAGE_CODES
end
end
def clear_gc_stats
GC.clear_stats if GC.respond_to?(:clear_stats)
end
def redirect_unless_admin
admins = AppConfig[:admins]
unless admins.present? && admins.include?(current_user.username)
redirect_to root_url
end
end
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
def grammatical_gender
@grammatical_gender || nil
end
end

View File

@@ -0,0 +1,67 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
class AspectMembershipsController < ApplicationController
before_filter :authenticate_user!
def destroy
#note :id is garbage
@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
flash.now[:notice] = I18n.t 'aspect_memberships.destroy.success'
respond_to do |format|
format.js do
render :json => {:button_html =>
render_to_string(:partial => 'aspect_memberships/remove_from_aspect',
:locals => {:aspect => membership.aspect,
:person => @contact.person,
:contact => @contact }),
:aspect_id => @aspect_id}
end
format.html{
redirect_to :back
}
end
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
def create
@person = Person.find(params[:person_id])
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
@contact = current_user.contact_for(@person)
current_user.add_contact_to_aspect(@contact, @aspect)
flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success'
respond_to do |format|
format.js { render :json => {
:button_html => render_to_string(:partial => 'aspect_memberships/add_to_aspect',
:locals => {:aspect_id => @aspect.id,
:person_id => @person.id}),
:badge_html => render_to_string(:partial => 'aspects/aspect_badge',
:locals => {:aspect => @aspect})
}}
format.html{ redirect_to aspect_path(@aspect.id)}
end
end
end

View File

@@ -6,28 +6,67 @@ class AspectsController < ApplicationController
before_filter :authenticate_user!
respond_to :html
respond_to :json, :only => :show
respond_to :json, :only => [:show, :create]
respond_to :js
def index
@posts = current_user.visible_posts(:_type => "StatusMessage").paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
@post_hashes = hashes_for_posts @posts
@aspect_hashes = hashes_for_aspects @aspects.all, @contacts
@aspect = :all
if params[:a_ids]
@aspects = current_user.aspects.where(:id => params[:a_ids]).includes(:contacts => {:person => :profile})
else
@aspects = current_user.aspects.includes(:contacts => {:person => :profile})
end
@selected_contacts = @aspects.inject([]){|arr, aspect| arr.concat(aspect.contacts)}
@selected_contacts.uniq!
if current_user.getting_started == true
# redirect to signup
if (current_user.getting_started == true || @aspects.blank?) && !request.format.mobile?
redirect_to getting_started_path
else
if params[:sort_order].blank? and session[:sort_order].blank?
session[:sort_order] = 'updated_at'
elsif not params[:sort_order].blank? and not session[:sort_order] == params[:sort_order]
session[:sort_order] = params[:sort_order] == 'created_at' ? 'created_at' : 'updated_at'
end
sort_order = session[:sort_order] == 'created_at' ? 'created_at' : 'updated_at'
@aspect_ids = @aspects.map{|a| a.id}
@posts = StatusMessage.joins(:aspects).where(:pending => false,
:aspects => {:id => @aspect_ids}).includes(:comments, :photos).select('DISTINCT `posts`.*').paginate(
:page => params[:page], :per_page => 15, :order => sort_order + ' DESC')
@fakes = PostsFake.new(@posts)
@contact_count = current_user.contacts.count
@aspect = :all unless params[:a_ids]
@aspect ||= @aspects.first #used in mobile
end
end
def create
@aspect = current_user.aspects.create(params[:aspect])
#hack, we don't know why mass assignment is not working
@aspect.contacts_visible = params[:aspect][:contacts_visible]
@aspect.save
if @aspect.valid?
flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name)
if current_user.getting_started
redirect_to :back
elsif request.env['HTTP_REFERER'].include?("aspects/manage")
redirect_to :back
elsif params[:aspect][:share_with]
@contact = Contact.where(:id => params[:aspect][:contact_id]).first
@person = Person.where(:id => params[:aspect][:person_id]).first
@contact = current_user.contact_for(@person) || Contact.new
respond_to do |format|
format.js { render :json => {:html => render_to_string(
:partial => 'aspects/aspect_list_item',
:locals => {:aspect => @aspect,
:person => @person,
:contact => @contact}
), :aspect_id => @aspect.id},:status => 201 }
end
else
respond_with @aspect
end
@@ -42,127 +81,90 @@ class AspectsController < ApplicationController
end
def destroy
@aspect = current_user.aspect_by_id params[:id]
@aspect = current_user.aspects.where(:id => params[:id]).first
begin
current_user.drop_aspect @aspect
flash[:notice] = I18n.t 'aspects.destroy.success',:name => @aspect.name
rescue RuntimeError => e
flash[:error] = e.message
redirect_to aspects_path
rescue ActiveRecord::StatementInvalid => e
flash[:error] = I18n.t 'aspects.destroy.failure',:name => @aspect.name
redirect_to aspects_path
end
respond_with :location => aspects_manage_path
end
def show
@aspect = current_user.aspect_by_id params[:id]
@aspect = current_user.aspects.where(:id => params[:id]).first
if @aspect
redirect_to aspects_path('a_ids[]' => @aspect.id)
else
redirect_to aspects_path
end
end
def edit
@aspect = current_user.aspects.where(:id => params[:id]).includes(:contacts => {:person => :profile}).first
@contacts = current_user.contacts.includes(:person => :profile)
unless @aspect
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
else
@aspect_contacts = @aspect.contacts
@aspect_contacts_count = @aspect_contacts.count
@posts = @aspect.posts.find_all_by__type("StatusMessage", :order => 'created_at desc').paginate :page => params[:page], :per_page => 15
@post_hashes = hashes_for_posts @posts
@post_count = @posts.count
respond_with @aspect
@aspect_ids = [@aspect.id]
@aspect_contacts_count = @aspect.contacts.length
render :layout => false
end
end
def manage
@aspect = :manage
@remote_requests = current_user.requests_for_me
@contacts = current_user.contacts.includes(:person => :profile)
@remote_requests = Request.where(:recipient_id => current_user.person.id).includes(:sender => :profile)
@aspects = @all_aspects.includes(:contacts => {:person => :profile})
end
def update
@aspect = current_user.aspect_by_id(params[:id])
@aspect = current_user.aspects.where(:id => params[:id]).first
if @aspect.update_attributes!( params[:aspect] )
#hack, we don't know why mass assignment is not working
@aspect.contacts_visible = params[:aspect][:contacts_visible]
@aspect.save
flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name
else
flash[:error] = I18n.t 'aspects.update.failure',:name => @aspect.name
end
@aspect.update_attributes( params[:aspect] )
flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name
respond_with @aspect
end
def toggle_contact_visibility
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
if @aspect.contacts_visible?
@aspect.contacts_visible = false
else
@aspect.contacts_visible = true
end
@aspect.save
end
def move_contact
unless current_user.move_contact( :person_id => params[:person_id], :from => params[:from], :to => params[:to][:to])
@person = Person.find(params[:person_id])
@from_aspect = current_user.aspects.where(:id => params[:from]).first
@to_aspect = current_user.aspects.where(:id => params[:to][: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.aspect_by_id(params[:to][:to])
flash[:notice] = I18n.t 'aspects.move_contact.success'
render :nothing => true
if aspect = current_user.aspects.where(:id => params[:to][:to]).first
response_hash[:notice] = I18n.t 'aspects.move_contact.success'
response_hash[:success] = true
else
flash[:notice] = I18n.t 'aspects.move_contact.failure'
render aspects_manage_path
response_hash[:notice] = I18n.t 'aspects.move_contact.failure'
response_hash[:success] = false
end
end
def add_to_aspect
begin current_user.add_person_to_aspect( params[:person_id], params[:aspect_id])
@person_id = params[:person_id]
@aspect_id = params[:aspect_id]
flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success'
respond_to do |format|
format.js { render :status => 200 }
format.html{ redirect_to aspect_path(@aspect_id)}
end
rescue Exception => e
flash.now[:error] = I18n.t 'aspects.add_to_aspect.failure'
respond_to do |format|
format.js { render :text => e, :status => 403 }
format.html{ redirect_to aspect_path(@aspect_id)}
end
end
end
def remove_from_aspect
begin current_user.delete_person_from_aspect(params[:person_id], params[:aspect_id])
@person_id = params[:person_id]
@aspect_id = params[:aspect_id]
flash.now[:notice] = I18n.t 'aspects.remove_from_aspect.success'
respond_to do |format|
format.js { render :status => 200 }
format.html{ redirect_to aspect_path(@aspect_id)}
end
rescue Exception => e
flash.now[:error] = I18n.t 'aspects.remove_from_aspect.failure'
respond_to do |format|
format.js { render :text => e, :status => 403 }
format.html{ redirect_to aspect_path(@aspect_id)}
end
end
end
private
def hashes_for_aspects aspects, contacts
aspects.map do |a|
hash = {:aspect => a}
aspect_contacts = contacts.select{|c|
c.aspect_ids.include?(a.id)}
hash[:contact_count] = aspect_contacts.count
person_ids = aspect_contacts.map{|c| c.person_id}
hash[:people] = Person.all(:id.in => person_ids, :limit => 8)
hash
end
end
def hashes_for_posts posts
post_ids = posts.map{|p| p.id}
comment_hash = Comment.hash_from_post_ids post_ids
person_hash = Person.from_post_comment_hash comment_hash
photo_hash = Photo.hash_from_post_ids post_ids
posts.map do |post|
{:post => post,
:photos => photo_hash[post.id],
:person => post.person,
:comments => comment_hash[post.id].map do |comment|
{:comment => comment,
:person => person_hash[comment.person_id],
}
end,
}
end
render :text => response_hash.to_json
end
end

View File

@@ -6,35 +6,38 @@ class CommentsController < ApplicationController
include ApplicationHelper
before_filter :authenticate_user!
respond_to :html
respond_to :html, :mobile
respond_to :json, :only => :show
def create
target = current_user.find_visible_post_by_id params[:post_id]
text = params[:text]
@comment = current_user.build_comment(text, :on => target)
if target
@comment = current_user.build_comment(text, :on => target)
if @comment.save(:safe => true)
raise 'MongoMapper failed to catch a failed save' unless @comment.id
Rails.logger.info("event=comment_create user=#{current_user.diaspora_handle} status=success comment=#{@comment.id}")
current_user.dispatch_comment(@comment)
if @comment.save
Rails.logger.info("event=create type=comment user=#{current_user.diaspora_handle} status=success comment=#{@comment.id} chars=#{params[:text].length}")
Postzord::Dispatch.new(current_user, @comment).post
respond_to do |format|
format.js{
json = { :post_id => @comment.post_id,
:comment_id => @comment.id,
:html => render_to_string(
:partial => 'comments/comment',
:locals => { :hash => {
:comment => @comment,
:person => current_user,
}}
)
}
render(:json => json, :status => 201)
}
format.html{ render :nothing => true, :status => 201 }
respond_to do |format|
format.js{
json = { :post_id => @comment.post_id,
:comment_id => @comment.id,
:html => render_to_string(
:partial => 'comments/comment',
:locals => { :comment => @comment,
:person => current_user.person,
}
)
}
render(:json => json, :status => 201)
}
format.html{ render :nothing => true, :status => 201 }
format.mobile{ redirect_to status_message_path(@comment.post_id) }
end
else
render :nothing => true, :status => 406
end
else
render :nothing => true, :status => 406

View File

@@ -0,0 +1,79 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class ContactsController < ApplicationController
before_filter :authenticate_user!
def new
@person = Person.find(params[:person_id])
@aspects_with_person = []
@aspects_without_person = current_user.aspects
@contact = Contact.new
render :layout => false
end
def create
@person = Person.find(params[:person_id])
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
@contact = request_to_aspect(@aspect, @person)
if @contact && @contact.persisted?
flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success'
respond_to do |format|
format.js { render :json => {
:button_html => render_to_string(:partial => 'aspect_memberships/add_to_aspect',
:locals => {:aspect_id => @aspect.id,
:person_id => @person.id}),
:badge_html => render_to_string(:partial => 'aspects/aspect_badge',
:locals => {:aspect => @aspect}),
:contact_id => @contact.id
}}
format.html{ redirect_to aspect_path(@aspect.id)}
end
else
flash[:error] = I18n.t 'contacts.create.failure'
redirect_to :back
end
end
def edit
@all_aspects ||= current_user.aspects
@contact = Contact.unscoped.where(:id => params[:id], :user_id => current_user.id).first
@person = @contact.person
@aspects_with_person = []
if @contact
@aspects_with_person = @contact.aspects
end
@aspects_without_person = @all_aspects - @aspects_with_person
render :layout => false
end
def destroy
contact = Contact.unscoped.where(:id => params[:id], :user_id => current_user.id).first
if current_user.disconnect(contact)
flash[:notice] = I18n.t('contacts.destroy.success', :name => contact.person.name)
else
flash[:error] = I18n.t('contacts.destroy.failure', :name => contact.person.name)
end
redirect_to contact.person
end
private
def request_to_aspect(aspect, person)
current_user.send_contact_request_to(person, aspect)
contact = current_user.contact_for(person)
if request = Request.where(:sender_id => person.id, :recipient_id => current_user.person.id).first
request.destroy
contact.update_attributes(:pending => false)
end
contact
end
end

View File

@@ -0,0 +1,19 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
class ConversationVisibilitiesController < ApplicationController
before_filter :authenticate_user!
def destroy
@vis = ConversationVisibility.where(:person_id => current_user.person.id,
:conversation_id => params[:conversation_id]).first
if @vis
if @vis.destroy
flash[:notice] = "Conversation successfully removed"
end
end
redirect_to conversations_path
end
end

View File

@@ -0,0 +1,66 @@
class ConversationsController < ApplicationController
before_filter :authenticate_user!
respond_to :html, :json
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
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] = "Message sent"
if params[:profile]
redirect_to person_path(params[:profile])
else
redirect_to conversations_path(:conversation_id => @conversation.id)
end
end
end
def show
@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
if @conversation
render :layout => false
else
redirect_to conversations_path
end
end
def new
@all_contacts_and_ids = current_user.contacts.map{|c| {:value => c.id, :name => c.person.name}}
@contact = current_user.contacts.find(params[:contact_id]) if params[:contact_id]
render :layout => false
end
end

View File

@@ -6,11 +6,25 @@ class HomeController < ApplicationController
def show
if current_user
redirect_to aspects_path
if params[:home]
redirect_to :controller => 'aspects', :action => 'index'
else
redirect_to :controller => 'aspects', :action => 'index', :a_ids => current_user.aspects.where(:open => true).select(:id).all
end
elsif is_mobile_device?
redirect_to user_session_path
else
@landing_page = true
render :show
end
end
def toggle_mobile
if session[:mobile_view]
session[:mobile_view] = false
else
session[:mobile_view] = true
end
redirect_to :back
end
end

View File

@@ -4,8 +4,12 @@
class InvitationsController < Devise::InvitationsController
before_filter :check_token, :only => [:edit]
before_filter :check_token, :only => [:edit]
def new
@sent_invitations = current_user.invitations_from_me.includes(:recipient)
render :layout => false
end
def create
if current_user.invites == 0
@@ -13,42 +17,40 @@ class InvitationsController < Devise::InvitationsController
redirect_to :back
return
end
begin
params[:user][:aspect_id] = params[:user].delete(:aspects)
aspect = params[:user].delete(:aspects)
message = params[:user].delete(:invite_messages)
params[:user][:invite_message] = message unless message == ""
emails = params[:user][:email].to_s.gsub(/\s/, '').split(/, */)
emails = params[:user][:email].split(/, */)
invited_users = emails.map { |e| current_user.invite_user(params[:user].merge({:email => e}))}
good_users, rejected_users = invited_users.partition {|u| u.persisted? }
good_emails, bad_emails = emails.partition{|e| e.try(:match, Devise.email_regexp)}
flash[:notice] = I18n.t('invitations.create.sent') + good_users.map{|x| x.email}.join(', ')
if rejected_users.any?
flash[:error] = I18n.t('invitations.create.rejected') + rejected_users.map{|x| x.email}.join(', ')
end
rescue RuntimeError => e
if e.message == "You have no invites"
flash[:error] = I18n.t 'invitations.create.no_more'
elsif e.message == "You already invited this person"
flash[:error] = I18n.t 'invitations.create.already_sent'
elsif e.message == "You are already connected to this person"
flash[:error] = I18n.t 'invitations.create.already_contacts'
good_emails.each{|e| Resque.enqueue(Job::InviteUserByEmail, current_user.id, e, aspect, message)}
if bad_emails.any?
flash[:error] = I18n.t('invitations.create.sent') + good_emails.join(', ') + " "+ I18n.t('invitations.create.rejected') + bad_emails.join(', ')
else
raise e
flash[:notice] = I18n.t('invitations.create.sent') + good_emails.join(', ')
end
end
redirect_to :back
redirect_to :back
end
def update
begin
invitation_token = params[:user][:invitation_token]
if invitation_token.nil? || invitation_token.blank?
raise I18n.t('invitations.check_token.not_found')
end
user = User.find_by_invitation_token(params[:user][:invitation_token])
user.seed_aspects
user.accept_invitation!(params[:user])
rescue MongoMapper::DocumentNotValid => e
user.seed_aspects
rescue Exception => e
user = nil
flash[:error] = e.message
record = e.record
record.errors.delete(:person)
flash[:error] = record.errors.full_messages.join(", ")
end
if user
flash[:notice] = I18n.t 'registrations.create.success'
sign_in_and_redirect(:user, user)
@@ -58,6 +60,15 @@ class InvitationsController < Devise::InvitationsController
end
end
def resend
invitation = current_user.invitations_from_me.where(:id => params[:id]).first
if invitation
Resque.enqueue(Job::ResendInvitation, invitation.id)
flash[:notice] = I18n.t('invitations.create.sent') + invitation.recipient.email
end
redirect_to :back
end
protected
def check_token

View File

@@ -0,0 +1,32 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class MessagesController < ApplicationController
include ApplicationHelper
before_filter :authenticate_user!
respond_to :html, :mobile
respond_to :json, :only => :show
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 => 406
end
else
render :nothing => true, :status => 406
end
end
end

View File

@@ -0,0 +1,31 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class NotificationsController < ApplicationController
before_filter :authenticate_user!
respond_to :html, :json
def update
note = Notification.where(:recipient_id => current_user.id, :id => params[:id]).first
if note
note.update_attributes(:unread => false)
render :nothing => true
else
render :nothing => true, :code => 404
end
end
def index
@notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id},
:order => 'created_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25
@group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) }
respond_with @notifications
end
def read_all
Notification.where(:recipient_id => current_user.id).update_all(:unread => false)
redirect_to aspects_path
end
end

View File

@@ -3,44 +3,78 @@
# the COPYRIGHT file.
class PeopleController < ApplicationController
before_filter :authenticate_user!
before_filter :authenticate_user!, :except => [:show]
respond_to :html
respond_to :json, :only => [:index, :show]
def index
@aspect = :search
params[:q] ||= params[:term]
limit = params[:limit] || 15
@people = Person.search(params[:q], current_user).paginate :page => params[:page], :per_page => limit
@hashes = hashes_for_people(@people, @aspects) unless request.format == :json
@people = Person.search(params[:q]).paginate :page => params[:page], :per_page => 25, :order => 'created_at DESC'
@requests = Request.all(:to_id.in => @people.map{|p| p.id})
#only do it if it is an email address
if params[:q].try(:match, Devise.email_regexp)
webfinger(params[:q])
end
if @people.count == 1
redirect_to @people.first
else
respond_with @people
respond_with @people
end
def hashes_for_people people, aspects
ids = people.map{|p| p.id}
requests = {}
Request.where(:sender_id => ids, :recipient_id => current_user.person.id).each do |r|
requests[r.id] = r
end
contacts = {}
Contact.unscoped.where(:user_id => current_user.id, :person_id => ids).each do |contact|
contacts[contact.person_id] = contact
end
people.map{|p|
{:person => p,
:contact => contacts[p.id],
:request => requests[p.id],
:aspects => aspects}
}
end
def show
@person = Person.find(params[:id].to_id)
@person = Person.where(:id => params[:id]).first
@post_type = :all
@aspect = :none
if @person
@profile = @person.profile
@contact = current_user.contact_for(@person)
@is_contact = @person != current_user.person && @contact
@share_with = (params[:share_with] == 'true')
if @contact
@aspects_with_person = @contact.aspects
if @person
@profile = @person.profile
if current_user
@incoming_request = current_user.request_from(@person)
@contact = current_user.contact_for(@person)
@aspects_with_person = []
if @contact
@aspects_with_person = @contact.aspects
@contacts_of_contact = @contact.contacts
else
@contact ||= Contact.new
@contacts_of_contact = []
end
if (@person != current_user.person) && (!@contact || @contact.pending)
@commenting_disabled = true
else
@commenting_disabled = false
end
@posts = current_user.posts_from(@person).where(:type => "StatusMessage").paginate(:per_page => 15, :page => params[:page])
else
@commenting_disabled = true
@posts = @person.posts.where(:type => "StatusMessage", :public => true).paginate(:per_page => 15, :page => params[:page], :order => 'created_at DESC')
end
@posts = current_user.visible_posts(:person_id => @person.id, :_type => "StatusMessage").paginate :page => params[:page], :order => 'created_at DESC'
@post_hashes = hashes_for_posts @posts
@fakes = PostsFake.new(@posts)
respond_with @person, :locals => {:post_type => :all}
else
@@ -49,44 +83,6 @@ class PeopleController < ApplicationController
end
end
def destroy
current_user.disconnect(current_user.visible_person_by_id(params[:id]))
respond_with :location => root_url
end
def edit
@aspect = :person_edit
@person = current_user.person
@profile = @person.profile
end
def update
# upload and set new profile photo
params[:person][:profile] ||= {}
if params[:person][:profile][:image].present?
raw_image = params[:person][:profile].delete(:image)
params[:profile_image_hash] = { :user_file => raw_image, :to => "all" }
photo = current_user.post(:photo, params[:profile_image_hash])
params[:person][:profile][:image_url] = photo.url(:thumb_large)
params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium)
params[:person][:profile][:image_url_small] = photo.url(:thumb_small)
end
if current_user.update_profile params[:person][:profile]
flash[:notice] = I18n.t 'people.update.updated'
else
flash[:error] = I18n.t 'people.update.failed'
end
if params[:getting_started]
redirect_to getting_started_path(:step => params[:getting_started].to_i+1)
else
redirect_to edit_person_path
end
end
def retrieve_remote
if params[:diaspora_handle]
webfinger(params[:diaspora_handle], :single_aspect_form => true)
@@ -97,33 +93,7 @@ class PeopleController < ApplicationController
end
private
def hashes_for_posts posts
post_ids = posts.map{|p| p.id}
comment_hash = Comment.hash_from_post_ids post_ids
person_hash = Person.from_post_comment_hash comment_hash
photo_hash = Photo.hash_from_post_ids post_ids
posts.map do |post|
{:post => post,
:person => @person,
:photos => photo_hash[post.id],
:comments => comment_hash[post.id].map do |comment|
{:comment => comment,
:person => person_hash[comment.person_id],
}
end,
}
end
end
def webfinger(account, opts = {})
finger = EMWebfinger.new(account)
finger.on_person do |response|
if response.class == Person
response.socket_to_uid(current_user.id, opts)
else
require File.join(Rails.root,'lib/diaspora/websocket')
Diaspora::WebSocket.queue_to_user(current_user.id, {:class => 'people', :status => 'fail', :query => account, :response => response}.to_json)
end
end
Resque.enqueue(Job::SocketWebfinger, current_user.id, account, opts)
end
end

View File

@@ -13,15 +13,25 @@ class PhotosController < ApplicationController
@person = Person.find_by_id(params[:person_id])
if @person
@incoming_request = Request.where(:recipient_id => current_user.person.id, :sender_id => @person.id).first
@outgoing_request = Request.where(:sender_id => current_user.person.id, :recipient_id => @person.id).first
@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
else
@contact = Contact.new
@contacts_of_contact = []
end
@posts = current_user.raw_visible_posts.all(:_type => 'Photo', :person_id => @person.id, :order => 'created_at DESC').paginate :page => params[:page], :order => 'created_at DESC'
@posts = current_user.visible_photos.where(
:author_id => @person.id
).paginate(:page => params[:page])
render 'people/show'
@@ -33,9 +43,12 @@ class PhotosController < ApplicationController
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)
@@ -43,35 +56,46 @@ class PhotosController < ApplicationController
@photo = current_user.build_post(:photo, params[:photo])
if @photo.save
raise 'MongoMapper failed to catch a failed save' unless @photo.id
current_user.add_to_streams(@photo, params[:photo][:aspect_ids])
current_user.dispatch_post(@photo, :to => params[:photo][:aspect_ids]) unless @photo.pending
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 :location => photos_path, :error => message
respond_with @photo, :location => photos_path, :error => message
end
rescue TypeError
message = I18n.t 'photos.create.type_error'
respond_with :location => photos_path, :error => message
respond_with @photo, :location => photos_path, :error => message
rescue CarrierWave::IntegrityError
message = I18n.t 'photos.create.integrity_error'
respond_with :location => photos_path, :error => message
respond_with @photo, :location => photos_path, :error => message
rescue RuntimeError => e
message = I18n.t 'photos.create.runtime_error'
respond_with :location => photos_path, :error => message
respond_with @photo, :location => photos_path, :error => message
raise e
end
end
def make_profile_photo
person_id = current_user.person.id
@photo = Photo.find_by_id_and_person_id(params[:photo_id], person_id)
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),
@@ -84,7 +108,7 @@ class PhotosController < ApplicationController
:image_url => @photo.url(:thumb_large),
:image_url_medium => @photo.url(:thumb_medium),
:image_url_small => @photo.url(:thumb_small),
:person_id => person_id},
:author_id => author_id},
:status => 201}
end
else
@@ -96,46 +120,62 @@ class PhotosController < ApplicationController
end
def destroy
photo = current_user.my_posts.where(:_id => params[:id]).first
photo = current_user.posts.where(:id => params[:id]).first
if photo
photo.destroy
flash[:notice] = I18n.t 'photos.destroy.notice'
if photo.status_message_id
respond_with :location => photo.status_message
respond_with photo, :location => photo.status_message
else
respond_with :location => photos_path
respond_with photo, :location => person_photos_path(current_user.person)
end
else
respond_with :location => photos_path
respond_with photo, :location => person_photos_path(current_user.person)
end
end
def show
@photo = current_user.find_visible_post_by_id params[:id]
@parent = @photo.status_message
@photo = current_user.visible_photos.where(:id => params[:id]).includes(:author, :status_message => :photos).first
@photo ||= Photo.where(:public => true, :id => params[:id]).includes(:author, :status_message => :photos).first
if @photo
@parent = @photo.status_message
#if photo is not an attachment, fetch comments for self
unless @parent
@parent = @photo
#if photo is not an attachment, fetch comments for self
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
comments_hash = Comment.hash_from_post_ids [@parent.id]
person_hash = Person.from_post_comment_hash comments_hash
@comment_hashes = comments_hash[@parent.id].map do |comment|
{:comment => comment,
:person => person_hash[comment.person_id]
}
end
@ownership = current_user.owns? @photo
respond_with @photo
end
def edit
if @photo = current_user.my_posts.where(:_id => params[:id]).first
if @photo = current_user.posts.where(:id => params[:id]).first
respond_with @photo
else
redirect_to person_photos_path(current_user.person)
@@ -143,7 +183,7 @@ class PhotosController < ApplicationController
end
def update
photo = current_user.my_posts.where(:_id => params[:id]).first
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'
@@ -163,7 +203,7 @@ class PhotosController < ApplicationController
end
private
private
def file_handler(params)
######################## dealing with local files #############

View File

@@ -0,0 +1,48 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class PostsController < ApplicationController
skip_before_filter :count_requests
skip_before_filter :set_invites
skip_before_filter :which_action_and_user
skip_before_filter :set_grammatical_gender
def index
if current_user
@posts = StatusMessage.joins(:aspects).where(:pending => false
).where(Aspect.arel_table[:user_id].eq(current_user.id).or(StatusMessage.arel_table[:public].eq(true))
).select('DISTINCT `posts`.*')
else
@posts = StatusMessage.where(:public => true, :pending => false)
end
params[:tag] ||= 'partytimeexcellent'
@posts = @posts.tagged_with(params[:tag])
@posts = @posts.includes(:comments, :photos).paginate(:page => params[:page], :per_page => 15, :order => 'created_at DESC')
@fakes = PostsFake.new(@posts)
@commenting_disabled = true
@pod_url = AppConfig[:pod_uri].host
end
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] = "that post does not exsist!"
redirect_to root_url
end
else
flash[:error] = "that post does not exsist!"
redirect_to root_url
end
end
end

View File

@@ -0,0 +1,33 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class ProfilesController < ApplicationController
before_filter :authenticate_user!
def edit
@person = current_user.person
@aspect = :person_edit
@profile = @person.profile
end
def update
# upload and set new profile photo
params[:profile] ||= {}
params[:profile][:searchable] ||= false
params[:profile][:photo] = Photo.where(:author_id => current_user.person.id,
:id => params[:photo_id]).first if params[:photo_id]
if current_user.update_profile params[:profile]
flash[:notice] = I18n.t 'profiles.update.updated'
else
flash[:error] = I18n.t 'profiles.update.failed'
end
if params[:getting_started]
redirect_to getting_started_path(:step => params[:getting_started].to_i+1)
else
redirect_to edit_profile_path
end
end
end

View File

@@ -6,15 +6,17 @@ class PublicsController < ApplicationController
require File.join(Rails.root, '/lib/diaspora/parser')
include Diaspora::Parser
skip_before_filter :set_contacts_and_status, :except => [:create, :update]
skip_before_filter :set_header_data
skip_before_filter :count_requests
skip_before_filter :set_invites
skip_before_filter :set_locale
skip_before_filter :which_action_and_user
skip_before_filter :set_grammatical_gender
layout false
caches_page :host_meta
def hcard
@person = Person.find_by_id params[:id]
@person = Person.where(:guid => params[:guid]).first
unless @person.nil? || @person.owner.nil?
render 'publics/hcard'
else
@@ -28,7 +30,7 @@ class PublicsController < ApplicationController
def webfinger
@person = Person.local_by_account_identifier(params[:q]) if params[:q]
unless @person.nil?
unless @person.nil?
render 'webfinger', :content_type => 'application/xrd+xml'
else
render :nothing => true, :status => 404
@@ -36,9 +38,7 @@ class PublicsController < ApplicationController
end
def hub
if params['hub.mode'] == 'subscribe' || params['hub.mode'] == 'unsubscribe'
render :text => params['hub.challenge'], :status => 202, :layout => false
end
render :text => params['hub.challenge'], :status => 202, :layout => false
end
def receive
@@ -47,21 +47,16 @@ class PublicsController < ApplicationController
return
end
person = Person.first(:id => params[:id])
person = Person.where(:guid => params[:guid]).first
if person.owner_id.nil?
Rails.logger.error("Received post for nonexistent person #{params[:id]}")
Rails.logger.error("Received post for nonexistent person #{params[:guid]}")
render :nothing => true, :status => 404
return
end
@user = person.owner
begin
@user.receive_salmon(params[:xml])
rescue Exception => e
Rails.logger.info("bad salmon: #{e.message}")
end
Resque.enqueue(Job::ReceiveSalmon, @user.id, CGI::unescape(params[:xml]))
render :nothing => true, :status => 200
end

View File

@@ -13,7 +13,9 @@ class RegistrationsController < Devise::RegistrationsController
sign_in_and_redirect(:user, @user)
Rails.logger.info("event=registration status=successful user=#{@user.diaspora_handle}")
else
flash[:error] = @user.errors.full_messages.join(', ')
@user.errors.delete(:person)
flash[:error] = @user.errors.full_messages.join(";")
Rails.logger.info("event=registration status=failure errors='#{@user.errors.full_messages.join(', ')}'")
render :new
end
@@ -25,7 +27,7 @@ class RegistrationsController < Devise::RegistrationsController
private
def check_registrations_open!
if APP_CONFIG[:registrations_closed]
if AppConfig[:registrations_closed]
flash[:error] = t('registrations.closed')
redirect_to new_user_session_path
end

View File

@@ -2,7 +2,7 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require File.join(Rails.root, 'lib/em-webfinger')
require File.join(Rails.root, 'lib/webfinger')
class RequestsController < ApplicationController
before_filter :authenticate_user!
@@ -11,14 +11,18 @@ class RequestsController < ApplicationController
respond_to :html
def destroy
if notification = Notification.where(:recipient_id => current_user.id, :target_id=> params[:id]).first
notification.update_attributes(:unread=>false)
end
if params[:accept]
if params[:aspect_id]
@contact = current_user.accept_and_respond( params[:id], params[:aspect_id])
flash[:notice] = I18n.t 'requests.destroy.success'
respond_with :location => current_user.aspect_by_id(params[:aspect_id])
respond_with @contact, :location => requests_url
else
flash[:error] = I18n.t 'requests.destroy.error'
respond_with :location => requests_url
respond_with @contact, :location => requests_url
end
else
current_user.ignore_contact_request params[:id]
@@ -28,23 +32,26 @@ class RequestsController < ApplicationController
end
def create
aspect = current_user.aspect_by_id(params[:request][:into])
account = params[:request][:to].strip
aspect = current_user.aspects.where(:id => params[:request][:into]).first
account = params[:request][:to].strip
person = Person.by_account_identifier(account)
existing_request = Request.from(person).to(current_user.person).where(:sent => false).first if person
existing_request = Request.where(:sender_id => person.id, :recipient_id => current_user.person.id).first if person
if existing_request
current_user.accept_and_respond(existing_request.id, aspect.id)
redirect_to :back
else
@request = Request.instantiate(:to => person,
:from => current_user.person,
:into => aspect)
if @request.save
current_user.dispatch_request(@request)
@contact = Contact.new(:user => current_user,
:person => person,
:aspect_ids => [aspect.id],
:pending => true)
if @contact.save
@contact.dispatch_request
flash.now[:notice] = I18n.t('requests.create.sent')
redirect_to :back
else
flash.now[:error] = @request.errors.full_messages.join(', ')
flash.now[:error] = @contact.errors.full_messages.join(', ')
redirect_to :back
end
end

View File

@@ -1,7 +1,5 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
# licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file.
class ServicesController < ApplicationController
before_filter :authenticate_user!
@@ -13,36 +11,67 @@ class ServicesController < ApplicationController
def create
auth = request.env['omniauth.auth']
toke = auth['credentials']['token']
secret = auth['credentials']['secret']
provider = auth['provider']
user = auth['user_info']
if provider == 'twitter'
access_token = auth['extra']['access_token']
current_user.services.create(:nickname => user['nickname'],
:access_token => access_token.token,
:access_secret => access_token.secret,
:provider => provider,
:uid => auth['uid'])
elsif provider == 'facebook'
current_user.services.create(:nickname => user['nickname'],
:access_token => auth['credentials']['token'],
:provider => provider,
:uid => auth['uid'])
end
service = "Services::#{provider.camelize}".constantize.new(:nickname => user['nickname'],
:access_token => toke,
:access_secret => secret,
:uid => auth['uid'])
current_user.services << service
flash[:notice] = I18n.t 'services.create.success'
if current_user.getting_started
redirect_to getting_started_path(:step => 3)
else
redirect_to services_url
redirect_to services_url
end
end
def failure
Rails.logger.info "error in oauth #{params.inspect}"
flash[:error] = t('services.failure.error')
redirect_to services_url
end
def destroy
@service = current_user.services.find(params[:id])
@service.destroy
flash[:notice] = I18n.t 'services.destroy.success'
redirect_to services_url
end
def finder
service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first
@friends = service ? service.finder(:remote => params[:remote]) : {}
render :layout => false
end
def inviter
if current_user.invites == 0
flash[:error] = I18n.t 'invitations.create.no_more'
redirect_to :back
return
end
@uid = params[:uid]
if i_id = params[:invitation_id]
invited_user = Invitation.find(i_id).recipient
else
invited_user = current_user.invite_user(params[:aspect_id], params[:provider], @uid)
end
@subject = t('services.inviter.join_me_on_diaspora')
@message = <<MSG
#{t('services.inviter.click_link_to_accept_invitation')}:
\n
\n
#{accept_invitation_url(invited_user, :invitation_token => invited_user.invitation_token)}
MSG
redirect_to "https://www.facebook.com/?compose=1&id=#{@uid}&subject=#{@subject}&message=#{@message}&sk=messages"
end
end

View File

@@ -11,9 +11,8 @@ class SocketsController < ApplicationController
Rails.logger.info("Socket received connection to: #{msg}")
end
def outgoing(uid,object,opts={})
def outgoing(user, object, opts={})
@_request = ActionDispatch::Request.new({})
Diaspora::WebSocket.queue_to_user(uid, action_hash(uid, object, opts))
Diaspora::WebSocket.queue_to_user(user.id, action_hash(user, object, opts))
end
end

View File

@@ -6,79 +6,84 @@ class StatusMessagesController < ApplicationController
before_filter :authenticate_user!
respond_to :html
respond_to :mobile
respond_to :json, :only => :show
def create
params[:status_message][:aspect_ids] = params[:aspect_ids]
if params[:status_message][:aspect_ids] == "all"
params[:status_message][:aspect_ids] = current_user.aspects.collect{|x| x.id}
end
photos = Photo.all(:id.in => [*params[:photos]], :diaspora_handle => current_user.person.diaspora_handle)
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)/) ? public_flag = true : public_flag = false
params[:status_message][:public] = public_flag
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][:message].length}")
if @status_message.save(:safe => true)
raise 'MongoMapper failed to catch a failed save' unless @status_message.id
@status_message.photos += photos unless photos.nil?
current_user.add_to_streams(@status_message, params[:status_message][:aspect_ids])
current_user.dispatch_post(@status_message, :to => params[:status_message][:aspect_ids])
for photo in photos
current_user.add_to_streams(photo, params[:status_message][:aspect_ids])
current_user.dispatch_post(photo, :to => params[:status_message][:aspect_ids])
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
respond_to do |format|
format.js{ render :json => { :post_id => @status_message.id,
:html => render_to_string(
:partial => 'shared/stream_element',
:locals => {
:post => @status_message,
:person => @status_message.person,
:photos => @status_message.photos,
:comments => [],
:aspects => current_user.aspects,
:current_user => current_user
}
)
},
:status => 201 }
format.html{ respond_with @status_message }
format.js { render :create, :status => 201}
format.html { redirect_to :back}
format.mobile{ redirect_to :back}
end
else
if !photos.empty?
photos.update_all(:status_message_id => nil)
end
respond_to do |format|
format.js{ render :status => 406 }
format.js { render :json =>{:errors => @status_message.errors.full_messages}, :status => 406 }
format.html {redirect_to :back}
end
end
end
def destroy
@status_message = current_user.my_posts.where(:_id => params[:id]).first
@status_message = current_user.posts.where(:id => params[:id]).first
if @status_message
@status_message.destroy
render :nothing => true, :status => 200
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
respond_with :location => root_url
end
def show
@status_message = current_user.find_visible_post_by_id params[:id]
comments_hash = Comment.hash_from_post_ids [@status_message.id]
person_hash = Person.from_post_comment_hash comments_hash
@comment_hashes = comments_hash[@status_message.id].map do |comment|
{:comment => comment,
:person => person_hash[comment.person_id]
}
if @status_message
@object_aspect_ids = @status_message.aspects.map{|a| a.id}
# mark corresponding notification as read
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
redirect_to :back
end
respond_with @status_message
end
end

View File

@@ -1,7 +1,6 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class UsersController < ApplicationController
require File.join(Rails.root, 'lib/diaspora/ostatus_builder')
require File.join(Rails.root, 'lib/diaspora/exporter')
@@ -14,45 +13,53 @@ class UsersController < ApplicationController
def edit
@aspect = :user_edit
@user = current_user
@email_prefs = Hash.new(true)
@user.user_preferences.each do |pref|
@email_prefs[pref.email_type] = false
end
end
def update
u = params[:user]
@user = current_user
if params[:user][:getting_started]
boolean = params[:user][:getting_started] == "true"
@user.update_attributes( :getting_started => boolean )
redirect_to root_path
u.delete(:password) if u[:password].blank?
u.delete(:password_confirmation) if u[:password].blank? and u[:password_confirmation].blank?
u.delete(:language) if u[:language].blank?
else
params[:user].delete(:password) if params[:user][:password].blank?
params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank?
params[:user].delete(:language) if params[:user][:language].blank?
params[:user].delete(:grammatical_gender) if params[:user][:grammatical_gender].blank?
if params[:user][:password] && params[:user][:password_confirmation]
if @user.update_attributes(:password => params[:user][:password], :password_confirmation => params[:user][:password_confirmation])
flash[:notice] = I18n.t 'users.update.password_changed'
else
flash[:error] = I18n.t 'users.update.password_not_changed'
end
elsif params[:user][:language]
if @user.update_attributes(:language => params[:user][:language])
if params[:user][:grammatical_gender]
if @user.update_attributes(:grammatical_gender => params[:user][:grammatical_gender])
flash[:notice] = I18n.t 'users.update.language_changed'
else
flash[:error] = I18n.t 'users.update.language_not_changed'
end
else
flash[:notice] = I18n.t 'users.update.language_changed'
end
else
flash[:error] = I18n.t 'users.update.language_not_changed'
end
# change email notifications
if u[:email_preferences]
@user.update_user_preferences(u[:email_preferences])
flash[:notice] = I18n.t 'users.update.email_notifications_changed'
# change passowrd
elsif u[:current_password] && u[:password] && u[:password_confirmation]
if @user.update_with_password(u)
flash[:notice] = I18n.t 'users.update.password_changed'
else
flash[:error] = I18n.t 'users.update.password_not_changed'
end
elsif u[:language]
if @user.update_attributes(:language => u[:language])
I18n.locale = @user.language
flash[:notice] = I18n.t 'users.update.language_changed'
else
flash[:error] = I18n.t 'users.update.language_not_changed'
end
elsif u[:a_ids]
@user.aspects.update_all(:open => false)
unless u[:a_ids] == ["home"]
@user.aspects.where(:id => u[:a_ids]).update_all(:open => true)
end
end
redirect_to edit_user_path(@user)
respond_to do |format|
format.js{
render :nothing => true, :status => 204
}
format.all{
redirect_to edit_user_path(@user)
}
end
end
@@ -67,13 +74,13 @@ class UsersController < ApplicationController
user = User.find_by_username(params[:username])
if user
posts = StatusMessage.where(:author_id => user.person.id, :public => true).order('created_at DESC')
director = Diaspora::Director.new
ostatus_builder = Diaspora::OstatusBuilder.new(user)
ostatus_builder = Diaspora::OstatusBuilder.new(user, posts)
render :xml => director.build(ostatus_builder), :content_type => 'application/atom+xml'
else
flash[:error] = I18n.t 'users.public.does_not_exist', :username => params[:username]
redirect_to root_url
redirect_to root_url, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
end
end
@@ -83,17 +90,34 @@ class UsersController < ApplicationController
@person = @user.person
@profile = @user.profile
@services = @user.services
@requests = @user.pending_requests
service = current_user.services.where(:type => "Services::Facebook").first
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
@step = ((params[:step].to_i>0)&&(params[:step].to_i<4)) ? params[:step].to_i : 1
@step ||= 1
if @step == 4
@user.grammatical_gender = I18n::Backend::Genderize.guess(@profile.gender)
@user.getting_started = false
@user.save
if @step == 2 && SERVICES['facebook']['app_id'] == ""
@step = 3
end
render "users/getting_started"
if @step == 3
@requests = Request.where(:recipient_id => @person.id).includes(:sender => :profile).all
@friends = service ? service.finder(:local => true) : {}
@friends.delete_if{|key, value| @requests.any?{ |r| r.sender_id == value[:person].id} }
end
if @step == 3 && @requests.length == 0 && @friends.length == 0
@user.update_attributes(:getting_started => false)
redirect_to root_path
else
render "users/getting_started"
end
end
def getting_started_completed
user = current_user
user.update_attributes(:getting_started => false)
redirect_to root_path
end
def export

View File

@@ -5,32 +5,61 @@
module ApplicationHelper
@@youtube_title_cache = Hash.new("no-title")
def modern_browser?
false
def timeago(time, options = {})
options[:class] ||= "timeago"
content_tag(:abbr, time.to_s, options.merge(:title => time.iso8601)) if time
end
def page_title text=nil
title = ""
if text.blank?
title = "#{current_user.name}" if current_user
else
title = "#{text}"
end
end
def aspects_with_post aspects, post
aspects.select do |a|
post.aspect_ids.include?(a.id)
aspects.select do |aspect|
PostVisibility.exists?(:aspect_id => aspect.id, :post_id => post.id)
end
end
def aspects_without_post aspects, post
aspects.reject do |a|
post.aspect_ids.include?(a.id)
aspects.reject do |aspect|
PostVisibility.exists?(:aspect_id => aspect.id, :post_id => post.id)
end
end
def aspect_links aspects, opts={}
str = ""
aspects.each do |a|
str << aspect_li(a, opts)
def aspect_badges aspects
str = ''
aspects.each do |aspect|
str << aspect_badge(aspect)
end
str.html_safe
end
def aspect_badge aspect
str = "<span class='aspect_badge single'>"
str << link_for_aspect(aspect, 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe
str << "</span>"
end
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
def aspect_li aspect, opts= {}
param_string = ""
if opts.size > 0
param_string << '?'
opts.each_pair do |k,v|
opts.each_pair do |k, v|
param_string << "#{k}=#{v}"
end
end
@@ -52,7 +81,7 @@ module ApplicationHelper
aspects_path
end
end
def object_path(object, opts = {})
return "" if object.nil?
object = object.person if object.is_a? User
@@ -73,17 +102,17 @@ module ApplicationHelper
end
def how_long_ago(obj)
"#{time_ago_in_words(obj.created_at)} #{t('ago')}"
timeago(obj.created_at)
end
def person_url(person)
case person.class.to_s
when "User"
user_path(person)
when "Person"
person_path(person)
else
I18n.t('application.helper.unknown_person')
when "User"
user_path(person)
when "Person"
person_path(person)
else
I18n.t('application.helper.unknown_person')
end
end
@@ -100,32 +129,25 @@ module ApplicationHelper
end
def person_image_tag(person, size=:thumb_small)
"<img alt='#{person.name}' class='avatar' data-person_id='#{person.id}' src='#{image_or_default(person, size)}' title='#{person.name}'>".html_safe
"<img alt=\"#{h(person.name)}\" class=\"avatar\" data-person_id=\"#{person.id}\" src=\"#{person.profile.image_url(size)}\" title=\"#{h(person.name)}\">".html_safe
end
def person_link(person)
"<a href='/people/#{person.id}'>
#{person.name}
def person_link(person, opts={})
"<a href='/people/#{person.id}' class='#{opts[:class]}'>
#{h(person.name)}
</a>".html_safe
end
def image_or_default(person, size=:thumb_large)
image_location = person.profile.image_url(size) if person.profile
image_location ||= person.profile.image_url(:thumb_large) if person.profile #backwards compatability for old profile pictures
image_location ||= "/images/user/default.png"
image_location
end
def hard_link(string, path)
link_to string, path, :rel => 'external'
link_to string, path, :rel => 'external'
end
def person_image_link(person, opts = {})
return "" if person.nil?
return "" if person.nil? || person.profile.nil?
if opts[:to] == :photos
link_to person_image_tag(person,opts[:size]), person_photos_path(person)
link_to person_image_tag(person, opts[:size]), person_photos_path(person)
else
"<a href='/people/#{person.id}'>
"<a href='/people/#{person.id}'>
#{person_image_tag(person)}
</a>".html_safe
end
@@ -135,86 +157,129 @@ module ApplicationHelper
(':' + post.id.to_s).to_sym
end
def person_photos_path person
person_id = person.id if person.respond_to?(:id)
person_id ||= person
"#{photos_path}?person_id=#{person_id}"
end
def markdownify(message, options = {})
message = h(message).html_safe
[:autolinks, :youtube, :emphasis, :links].each do |k|
if !options.has_key?(k)
options[k] = true
end
if !options.has_key?(:newlines)
options[:newlines] = true
end
if options[:links]
message.gsub!(/\[([^\[]+)\]\(([^ ]+) \&quot;(([^&]|(&[^q])|(&q[^u])|(&qu[^o])|(&quo[^t])|(&quot[^;]))+)\&quot;\)/) do |m|
escape = (options[:emphasis]) ? "\\" : ""
res = "<a target=\"#{escape}_blank\" href=\"#{$2}\" title=\"#{$3}\">#{$1}</a>"
res
end
message.gsub!(/\[([^\[]+)\]\(([^ ]+)\)/) do |m|
escape = (options[:emphasis]) ? "\\" : ""
res = "<a target=\"#{escape}_blank\" href=\"#{$2}\">#{$1}</a>"
res
end
end
message = process_links(message)
message = process_autolinks(message)
message = process_emphasis(message)
message = process_youtube(message, options[:youtube_maps])
message = process_vimeo(message, options[:vimeo_maps])
message.gsub!(/&lt;3/, "&hearts;")
if options[:youtube]
message.gsub!(/( |^)(http:\/\/)?www\.youtube\.com\/watch[^ ]*v=([A-Za-z0-9_]+)(&[^ ]*|)/) do |m|
res = "#{$1}youtube.com::#{$3}"
res.gsub!(/(\*|_)/) { |m| "\\#{$1}" } if options[:emphasis]
res
end
end
if options[:autolinks]
message.gsub!(/( |^)(www\.[^ ]+\.[^ ])/, '\1http://\2')
message.gsub!(/(<a target="\\?_blank" href=")?(https|http|ftp):\/\/([^ ]+)/) do |m|
if !$1.nil?
m
else
res = %{<a target="_blank" href="#{$2}://#{$3}">#{$3}</a>}
res.gsub!(/(\*|_)/) { |m| "\\#{$1}" } if options[:emphasis]
res
end
end
end
if options[:emphasis]
message.gsub!("\\**", "-^doublestar^-")
message.gsub!("\\__", "-^doublescore^-")
message.gsub!("\\*", "-^star^-")
message.gsub!("\\_", "-^score^-")
message.gsub!(/(\*\*\*|___)(.+?)\1/m, '<em><strong>\2</strong></em>')
message.gsub!(/(\*\*|__)(.+?)\1/m, '<strong>\2</strong>')
message.gsub!(/(\*|_)(.+?)\1/m, '<em>\2</em>')
message.gsub!("-^doublestar^-", "**")
message.gsub!("-^doublescore^-", "__")
message.gsub!("-^star^-", "*")
message.gsub!("-^score^-", "_")
end
if options[:youtube]
while youtube = message.match(/youtube\.com::([A-Za-z0-9_\\\-]+)/)
video_id = youtube[1]
if options[:youtube_maps] && options[:youtube_maps][video_id]
title = options[:youtube_maps][video_id]
else
title = I18n.t 'application.helper.youtube_title.unknown'
end
message.gsub!('youtube.com::'+video_id, '<a class="video-link" data-host="youtube.com" data-video-id="' + video_id + '" href="#video">Youtube: ' + title + '</a>')
end
if options[:newlines]
message.gsub!(/\n+/, '<br />')
end
return message
end
def process_links(message)
message.gsub!(/\[([^\[]+)\]\(([^ ]+) \&quot;(([^&]|(&[^q])|(&q[^u])|(&qu[^o])|(&quo[^t])|(&quot[^;]))+)\&quot;\)/) do |m|
escape = "\\"
link = $1
url = $2
title = $3
url.gsub!("_", "\\_")
url.gsub!("*", "\\*")
protocol = (url =~ /^\w+:\/\//) ? '' :'http://'
res = "<a target=\"#{escape}_blank\" href=\"#{protocol}#{url}\" title=\"#{title}\">#{link}</a>"
res
end
message.gsub!(/\[([^\[]+)\]\(([^ ]+)\)/) do |m|
escape = "\\"
link = $1
url = $2
url.gsub!("_", "\\_")
url.gsub!("*", "\\*")
protocol = (url =~ /^\w+:\/\//) ? '' :'http://'
res = "<a target=\"#{escape}_blank\" href=\"#{protocol}#{url}\">#{link}</a>"
res
end
return message
end
def process_youtube(message, youtube_maps)
regex = /( |^)(http:\/\/)?www\.youtube\.com\/watch[^ ]*v=([A-Za-z0-9_\-]+)(&[^ ]*|)/
processed_message = message.gsub(regex) do |matched_string|
match_data = matched_string.match(regex)
video_id = match_data[3]
if youtube_maps && youtube_maps[video_id]
title = h(CGI::unescape(youtube_maps[video_id]))
else
title = I18n.t 'application.helper.video_title.unknown'
end
' <a class="video-link" data-host="youtube.com" data-video-id="' + video_id + '" href="'+ match_data[0].strip + '" target="_blank">Youtube: ' + title + '</a>'
end
return processed_message
end
def process_autolinks(message)
message.gsub!(/( |^)(www\.[^\s]+\.[^\s])/, '\1http://\2')
message.gsub!(/(<a target="\\?_blank" href=")?(https|http|ftp):\/\/([^\s]+)/) do |m|
captures = [$1,$2,$3]
if !captures[0].nil?
m
elsif m.match(/(youtube|vimeo)/)
m.gsub(/(\*|_)/) { |m| "\\#{$1}" } #remove markers on markdown chars to not markdown inside links
else
res = %{<a target="_blank" href="#{captures[1]}://#{captures[2]}">#{captures[2]}</a>}
res.gsub!(/(\*|_)/) { |m| "\\#{$1}" }
res
end
end
return message
end
def process_emphasis(message)
message.gsub!("\\**", "-^doublestar^-")
message.gsub!("\\__", "-^doublescore^-")
message.gsub!("\\*", "-^star^-")
message.gsub!("\\_", "-^score^-")
message.gsub!(/(\*\*\*|___)(.+?)\1/m, '<em><strong>\2</strong></em>')
message.gsub!(/(\*\*|__)(.+?)\1/m, '<strong>\2</strong>')
message.gsub!(/(\*|_)(.+?)\1/m, '<em>\2</em>')
message.gsub!("-^doublestar^-", "**")
message.gsub!("-^doublescore^-", "__")
message.gsub!("-^star^-", "*")
message.gsub!("-^score^-", "_")
return message
end
def process_vimeo(message, vimeo_maps)
regex = /https?:\/\/(?:w{3}\.)?vimeo.com\/(\d{6,})/
processed_message = message.gsub(regex) do |matched_string|
match_data = message.match(regex)
video_id = match_data[1]
if vimeo_maps && vimeo_maps[video_id]
title = h(CGI::unescape(vimeo_maps[video_id]))
else
title = I18n.t 'application.helper.video_title.unknown'
end
' <a class="video-link" data-host="vimeo.com" data-video-id="' + video_id + '" href="' + match_data[0] + '" target="_blank">Vimeo: ' + title + '</a>'
end
return processed_message
end
def info_text(text)
image_tag 'icons/monotone_question.png', :class => 'what_is_this', :title => text
end
def get_javascript_strings_for(language)
defaults = I18n.t('javascripts', :locale => DEFAULT_LANGUAGE)
if language != DEFAULT_LANGUAGE
translations = I18n.t('javascripts', :locale => language)
defaults.update(translations)
end
defaults
end
end

View File

@@ -1,13 +1,17 @@
# Copyright (c) 2010, Diaspora Inc. This file is
#/ Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module AspectsHelper
def link_for_aspect( aspect )
link_to aspect.name, aspect
def link_for_aspect(aspect, opts={})
opts[:params] ||= {}
params ||= {}
opts[:params] = opts[:params].merge("a_ids[]" => aspect.id, :created_at => params[:created_at])
link_to aspect.name, aspects_path( opts[:params] ), opts
end
def remove_link( aspect )
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
@@ -15,20 +19,38 @@ module AspectsHelper
end
end
def add_to_aspect_button(aspect_id, person_id)
link_to image_tag('icons/monotone_plus_add_round.png'), {:controller => "aspects", :action => 'add_to_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'add button'
def add_to_aspect_button(aspect_id, person_id, kontroller)
link_to image_tag('icons/monotone_plus_add_round.png'),
{:controller => kontroller,
:action => 'create',
:aspect_id => aspect_id,
:person_id => person_id},
:remote => true,
:method => 'post',
:class => 'add button'
end
def remove_from_aspect_button(aspect_id, person_id)
link_to image_tag('icons/monotone_check_yes.png'), {:controller => "aspects", :action => 'remove_from_aspect', :aspect_id => aspect_id, :person_id => person_id}, :remote => true, :class => 'added button'
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'
end
def aspect_membership_button(aspect_id, contact)
unless contact.aspect_ids.include?(aspect_id)
add_to_aspect_button(aspect_id, contact.person.id)
def contact_or_membership(contact)
(contact.persisted?) ? 'aspect_memberships' : 'contacts'
end
def aspect_membership_button(aspect, contact, person)
if contact.nil? || !aspect.contacts.include?(contact)
add_to_aspect_button(aspect.id, person.id, contact_or_membership(contact))
else
remove_from_aspect_button(aspect_id, contact.person.id)
remove_from_aspect_button(aspect.id, person.id)
end
end
end

View File

@@ -0,0 +1,5 @@
module ConversationsHelper
def new_message_text(count)
t('conversations.helper.new_messages', :count => count)
end
end

View File

@@ -6,30 +6,4 @@ module LanguageHelper
end
options.sort_by { |o| o[0] }
end
def options_for_gender_select(user)
grammatical_gender = user.grammatical_gender
genders_list = I18n::Backend::Genderize.known_genders.map do |gender|
[t("#{gender}"), gender]
end
if grammatical_gender.blank?
grammatical_gender = I18n::Backend::Genderize.guess(user.profile.gender)
end
options_for_select(genders_list, grammatical_gender.to_s)
end
def gender_select_disabled(user)
not I18n::Backend::Genderize.supports?(user.language)
end
def grammatical_gender_languages
@glang_cache ||= array_or_string_for_javascript(I18n::Backend::Genderize::SupportedLanguages)
end
def options_for_grammatical_gender_block(user)
enabled = I18n::Backend::Genderize.supports? user.language
{:style => 'display: ' + (enabled ? 'inline' : 'none') + ';' +
' margin-left: 1em; margin-right: 0.5em;'
}
end
end
end

View File

@@ -0,0 +1,53 @@
module NotificationsHelper
def object_link(note)
target_type = note.translation_key
if note.instance_of?(Notifications::Mentioned)
post = Mention.find(note.target_id).post
if post
"#{translation(target_type)} #{link_to t('notifications.post'), object_path(post)}".html_safe
else
"#{translation(target_type)} #{t('notifications.deleted')} #{t('notifications.post')}"
end
elsif note.instance_of?(Notifications::RequestAccepted)
translation(target_type)
elsif note.instance_of?(Notifications::NewRequest)
translation(target_type)
elsif note.instance_of?(Notifications::CommentOnPost)
post = Post.where(:id => note.target_id).first
if post
"#{translation(target_type)} #{link_to t('notifications.post'), object_path(post)}".html_safe
else
"#{translation(target_type)} #{t('notifications.deleted')} #{t('notifications.post')}"
end
elsif note.instance_of?(Notifications::AlsoCommented)
post = Post.where(:id => note.target_id).first
if post
"#{translation(target_type, post.author.name)} #{link_to t('notifications.post'), object_path(post)}".html_safe
else
t('notifications.also_commented_deleted')
end
end
end
def translation(target_type, post_author = nil)
t("notifications.#{target_type}", :post_author => post_author)
end
def new_notification_text(count)
t('notifications.helper.new_notifications', :count => count)
end
def new_notification_link(count)
if count > 0
link_to new_notification_text(count), notifications_path
end
end
def notification_people_link(note)
note.actors.collect{ |person| link_to("#{h(person.name.titlecase)}", person_path(person))}.join(", ").html_safe
end
def peoples_names(note)
note.actors.map{|p| p.name}.join(",")
end
end

View File

@@ -20,16 +20,11 @@ module PeopleHelper
end
end
def action_link(person, is_contact)
if is_contact
link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete
elsif person == current_user.person
link_to t('people.profile_sidebar.edit_my_profile'), edit_person_path(person)
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
def pending_request_for(person)
current_user.request_for(person)
end
end

View File

@@ -0,0 +1,2 @@
module PrivateMessagesHelper
end

View File

@@ -10,7 +10,7 @@ module RequestsHelper
def new_request_link(request_count)
if request_count > 0
link_to t('new_requests', :count => @request_count), aspects_manage_path
link_to t('requests.helper.new_requests', :count => @request_count), aspects_manage_path
end
end
end

View File

@@ -4,44 +4,61 @@
module SocketsHelper
include ApplicationHelper
include NotificationsHelper
def obj_id(object)
object.respond_to?(:post_id) ? object.post_id : object.id
if object.respond_to?(:post_id)
object.post_id
elsif object.respond_to?(:post_guid)
object.post_guid
else
object.id
end
end
def action_hash(uid, object, opts={})
def action_hash(user, object, opts={})
uid = user.id
begin
user = User.find_by_id uid
unless user.nil?
old_locale = I18n.locale
I18n.locale = user.language.to_s
end
if object.is_a? StatusMessage
post_hash = {:post => object,
:person => object.person,
:author => object.author,
:photos => object.photos,
:comments => object.comments.map{|c|
{:comment => c,
:person => c.person
:author => c.author
}
},
:current_user => user,
:aspects => user.aspects,
: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],
:single_aspect_form => opts["single_aspect_form"],
:person => object,
:aspects => user.aspects,
:all_aspects => user.aspects,
:contact => user.contact_for(object),
:request => user.request_for(object),
:request => user.request_from(object),
:current_user => user}
v = render_to_string(:partial => 'people/person', :locals => person_hash)
elsif object.is_a? Comment
v = render_to_string(:partial => 'comments/comment', :locals => {:hash => {:comment => object, :person => object.person}})
v = render_to_string(:partial => 'comments/comment', :locals => {:comment => object, :person => object.author})
elsif object.is_a? Notification
v = render_to_string(:partial => 'notifications/popup', :locals => {:note => object, :person => opts[:actor]})
else
v = render_to_string(:partial => type_partial(object), :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction
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.original_exception
raise e
end
action_hash = {:class =>object.class.to_s.underscore.pluralize, :html => v, :post_id => obj_id(object)}
action_hash.merge! opts
@@ -50,21 +67,17 @@ module SocketsHelper
end
if object.is_a? Comment
post = object.post
action_hash[:comment_id] = object.id
action_hash[:my_post?] = (object.post.person.owner.id == uid)
action_hash[:notification] = notification(object)
action_hash[:my_post?] = (post.author.owner_id == uid)
action_hash[:post_guid] = post.guid
end
action_hash[:mine?] = object.person && (object.person.owner.id == uid) if object.respond_to?(:person)
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
def notification(object)
begin
render_to_string(:partial => 'shared/notification', :locals => {:object => object})
rescue Exception => e
Rails.logger.error("event=socket_render status=fail user=#{user.diaspora_handle} object=#{object.id.to_s}")
end
end
end

View File

@@ -3,13 +3,18 @@
# the COPYRIGHT file.
module StreamHelper
def comment_toggle(count)
if count < 3
GSUB_THIS = "FIUSDHVIUSHDVIUBAIUHAPOIUXJM"
def comment_toggle(count, commenting_disabled=false)
if count <= 3
link_to "#{t('stream_helper.hide_comments')} (#{count})", '#', :class => "show_post_comments"
else
link_to "#{t('stream_helper.show_comments')} (#{count})", '#', :class => "show_post_comments"
end
end
def new_comment_form(post_id, current_user)
@form ||= controller.render_to_string(
:partial => 'comments/new_comment', :locals => {:post_id => GSUB_THIS, :current_user => current_user})
@form.gsub(GSUB_THIS, post_id.to_s)
end
end

View File

@@ -1,24 +1,25 @@
class Notifier < ActionMailer::Base
default :from => "no-reply@joindiaspora.com"
ATTACHMENT = File.read("#{Rails.root}/public/images/diaspora_white_on_grey.png")
helper :application
default :from => AppConfig[:smtp_sender_address]
ATTACHMENT = File.read("#{Rails.root}/public/images/logo_caps.png")
def self.admin(string, recipients, opts = {})
mails = []
recipients.each do |rec|
mail = single_admin(string, rec)
mails << mail
mail.deliver
end
mails
end
def single_admin(string, recipient)
@recipient = recipient
@string = string.html_safe
attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT
attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => @recipient.email,
:subject => I18n.t('notifier.single_admin.subject'), :host => APP_CONFIG[:terse_pod_url])
:subject => I18n.t('notifier.single_admin.subject'), :host => AppConfig[:pod_uri].host)
end
def new_request(recipient_id, sender_id)
@@ -27,28 +28,96 @@ class Notifier < ActionMailer::Base
log_mail(recipient_id, sender_id, 'new_request')
attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT
attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "#{@receiver.name} <#{@receiver.email}>",
:subject => I18n.t('notifier.new_request.subject', :from => @sender.name), :host => APP_CONFIG[:terse_pod_url])
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.new_request.subject', :from => @sender.name), :host => AppConfig[:pod_uri].host)
end
end
def request_accepted(recipient_id, sender_id, aspect_id)
def request_accepted(recipient_id, sender_id)
@receiver = User.find_by_id(recipient_id)
@sender = Person.find_by_id(sender_id)
@aspect = Aspect.find_by_id(aspect_id)
log_mail(recipient_id, sender_id, 'request_accepted')
attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT
attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "#{@receiver.name} <#{@receiver.email}>",
:subject => I18n.t('notifier.request_accepted.subject', :name => @sender.name), :host => APP_CONFIG[:terse_pod_url])
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.request_accepted.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end
def mentioned(recipient_id, sender_id, target_id)
@receiver = User.find_by_id(recipient_id)
@sender = Person.find_by_id(sender_id)
@post = Mention.find_by_id(target_id).post
log_mail(recipient_id, sender_id, 'mentioned')
attachments.inline['logo_caps.png'] = ATTACHMENT
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.mentioned.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end
def comment_on_post(recipient_id, sender_id, comment_id)
@receiver = User.find_by_id(recipient_id)
@sender = Person.find_by_id(sender_id)
@comment = Comment.find_by_id(comment_id)
log_mail(recipient_id, sender_id, 'comment_on_post')
attachments.inline['logo_caps.png'] = ATTACHMENT
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.comment_on_post.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end
def also_commented(recipient_id, sender_id, comment_id)
@receiver = User.find_by_id(recipient_id)
@sender = Person.find_by_id(sender_id)
@comment = Comment.find_by_id(comment_id)
@post_author_name = @comment.post.author.name
log_mail(recipient_id, sender_id, 'comment_on_post')
attachments.inline['logo_caps.png'] = ATTACHMENT
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.also_commented.subject', :name => @sender.name, :post_author => @post_author_name ), :host => AppConfig[:pod_uri].host)
end
end
def private_message(recipient_id, sender_id, message_id)
@receiver = User.find_by_id(recipient_id)
@sender = Person.find_by_id(sender_id)
@message = Message.find_by_id(message_id)
@conversation = @message.conversation
@participants = @conversation.participants
log_mail(recipient_id, sender_id, 'private_message')
attachments.inline['logo_caps.png'] = ATTACHMENT
I18n.with_locale(@receiver.language) do
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.private_message.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end
private
def log_mail recipient_id, sender_id, type
log_string = "event=mail mail_type=#{type} db_name=#{MongoMapper.database.name} recipient_id=#{recipient_id} sender_id=#{sender_id}"
log_string = "event=mail mail_type=#{type} recipient_id=#{recipient_id} sender_id=#{sender_id}"
if @receiver && @sender
log_string << "models_found=true sender_handle=#{@sender.diaspora_handle} recipient_handle=#{@receiver.diaspora_handle}"
else

View File

@@ -2,48 +2,27 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Aspect
include MongoMapper::Document
class Aspect < ActiveRecord::Base
belongs_to :user
key :name, String
key :request_ids, Array
key :post_ids, Array
has_many :aspect_memberships
has_many :contacts, :through => :aspect_memberships
many :contacts, :foreign_key => 'aspect_ids', :class_name => 'Contact'
many :requests, :in => :request_ids, :class_name => 'Request'
many :posts, :in => :post_ids, :class_name => 'Post'
belongs_to :user, :class_name => 'User'
has_many :post_visibilities
has_many :posts, :through => :post_visibilities
validates_presence_of :name
validates_length_of :name, :maximum => 20
validates_uniqueness_of :name, :scope => :user_id
validates_uniqueness_of :name, :scope => :user_id, :case_sensitive => false
attr_accessible :name
before_validation do
name.strip!
end
timestamps!
def to_s
name
end
def person_objects
person_ids = people.map{|x| x.person_id}
Person.all(:id.in => person_ids)
end
def as_json(opts = {})
{
:aspect => {
:name => self.name,
:people => self.people.each{|person| person.as_json},
:posts => self.posts.each {|post| post.as_json },
}
}
end
end

View File

@@ -0,0 +1,23 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class AspectMembership < ActiveRecord::Base
belongs_to :aspect
belongs_to :contact
has_one :user, :through => :contact
has_one :person, :through => :contact
before_destroy :ensure_membership
def ensure_membership
if self.contact.aspect_memberships.count == 1
errors[:base] << I18n.t('shared.contact_list.cannot_remove')
false
else
true
end
end
end

View File

@@ -2,88 +2,58 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class HandleValidator < ActiveModel::Validator
def validate(document)
unless document.diaspora_handle == document.person.diaspora_handle
document.errors[:base] << "Diaspora handle and person handle must match"
end
end
end
class Comment
require File.join(Rails.root, 'lib/diaspora/websocket')
class Comment < ActiveRecord::Base
require File.join(Rails.root, 'lib/diaspora/web_socket')
require File.join(Rails.root, 'lib/youtube_titles')
include YoutubeTitles
include MongoMapper::Document
include ROXML
include Diaspora::Webhooks
include Encryptable
include Diaspora::Relayable
include Diaspora::Guid
include Diaspora::Socketable
xml_reader :text
xml_reader :diaspora_handle
xml_reader :post_id
xml_reader :_id
xml_attr :text
xml_attr :diaspora_handle
key :text, String
key :post_id, ObjectId
key :person_id, ObjectId
key :diaspora_handle, String
belongs_to :post, :touch => true
belongs_to :author, :class_name => 'Person'
belongs_to :post, :class_name => "Post"
belongs_to :person, :class_name => "Person"
validates_presence_of :text, :diaspora_handle, :post
validates_with HandleValidator
validates_presence_of :text, :post
validates_length_of :text, :maximum => 2500
serialize :youtube_titles, Hash
before_save do
get_youtube_title text
self.text.strip! unless self.text.nil?
end
def diaspora_handle
self.author.diaspora_handle
end
def diaspora_handle= nh
self.author = Webfinger.new(nh).fetch
end
timestamps!
#ENCRYPTION
xml_reader :creator_signature
xml_reader :post_creator_signature
key :creator_signature, String
key :post_creator_signature, String
def signable_accessors
accessors = self.class.roxml_attrs.collect{|definition|
definition.accessor}
accessors.delete 'person'
accessors.delete 'creator_signature'
accessors.delete 'post_creator_signature'
accessors
end
def signable_string
signable_accessors.collect{|accessor|
(self.send accessor.to_sym).to_s}.join ';'
end
def verify_post_creator_signature
verify_signature(post_creator_signature, post.person)
end
def signature_valid?
verify_signature(creator_signature, person)
end
def self.hash_from_post_ids post_ids
hash = {}
comments = self.on_posts(post_ids)
post_ids.each do |id|
hash[id] = []
def notification_type(user, person)
if self.post.author == user.person
return Notifications::CommentOnPost
elsif self.post.comments.where(:author_id => user.person.id) != [] && self.author_id != user.person.id
return Notifications::AlsoCommented
else
return false
end
comments.each do |comment|
hash[comment.post_id] << comment
end
hash.each_value {|comments| comments.sort!{|c1, c2| c1.created_at <=> c2.created_at }}
hash
end
scope :on_posts, lambda { |post_ids|
where(:post_id.in => post_ids)
}
def parent_class
Post
end
def parent
self.post
end
def parent= parent
self.post = parent
end
end

View File

@@ -2,8 +2,8 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Contact
include MongoMapper::Document
class Contact < ActiveRecord::Base
default_scope where(:pending => false)
belongs_to :user
validates_presence_of :user
@@ -11,7 +11,38 @@ class Contact
belongs_to :person
validates_presence_of :person
key :aspect_ids, Array, :typecast => 'ObjectId'
many :aspects, :in => :aspect_ids, :class_name => 'Aspect'
has_many :aspect_memberships
has_many :aspects, :through => :aspect_memberships
validate :not_contact_for_self
validates_uniqueness_of :person_id, :scope => :user_id
def dispatch_request
request = self.generate_request
Postzord::Dispatch.new(self.user, request).post
request
end
def generate_request
Request.new(:sender => self.user.person,
:recipient => self.person,
:aspect => aspects.first)
end
def contacts
people = Person.arel_table
incoming_aspects = Aspect.joins(:contacts).where(
:user_id => self.person.owner_id,
:contacts_visible => true,
:contacts => {:person_id => self.user.person.id}).select('`aspects`.id')
incoming_aspect_ids = incoming_aspects.map{|a| a.id}
similar_contacts = Person.joins(:contacts => :aspect_memberships).where(
:aspect_memberships => {:aspect_id => incoming_aspect_ids}).where(people[:id].not_eq(self.user.person.id)).select('DISTINCT `people`.*')
end
private
def not_contact_for_self
if person_id && person.owner == user
errors[:base] << 'Cannot create self-contact'
end
end
end

View File

@@ -0,0 +1,72 @@
class Conversation < ActiveRecord::Base
include ROXML
include Diaspora::Guid
include Diaspora::Webhooks
xml_attr :subject
xml_attr :created_at
xml_attr :messages, :as => [Message]
xml_reader :diaspora_handle
xml_reader :participant_handles
has_many :conversation_visibilities, :dependent => :destroy
has_many :participants, :class_name => 'Person', :through => :conversation_visibilities, :source => :person
has_many :messages, :order => 'created_at ASC'
belongs_to :author, :class_name => 'Person'
def self.create(opts={})
opts = opts.dup
msg_opts = {:author => opts[:author], :text => opts.delete(:text)}
cnv = super(opts)
message = Message.new(msg_opts.merge({:conversation_id => cnv.id}))
message.save
cnv
end
def recipients
self.participants - [self.author]
end
def diaspora_handle
self.author.diaspora_handle
end
def diaspora_handle= nh
self.author = Webfinger.new(nh).fetch
end
def participant_handles
self.participants.map{|p| p.diaspora_handle}.join(";")
end
def participant_handles= handles
handles.split(';').each do |handle|
self.participants << Webfinger.new(handle).fetch
end
end
def last_author
self.messages.last.author if self.messages.size > 0
end
def subject
self[:subject].blank? ? "no subject" : self[:subject]
end
def subscribers(user)
self.recipients
end
def receive(user, person)
cnv = Conversation.find_or_create_by_guid(self.attributes)
self.participants.each do |participant|
ConversationVisibility.find_or_create_by_conversation_id_and_person_id(cnv.id, participant.id)
end
self.messages.each do |msg|
msg.conversation_id = cnv.id
received_msg = msg.receive(user, person)
Notification.notify(user, received_msg, person) if msg.respond_to?(:notification_type)
end
end
end

View File

@@ -0,0 +1,6 @@
class ConversationVisibility < ActiveRecord::Base
belongs_to :conversation
belongs_to :person
end

View File

@@ -2,63 +2,91 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Invitation
include MongoMapper::Document
class Invitation < ActiveRecord::Base
belongs_to :from, :class => User
belongs_to :to, :class => User
belongs_to :into, :class => Aspect
key :message, String
belongs_to :sender, :class_name => 'User'
belongs_to :recipient, :class_name => 'User'
belongs_to :aspect
validates_presence_of :from, :to, :into
validates_presence_of :sender, :recipient, :aspect
def self.invite(opts = {})
existing_user = User.find_by_email(opts[:email])
return false if opts[:identifier] == opts[:from].email
existing_user = self.find_existing_user(opts[:service], opts[:identifier])
if existing_user
if opts[:from].contact_for(opts[:from].person)
raise "You are already connceted to this person"
elsif not existing_user.invited?
opts[:from].send_contact_request_to(existing_user.person, opts[:into])
return
elsif Invitation.first(:from_id => opts[:from].id, :to_id => existing_user.id)
elsif Invitation.where(:sender_id => opts[:from].id, :recipient_id => existing_user.id).first
raise "You already invited this person"
end
end
opts[:existing_user] = existing_user
create_invitee(opts)
end
def self.create_invitee(opts = {})
invitee = User.find_or_initialize_with_error_by(:email, opts[:email])
invitee.invites = opts[:invites]
if invitee.new_record?
invitee.errors.clear if invitee.email.try(:match, Devise.email_regexp)
def self.find_existing_user(service, identifier)
existing_user = User.where(:invitation_service => service,
:invitation_identifier => identifier).first
if service == 'email'
existing_user ||= User.where(:email => identifier).first
else
invitee.errors.add(:email, :taken) unless invitee.invited?
existing_user ||= User.joins(:services).where(:services => {:type => "Services::#{service.titleize}", :uid => identifier}).first
end
if invitee.errors.empty?
existing_user
end
if opts[:from]
invitee.save(:validate => false)
Invitation.create!(:from => opts[:from],
:to => invitee,
:into => opts[:into],
:message => opts[:message])
opts[:from].invites -= 1 unless opts[:from].invites == 0
opts[:from].save!
invitee.reload
end
def self.new_user_by_service_and_identifier(service, identifier)
result = User.new()
result.invitation_service = service
result.invitation_identifier = identifier
result.email = identifier if service == 'email'
result.valid?
result
end
def self.create_invitee(opts = {})
invitee = opts[:existing_user] || new_user_by_service_and_identifier(opts[:service], opts[:identifier])
return invitee if opts[:service] == 'email' && !opts[:identifier].match(Devise.email_regexp)
invitee.invites = opts[:invites] || 5
if invitee.new_record?
invitee.errors.clear
invitee.serialized_private_key = User.generate_key if invitee.serialized_private_key.blank?
invitee.send(:generate_invitation_token)
invitee.invite!
Rails.logger.info("event=invitation_sent to=#{opts[:email]} #{"inviter=#{opts[:from].diaspora_handle}" if opts[:from]}")
elsif invitee.invitation_token.nil?
return invitee
end
if opts[:from]
invitee.save(:validate => false)
Invitation.create!(:sender => opts[:from],
:recipient => invitee,
:aspect => opts[:into],
:message => opts[:message])
opts[:from].invites -= 1 unless opts[:from].invites == 0
opts[:from].save!
invitee.reload
end
invitee.invite!(:email => (opts[:service] == 'email'))
log_string = "event=invitation_sent to=#{opts[:identifier]} service=#{opts[:service]} "
log_string << "inviter=#{opts[:from].diaspora_handle} inviter_uid=#{opts[:from].id} inviter_created_at_unix=#{opts[:from].created_at.to_i}" if opts[:from]
Rails.logger.info(log_string)
invitee
end
def resend
recipient.invite!
end
def to_request!
request = from.send_contact_request_to(to.person, into)
request = sender.send_contact_request_to(recipient.person, aspect)
destroy if request
request
end

13
app/models/jobs/base.rb Normal file
View File

@@ -0,0 +1,13 @@
module Job
class Base
extend ResqueJobLogging
def self.perform(*args)
ActiveRecord::Base.verify_active_connections!
self.perform_delegate(*args)
end
def self.perform_delegate(*args) # override this
end
end
end

View File

@@ -0,0 +1,60 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'uri'
module Job
class HttpMulti < Base
@queue = :http
MAX_RETRIES = 3
OPTS = {:max_redirects => 3, :timeout => 5000, :method => :post}
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 = Typhoeus::Hydra.new
people.each do |person|
url = person.receive_url
xml = salmon.xml_for(person)
request = Typhoeus::Request.new(url, OPTS.merge(:params => {:xml => CGI::escape(xml)}))
request.on_complete do |response|
if response.code >= 300 && response.code < 400
if response.headers_hash['Location'] == response.request.url.sub('http://', 'https://')
location = URI.parse(response.headers_hash['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
end
end

View File

@@ -0,0 +1,30 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class HttpPost < Base
@queue = :http
NUM_TRIES = 3
def self.perform_delegate(url, body, tries_remaining = NUM_TRIES)
begin
body = CGI::escape(body)
RestClient.post(url, :xml => body){ |response, request, result, &block|
if [301, 302, 307].include? response.code
response.follow_redirection(request, result, &block)
else
response.return!(request, result, &block)
end
}
rescue Exception => e
unless tries_remaining <= 1
Resque.enqueue(self, url, body, tries_remaining -1)
else
raise e
end
end
end
end
end

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class InviteUserByEmail < Base
@queue = :mail
def self.perform_delegate(sender_id, email, aspect_id, invite_message)
user = User.find(sender_id)
user.invite_user(aspect_id, 'email', email, invite_message)
end
end
end

View File

@@ -0,0 +1,9 @@
module Job
class MailAlsoCommented < Base
@queue = :mail
def self.perform_delegate(recipient_id, sender_id, comment_id)
Notifier.also_commented(recipient_id, sender_id, comment_id).deliver
end
end
end

View File

@@ -0,0 +1,9 @@
module Job
class MailCommentOnPost < Base
@queue = :mail
def self.perform_delegate(recipient_id, sender_id, comment_id)
Notifier.comment_on_post(recipient_id, sender_id, comment_id).deliver
end
end
end

View File

@@ -0,0 +1,15 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class MailMentioned < Base
@queue = :mail
def self.perform_delegate(recipient_id, actor_id, target_id)
Notifier.mentioned( recipient_id, actor_id, target_id).deliver
end
end
end

View File

@@ -0,0 +1,13 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class MailPrivateMessage < Base
@queue = :mail
def self.perform_delegate(recipient_id, actor_id, target_id)
Notifier.private_message( recipient_id, actor_id, target_id).deliver
end
end
end

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class MailRequestAcceptance < Base
@queue = :mail
def self.perform_delegate(recipient_id, sender_id, target_id)
Notifier.request_accepted(recipient_id, sender_id).deliver
end
end
end

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class MailRequestReceived < Base
@queue = :mail
def self.perform_delegate(recipient_id, sender_id, target_id)
Notifier.new_request(recipient_id, sender_id).deliver
end
end
end

View File

@@ -0,0 +1,19 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class NotifyLocalUsers < Base
@queue = :receive_local
require File.join(Rails.root, 'app/models/notification')
def self.perform_delegate(user_id, object_klass, object_id, person_id)
user = User.find_by_id(user_id)
object = object_klass.constantize.find_by_id(object_id)
person = Person.find_by_id(person_id)
Notification.notify(user, object, person)
end
end
end

View File

@@ -0,0 +1,15 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
module Job
class PostToService < Base
@queue = :http_service
def self.perform_delegate(service_id, post_id, url)
service = Service.find_by_id(service_id)
post = Post.find_by_id(post_id)
service.post(post, url)
end
end
end

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class PublishToHub < Base
@queue = :http_service
def self.perform_delegate(sender_public_url)
require File.join(Rails.root, 'lib/pubsubhubbub')
Pubsubhubbub.new(AppConfig[:pubsub_server]).publish(sender_public_url)
end
end
end

View File

@@ -0,0 +1,17 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class Receive < Base
@queue = :receive
def self.perform(user_id, xml, salmon_author_id)
user = User.find(user_id)
salmon_author = Person.find(salmon_author_id)
zord = Postzord::Receiver.new(user, :person => salmon_author)
zord.parse_and_receive(xml)
end
end
end

View File

@@ -0,0 +1,20 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class ReceiveLocal < Base
require File.join(Rails.root, 'lib/postzord/receiver')
@queue = :receive_local
def self.perform_delegate(user_id, person_id, object_type, object_id)
user = User.find(user_id)
person = Person.find(person_id)
object = object_type.constantize.where(:id => object_id).first
z = Postzord::Receiver.new(user, :person => person, :object => object)
z.receive_object
end
end
end

View File

@@ -0,0 +1,17 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require File.join(Rails.root, 'lib/postzord/receiver')
module Job
class ReceiveSalmon < Base
@queue = :receive_salmon
def self.perform_delegate(user_id, xml)
user = User.find(user_id)
zord = Postzord::Receiver.new(user, :salmon_xml => xml)
zord.perform
end
end
end

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class ResendInvitation < Base
@queue = :mail
def self.perform_delegate(invitation_id)
inv = Invitation.where(:id => invitation_id).first
inv.resend
end
end
end

View File

@@ -0,0 +1,27 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class SocketWebfinger < Base
@queue = :socket_webfinger
def self.perform_delegate(user_id, account, opts={})
finger = Webfinger.new(account)
begin
user = User.find_by_id(user_id)
result = finger.fetch
result.socket_to_user(user, 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
end
end

25
app/models/mention.rb Normal file
View File

@@ -0,0 +1,25 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Mention < ActiveRecord::Base
belongs_to :post
belongs_to :person
validates_presence_of :post
validates_presence_of :person
after_destroy :delete_notification
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
def notification_type(*args)
Notifications::Mentioned
end
def delete_notification
Notification.where(:target_type => self.class.name, :target_id => self.id).delete_all
end
end

82
app/models/message.rb Normal file
View File

@@ -0,0 +1,82 @@
class Message < ActiveRecord::Base
include ROXML
include Diaspora::Guid
include Diaspora::Webhooks
include Diaspora::Relayable
xml_attr :text
xml_attr :created_at
xml_reader :diaspora_handle
xml_reader :conversation_guid
belongs_to :author, :class_name => 'Person'
belongs_to :conversation, :touch => true
after_create do
#sign comment as commenter
self.author_signature = self.sign_with_key(self.author.owner.encryption_key) if self.author.owner
if !self.parent.blank? && self.author.owns?(self.parent)
#sign comment as post owner
self.parent_author_signature = self.sign_with_key( self.parent.author.owner.encryption_key) if self.parent.author.owner
end
self.save!
self
end
validate :participant_of_parent_conversation
def diaspora_handle
self.author.diaspora_handle
end
def diaspora_handle= nh
self.author = Webfinger.new(nh).fetch
end
def conversation_guid
self.conversation.guid
end
def conversation_guid= guid
if cnv = Conversation.find_by_guid(guid)
self.conversation_id = cnv.id
end
end
def parent_class
Conversation
end
def parent
self.conversation
end
def parent= parent
self.conversation = parent
end
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 NotVisibileException("Attempting to access a ConversationVisibility that does not exist!")
end
end
def notification_type(user, person)
Notifications::PrivateMessage unless user.person == person
end
private
def participant_of_parent_conversation
if self.parent && !self.parent.participants.include?(self.author)
errors[:base] << "Author is not participating in the conversation"
else
true
end
end
end

21
app/models/mongo.rb Normal file
View File

@@ -0,0 +1,21 @@
module Mongo
def self.table_name_prefix
"mongo_"
end
class Aspect < ActiveRecord::Base; end
class AspectMembership < ActiveRecord::Base; end
class Comment < ActiveRecord::Base; end
class Contact < ActiveRecord::Base; end
class Invitation < ActiveRecord::Base; end
class Notification < ActiveRecord::Base; end
class Person < ActiveRecord::Base; end
#Photo?
class Post < ActiveRecord::Base; end
class PostVisibility < ActiveRecord::Base; end
class Profile < ActiveRecord::Base; end
class Request < ActiveRecord::Base; end
class Service < ActiveRecord::Base; end
#StatusMessage?
class User < ActiveRecord::Base; end
end

View File

@@ -0,0 +1,65 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
class Notification < ActiveRecord::Base
require File.join(Rails.root, 'lib/diaspora/web_socket')
include Diaspora::Socketable
belongs_to :recipient, :class_name => 'User'
has_many :notification_actors
has_many :actors, :class_name => 'Person', :through => :notification_actors, :source => :person
belongs_to :target, :polymorphic => true
def self.for(recipient, opts={})
self.where(opts.merge!(:recipient_id => recipient.id)).order('updated_at desc')
end
def self.notify(recipient, target, actor)
if target.respond_to? :notification_type
if note_type = target.notification_type(recipient, actor)
if target.is_a? Comment
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
def email_the_user(target, actor)
self.recipient.mail(self.mail_job, self.recipient_id, actor.id, target.id)
end
def mail_job
raise NotImplementedError.new('Subclass this.')
end
private
def self.concatenate_or_create(recipient, target, actor, notification_type)
if n = notification_type.where(:target_id => target.id,
:target_type => target.class.base_class,
:recipient_id => recipient.id).first
unless n.actors.include?(actor)
n.actors << actor
end
n.unread = true
n.save!
n
else
make_notification(recipient, target, actor, notification_type)
end
end
def self.make_notification(recipient, target, actor, notification_type)
n = notification_type.new(:target => target,
:recipient_id => recipient.id)
n.actors << actor
n.unread = false if target.is_a? Request
n.save!
n
end
end

View File

@@ -1,8 +1,10 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
require 'spec_helper'
describe SocketsHelper do
class NotificationActor < ActiveRecord::Base
belongs_to :notification
belongs_to :person
end

View File

@@ -0,0 +1,8 @@
class Notifications::AlsoCommented < Notification
def mail_job
Job::MailAlsoCommented
end
def translation_key
'also_commented'
end
end

View File

@@ -0,0 +1,8 @@
class Notifications::CommentOnPost < Notification
def mail_job
Job::MailCommentOnPost
end
def translation_key
'comment_on_post'
end
end

View File

@@ -0,0 +1,8 @@
class Notifications::Mentioned < Notification
def mail_job
Job::MailMentioned
end
def translation_key
'mentioned'
end
end

View File

@@ -0,0 +1,8 @@
class Notifications::NewRequest < Notification
def mail_job
Job::MailRequestReceived
end
def translation_key
'new_request'
end
end

View File

@@ -0,0 +1,15 @@
class Notifications::PrivateMessage < Notification
def mail_job
Job::MailPrivateMessage
end
def translation_key
'private_message'
end
def self.make_notification(recipient, target, actor, notification_type)
n = notification_type.new(:target => target,
:recipient_id => recipient.id)
n.actors << actor
n
end
end

View File

@@ -0,0 +1,8 @@
class Notifications::RequestAccepted < Notification
def mail_job
Job::MailRequestAcceptance
end
def translation_key
'request_accepted'
end
end

View File

@@ -2,92 +2,126 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'uri'
require File.join(Rails.root, 'lib/hcard')
class Person
include MongoMapper::Document
class Person < ActiveRecord::Base
include ROXML
include Encryptor::Public
require File.join(Rails.root, 'lib/diaspora/websocket')
require File.join(Rails.root, 'lib/diaspora/web_socket')
include Diaspora::Socketable
include Diaspora::Guid
xml_accessor :_id
xml_accessor :diaspora_handle
xml_accessor :url
xml_accessor :profile, :as => Profile
xml_reader :exported_key
xml_attr :diaspora_handle
xml_attr :url
xml_attr :profile, :as => Profile
xml_attr :exported_key
key :url, String
key :diaspora_handle, String, :unique => true
key :serialized_public_key, String
has_one :profile
delegate :last_name, :to => :profile
key :owner_id, ObjectId
one :profile, :class_name => 'Profile'
validates_associated :profile
delegate :first_name, :last_name, :to => :profile
before_save :downcase_diaspora_handle
before_save :downcase_diaspora_handle
def downcase_diaspora_handle
diaspora_handle.downcase!
end
has_many :contacts #Other people's contacts for this person
has_many :posts, :foreign_key => :author_id #his own posts
belongs_to :owner, :class_name => 'User'
timestamps!
has_many :notification_actors
has_many :notifications, :through => :notification_actors
has_many :mentions, :dependent => :destroy
before_destroy :remove_all_traces
before_validation :clean_url
validates_presence_of :url, :profile, :serialized_public_key
validates_uniqueness_of :diaspora_handle, :case_sensitive => false
#validates_format_of :url, :with =>
# /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
ensure_index :diaspora_handle
scope :searchable, joins(:profile).where(:profiles => {:searchable => true})
scope :searchable, where('profile.searchable' => true)
def self.search(query, user)
return [] if query.to_s.blank? || query.to_s.length < 3
attr_accessible :profile
where_clause = <<-SQL
profiles.first_name LIKE ? OR
profiles.last_name LIKE ? OR
people.diaspora_handle LIKE ? OR
profiles.first_name LIKE ? OR
profiles.last_name LIKE ?
SQL
sql = ""
tokens = []
def self.search(query)
return [] if query.to_s.empty?
query_tokens = query.to_s.strip.split(" ")
full_query_text = Regexp.escape(query.to_s.strip)
p = []
query_tokens.each do |token|
q = Regexp.escape(token.to_s.strip)
p = Person.searchable.all('profile.first_name' => /^#{q}/i, 'limit' => 30) \
| Person.searchable.all('profile.last_name' => /^#{q}/i, 'limit' => 30) \
| Person.searchable.all('diaspora_handle' => /^#{q}/i, 'limit' => 30) \
| p
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
return p
#SELECT `people`.* FROM people
# INNER JOIN `profiles` ON `profiles`.person_id = `people`.id
# LEFT OUTER JOIN `contacts` ON (`contacts`.user_id = #{user.id} AND `contacts`.person_id = `people`.id)
# WHERE `profiles`.searchable = true AND
# `profiles`.first_name LIKE '%Max%'
# ORDER BY `contacts`.user_id DESC
Person.searchable.where(sql, *tokens).joins(
"LEFT OUTER JOIN `contacts` ON `contacts`.user_id = #{user.id} AND `contacts`.person_id = `people`.id"
).joins("LEFT OUTER JOIN `requests` ON `requests`.recipient_id = #{user.person.id} AND `requests`.sender_id = `people`.id"
).order("contacts.user_id DESC", "requests.recipient_id DESC", "profiles.last_name ASC", "profiles.first_name ASC")
end
def name
@name ||= if profile.first_name.nil? || profile.first_name.empty?
def name(opts = {})
@name ||= if profile.nil? || profile.first_name.nil? || profile.first_name.blank?
self.diaspora_handle
else
"#{profile.first_name.to_s} #{profile.last_name.to_s}"
end
end
def owns?(post)
self.id == post.person.id
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
def owns?(obj)
self == obj.author
end
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
def receive_url
"#{self.url}receive/users/#{self.id}/"
"#{url}receive/users/#{self.guid}/"
end
def public_url
"#{self.url}public/#{self.owner.username}"
if self.owner
username = self.owner.username
else
username = self.diaspora_handle.split("@")[0]
end
"#{url}public/#{username}"
end
def public_key_hash
Base64.encode64 OpenSSL::Digest::SHA256.new(self.exported_key).to_s
end
@@ -102,13 +136,13 @@ class Person
def exported_key= new_key
raise "Don't change a key" if serialized_public_key
@serialized_public_key = new_key
serialized_public_key = new_key
end
#database calls
def self.by_account_identifier(identifier)
identifier = identifier.strip.downcase.gsub('acct:', '')
self.first(:diaspora_handle => identifier)
self.where(:diaspora_handle => identifier).first
end
def self.local_by_account_identifier(identifier)
@@ -116,49 +150,37 @@ class Person
(person.nil? || person.remote?) ? nil : person
end
def self.build_from_webfinger(profile, hcard)
def self.create_from_webfinger(profile, hcard)
return nil if profile.nil? || !profile.valid_diaspora_profile?
new_person = Person.new
new_person.exported_key = profile.public_key
new_person.id = profile.guid
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
#hcard_profile = HCard.find profile.hcard.first[:href]
Rails.logger.info("event=webfinger_marshal valid=#{new_person.valid?} target=#{new_person.diaspora_handle}")
new_person.url = hcard[:url]
new_person.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])
new_person.save! ? new_person : nil
new_person.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])
new_person.save!
new_person.profile.save!
new_person
end
def remote?
owner_id.nil?
end
def as_json(opts={})
{
:person => {
:id => self.id,
:name => self.name,
:url => self.url,
:exported_key => exported_key,
:diaspora_handle => self.diaspora_handle
}
}
def local?
!remote?
end
def self.from_post_comment_hash(hash)
person_ids = hash.values.flatten.map{|c| c.person_id}.uniq
people = where(:id.in => person_ids)
people_hash = {}
people.each{|p| people_hash[p.id] = p}
people_hash
def as_json(opts={})
{:id => self.guid, :name => self.name, :avatar => self.profile.image_url(:thumb_small), :handle => self.diaspora_handle, :url => "/people/#{self.id}"}
end
protected
@@ -173,6 +195,6 @@ class Person
private
def remove_all_traces
Post.all(:person_id => id).each { |p| p.delete }
Notification.joins(:notification_actors).where(:notification_actors => {:person_id => self.id}).all.each{ |n| n.destroy}
end
end

View File

@@ -3,71 +3,79 @@
# the COPYRIGHT file.
class Photo < Post
require 'carrierwave/orm/mongomapper'
include MongoMapper::Document
require 'carrierwave/orm/activerecord'
mount_uploader :image, ImageUploader
xml_accessor :remote_photo
xml_accessor :caption
xml_reader :status_message_id
xml_attr :remote_photo_path
xml_attr :remote_photo_name
key :caption, String
key :remote_photo_path
key :remote_photo_name
key :random_string
key :status_message_id, ObjectId
timestamps!
xml_attr :caption
xml_attr :status_message_guid
belongs_to :status_message
attr_accessible :caption
attr_accessible :caption, :pending
validate :ownership_of_status_message
before_destroy :ensure_user_picture
def ownership_of_status_message
message = StatusMessage.find_by_id(self.status_message_id)
if status_message_id && message
self.diaspora_handle == message.diaspora_handle
if status_message_id && message
self.diaspora_handle == message.diaspora_handle
else
true
end
end
def self.instantiate(params = {})
def self.diaspora_initialize(params = {})
photo = super(params)
image_file = params.delete(:user_file)
photo.random_string = gen_random_string(10)
photo.image.store! image_file
unless photo.image.url.match(/^https?:\/\//)
pod_url = AppConfig[:pod_url].dup
pod_url.chop! if AppConfig[:pod_url][-1,1] == '/'
remote_path = "#{pod_url}#{photo.image.url}"
else
remote_path = photo.image.url
end
name_start = remote_path.rindex '/'
photo.remote_photo_path = "#{remote_path.slice(0, name_start)}/"
photo.remote_photo_name = remote_path.slice(name_start + 1, remote_path.length)
photo
end
def remote_photo
image.url.nil? ? (remote_photo_path + '/' + remote_photo_name) : image.url
def status_message_guid
if self.status_message
self.status_message.guid
else
nil
end
end
def remote_photo= remote_path
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)
def status_message_guid= new_sm_guid
self.status_message= StatusMessage.where(:guid => new_sm_guid).first
end
def url(name = nil)
if remote_photo_path
name = name.to_s + "_" if name
person.url.chop + remote_photo_path + "/" + name.to_s + remote_photo_name
name = name.to_s + '_' if name
remote_photo_path + name.to_s + remote_photo_name
else
image.url name
image.url(name)
end
end
def ensure_user_picture
people = Person.all('profile.image_url' => absolute_url(:thumb_large) )
people.each{ |person|
person.profile.update_attributes(:image_url => nil)
profiles = Profile.where(:image_url => url(:thumb_large))
profiles.each { |profile|
profile.image_url = nil
profile.save
}
end
@@ -79,12 +87,6 @@ class Photo < Post
true
end
def absolute_url *args
pod_url = APP_CONFIG[:pod_url].dup
pod_url.chop! if APP_CONFIG[:pod_url][-1,1] == '/'
"#{pod_url}#{url(*args)}"
end
def self.gen_random_string(len)
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
string = ""
@@ -92,30 +94,19 @@ class Photo < Post
return string
end
def as_json(opts={})
{
:photo => {
:id => self.id,
:photo => {
:id => self.id,
:url => self.url(:thumb_medium),
:thumb_small => self.url(:thumb_small),
:caption => self.caption
}
}
end
def self.hash_from_post_ids post_ids
hash = {}
photos = self.on_statuses(post_ids)
post_ids.each do |id|
hash[id] = []
end
photos.each do |photo|
hash[photo.status_message_id] << photo
end
hash.each_value {|photos| photos.sort!{|p1, p2| p1.created_at <=> p2.created_at }}
hash
end
scope :on_statuses, lambda { |post_ids|
where(:status_message_id.in => post_ids)
scope :on_statuses, lambda { |post_ids|
where(:status_message_id => post_ids)
}
end

View File

@@ -2,57 +2,52 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Post
require File.join(Rails.root, 'lib/encryptable')
require File.join(Rails.root, 'lib/diaspora/websocket')
include MongoMapper::Document
class Post < ActiveRecord::Base
require File.join(Rails.root, 'lib/diaspora/web_socket')
include ApplicationHelper
include ROXML
include Diaspora::Webhooks
include Diaspora::Guid
xml_reader :_id
xml_reader :diaspora_handle
xml_reader :public
xml_reader :created_at
xml_attr :diaspora_handle
xml_attr :public
xml_attr :created_at
key :public, Boolean, :default => false
key :diaspora_handle, String
key :user_refs, Integer, :default => 0
key :pending, Boolean, :default => false
key :aspect_ids, Array, :typecast => 'ObjectId'
many :comments, :class_name => 'Comment', :foreign_key => :post_id, :order => 'created_at ASC'
many :aspects, :in => :aspect_ids, :class_name => 'Aspect'
belongs_to :person, :class_name => 'Person'
timestamps!
has_many :comments, :order => 'created_at ASC'
has_many :post_visibilities
has_many :aspects, :through => :post_visibilities
has_many :mentions, :dependent => :destroy
belongs_to :author, :class_name => 'Person'
cattr_reader :per_page
@@per_page = 10
before_destroy :propogate_retraction
after_destroy :destroy_comments
after_destroy :propogate_retraction
attr_accessible :user_refs
def self.instantiate params
def user_refs
self.post_visibilities.count
end
def diaspora_handle= nd
self.author = Person.where(:diaspora_handle => nd).first
write_attribute(:diaspora_handle, nd)
end
def self.diaspora_initialize params
new_post = self.new params.to_hash
new_post.person = params[:person]
new_post.aspect_ids = params[:aspect_ids]
new_post.public = params[:public]
new_post.pending = params[:pending]
new_post.diaspora_handle = new_post.person.diaspora_handle
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
def as_json(opts={})
{
:post => {
:id => self.id,
:person => self.person.as_json,
}
:post => {
:id => self.id,
:author => self.author.as_json,
}
}
end
@@ -60,13 +55,46 @@ class Post
false
end
protected
def destroy_comments
comments.each{|c| c.destroy}
def subscribers(user)
user.people_in_aspects(user.aspects_with_post(self.id))
end
def receive(user, person)
#exists locally, but you dont know about it
#does not exsist locally, and you dont know about it
#exists_locally?
#you know about it, and it is mutable
#you know about it, and it is not mutable
local_post = Post.where(:guid => self.guid).first
if local_post && local_post.author_id == self.author_id
known_post = user.visible_posts(: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.add_post_to_aspects(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
self.save
user.add_post_to_aspects(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=true status=abort sender=#{self.diaspora_handle} reason='update not from post owner' existing_post=#{self.id}")
end
end
protected
def propogate_retraction
self.person.owner.retract(self)
self.author.owner.retract(self) if self.author.owner
end
end

View File

@@ -0,0 +1,15 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class PostVisibility < ActiveRecord::Base
belongs_to :aspect
validates_presence_of :aspect
belongs_to :post
validates_presence_of :post
has_one :user, :through => :aspect
has_one :person, :through => :post, :foreign_key => :author_id
end

View File

@@ -2,64 +2,62 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Profile
include MongoMapper::EmbeddedDocument
class Profile < ActiveRecord::Base
require File.join(Rails.root, 'lib/diaspora/webhooks')
include Diaspora::Webhooks
include ROXML
xml_reader :diaspora_handle
xml_reader :first_name
xml_reader :last_name
xml_reader :image_url
xml_reader :image_url_small
xml_reader :image_url_medium
xml_reader :birthday
xml_reader :gender
xml_reader :bio
xml_reader :searchable
key :diaspora_handle, String
key :first_name, String
key :last_name, String
key :image_url, String
key :image_url_small, String
key :image_url_medium, String
key :birthday, Date
key :gender, String
key :bio, String
key :searchable, Boolean, :default => true
after_validation :strip_names
validates_length_of :first_name, :maximum => 32
validates_length_of :last_name, :maximum => 32
xml_attr :diaspora_handle
xml_attr :first_name
xml_attr :last_name
xml_attr :image_url
xml_attr :image_url_small
xml_attr :image_url_medium
xml_attr :birthday
xml_attr :gender
xml_attr :bio
xml_attr :searchable
before_save :strip_names
after_validation :strip_names
validates_length_of :first_name, :maximum => 32
validates_length_of :last_name, :maximum => 32
validates_format_of :first_name, :with => /\A[^;]+\z/, :allow_blank => true
validates_format_of :last_name, :with => /\A[^;]+\z/, :allow_blank => true
attr_accessible :first_name, :last_name, :image_url, :image_url_medium,
:image_url_small, :birthday, :gender, :bio, :searchable, :date
belongs_to :person
def person
self._parent_document
def subscribers(user)
Person.joins(:contacts).where(:contacts => {:user_id => user.id})
end
def receive(user, person)
Rails.logger.info("event=receive payload_type=profile sender=#{person} to=#{user}")
person.profile.update_attributes self.attributes
person.profile
end
def diaspora_handle
#get the parent diaspora handle, unless we want to access a profile without a person
(self._parent_document) ? self.person.diaspora_handle : self[:diaspora_handle]
(self.person) ? self.person.diaspora_handle : self[:diaspora_handle]
end
def image_url(size = :thumb_large)
if size == :thumb_medium
self[:image_url_medium]
elsif size == :thumb_small
self[:image_url_small]
else
self[:image_url]
end
result = if size == :thumb_medium && self[:image_url_medium]
self[:image_url_medium]
elsif size == :thumb_small && self[:image_url_small]
self[:image_url_small]
else
self[:image_url]
end
result || '/images/user/default.png'
end
def image_url= url
return image_url if url == ''
if url.nil? || url.match(/^https?:\/\//)
@@ -88,10 +86,11 @@ class Profile
end
def date= params
if ['year', 'month', 'day'].all? { |key| params[key].present? }
if ['month', 'day'].all? { |key| params[key].present? }
params['year'] = '1000' if params['year'].blank?
date = Date.new(params['year'].to_i, params['month'].to_i, params['day'].to_i)
self.birthday = date
elsif ['year', 'month', 'day'].all? { |key| params[key] == '' }
elsif [ 'year', 'month', 'day'].all? { |key| params[key].blank? }
self.birthday = nil
end
end
@@ -105,8 +104,8 @@ class Profile
private
def absolutify_local_url url
pod_url = APP_CONFIG[:pod_url].dup
pod_url.chop! if APP_CONFIG[:pod_url][-1,1] == '/'
pod_url = AppConfig[:pod_url].dup
pod_url.chop! if AppConfig[:pod_url][-1,1] == '/'
"#{pod_url}#{url}"
end
end

View File

@@ -2,115 +2,87 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Request
class Request < ActiveRecord::Base
require File.join(Rails.root, 'lib/diaspora/webhooks')
include MongoMapper::Document
include Magent::Async
require File.join(Rails.root, 'lib/postzord/dispatch')
include Diaspora::Webhooks
include ROXML
xml_reader :sender_handle
xml_reader :recipient_handle
xml_accessor :sender_handle
xml_accessor :recipient_handle
belongs_to :into, :class => Aspect
belongs_to :from, :class => Person
belongs_to :to, :class => Person
key :sent, Boolean, :default => false
belongs_to :sender, :class_name => 'Person'
belongs_to :recipient, :class_name => 'Person'
belongs_to :aspect
validates_presence_of :from, :to
validate :not_already_connected_if_sent
validate :not_already_connected_if_not_sent
validate :no_pending_request, :if => :sent
validates_uniqueness_of :sender_id, :scope => :recipient_id
validates_presence_of :sender, :recipient
validate :not_already_connected
validate :not_friending_yourself
#before_validation :clean_link
scope :from, lambda { |person|
target = (person.is_a?(User) ? person.person : person)
where(:from_id => target.id)
}
scope :to, lambda { |person|
target = (person.is_a?(User) ? person.person : person)
where(:to_id => target.id)
}
def self.instantiate(opts = {})
self.new(:from => opts[:from],
:to => opts[:to],
:into => opts[:into],
:sent => true)
def self.diaspora_initialize(opts = {})
self.new(:sender => opts[:from],
:recipient => opts[:to],
:aspect => opts[:into])
end
def reverse_for accepting_user
Request.new(
:from => accepting_user.person,
:to => self.from
:sender => accepting_user.person,
:recipient => self.sender
)
end
def self.send_request_accepted(user, person, aspect)
self.async.send_request_accepted!(user.id, person.id, aspect.id).commit!
end
def self.send_request_accepted!(user_id, person_id, aspect_id)
Notifier.request_accepted(user_id, person_id, aspect_id).deliver
end
def self.send_new_request(user, person)
self.async.send_new_request!(user.id, person.id).commit!
end
def self.send_new_request!(user_id, person_id)
Notifier.new_request(user_id, person_id).deliver
end
def sender_handle
from.diaspora_handle
sender.diaspora_handle
end
def sender_handle= sender_handle
self.from = Person.first(:diaspora_handle => sender_handle)
self.sender = Person.where(:diaspora_handle => sender_handle).first
end
def recipient_handle
to.diaspora_handle
recipient.diaspora_handle
end
def recipient_handle= recipient_handle
self.to = Person.first(:diaspora_handle => recipient_handle)
self.recipient = Person.where(:diaspora_handle => recipient_handle).first
end
def diaspora_handle
self.from.diaspora_handle
sender_handle
end
def notification_type(user, person)
if Contact.where(:user_id => user.id, :person_id => person.id).first
Notifications::RequestAccepted
else
Notifications::NewRequest
end
end
def subscribers(user)
[self.recipient]
end
def receive(user, person)
Rails.logger.info("event=receive payload_type=request sender=#{self.sender} to=#{self.recipient}")
user.receive_contact_request(self)
self.save
self
end
private
def no_pending_request
if Request.first(:from_id => from_id, :to_id => to_id)
errors[:base] << 'You have already sent a request to that person'
end
end
def not_already_connected_if_sent
if self.sent
if Contact.first(:user_id => self.from.owner_id, :person_id => self.to.id)
errors[:base] << 'You have already connected to this person'
end
end
end
def not_already_connected_if_not_sent
unless self.sent
if Contact.first(:user_id => self.to.owner_id, :person_id => self.from.id)
errors[:base] << 'You have already connected to this person'
end
def not_already_connected
if sender && recipient && Contact.where(:user_id => self.recipient.owner_id, :person_id => self.sender.id).count > 0
errors[:base] << 'You have already connected to this person'
end
end
def not_friending_yourself
if self.to == self.from
if self.recipient == self.sender
errors[:base] << 'You can not friend yourself'
end
end

View File

@@ -6,41 +6,59 @@ class Retraction
include ROXML
include Diaspora::Webhooks
xml_accessor :post_id
xml_accessor :post_guid
xml_accessor :diaspora_handle
xml_accessor :type
attr_accessor :person
attr_accessor :person, :object, :subscribers
def subscribers(user)
unless self.type == 'Person'
@subscribers ||= self.object.subscribers(user)
else
raise 'HAX: you must set the subscribers manaully before unfriending' if @subscribers.nil?
@subscribers
end
end
def self.for(object)
retraction = self.new
if object.is_a? User
retraction.post_id = object.person.id
retraction.post_guid = object.person.guid
retraction.type = object.person.class.to_s
else
retraction.post_id = object.id
retraction.post_guid = object.guid
retraction.type = object.class.to_s
retraction.object = object
end
retraction.diaspora_handle = object.diaspora_handle
retraction.diaspora_handle = object.diaspora_handle
retraction
end
def perform receiving_user_id
Rails.logger.debug "Performing retraction for #{post_id}"
if self.type.constantize.find_by_id(post_id)
unless Post.first(:diaspora_handle => person.diaspora_handle, :id => post_id)
Rails.logger.info("event=retraction status=abort reason='no post found authored by retractor' sender=#{person.diaspora_handle} post_id=#{post_id}")
raise "#{person.inspect} is trying to retract a post that either doesn't exist or is not by them"
end
def target
@target ||= self.type.constantize.where(:guid => post_guid).first
end
begin
Rails.logger.debug("Retracting #{self.type} id: #{self.post_id}")
target = self.type.constantize.first(:id => self.post_id)
target.unsocket_from_uid receiving_user_id if target.respond_to? :unsocket_from_uid
target.delete
rescue NameError
Rails.logger.info("event=retraction status=abort reason='unknown type'")
def perform receiving_user
Rails.logger.debug "Performing retraction for #{post_guid}"
self.target.unsocket_from_user receiving_user if target.respond_to? :unsocket_from_user
self.target.destroy
target.post_visibilities.delete_all
Rails.logger.info("event=retraction status=complete type=#{self.type} guid=#{self.post_guid}")
end
def receive(user, person)
if self.type == 'Person'
unless self.person.guid.to_s == self.post_guid.to_s
Rails.logger.info("event=receive status=abort reason='sender is not the person he is trying to retract' recipient=#{self.diaspora_handle} sender=#{self.person.diaspora_handle} payload_type=#{self.class} retraction_type=person")
return
end
user.disconnected_by(self.target)
elsif self.target.nil? || self.target.author != self.person
Rails.logger.info("event=retraction status=abort reason='no post found authored by retractor' sender=#{person.diaspora_handle} post_guid=#{post_guid}")
else
self.perform(user)
end
self
end
end

View File

@@ -2,14 +2,18 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Service
include MongoMapper::Document
class Service < ActiveRecord::Base
include ActionView::Helpers::TextHelper
belongs_to :user
key :provider, String
key :uid, String
key :access_token, String
key :access_secret, String
key :nickname, String
def public_message(post, length, url = "")
url = "" if post.respond_to?(:photos) && post.photos.count == 0
space_for_url = url.blank? ? 0 : (url.length + 1)
truncated = truncate(post.message(:plain_text => true), :length => (length - space_for_url))
truncated = "#{truncated} #{url}" unless url.blank?
return truncated
end
end
require File.join(Rails.root, 'app/models/services/facebook')
require File.join(Rails.root, 'app/models/services/twitter')

View File

@@ -0,0 +1,65 @@
class Services::Facebook < Service
MAX_CHARACTERS = 420
def provider
"facebook"
end
def post(post, url='')
Rails.logger.debug("event=post_to_service type=facebook sender_id=#{self.user_id}")
message = public_message(post, url)
begin
RestClient.post("https://graph.facebook.com/me/feed", :message => message, :access_token => self.access_token)
rescue Exception => e
Rails.logger.info("#{e.message} failed to post to facebook")
end
end
def public_message(post, url)
super(post, MAX_CHARACTERS, url)
end
def finder(opts = {})
Rails.logger.debug("event=friend_finder type=facebook sender_id=#{self.user_id}")
response = RestClient.get("https://graph.facebook.com/me/friends", {:params => {:access_token => self.access_token}})
data = JSON.parse(response.body)['data']
data_h = {}
data.each do |d|
data_h[d['id']] = {:name => d['name']}
end
invitation_objects = Invitation.joins(:recipient).where(:sender_id => self.user_id,
:users => {:invitation_service => 'facebook',
:invitation_identifier => data_h.keys})
invitation_objects.each do |inv|
data_h[inv.recipient.invitation_identifier][:invitation_id] = inv.id
end
service_objects = Services::Facebook.where(:uid => data_h.keys).includes(:user => {:person => :profile})
person_ids_and_uids = {}
service_objects.each do |s|
data_h[s.uid][:person] = s.user.person if s.user.person.profile.searchable
person_ids_and_uids[s.user.person.id] = s.uid
end
requests = Request.where(:recipient_id => self.user.person.id, :sender_id => person_ids_and_uids.keys).all
requests.each{|r| data_h[person_ids_and_uids[r.sender_id]][:request] = r}
contact_objects = Contact.unscoped.where(:user_id => self.user.id, :person_id => person_ids_and_uids.keys)
contact_objects.each{|c| data_h[person_ids_and_uids[c.person_id]][:contact] = c}
if opts[:local]
data_h.delete_if {|key, value| value[:person].nil? }
end
if opts[:remote]
data_h.delete_if {|key, value| !value[:person].nil? }
end
data_h
end
end

View File

@@ -0,0 +1,36 @@
class Services::Twitter < Service
MAX_CHARACTERS = 140
def provider
"twitter"
end
def post(post, url='')
Rails.logger.debug("event=post_to_service type=twitter sender_id=#{self.user_id}")
message = public_message(post, url)
twitter_key = SERVICES['twitter']['consumer_key']
twitter_consumer_secret = SERVICES['twitter']['consumer_secret']
if twitter_consumer_secret.blank? || twitter_consumer_secret.blank?
Rails.logger.info "you have a blank twitter key or secret.... you should look into that"
end
Twitter.configure do |config|
config.consumer_key = twitter_key
config.consumer_secret = twitter_consumer_secret
config.oauth_token = self.access_token
config.oauth_token_secret = self.access_secret
end
begin
Twitter.update(message)
rescue Exception => e
Rails.logger.info e.message
end
end
def public_message(post, url)
super(post, MAX_CHARACTERS, url)
end
end

View File

@@ -6,41 +6,139 @@ class StatusMessage < Post
include Diaspora::Socketable
include YoutubeTitles
require File.join(Rails.root, 'lib/youtube_titles')
include ActionView::Helpers::TextHelper
acts_as_taggable_on :tags
validates_length_of :message, :maximum => 1000, :message => "please make your status messages less than 1000 characters"
xml_name :status_message
xml_reader :message
xml_attr :raw_message
key :message, String
many :photos, :class => Photo, :foreign_key => :status_message_id
has_many :photos, :dependent => :destroy
validate :message_or_photos_present?
attr_accessible :message
serialize :youtube_titles, Hash
before_save do
get_youtube_title message
end
before_create :build_tags
def message(opts = {})
self.formatted_message(opts)
end
def raw_message
read_attribute(:message)
end
def raw_message=(text)
write_attribute(:message, text)
end
def formatted_message(opts={})
return self.raw_message unless self.raw_message
escaped_message = opts[:plain_text] ? self.raw_message: ERB::Util.h(self.raw_message)
mentioned_message = self.format_mentions(escaped_message, opts)
self.format_tags(mentioned_message, opts)
end
def format_tags(text, opts={})
return text if opts[:plain_text]
regex = /(^|\s)#(\w+)/
form_message = text.gsub(regex) do |matched_string|
"#{$~[1]}<a href=\"/p?tag=#{$~[2]}\" class=\"tag\">##{ERB::Util.h($~[2])}</a>"
end
form_message
end
def format_mentions(text, opts = {})
people = self.mentioned_people
regex = /@\{([^;]+); ([^\}]+)\}/
form_message = text.gsub(regex) do |matched_string|
person = people.detect{ |p|
p.diaspora_handle == $~[2] unless p.nil?
}
if opts[:plain_text]
person ? ERB::Util.h(person.name) : ERB::Util.h($~[1])
else
person ? "<a href=\"/people/#{person.id}\" class=\"mention\">@#{ERB::Util.h(person.name)}</a>" : ERB::Util.h($~[1])
end
end
form_message
end
def mentioned_people
if self.persisted?
create_mentions if self.mentions.empty?
self.mentions.includes(:person => :profile).map{ |mention| mention.person }
else
mentioned_people_from_string
end
end
def create_mentions
mentioned_people_from_string.each do |person|
self.mentions.create(:person => person)
end
end
def mentions?(person)
mentioned_people.include? person
end
def notify_person(person)
self.mentions.where(:person_id => person.id).first.try(:notify_recipient)
end
def mentioned_people_from_string
regex = /@\{([^;]+); ([^\}]+)\}/
identifiers = self.raw_message.scan(regex).map do |match|
match.last
end
identifiers.empty? ? [] : Person.where(:diaspora_handle => identifiers)
end
def build_tags
self.tag_list = tag_strings
end
def tag_strings
regex = /(?:^|\s)#(\w+)/
matches = self.raw_message.scan(regex).map do |match|
match.last
end
unique_matches = matches.inject(Hash.new) do |h,element|
h[element.downcase] = element unless h[element.downcase]
h
end
unique_matches.values
end
def to_activity
<<-XML
<<-XML
<entry>
<title>#{self.message}</title>
<link rel="alternate" type="text/html" href="#{person.url}status_messages/#{self.id}"/>
<id>#{person.url}status_messages/#{self.id}</id>
<title>#{x(self.formatted_message(:plain_text => true))}</title>
<content>#{x(self.formatted_message(:plain_text => true))}</content>
<link rel="alternate" type="text/html" href="#{self.author.url}p/#{self.id}"/>
<id>#{self.author.url}posts/#{self.id}</id>
<published>#{self.created_at.xmlschema}</published>
<updated>#{self.updated_at.xmlschema}</updated>
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
<activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
</entry>
XML
XML
end
protected
def message_or_photos_present?
unless !self.message.blank? || self.photos.count > 0
if self.message.blank? && self.photos == []
errors[:base] << 'Status message requires a message or at least one photo'
end
end
end

View File

@@ -4,66 +4,67 @@
require File.join(Rails.root, 'lib/diaspora/user')
require File.join(Rails.root, 'lib/salmon/salmon')
require File.join(Rails.root, 'lib/postzord/dispatch')
require 'rest-client'
class User
include MongoMapper::Document
class User < ActiveRecord::Base
include Diaspora::UserModules
include Encryptor::Private
plugin MongoMapper::Devise
QUEUE = MessageHandler.new
devise :invitable, :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
key :username
key :serialized_private_key, String
key :invites, Integer, :default => 5
key :invitation_token, String
key :invitation_sent_at, DateTime
key :pending_request_ids, Array, :typecast => 'ObjectId'
key :visible_post_ids, Array, :typecast => 'ObjectId'
key :visible_person_ids, Array, :typecast => 'ObjectId'
key :getting_started, Boolean, :default => true
key :language, String
key :grammatical_gender, String
:recoverable, :rememberable, :trackable, :validatable,
:timeoutable
before_validation :strip_and_downcase_username, :on => :create
before_validation :set_current_language, :on => :create
validates_presence_of :username
validates_uniqueness_of :username, :case_sensitive => false
validates_format_of :username, :with => /\A[A-Za-z0-9_.]+\z/
validates_format_of :username, :with => /\A[A-Za-z0-9_]+\z/
validates_length_of :username, :maximum => 32
validates_inclusion_of :language, :in => AVAILABLE_LANGUAGE_CODES
validates_inclusion_of :grammatical_gender, :in => I18n::Backend::Genderize::known_genders + [nil]
validates_presence_of :person, :unless => proc {|user| user.invitation_token.present?}
validates_associated :person
one :person, :class => Person, :foreign_key => :owner_id
has_one :person, :foreign_key => :owner_id
delegate :public_key, :posts, :owns?, :diaspora_handle, :name, :public_url, :profile, :first_name, :last_name, :to => :person
many :invitations_from_me, :class => Invitation, :foreign_key => :from_id
many :invitations_to_me, :class => Invitation, :foreign_key => :to_id
many :contacts, :class => Contact, :foreign_key => :user_id
many :visible_people, :in => :visible_person_ids, :class => Person # One of these needs to go
many :pending_requests, :in => :pending_request_ids, :class => Request
many :raw_visible_posts, :in => :visible_post_ids, :class => Post
many :aspects, :class => Aspect, :dependent => :destroy
has_many :invitations_from_me, :class_name => 'Invitation', :foreign_key => :sender_id
has_many :invitations_to_me, :class_name => 'Invitation', :foreign_key => :recipient_id
has_many :aspects
has_many :aspect_memberships, :through => :aspects
has_many :contacts
has_many :contact_people, :through => :contacts, :source => :person
has_many :services
has_many :user_preferences
many :services, :class => Service
#after_create :seed_aspects
before_destroy :disconnect_everyone, :remove_person
before_destroy :disconnect_everyone, :remove_mentions, :remove_person
before_save do
person.save if person
person.save if person && person.changed?
end
attr_accessible :getting_started, :password, :password_confirmation, :language, :grammatical_gender
attr_accessible :getting_started, :password, :password_confirmation, :language, :disable_mail
def update_user_preferences(pref_hash)
if self.disable_mail
mails = ['mentioned', 'request_received', 'comment_on_post', 'request_acceptance', 'also_commented', 'private_message']
mails.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
def strip_and_downcase_username
if username.present?
@@ -77,133 +78,73 @@ class User
end
def self.find_for_authentication(conditions={})
conditions[:username] = conditions[:username].downcase
if conditions[:username] =~ /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i # email regex
conditions[:email] = conditions.delete(:username)
end
super
end
def has_incoming_request_from(person)
self.pending_requests.select do |req|
req.to_id == self.person.id
end.any? { |req| req.from_id == person.id }
end
######## Making things work ########
key :email, String
def method_missing(method, *args)
self.person.send(method, *args) if self.person
super(conditions)
end
######### Aspects ######################
def drop_aspect(aspect)
if aspect.contacts.count == 0
aspect.destroy
end
def move_contact(person, to_aspect, from_aspect)
return true if to_aspect == from_aspect
contact = contact_for(person)
if add_contact_to_aspect(contact, to_aspect)
membership = contact ? contact.aspect_memberships.where(:aspect_id => from_aspect.id).first : nil
return ( membership && membership.destroy )
else
raise "Aspect not empty"
false
end
end
def move_contact(opts = {})
if opts[:to] == opts[:from]
true
elsif opts[:person_id] && opts[:to] && opts[:from]
from_aspect = self.aspects.find_by_id(opts[:from])
if add_person_to_aspect(opts[:person_id], opts[:to])
delete_person_from_aspect(opts[:person_id], opts[:from])
end
end
end
def add_person_to_aspect(person_id, aspect_id)
contact = contact_for(Person.find(person_id))
raise "Can not add person to an aspect you do not own" unless aspect = self.aspects.find_by_id(aspect_id)
raise "Can not add person you are not connected to" unless contact
raise 'Can not add person who is already in the aspect' if aspect.contacts.include?(contact)
contact.aspects << aspect
contact.save!
aspect.save!
end
def delete_person_from_aspect(person_id, aspect_id, opts = {})
aspect = Aspect.find(aspect_id)
raise "Can not delete a person from an aspect you do not own" unless aspect.user == self
contact = contact_for Person.find(person_id)
if opts[:force] || contact.aspect_ids.count > 1
contact.aspect_ids.delete aspect.id
contact.save!
aspect.save!
else
raise "Can not delete a person from last aspect"
end
def add_contact_to_aspect(contact, aspect)
return true if contact.aspect_memberships.where(:aspect_id => aspect.id).count > 0
contact.aspect_memberships.create!(:aspect => aspect)
end
######## Posting ########
def post(class_name, opts = {})
post = build_post(class_name, opts)
if post.save
raise 'MongoMapper failed to catch a failed save' unless post.id
add_to_streams(post, opts[:to])
dispatch_post(post, :to => opts[:to])
end
post
end
def build_post(class_name, opts = {})
opts[:person] = self.person
opts[:diaspora_handle] = opts[:person].diaspora_handle
opts[:author] = self.person
opts[:diaspora_handle] = opts[:author].diaspora_handle
model_class = class_name.to_s.camelize.constantize
model_class.instantiate(opts)
model_class.diaspora_initialize(opts)
end
def dispatch_post(post, opts = {})
aspect_ids = opts.delete(:to)
#socket post
Rails.logger.info("event=dispatch user=#{diaspora_handle} post=#{post.id.to_s}")
push_to_aspects(post, aspects_from_ids(aspect_ids))
if post.public
self.services.each do |service|
self.send("post_to_#{service.provider}".to_sym, service, post.message)
end
end
end
def post_to_facebook(service, message)
Rails.logger.info("Sending a message: #{message} to Facebook")
EventMachine::HttpRequest.new("https://graph.facebook.com/me/feed?message=#{message}&access_token=#{service.access_token}").post
end
def post_to_twitter(service, message)
oauth = Twitter::OAuth.new(SERVICES['twitter']['consumer_token'], SERVICES['twitter']['consumer_secret'])
oauth.authorize_from_access(service.access_token, service.access_secret)
client = Twitter::Base.new(oauth)
client.update(message)
mailman = Postzord::Dispatch.new(self, post)
mailman.post(opts)
end
def update_post(post, post_hash = {})
if self.owns? post
post.update_attributes(post_hash)
aspects = aspects_with_post(post.id)
self.push_to_aspects(post, aspects)
Postzord::Dispatch.new(self, post).post
end
end
def add_to_streams(post, aspect_ids)
self.raw_visible_posts << post
self.save
def notify_if_mentioned(post)
return unless self.contact_for(post.author) && post.respond_to?(:mentions?)
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to? :socket_to_uid
target_aspects = aspects_from_ids(aspect_ids)
target_aspects.each do |aspect|
post.notify_person(self.person) if post.mentions? self.person
end
def add_post_to_aspects(post)
return unless self.contact_for(post.author)
Rails.logger.debug("event=add_post_to_aspects user_id=#{self.id} post_id=#{post.id}")
add_to_streams(post, self.aspects_with_person(post.author))
post
end
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
aspect.save
end
end
@@ -211,124 +152,61 @@ class User
if aspect_ids == "all" || aspect_ids == :all
self.aspects
else
if aspect_ids.respond_to? :to_id
aspect_ids = [aspect_ids]
end
aspect_ids.map!{ |x| x.to_id }
aspects.all(:id.in => aspect_ids)
aspects.where(:id => aspect_ids)
end
end
def push_to_aspects(post, aspects)
#send to the aspects
target_contacts = aspects.inject([]) { |contacts,aspect|
contacts = contacts | aspect.contacts
}
push_to_hub(post) if post.respond_to?(:public) && post.public
push_to_people(post, self.person_objects(target_contacts))
end
def push_to_people(post, people)
salmon = salmon(post)
people.each do |person|
push_to_person(salmon, post, person)
end
end
def push_to_person(salmon, post, person)
person.reload # Sadly, we need this for Ruby 1.9.
# person.owner will always return a ProxyObject.
# calling nil? performs a necessary evaluation.
if person.owner_id
Rails.logger.info("event=push_to_person route=local sender=#{self.diaspora_handle} recipient=#{person.diaspora_handle} payload_type=#{post.class}")
person.owner.receive(post.to_diaspora_xml, self.person)
else
xml = salmon.xml_for person
Rails.logger.info("event=push_to_person route=remote sender=#{self.diaspora_handle} recipient=#{person.diaspora_handle} payload_type=#{post.class}")
QUEUE.add_post_request(person.receive_url, xml)
QUEUE.process
end
end
def push_to_hub(post)
Rails.logger.debug("event=push_to_hub target=#{APP_CONFIG[:pubsub_server]} sender_url=#{self.public_url}")
QUEUE.add_hub_notification(APP_CONFIG[:pubsub_server], self.public_url)
end
def salmon(post)
created_salmon = Salmon::SalmonSlap.create(self, post.to_diaspora_xml)
created_salmon
Salmon::SalmonSlap.create(self, post.to_diaspora_xml)
end
######## Commenting ########
def comment(text, options = {})
comment = build_comment(text, options)
if comment.save
raise 'MongoMapper failed to catch a failed save' unless comment.id
dispatch_comment comment
end
comment
end
def build_comment(text, options = {})
comment = Comment.new(:person_id => self.person.id,
:diaspora_handle => self.person.diaspora_handle,
comment = Comment.new(:author_id => self.person.id,
:text => text,
:post => options[:on])
comment.set_guid
#sign comment as commenter
comment.creator_signature = comment.sign_with_key(self.encryption_key)
comment.author_signature = comment.sign_with_key(self.encryption_key)
if !comment.post_id.blank? && owns?(comment.post)
if !comment.post_id.blank? && person.owns?(comment.parent)
#sign comment as post owner
comment.post_creator_signature = comment.sign_with_key(self.encryption_key)
comment.parent_author_signature = comment.sign_with_key(self.encryption_key)
end
comment
end
def dispatch_comment(comment)
if owns? comment.post
#push DOWNSTREAM (to original audience)
Rails.logger.info "event=dispatch_comment direction=downstream user=#{self.diaspora_handle} comment=#{comment.id}"
aspects = aspects_with_post(comment.post_id)
#just socket to local users, as the comment has already
#been associated and saved by post owner
# (we'll push to all of their aspects for now, the comment won't
# show up via js where corresponding posts are not present)
people_in_aspects(aspects, :type => 'local').each do |person|
comment.socket_to_uid(person.owner_id, :aspect_ids => 'all')
end
#push to remote people
push_to_people(comment, people_in_aspects(aspects, :type => 'remote'))
elsif owns? comment
#push UPSTREAM (to poster)
Rails.logger.info "event=dispatch_comment direction=upstream user=#{self.diaspora_handle} comment=#{comment.id}"
push_to_people comment, [comment.post.person]
######### Mailer #######################
def mail(job, *args)
pref = job.to_s.gsub('Job::Mail', '').underscore
unless self.disable_mail || self.user_preferences.exists?(:email_type => pref)
Resque.enqueue(job, *args)
end
end
######### Posts and Such ###############
def retract(post)
aspect_ids = aspects_with_post(post.id)
aspect_ids.map! { |aspect| aspect.id.to_s }
aspects = post.aspects
post.unsocket_from_uid(self.id, :aspect_ids => aspect_ids) if post.respond_to? :unsocket_from_uid
retraction = Retraction.for(post)
push_to_people retraction, people_in_aspects(aspects_with_post(post.id))
post.unsocket_from_user(self, :aspect_ids => aspects.map { |a| a.id.to_s }) if post.respond_to? :unsocket_from_user
mailman = Postzord::Dispatch.new(self, retraction)
mailman.post
retraction
end
########### Profile ######################
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)
push_to_aspects profile, aspects
Postzord::Dispatch.new(self, profile).post
true
else
false
@@ -336,88 +214,80 @@ class User
end
###Invitations############
def invite_user(opts = {})
aspect_id = opts.delete(:aspect_id)
if aspect_id == nil
raise "Must invite into aspect"
end
aspect_object = self.aspects.find_by_id(aspect_id)
if !(aspect_object)
raise "Must invite to your aspect"
else
Invitation.invite(:email => opts[:email],
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_object,
:message => opts[:invite_message])
:into => aspect,
:message => invite_message)
else
false
end
end
def accept_invitation!(opts = {})
if self.invited?
log_string = "event=invitation_accepted username=#{opts[:username]} "
log_string << "inviter=#{invitations_to_me.first.from.diaspora_handle}" if invitations_to_me.first
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.to_request!}
log_string << "success"
Rails.logger.info log_string
self.reload # Because to_request adds a request and saves elsewhere
self
end
rescue Exception => e
log_string << "failure"
Rails.logger.info log_string
self.setup(opts)
self.invitation_token = nil
self.password = opts[:password]
self.password_confirmation = opts[:password_confirmation]
self.person.save!
self.save!
invitations_to_me.each{|invitation| invitation.to_request!}
self.reload # Because to_request adds a request and saves elsewhere
self
raise e
end
end
###Helpers############
def self.build(opts = {})
u = User.new(opts)
u.email = opts[:email]
u.setup(opts)
u
end
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] ||= {}
opts[:person][:profile] ||= Profile.new
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]}@#{APP_CONFIG[:terse_pod_url]}"
self.person.url = APP_CONFIG[:pod_url]
new_key = User.generate_key
self.serialized_private_key = new_key
self.person.serialized_public_key = new_key.public_key
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
def seed_aspects
self.aspects.create(:name => I18n.t('aspects.seed.family'))
self.aspects.create(:name => I18n.t('aspects.seed.work'))
end
def as_json(opts={})
{
:user => {
:posts => self.raw_visible_posts.each { |post| post.as_json },
:contacts => self.contacts.each { |contact| contact.as_json },
:aspects => self.aspects.each { |aspect| aspect.as_json },
:pending_requests => self.pending_requests.each { |request| request.as_json },
}
}
end
def self.generate_key
key_size = (Rails.env == 'test' ? 512 : 4096)
OpenSSL::PKey::RSA::generate key_size
@@ -434,12 +304,21 @@ class User
end
def disconnect_everyone
contacts.each { |contact|
if contact.person.owner?
Contact.unscoped.where(:user_id => self.id).each { |contact|
if contact.person.owner_id
contact.person.owner.disconnected_by self.person
remove_contact(contact)
else
self.disconnect contact
end
}
self.aspects.delete_all
end
def remove_mentions
Mention.where( :person_id => self.person.id).each do |mentioned_person|
mentioned_person.delete
end
end
end

View File

@@ -0,0 +1,21 @@
class UserPreference < ActiveRecord::Base
belongs_to :user
validate :must_be_valid_email_type
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
def valid_email_types
["mentioned",
"comment_on_post",
"private_message",
"request_acceptence",
"request_received",
"also_commented"]
end
end

View File

@@ -5,8 +5,6 @@
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
def store_dir
"uploads/images"
end
@@ -19,8 +17,6 @@ class ImageUploader < CarrierWave::Uploader::Base
model.random_string + model.id.to_s + File.extname(@filename) if @filename
end
version :thumb_small do
process :resize_to_fill => [50,50]
end

View File

@@ -0,0 +1,41 @@
%h3
= form_tag 'admin_inviter', :method => :get do
email to invite:
= text_field_tag 'identifier'
= submit_tag 'invite'
%h3
user search
= form_tag 'user_search', :method => :get do
username:
= text_field_tag 'user[username]', params[:user][:username]
email:
= text_field_tag 'user[email]', params[:user][:email]
invitation identifier
= text_field_tag 'user[invitation_identifier]', params[:user][:invitation_identifier]
invitation token:
= text_field_tag 'user[invitation_token]', params[:user][:invitation_token]
= submit_tag 'go'
= "#{@users.count} users found"
%br
%br
= for user in @users
= user.inspect
%br
- if user.person
= user.person.inspect
%br
- if user.person.profile
= user.person.profile.inspect
%br
= "invite token: #{accept_invitation_url(user, :invitation_token => user.invitation_token)}" if user.invitation_token
%br
%br

View File

@@ -2,4 +2,6 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= link_to t('.new', :type => object.class.to_s, :from => object.person.name), object_path(object.post)
= remove_from_aspect_button(aspect_id,person_id)

View File

@@ -0,0 +1,7 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= aspect_membership_button(aspect, contact, person)

View File

@@ -3,5 +3,5 @@
-# the COPYRIGHT file.
= add_to_aspect_button(@aspect_id,@person_id)
= aspect_membership_button(aspect, person, contact)

View File

@@ -0,0 +1,12 @@
%li{:data=>{:guid=>aspect.id}, :class => ("dull" if contacts.size == 0)}
.right
%b
= link_to t('contacts', :count => contacts.size), edit_aspect_path(aspect), :rel => 'facebox'
%b
= link_to aspect.name, edit_aspect_path(aspect), :rel => 'facebox', :class => 'name'
%br
- if contacts.length > 0
.contacts
- for contact in contacts[0..15]
= person_image_link(contact.person)

View File

@@ -0,0 +1,7 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.aspect_badge.single{:guid=>aspect.id}
= link_to aspect.name, aspect

View File

@@ -0,0 +1,30 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :head do
=javascript_include_tag 'aspect-contacts'
:javascript
EditPane.setTranslations({
doneEditing: "#{t('.done_editing')}",
editAspect:"#{t('aspects.show.edit_aspect')}"
});
- if aspect.contacts.count == 0
:javascript
$(document).ready(function(){
EditPane.fadeIn();
});
#left_pane
.section.contact_pictures
- for contact in contacts
= person_image_link(contact[:person])
%br
%br
%br
.section
%h3= t('shared.invitations.invites')
= render "shared/invitations", :invites => @invites

Some files were not shown because too many files have changed in this diff Show More