social_stream 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +6 -0
  3. data/app/controllers/api_controller.rb +39 -0
  4. data/app/controllers/frontpage_controller.rb +2 -0
  5. data/app/controllers/groups_controller.rb +8 -2
  6. data/app/controllers/likes_controller.rb +9 -29
  7. data/app/controllers/logos_controller.rb +21 -0
  8. data/app/controllers/mailbox/conversation_controller.rb +110 -0
  9. data/app/controllers/mailbox_controller.rb +35 -0
  10. data/app/controllers/posts_controller.rb +2 -0
  11. data/app/controllers/profiles_controller.rb +3 -0
  12. data/app/controllers/ties_controller.rb +10 -0
  13. data/app/controllers/users_controller.rb +5 -5
  14. data/app/helpers/groups_helper.rb +0 -2
  15. data/app/helpers/subjects_helper.rb +11 -0
  16. data/app/helpers/ties_helper.rb +1 -1
  17. data/app/models/activity.rb +24 -1
  18. data/app/models/activity_object.rb +10 -0
  19. data/app/models/activity_object_activity.rb +10 -0
  20. data/app/models/actor.rb +87 -60
  21. data/app/models/group.rb +10 -4
  22. data/app/models/like.rb +34 -0
  23. data/app/models/logo.rb +51 -0
  24. data/app/models/permission.rb +7 -5
  25. data/app/models/profile.rb +24 -8
  26. data/app/models/tie.rb +15 -2
  27. data/app/models/user.rb +2 -2
  28. data/app/views/activities/_activities.html.erb +1 -1
  29. data/app/views/activities/_new.html.erb +12 -7
  30. data/app/views/api/activity_atom_feed.atom.builder +40 -0
  31. data/app/views/comments/_new.html.erb +1 -1
  32. data/app/views/devise/passwords/edit.html.erb +21 -0
  33. data/app/views/devise/passwords/new.html.erb +16 -0
  34. data/app/views/devise/registrations/new.html.erb +35 -19
  35. data/app/views/devise/sessions/new.html.erb +30 -0
  36. data/app/views/frontpage/_header.html.erb +18 -20
  37. data/app/views/frontpage/_search.html.erb +13 -0
  38. data/app/views/frontpage/_sponsor.html.erb +12 -13
  39. data/app/views/frontpage/index.html.erb +88 -80
  40. data/app/views/groups/_group.html.erb +2 -6
  41. data/app/views/groups/_index.html.erb +22 -25
  42. data/app/views/groups/_logo.html.erb +1 -1
  43. data/app/views/groups/_new.html.erb +56 -39
  44. data/app/views/groups/_profile.html.erb +142 -0
  45. data/app/views/groups/_sidebar_index.html.erb +73 -0
  46. data/app/views/groups/{_middle_show.html.erb → _sidebar_show.html.erb} +2 -2
  47. data/app/views/groups/_tabs.html.erb +37 -31
  48. data/app/views/groups/_toolbar_show.html.erb +12 -0
  49. data/app/views/groups/edit.html.erb +136 -0
  50. data/app/views/groups/index.html.erb +47 -46
  51. data/app/views/groups/new.html.erb +2 -0
  52. data/app/views/groups/show.html.erb +9 -4
  53. data/app/views/groups/update.js.erb +39 -0
  54. data/app/views/home/_groups.html.erb +4 -5
  55. data/app/views/{users/_middle_index.html.erb → home/_sidebar.html.erb} +0 -2
  56. data/app/views/home/index.html.erb +3 -5
  57. data/app/views/layouts/_footer.html.erb +4 -0
  58. data/app/views/layouts/_header.erb +29 -37
  59. data/app/views/layouts/_representation.html.erb +2 -2
  60. data/app/views/layouts/application.html.erb +47 -74
  61. data/app/views/layouts/frontpage.html.erb +27 -48
  62. data/app/views/layouts/test.html +44 -0
  63. data/app/views/likes/create.js.erb +1 -1
  64. data/app/views/likes/destroy.js.erb +1 -1
  65. data/app/views/logos/_form.html.erb +33 -0
  66. data/app/views/logos/_precrop.html.erb +48 -0
  67. data/app/views/logos/edit.html.erb +6 -0
  68. data/app/views/logos/index.html.erb +27 -0
  69. data/app/views/logos/new.html.erb +20 -0
  70. data/app/views/logos/show.html.erb +5 -0
  71. data/app/views/mailbox/_conversation.html.erb +23 -0
  72. data/app/views/mailbox/_conversations.html.erb +9 -0
  73. data/app/views/mailbox/_index.html.erb +16 -0
  74. data/app/views/{messages → mailbox}/_location.html.erb +0 -0
  75. data/app/views/mailbox/_menu_options.html.erb +19 -0
  76. data/app/views/mailbox/_show.html.erb +15 -0
  77. data/app/views/mailbox/conversation/_conversation.html.erb +40 -0
  78. data/app/views/mailbox/conversation/_form.html.erb +54 -0
  79. data/app/views/mailbox/conversation/_location.html.erb +3 -0
  80. data/app/views/mailbox/conversation/_new.html.erb +19 -0
  81. data/app/views/mailbox/conversation/_show.html.erb +27 -0
  82. data/app/views/mailbox/conversation/edit.html.erb +6 -0
  83. data/app/views/mailbox/conversation/new.html.erb +10 -0
  84. data/app/views/mailbox/conversation/new.js.erb +1 -0
  85. data/app/views/mailbox/conversation/show.html.erb +1 -0
  86. data/app/views/{messages → mailbox}/edit.html.erb +0 -0
  87. data/app/views/mailbox/index.html.erb +10 -0
  88. data/app/views/{messages → mailbox}/index.js.erb +0 -0
  89. data/app/views/mailbox/new.html.erb +14 -0
  90. data/app/views/mailbox/show.html.erb +11 -0
  91. data/app/views/mailbox/show.js.erb +1 -0
  92. data/app/views/menu/_group.html.erb +15 -0
  93. data/{lib/generators/social_stream/templates/public/stylesheets/users.css → app/views/menu/_home_user.html.erb} +0 -0
  94. data/app/views/menu/_options.html.erb +11 -0
  95. data/app/views/menu/_services.html.erb +11 -0
  96. data/app/views/menu/_tiesGroup.html.erb +14 -0
  97. data/app/views/menu/_tiesUser.html.erb +11 -0
  98. data/app/views/menu/_user.html.erb +15 -0
  99. data/app/views/profiles/show.html.erb +1 -0
  100. data/app/views/subjects/_contacts.html.erb +8 -9
  101. data/app/views/subjects/_menu_options.html.erb +14 -0
  102. data/app/views/subjects/_toolbar.html.erb +15 -0
  103. data/app/views/ties/_new.html.erb +3 -2
  104. data/app/views/ties/_pendings.html.erb +7 -12
  105. data/app/views/ties/_suggestions.html.erb +12 -12
  106. data/app/views/ties/_tie.html.erb +9 -7
  107. data/app/views/ties/new.js.erb +1 -2
  108. data/app/views/users/_groups.html.erb +4 -3
  109. data/app/views/users/_index.html.erb +24 -22
  110. data/app/views/users/_logo.html.erb +1 -1
  111. data/app/views/users/_profile.html.erb +167 -164
  112. data/app/views/users/_sidebar_index.html.erb +6 -0
  113. data/app/views/users/{_middle_show.html.erb → _sidebar_show.html.erb} +0 -0
  114. data/app/views/users/_toolbar_show.html.erb +17 -0
  115. data/app/views/users/edit.html.erb +193 -165
  116. data/app/views/users/index.html.erb +34 -47
  117. data/{spec/dummy/public/stylesheets/.gitkeep → app/views/users/info.html.erb} +0 -0
  118. data/app/views/users/show.html.erb +4 -4
  119. data/app/views/users/show.xml.builder +28 -0
  120. data/app/views/users/update.js.erb +3 -1
  121. data/config/locales/en.yml +88 -9
  122. data/config/routes.rb +30 -14
  123. data/lib/generators/social_stream/install_generator.rb +8 -2
  124. data/lib/generators/social_stream/templates/migration.rb +75 -81
  125. data/lib/generators/social_stream/templates/public/images/{frontpage/facebook.png → btn/1-facebook.png} +0 -0
  126. data/lib/generators/social_stream/templates/public/images/btn/edit.png +0 -0
  127. data/lib/generators/social_stream/templates/public/images/btn/facebook.png +0 -0
  128. data/lib/generators/social_stream/templates/public/images/btn/linkedin.png +0 -0
  129. data/lib/generators/social_stream/templates/public/images/btn/twitter-follow-icon.png +0 -0
  130. data/lib/generators/social_stream/templates/public/images/btn/twitter.png +0 -0
  131. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.png +0 -0
  132. data/lib/generators/social_stream/templates/public/images/frontpage/meet.png +0 -0
  133. data/lib/generators/social_stream/templates/public/images/frontpage/share.png +0 -0
  134. data/lib/generators/social_stream/templates/public/images/icons/favicon.ico +0 -0
  135. data/lib/generators/social_stream/templates/public/images/logo.png +0 -0
  136. data/lib/generators/social_stream/templates/public/images/w3c_css.png +0 -0
  137. data/lib/generators/social_stream/templates/public/images/w3c_xhtml.png +0 -0
  138. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-1.8.4.custom.min.js +3 -3
  139. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-personalized-1.5.2.packed.js +1 -0
  140. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui.min.js +3 -3
  141. data/lib/generators/social_stream/templates/public/javascripts/jquery.Jcrop.min.js +163 -0
  142. data/lib/generators/social_stream/templates/public/javascripts/jquery.fcbkcomplete.min.js +76 -76
  143. data/lib/generators/social_stream/templates/public/javascripts/jquery.min.js +156 -5
  144. data/lib/generators/social_stream/templates/public/javascripts/main.js +9 -0
  145. data/lib/generators/social_stream/templates/public/javascripts/menu-collapsed.js +42 -0
  146. data/lib/generators/social_stream/templates/public/javascripts/menu.js +1 -1
  147. data/lib/generators/social_stream/templates/public/javascripts/rails.js +30 -29
  148. data/lib/generators/social_stream/templates/public/javascripts/superfish.js +121 -0
  149. data/lib/generators/social_stream/templates/public/stylesheets/default/activities.css +72 -0
  150. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +150 -0
  151. data/lib/generators/social_stream/templates/public/stylesheets/default/carousel.css +23 -0
  152. data/lib/generators/social_stream/templates/public/stylesheets/{fcbkComplete.css → default/fcbkComplete.css} +2 -2
  153. data/lib/generators/social_stream/templates/public/stylesheets/default/footer.css +25 -0
  154. data/lib/generators/social_stream/templates/public/stylesheets/default/frontpage.css +54 -0
  155. data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +44 -0
  156. data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +44 -0
  157. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  158. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
  159. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  160. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  161. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_dadada_1x400.png +0 -0
  162. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  163. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  164. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  165. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_222222_256x240.png +0 -0
  166. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_2e83ff_256x240.png +0 -0
  167. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_454545_256x240.png +0 -0
  168. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_888888_256x240.png +0 -0
  169. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_cd0a0a_256x240.png +0 -0
  170. data/lib/generators/social_stream/templates/public/stylesheets/default/jqcloud.css +15 -0
  171. data/lib/generators/social_stream/templates/public/stylesheets/{jquery-ui.css → default/jquery-ui.css} +0 -0
  172. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.Jcrop.css +35 -0
  173. data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +33 -0
  174. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  175. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  176. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  177. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  178. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  179. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  180. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  181. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  182. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_222222_256x240.png +0 -0
  183. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_2e83ff_256x240.png +0 -0
  184. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_454545_256x240.png +0 -0
  185. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_888888_256x240.png +0 -0
  186. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_cd0a0a_256x240.png +0 -0
  187. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.7.3.custom.css +0 -0
  188. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.8.4.custom.css +0 -0
  189. data/lib/social_stream.rb +11 -2
  190. data/lib/social_stream/ability.rb +21 -3
  191. data/lib/social_stream/models/object.rb +5 -3
  192. data/lib/social_stream/models/subject.rb +50 -31
  193. data/lib/social_stream/rails.rb +5 -0
  194. data/lib/social_stream/test_helpers.rb +11 -0
  195. data/lib/social_stream/test_helpers/controllers.rb +64 -0
  196. data/lib/social_stream/version.rb +1 -1
  197. data/lib/tasks/db/populate.rake +110 -25
  198. data/social_stream.gemspec +7 -1
  199. data/spec/controllers/contacts_controller_spec.rb +1 -1
  200. data/spec/controllers/groups_controller_spec.rb +8 -0
  201. data/spec/controllers/home_controller_spec.rb +15 -0
  202. data/spec/controllers/likes_controller_spec.rb +29 -0
  203. data/spec/controllers/posts_controller_spec.rb +41 -0
  204. data/spec/controllers/profiles_controller_spec.rb +46 -0
  205. data/spec/controllers/users_controller_spec.rb +2 -2
  206. data/spec/dummy/.gitignore +4 -0
  207. data/spec/dummy/config/database.yml +8 -0
  208. data/spec/dummy/config/environments/test_pg.rb +35 -0
  209. data/spec/dummy/config/routes.rb +2 -0
  210. data/spec/factories/group.rb +1 -1
  211. data/spec/integration/navigation_spec.rb +1 -1
  212. data/spec/models/actor_spec.rb +4 -4
  213. data/spec/models/user_spec.rb +2 -2
  214. data/spec/spec_helper.rb +1 -1
  215. data/spec/support/db.rb +7 -0
  216. metadata +198 -116
  217. data/app/controllers/messages_controller.rb +0 -3
  218. data/app/models/message.rb +0 -2
  219. data/app/views/groups/_middle_index.html.erb +0 -74
  220. data/app/views/groups/_right_index.html.erb +0 -19
  221. data/app/views/groups/_right_show.html.erb +0 -8
  222. data/app/views/home/_middle.html.erb +0 -4
  223. data/app/views/home/_options.html.erb +0 -8
  224. data/app/views/home/_right.html.erb +0 -17
  225. data/app/views/messages/_form.html.erb +0 -24
  226. data/app/views/messages/_index.html.erb +0 -24
  227. data/app/views/messages/_message.html.erb +0 -17
  228. data/app/views/messages/_messages.html.erb +0 -2
  229. data/app/views/messages/index.html.erb +0 -1
  230. data/app/views/messages/new.html.erb +0 -14
  231. data/app/views/messages/show.html.erb +0 -21
  232. data/app/views/users/_menu.html.erb +0 -7
  233. data/app/views/users/_options.html.erb +0 -5
  234. data/app/views/users/_right_index.html.erb +0 -19
  235. data/app/views/users/_right_show.html.erb +0 -14
  236. data/lib/generators/social_stream/templates/public/images/btn/btn_share.png +0 -0
  237. data/lib/generators/social_stream/templates/public/images/favicon.ico +0 -0
  238. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.gif +0 -0
  239. data/lib/generators/social_stream/templates/public/images/frontpage/meet.gif +0 -0
  240. data/lib/generators/social_stream/templates/public/images/frontpage/share.gif +0 -0
  241. data/lib/generators/social_stream/templates/public/javascripts/hoverIntent.js +0 -84
  242. data/lib/generators/social_stream/templates/public/stylesheets/activities.css +0 -235
  243. data/lib/generators/social_stream/templates/public/stylesheets/base.css +0 -68
  244. data/lib/generators/social_stream/templates/public/stylesheets/boxy.css +0 -49
  245. data/lib/generators/social_stream/templates/public/stylesheets/browse.css +0 -162
  246. data/lib/generators/social_stream/templates/public/stylesheets/carousel.css +0 -57
  247. data/lib/generators/social_stream/templates/public/stylesheets/edit_user.css +0 -104
  248. data/lib/generators/social_stream/templates/public/stylesheets/frontpage.css +0 -708
  249. data/lib/generators/social_stream/templates/public/stylesheets/header.css +0 -116
  250. data/lib/generators/social_stream/templates/public/stylesheets/home.css +0 -121
  251. data/lib/generators/social_stream/templates/public/stylesheets/index.css +0 -625
  252. data/lib/generators/social_stream/templates/public/stylesheets/jqcloud.css +0 -62
  253. data/lib/generators/social_stream/templates/public/stylesheets/menu.css +0 -83
  254. data/lib/generators/social_stream/templates/public/stylesheets/message.css +0 -46
  255. data/lib/generators/social_stream/templates/public/stylesheets/middle.css +0 -113
  256. data/lib/generators/social_stream/templates/public/stylesheets/right.css +0 -58
  257. data/lib/generators/social_stream/templates/public/stylesheets/social_stream.css +0 -78
  258. data/lib/generators/social_stream/templates/public/stylesheets/ui.dropdownchecklist.css +0 -21
  259. data/spec/dummy/db/.gitignore +0 -2
  260. data/spec/dummy/log/.gitignore +0 -1
  261. data/spec/dummy/public/javascripts/application.js +0 -2
  262. data/spec/dummy/public/javascripts/controls.js +0 -965
  263. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  264. data/spec/dummy/public/javascripts/effects.js +0 -1123
  265. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  266. data/spec/dummy/public/javascripts/rails.js +0 -175
@@ -1,9 +1,9 @@
1
- <% content_for :middle do %>
2
- <%= render :partial => 'middle_show' %>
1
+ <% content_for :sidebar do %>
2
+ <%= render :partial => 'sidebar_show' %>
3
3
  <% end %>
4
4
 
5
- <% content_for :right do %>
6
- <%= render :partial => 'right_show' %>
5
+ <% content_for :toolbar do %>
6
+ <%= render :partial => 'toolbar_show' %>
7
7
  <% end %>
8
8
 
9
9
  <%= render :partial => 'location' %>
@@ -0,0 +1,28 @@
1
+ xml.instruct!
2
+ xml.user do
3
+ xml.uid @user.id
4
+ xml.name @user.name
5
+ xml.slug @user.slug
6
+ xml.email @user.email
7
+ xml.userSince @user.created_at
8
+ xml.birthday @user.profile.birthday
9
+ xml.organization @user.profile.organization
10
+ xml.city @user.profile.city
11
+ xml.country @user.profile.country
12
+ xml.website @user.profile.website
13
+ xml.ties do
14
+ @user.actors(:subject_type => 'user', :direction => :senders).each do |u|
15
+ xml.contact do
16
+ xml.uid u.id
17
+ xml.slug u.slug
18
+ end
19
+ end
20
+
21
+ @user.actors(:subject_type => 'group', :direction => :senders).each do |g|
22
+ xml.group do
23
+ xml.gid g.id
24
+ xml.slug g.slug
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,4 +1,6 @@
1
1
 
2
+
3
+
2
4
  if ($("#notice").length == 0){
3
5
 
4
6
  $("#content").prepend('<div id="notice"></div>');
@@ -10,7 +12,7 @@
10
12
  $("#notice").html("<h2>Form Submitted!</h2><br/>");
11
13
  $("#notice").removeClass('error_explanation');
12
14
  $("#notice").addClass('confirmed');
13
- $("#middleContent").replaceWith("<%= escape_javascript(render(:partial => 'middle_show'))%>");
15
+ $("#sidebarContent").replaceWith("<%= escape_javascript(render(:partial => 'sidebar_show'))%>");
14
16
 
15
17
  $("#contact_info").addClass('section_normal');
16
18
  $("#experience_info").addClass('section_normal');
@@ -1,4 +1,7 @@
1
1
  en:
2
+ action:
3
+ send: "Send"
4
+ accept: "Accept"
2
5
  account:
3
6
  one: "Account"
4
7
  activity:
@@ -8,9 +11,9 @@ en:
8
11
  confirm_delete: "Delete activity?"
9
12
  delete: "Delete"
10
13
  to_comment: "Comment"
11
- like: I like
12
- unlike: Already I do not like
13
- last: Last Activities
14
+ like: "I like"
15
+ unlike: "Already I do not like"
16
+ last: "Last Activities"
14
17
  browse: "Browse"
15
18
  comment:
16
19
  input: "Write a comment..."
@@ -26,9 +29,59 @@ en:
26
29
  days: Days
27
30
  delete:
28
31
  confirm: Delete %{element}}?
29
- forgot_password?: "Forgot you password?"
32
+ devise:
33
+ confirmations:
34
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
35
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
36
+ failure:
37
+ unauthenticated: 'You need to sign in or sign up before continuing.'
38
+ unconfirmed: 'You have to confirm your account before continuing.'
39
+ locked: 'Your account is locked.'
40
+ invalid: 'Invalid email or password.'
41
+ invalid_token: 'Invalid authentication token.'
42
+ timeout: 'Your session expired, please sign in again to continue.'
43
+ inactive: 'Your account was not activated yet.'
44
+ mailer:
45
+ confirmation_instructions:
46
+ subject: 'Confirmation instructions'
47
+ reset_password_instructions:
48
+ subject: 'Reset password instructions'
49
+ unlock_instructions:
50
+ subject: 'Unlock Instructions'
51
+ registrations:
52
+ signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.'
53
+ updated: 'You updated your account successfully'
54
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
55
+ passwords:
56
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
57
+ updated: 'Your password was changed successfully. You are now signed in.'
58
+ field: 'Please, enter same email when you create account'
59
+ sessions:
60
+ signed_in: 'Signed in successfully'
61
+ signed_out: 'Signed out successfully'
62
+ unlocks:
63
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
64
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
65
+ edit:
66
+ aboutme: "About me"
67
+ actualcity: "Actual City"
68
+ address: "Address"
69
+ birthday: "BirthDay"
70
+ contact: "Contact information"
71
+ email: "E-mail"
72
+ experience: "Experience"
73
+ fax: "Fax"
74
+ group_info: "Group information"
75
+ mobile: "Mobile"
76
+ organization: "Organization"
77
+ personal_info: "Personal information"
78
+ phone: "Phone"
79
+ profile: "Edit profile"
80
+ website: "Website"
81
+ forgot_password: "Forgot you password?"
30
82
  frontpage:
31
83
  collaborate:
84
+ default: "Collaborate"
32
85
  sentence1: "Organize your projects and activities"
33
86
  sentence2: "Create your own groups"
34
87
  elements:
@@ -40,11 +93,14 @@ en:
40
93
  tags: "Tags"
41
94
  main_title: "SocialStream is a core for building social network websites."
42
95
  meet:
96
+ default: "Meet"
43
97
  sentence1: "Meet interesting people and groups"
44
98
  share:
99
+ default: "Share"
45
100
  sentence1: "Your contacts and relations"
46
101
  sentence2: "Posts, comments and activities"
47
102
  stats: "%{users} users and %{groups} groups registered"
103
+ find: "Find"
48
104
  group:
49
105
  one: "Group"
50
106
  other: "Groups"
@@ -62,15 +118,25 @@ en:
62
118
  most: "Most popular"
63
119
  voted:
64
120
  most: "Most voted"
121
+ help: "Help"
65
122
  home: "Home"
66
123
  inbox:
67
124
  one: "Inbox"
68
125
  location:
69
126
  message: "You are here > %{location}"
127
+ mailbox:
128
+ mailbox: "Message"
129
+ inbox: "Inbox"
130
+ sentbox: "Sentbox"
131
+ trash: "Trash"
70
132
  message:
71
133
  one: "Message"
72
134
  menu:
73
135
  options: "Menu Options"
136
+ information: "Information"
137
+ wall: "Wall"
138
+ password:
139
+ forgot: "Do you forgot your password?"
74
140
  post:
75
141
  confirm_delete: "Delete post?"
76
142
  profile:
@@ -80,18 +146,31 @@ en:
80
146
  representation:
81
147
  action: "representing"
82
148
  change: "Change"
149
+ service:
150
+ one: "Service"
151
+ other: "Services"
152
+ products:
153
+ one: "Product"
154
+ other: "Products"
155
+ share: "Share"
83
156
  sign_in: "Sign in"
84
- sign_up: "Sign up"
85
157
  sign_out: "Sign out"
158
+ sign_up: "Sign up"
86
159
  socialstream: "SocialStream"
87
160
  tie:
161
+ add:
162
+ bookmark: "Bookmark"
163
+ contact: "Add Contact"
164
+ follow: "Follow"
165
+ partner: "Add Partner"
88
166
  pending:
89
- other: Pending requests
167
+ other: "Pending requests"
90
168
  all: "All"
91
169
  suggestion:
92
- one: Suggestion
93
- other: Suggestions
94
- all: All
170
+ one: "Suggestion"
171
+ other: "Suggestions"
172
+ all: "All"
173
+ options: "Tie options"
95
174
  time:
96
175
  ago: "%{time} ago"
97
176
  user:
data/config/routes.rb CHANGED
@@ -1,29 +1,45 @@
1
1
  Rails.application.routes.draw do
2
2
  get "contacts/index"
3
3
  root :to => "frontpage#index"
4
-
4
+
5
5
  match 'home' => 'home#index', :as => :home
6
6
  match 'home' => 'home#index', :as => :user_root # devise after_sign_in_path_for
7
-
8
- devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}
9
- resources :users
10
-
7
+
8
+ ##API###
9
+ match 'api/keygen' => 'api#create_key', :as => :api_keygen
10
+ match 'api/user/:id' => 'api#users'
11
+ match 'api/me' => 'api#users'
12
+ match 'api/me/home/' => 'api#activity_atom_feed', :format => 'atom', :as => :api_my_home
13
+ match 'api/user/:id/home' => 'api#activity_atom_feed', :format => 'atom'
14
+ ##/API##
15
+
16
+ SocialStream.subjects.each do |actor|
17
+ resources actor.to_s.pluralize do
18
+ resource :profile
19
+ end
20
+ end
21
+
11
22
  resource :representation
12
-
13
- resources :groups
14
-
23
+
24
+ resources :logos
25
+
26
+ namespace :mailbox do
27
+ resources :conversation, :controller => :conversation
28
+ end
29
+ resources :mailbox, :controller => :mailbox
30
+
15
31
  resources :ties do
16
32
  collection do
17
33
  get 'suggestion'
18
34
  end
19
35
  end
20
-
36
+
21
37
  resources :activities do
22
38
  resource :like
23
39
  end
24
-
25
-
26
- resources :posts
27
- resources :comments
28
- resources :messages
40
+
41
+
42
+ (SocialStream.objects - [ :actor ]).each do |object|
43
+ resources object.to_s.pluralize
44
+ end
29
45
  end
@@ -6,14 +6,20 @@ class SocialStream::InstallGenerator < Rails::Generators::Base #:nodoc:
6
6
 
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
 
9
- def outh_for_devise_config
9
+ def devise_initializer_config
10
10
  inject_into_file "config/initializers/devise.rb",
11
11
  "\n config.omniauth :linked_in, \"ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB\", \"WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY\"
12
12
  \n config.omniauth :facebook, \"129571360447856\",\"eef39dce5e20e76f77495c59623bdb38\"
13
- \n #config.omniauth :twitter, \"wgTxO0fTpjTeSnjKC9ZHA\",\"JepulVWwLcuAnGfWjwCu47yEP0TcJJfKtvISPBsilI\"",
13
+ \n #config.omniauth :twitter, \"wgTxO0fTpjTeSnjKC9ZHA\",\"JepulVWwLcuAnGfWjwCu47yEP0TcJJfKtvISPBsilI\"
14
+ \n config.token_authentication_key = :auth_token
15
+ \n config.stateless_token = true",
14
16
  :after => " # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'"
15
17
  end
16
18
 
19
+ def create_devise_route
20
+ route "devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}"
21
+ end
22
+
17
23
  def create_initializer_file
18
24
  copy_file 'initializer.rb', 'config/initializers/social_stream.rb'
19
25
  end
@@ -6,37 +6,37 @@ class CreateSocialStream < ActiveRecord::Migration
6
6
  t.datetime "updated_at"
7
7
  t.string "ancestry"
8
8
  end
9
-
9
+
10
10
  add_index "activities", "activity_verb_id"
11
-
11
+
12
12
  create_table "activity_object_activities", :force => true do |t|
13
13
  t.integer "activity_id"
14
14
  t.integer "activity_object_id"
15
15
  t.datetime "created_at"
16
16
  t.datetime "updated_at"
17
- t.string "type", :limit => 45
17
+ t.string "object_type"
18
18
  end
19
-
19
+
20
20
  add_index "activity_object_activities", "activity_id"
21
21
  add_index "activity_object_activities", "activity_object_id"
22
-
22
+
23
23
  create_table "activity_objects", :force => true do |t|
24
24
  t.datetime "created_at"
25
25
  t.datetime "updated_at"
26
26
  t.string "object_type", :limit => 45
27
27
  end
28
-
28
+
29
29
  create_table "activity_verbs", :force => true do |t|
30
30
  t.string "name", :limit => 45
31
31
  t.datetime "created_at"
32
32
  t.datetime "updated_at"
33
33
  end
34
-
34
+
35
35
  create_table "actors", :force => true do |t|
36
- t.string "name", :limit => 45
36
+ t.string "name"
37
37
  t.string "email", :default => "", :null => false
38
- t.string "permalink", :limit => 45
39
- t.string "subject_type", :limit => 45
38
+ t.string "slug"
39
+ t.string "subject_type"
40
40
  t.datetime "created_at"
41
41
  t.datetime "updated_at"
42
42
  t.integer "activity_object_id"
@@ -45,11 +45,11 @@ class CreateSocialStream < ActiveRecord::Migration
45
45
  t.integer "logo_file_size"
46
46
  t.datetime "logo_updated_at"
47
47
  end
48
-
48
+
49
49
  add_index "actors", "activity_object_id"
50
50
  add_index "actors", "email"
51
- add_index "actors", "permalink", :unique => true
52
-
51
+ add_index "actors", "slug", :unique => true
52
+
53
53
  create_table :authentications, :force => true do |t|
54
54
  t.integer :user_id
55
55
  t.string :provider
@@ -58,34 +58,24 @@ class CreateSocialStream < ActiveRecord::Migration
58
58
  end
59
59
 
60
60
  add_index "authentications", "user_id"
61
-
61
+
62
62
  create_table "comments", :force => true do |t|
63
63
  t.integer "activity_object_id"
64
64
  t.text "text"
65
65
  t.datetime "updated_at"
66
66
  t.datetime "created_at"
67
67
  end
68
-
68
+
69
69
  add_index "comments", "activity_object_id"
70
-
70
+
71
71
  create_table "groups", :force => true do |t|
72
72
  t.integer "actor_id"
73
73
  t.datetime "created_at"
74
74
  t.datetime "updated_at"
75
- t.string "description"
76
75
  end
77
-
76
+
78
77
  add_index "groups", "actor_id"
79
-
80
- create_table "messages", :force => true do |t|
81
- t.integer "activity_object_id"
82
- t.datetime "created_at"
83
- t.datetime "updated_at"
84
- t.text "text"
85
- end
86
-
87
- add_index "messages", "activity_object_id"
88
-
78
+
89
79
  create_table "permissions", :force => true do |t|
90
80
  t.string "action"
91
81
  t.string "object"
@@ -93,16 +83,23 @@ class CreateSocialStream < ActiveRecord::Migration
93
83
  t.datetime "created_at"
94
84
  t.datetime "updated_at"
95
85
  end
96
-
86
+
87
+ create_table "logos", :force => true do |t|
88
+ t.string "logo_file_name"
89
+ t.string "logo_content_type"
90
+ t.integer "logo_file_size"
91
+ t.datetime "logo_updated_at"
92
+ end
93
+
97
94
  create_table "posts", :force => true do |t|
98
95
  t.integer "activity_object_id"
99
96
  t.datetime "created_at"
100
97
  t.datetime "updated_at"
101
98
  t.text "text"
102
99
  end
103
-
100
+
104
101
  add_index "posts", "activity_object_id"
105
-
102
+
106
103
  create_table "profiles", :force => true do |t|
107
104
  t.integer "actor_id"
108
105
  t.date "birthday"
@@ -124,9 +121,9 @@ class CreateSocialStream < ActiveRecord::Migration
124
121
  t.string "skype", :limit => 45
125
122
  t.string "im", :limit => 45
126
123
  end
127
-
124
+
128
125
  add_index "profiles", "actor_id"
129
-
126
+
130
127
  create_table "relation_permissions", :force => true do |t|
131
128
  t.integer "relation_id"
132
129
  t.integer "permission_id"
@@ -134,10 +131,10 @@ class CreateSocialStream < ActiveRecord::Migration
134
131
  t.datetime "updated_at"
135
132
  t.integer "relation_id"
136
133
  end
137
-
134
+
138
135
  add_index "relation_permissions", "relation_id"
139
136
  add_index "relation_permissions", "permission_id"
140
-
137
+
141
138
  create_table "relations", :force => true do |t|
142
139
  t.string "name", :limit => 45
143
140
  t.datetime "created_at"
@@ -148,137 +145,134 @@ class CreateSocialStream < ActiveRecord::Migration
148
145
  t.integer "lft"
149
146
  t.integer "rgt"
150
147
  end
151
-
148
+
152
149
  add_index "relations", "parent_id"
153
-
150
+
154
151
  create_table "tags", :force => true do |t|
155
152
  t.string "name", :limit => 45
156
153
  t.datetime "created_at"
157
154
  t.datetime "updated_at"
158
155
  end
159
-
156
+
160
157
  create_table "tags_activity_objects", :force => true do |t|
161
158
  t.integer "tag_id"
162
159
  t.integer "activity_object_id"
163
160
  end
164
-
161
+
165
162
  add_index "tags_activity_objects", "activity_object_id"
166
163
  add_index "tags_activity_objects", "tag_id"
167
-
164
+
168
165
  create_table "tie_activities", :force => true do |t|
169
166
  t.integer "tie_id"
170
167
  t.integer "activity_id"
171
168
  t.boolean "read"
172
169
  t.boolean "original", :default => true
173
170
  end
174
-
171
+
175
172
  add_index "tie_activities", "tie_id"
176
173
  add_index "tie_activities", "activity_id"
177
-
174
+
178
175
  create_table "ties", :force => true do |t|
179
176
  t.integer "sender_id"
180
177
  t.integer "receiver_id"
181
178
  t.integer "relation_id"
182
179
  t.datetime "created_at"
183
180
  t.datetime "updated_at"
181
+ t.boolean "original", :default => true
184
182
  end
185
-
183
+
186
184
  add_index "ties", "receiver_id"
187
185
  add_index "ties", "relation_id"
188
186
  add_index "ties", "sender_id"
189
-
187
+
190
188
  create_table "users", :force => true do |t|
191
189
  t.string :encrypted_password, :null => false, :default => "", :limit => 128
192
190
  t.string :password_salt
193
-
191
+
194
192
  t.recoverable
195
193
  t.rememberable
196
194
  t.trackable
197
-
195
+
198
196
  # t.confirmable
199
197
  # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
200
- # t.token_authenticatable
201
-
198
+ t.token_authenticatable
199
+
202
200
  t.timestamps
203
201
  t.integer "actor_id"
204
202
  end
205
-
203
+
206
204
  add_index "users", "actor_id"
207
205
  add_index "users", :reset_password_token, :unique => true
208
206
  # add_index :users, :confirmation_token, :unique => true
209
207
  # add_index :users, :unlock_token, :unique => true
210
-
208
+
211
209
  add_foreign_key "activities", "activity_verbs", :name => "index_activities_on_activity_verb_id"
212
-
210
+
213
211
  add_foreign_key "activity_object_activities", "activities", :name => "index_activity_object_activities_on_activity_id"
214
212
  add_foreign_key "activity_object_activities", "activity_objects", :name => "activity_object_activities_on_activity_object_id"
215
-
213
+
216
214
  add_foreign_key "actors", "activity_objects", :name => "actors_on_activity_object_id"
217
-
215
+
218
216
  add_foreign_key "authentications", "users", :name => "authentications_on_user_id"
219
-
217
+
220
218
  add_foreign_key "comments", "activity_objects", :name => "comments_on_activity_object_id"
221
-
219
+
222
220
  add_foreign_key "groups", "actors", :name => "groups_on_actor_id"
223
-
224
- add_foreign_key "messages", "activity_objects", :name => "messages_on_activity_object_id"
225
-
221
+
226
222
  add_foreign_key "posts", "activity_objects", :name => "posts_on_activity_object_id"
227
-
223
+
228
224
  add_foreign_key "profiles", "actors", :name => "profiles_on_actor_id"
229
-
225
+
230
226
  add_foreign_key "relation_permissions", "relations", :name => "relation_permissions_on_relation_id"
231
227
  add_foreign_key "relation_permissions", "permissions", :name => "relation_permissions_on_permission_id"
232
-
228
+
233
229
  add_foreign_key "tags_activity_objects", "activity_objects", :name => "tags_activity_objects_on_activity_object_id"
234
230
  add_foreign_key "tags_activity_objects", "tags", :name => "tags_activity_objects_on_tag_id"
235
-
231
+
236
232
  add_foreign_key "tie_activities", "ties", :name => "tie_activities_on_tie_id"
237
233
  add_foreign_key "tie_activities", "activities", :name => "tie_activities_on_activity_id"
238
-
234
+
239
235
  add_foreign_key "ties", "actors", :name => "ties_on_receiver_id", :column => "receiver_id"
240
236
  add_foreign_key "ties", "actors", :name => "ties_on_relation_id", :column => "sender_id"
241
237
  add_foreign_key "ties", "relations", :name => "ties_on_sender_id"
242
-
238
+
243
239
  add_foreign_key "users", "actors", :name => "users_on_actor_id"
244
240
  end
245
241
 
246
-
242
+
247
243
  def self.down
248
244
  remove_foreign_key "activities", :name => "index_activities_on_activity_verb_id"
249
-
245
+
250
246
  remove_foreign_key "activity_object_activities", :name => "index_activity_object_activities_on_activity_id"
251
247
  remove_foreign_key "activity_object_activities", :name => "activity_object_activities_on_activity_object_id"
252
-
248
+
253
249
  remove_foreign_key "actors", :name => "actors_on_activity_object_id"
254
-
250
+
255
251
  remove_foreign_key "authentications", :name => "authentications_on_user_id"
256
-
252
+
257
253
  remove_foreign_key "comments", :name => "comments_on_activity_object_id"
258
-
254
+
259
255
  remove_foreign_key "groups", :name => "groups_on_actor_id"
260
-
261
- remove_foreign_key "messages", :name => "messages_on_activity_object_id"
262
-
256
+
263
257
  remove_foreign_key "posts", :name => "posts_on_activity_object_id"
264
-
258
+
265
259
  remove_foreign_key "profiles", :name => "profiles_on_actor_id"
266
-
260
+
267
261
  remove_foreign_key "relation_permissions", :name => "relation_permissions_on_relation_id"
268
262
  remove_foreign_key "relation_permissions", :name => "relation_permissions_on_permission_id"
269
-
263
+
270
264
  remove_foreign_key "tags_activity_objects", :name => "tags_activity_objects_on_activity_object_id"
271
265
  remove_foreign_key "tags_activity_objects", :name => "tags_activity_objects_on_tag_id"
272
-
266
+
273
267
  remove_foreign_key "tie_activities", :name => "tie_activities_on_tie_id"
274
268
  remove_foreign_key "tie_activities", :name => "tie_activities_on_activity_id"
275
-
269
+
276
270
  remove_foreign_key "ties", :name => "ties_on_receiver_id", :column => "receiver_id"
277
271
  remove_foreign_key "ties", :name => "ties_on_relation_id", :column => "sender_id"
278
272
  remove_foreign_key "ties", :name => "ties_on_sender_id"
279
-
273
+
280
274
  remove_foreign_key "users", :name => "users_on_actor_id"
281
-
275
+
282
276
  drop_table :activities
283
277
  drop_table :activity_object_activities
284
278
  drop_table :activity_objects
@@ -287,7 +281,6 @@ class CreateSocialStream < ActiveRecord::Migration
287
281
  drop_table :authentications
288
282
  drop_table :comments
289
283
  drop_table :groups
290
- drop_table :messages
291
284
  drop_table :permissions
292
285
  drop_table :posts
293
286
  drop_table :profiles
@@ -297,5 +290,6 @@ class CreateSocialStream < ActiveRecord::Migration
297
290
  drop_table :tags_activity_objects
298
291
  drop_table :ties
299
292
  drop_table :users
293
+
300
294
  end
301
295
  end