social_stream 0.11.8 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/base/app/assets/images/btn/download.png +0 -0
  2. data/base/app/assets/javascripts/activities.js.erb +1 -1
  3. data/base/app/assets/javascripts/social_stream-base.js +2 -0
  4. data/base/app/assets/stylesheets/social_stream-base.css +2 -0
  5. data/base/app/views/avatars/index.html.erb +0 -13
  6. data/base/app/views/comments/create.js.erb +3 -0
  7. data/base/app/views/toolbar/_home.html.erb +1 -1
  8. data/base/config/locales/en.yml +1 -0
  9. data/base/config/locales/es.yml +1 -0
  10. data/base/lib/social_stream/base/version.rb +1 -1
  11. data/base/lib/social_stream/controllers/helpers.rb +6 -0
  12. data/base/lib/social_stream/migrations/base.rb +12 -9
  13. data/base/lib/social_stream/migrations/components.rb +1 -1
  14. data/base/social_stream-base.gemspec +1 -1
  15. data/documents/Rakefile +3 -13
  16. data/documents/app/assets/javascripts/documents.js.erb +21 -32
  17. data/documents/app/assets/javascripts/social_stream-documents.js +2 -1
  18. data/documents/app/assets/stylesheets/{documents.css → documents.css.scss} +32 -6
  19. data/documents/app/assets/stylesheets/show.css.scss +75 -0
  20. data/documents/app/assets/stylesheets/social_stream-documents.css +2 -1
  21. data/documents/app/controllers/audios_controller.rb +0 -14
  22. data/documents/app/controllers/common_documents_controller.rb +6 -3
  23. data/documents/app/controllers/documents_controller.rb +9 -3
  24. data/documents/app/controllers/pictures_controller.rb +0 -1
  25. data/documents/app/controllers/videos_controller.rb +0 -15
  26. data/documents/app/helpers/documents_helper.rb +11 -7
  27. data/documents/app/models/audio.rb +1 -1
  28. data/documents/app/models/document.rb +9 -5
  29. data/documents/app/models/picture.rb +1 -1
  30. data/documents/app/models/video.rb +8 -6
  31. data/documents/app/views/audios/_audio.html.erb +2 -2
  32. data/documents/app/views/audios/_audio_processed.html.erb +4 -4
  33. data/documents/app/views/audios/_audio_show.html.erb +62 -0
  34. data/documents/app/views/audios/index.html.erb +1 -1
  35. data/documents/app/views/audios/show.html.erb +2 -2
  36. data/documents/app/views/common_documents/_document_info.html.erb +34 -0
  37. data/documents/app/views/common_documents/_index.html.erb +49 -0
  38. data/documents/app/views/common_documents/_show.html.erb +36 -0
  39. data/documents/app/views/documents/_document.html.erb +2 -6
  40. data/documents/app/views/documents/_document_show.html.erb +7 -0
  41. data/documents/app/views/documents/index.html.erb +1 -1
  42. data/documents/app/views/documents/show.html.erb +2 -2
  43. data/documents/app/views/pictures/_picture.html.erb +13 -12
  44. data/documents/app/views/pictures/_picture_show.html.erb +26 -0
  45. data/documents/app/views/pictures/index.html.erb +1 -1
  46. data/documents/app/views/pictures/show.html.erb +2 -2
  47. data/documents/app/views/videos/_video.html.erb +2 -2
  48. data/documents/app/views/videos/_video_processed.html.erb +4 -3
  49. data/documents/app/views/videos/_video_show.html.erb +64 -0
  50. data/documents/app/views/videos/index.html.erb +1 -1
  51. data/documents/app/views/videos/show.html.erb +2 -2
  52. data/documents/config/locales/en.yml +19 -1
  53. data/documents/config/locales/es.yml +18 -0
  54. data/documents/lib/social_stream/documents/engine.rb +2 -0
  55. data/documents/lib/social_stream/documents/version.rb +1 -1
  56. data/documents/social_stream-documents.gemspec +1 -1
  57. data/documents/spec/controllers/documents_controller_spec.rb +40 -2
  58. data/documents/spec/controllers/pictures_controller_spec.rb +4 -4
  59. data/documents/spec/dummy/config/environments/development.rb +0 -1
  60. data/documents/spec/dummy/config/environments/test.rb +2 -0
  61. data/lib/social_stream/release.rb +26 -4
  62. data/lib/social_stream/version.rb +1 -1
  63. data/presence/app/assets/javascripts/xmpp_client.js +0 -6
  64. data/presence/app/controllers/xmpp_controller.rb +46 -102
  65. data/presence/app/views/xmpp/_chat.html.erb +1 -2
  66. data/presence/ejabberd/conf/{ejabberd.cfg → ejabberd_example.cfg} +3 -7
  67. data/presence/ejabberd/conf/ssconfig_example.cfg +32 -0
  68. data/presence/ejabberd/ejabberd_scripts/authentication_script +7 -3
  69. data/presence/ejabberd/ejabberd_scripts/{compile_module → development_scripts/compile_module} +0 -0
  70. data/presence/ejabberd/ejabberd_scripts/{generate_random_password → development_scripts/generate_random_password} +0 -0
  71. data/presence/ejabberd/ejabberd_scripts/{kill_authentication_script.sh → development_scripts/kill_authentication_script.sh} +0 -0
  72. data/presence/ejabberd/ejabberd_scripts/{reset_logs.sh → development_scripts/reset_logs.sh} +0 -2
  73. data/presence/ejabberd/ejabberd_scripts/{show_config.sh → development_scripts/show_config.sh} +3 -0
  74. data/presence/ejabberd/ejabberd_scripts/{start_ejabberd.sh → development_scripts/start_ejabberd.sh} +0 -0
  75. data/presence/ejabberd/ejabberd_scripts/{stop_ejabberd.sh → development_scripts/stop_ejabberd.sh} +0 -0
  76. data/presence/ejabberd/ejabberd_scripts/emanagement +18 -14
  77. data/presence/ejabberd/mod_sspresence/mod_sspresence.beam +0 -0
  78. data/presence/ejabberd/mod_sspresence/mod_sspresence.erl +11 -7
  79. data/presence/lib/generators/social_stream/presence/templates/initializer.rb +14 -4
  80. data/presence/lib/social_stream/migrations/presence.rb +0 -1
  81. data/presence/lib/social_stream/presence/engine.rb +1 -48
  82. data/presence/lib/social_stream/presence/models/buddy_manager.rb +17 -44
  83. data/presence/lib/social_stream/presence/version.rb +1 -1
  84. data/presence/lib/social_stream/presence/xmpp_server_order.rb +181 -0
  85. data/presence/lib/social_stream-presence.rb +12 -2
  86. data/presence/lib/tasks/presence/synchronize.rake +6 -47
  87. data/social_stream.gemspec +2 -2
  88. metadata +32 -28
  89. data/base/lib/social_stream/migrations/finder.rb +0 -20
  90. data/documents/app/views/common-documents/_index.html.erb +0 -45
  91. data/documents/app/views/toolbar/_uploads_menu.html.erb +0 -21
  92. data/presence/ejabberd/conf/ejabberdctl.cfg +0 -154
  93. data/presence/ejabberd/conf/inetrc +0 -3
  94. data/presence/ejabberd/conf/ssconfig.cfg +0 -32
  95. data/presence/ejabberd/ejabberd_scripts/authentication_script_org +0 -114
@@ -0,0 +1,62 @@
1
+ <% content_for :javascript do %>
2
+
3
+ $("#jpId<%=audio.id%>").jPlayer( {
4
+ ready: function () {
5
+ $(this).jPlayer("setMedia", {
6
+ webma: "<%= audio_url(audio, :format => 'webma') %>" // Defines the webma url
7
+ });
8
+ },
9
+ supplied: "webma",
10
+ preload: "none",
11
+ swfPath: "assets",
12
+ cssSelectorAncestor: "#jp_interface_<%=audio.id%>"
13
+ });
14
+
15
+ <% end %>
16
+
17
+ <%= div_for audio, :class => 'content_size' do %>
18
+ <div class="audio_show">
19
+ <% if audio.file_processing %>
20
+ <div class="processing_text">
21
+ <%= t('audio.processing')%>
22
+ </div>
23
+ <% else %>
24
+ <div id="jpId<%= audio.id%>" class="jpId_size0"></div>
25
+ <div class="jp-audio">
26
+ <div class="jp-type-single">
27
+ <div id="jp_interface_<%= audio.id%>" class="jp-interface">
28
+ <ul class="jp-controls">
29
+ <li>
30
+ <a href="#" class="jp-play" tabindex="1">play</a>
31
+ </li>
32
+ <li>
33
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
34
+ </li>
35
+ <li>
36
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
37
+ </li>
38
+ <li>
39
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
40
+ </li>
41
+ <li>
42
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
43
+ </li>
44
+ </ul>
45
+ <div class="jp-progress">
46
+ <div class="jp-seek-bar">
47
+ <div class="jp-play-bar"></div>
48
+ </div>
49
+ </div>
50
+ <div class="jp-volume-bar">
51
+ <div class="jp-volume-bar-value"></div>
52
+ </div>
53
+ <div class="jp-current-time"></div>
54
+ <div class="jp-duration"></div>
55
+ </div>
56
+ <div id="jp_playlist_<%= audio.id%>" class="jp-playlist"></div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ <% end %>
61
+
62
+ <% end %>
@@ -1 +1 @@
1
- <%=render(:partial => 'common-documents/index') %>
1
+ <%=render(:partial => 'common_documents/index') %>
@@ -1,2 +1,2 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => @audio } %>
1
+ <%= render :partial => 'common_documents/show',
2
+ :locals => { :document => @audio } %>
@@ -0,0 +1,34 @@
1
+ <div id="document_info">
2
+ <div class="left">
3
+ <div id="date_labels">
4
+ <div class="details">
5
+ <%= t('document.info.date.created_at') %>
6
+ </div>
7
+ <div class="details">
8
+ <%= t('document.info.date.updated_at') %>
9
+ </div>
10
+ </div>
11
+ <div id="dates">
12
+ <div class="date">
13
+ <%= I18n.localize document.created_at, :format => :long %>
14
+ </div>
15
+ <div class="date">
16
+ <%= I18n.localize document.updated_at, :format => :long %>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <div class="right">
21
+ <div id="like_count">
22
+ <%= document.like_count %> <span class="details">likes</span>
23
+ </div>
24
+ </div>
25
+ <br class="clearfloat" />
26
+ <div id="actions">
27
+ <%= link_to image_tag("btn/download.png") + t('document.actions.download'), download_document_path(document), :class => :action %>
28
+ <%= link_to image_tag("btn/edit.png") + t('document.actions.edit'), "javascript:toggleEdit();", :class => :action %>
29
+ <% if document.post_activity.delete_object_by?(current_subject) %>
30
+ <%= link_to image_tag("btn/error.png") + t('document.actions.delete'), document.post_activity.direct_object , :confirm => t('confirm_delete',
31
+ :scope => document.post_activity.direct_object.class.to_s.underscore), :method => :delete %>
32
+ <% end %>
33
+ </div>
34
+ </div>
@@ -0,0 +1,49 @@
1
+ <% content_for :title do %>
2
+ <%= profile_subject.name + ": " + t('repository.title') %>
3
+ <% end %>
4
+
5
+ <% content_for :sidebar do %>
6
+ <%= render :partial => 'home/sidebar' %>
7
+ <% end %>
8
+
9
+ <%if profile_subject_is_current?%>
10
+ <%= location(
11
+ link_to(t('repository.title'), polymorphic_path(controller.controller_name),:remote => true)
12
+ ) %>
13
+ <%else%>
14
+ <%= location(
15
+ link_to(profile_subject.name, polymorphic_path(profile_subject),:remote => true),
16
+ link_to(t('repository.title'), polymorphic_path([profile_subject, controller.controller_name]),:remote => true)
17
+ ) %>
18
+ <%end%>
19
+
20
+ <% toolbar :profile => profile_subject %>
21
+ <br class="clearfloat" />
22
+ <div class="space_center"></div>
23
+ <div id="repository_filter">
24
+ <form action="<%= search_path%>" method="get" id="repository_filter">
25
+ <%= text_field_tag :filter_query, nil,:autocomplete => :off, :id => :repository_filter_input %>
26
+ </form>
27
+ <div id="order_by"><%= t('repository.order.by') %>: <%= t('repository.order.last_modified') %> · <%= t('repository.order.most_popular') %> </div>
28
+ </div>
29
+ <div class="space_center"></div>
30
+
31
+ <% @activities.each do |a| %>
32
+ <% document = a.activity_objects.first.document %>
33
+ <div class="attachment_tile">
34
+ <div class="attachment_tile_thumb">
35
+ <%= link_to thumb_for(document,48),
36
+ {:controller => "documents", :action => "show", :id => document},
37
+ :type => document.type,
38
+ :title => document.file_file_name,
39
+ :path => document_path(document) %>
40
+ </div>
41
+ <div class="attachment_tile_text">
42
+ <%= link_to truncate_name(document.file_file_name,:length => 15),
43
+ {:controller => "documents", :action => "show", :id => document},
44
+ :alt => document.file_file_name,
45
+ :type => document.type,
46
+ :path => document_path(document) %>
47
+ </div>
48
+ </div>
49
+ <% end %>
@@ -0,0 +1,36 @@
1
+ <% profile_subject ||= document.post_activity.receiver_subject %>
2
+
3
+ <% content_for :title do %>
4
+ <%= profile_subject.name + ": " + t('repository.title') %>
5
+ <% end %>
6
+
7
+ <% content_for :sidebar do %>
8
+ <%= render :partial => 'home/sidebar' %>
9
+ <% end %>
10
+
11
+ <%if profile_subject_is_current?%>
12
+ <%= location(
13
+ link_to(t('repository.title'), polymorphic_path(controller.controller_name),:remote => true)
14
+ ) %>
15
+ <%else%>
16
+ <%= location(
17
+ link_to(profile_subject.name, polymorphic_path(profile_subject),:remote => true),
18
+ link_to(t('repository.title'), polymorphic_path([profile_subject, controller.controller_name]),:remote => true)
19
+ ) %>
20
+ <%end%>
21
+
22
+ <% toolbar :profile => profile_subject %>
23
+
24
+ <br class="clearfloat" />
25
+ <div class="space_center"></div>
26
+ <h2><%= document.title.nil? ? document.file_file_name : document.title %></h2>
27
+ <div class="space_center"></div>
28
+
29
+ <%= show_view_for document %>
30
+
31
+ <%= render :partial => "document_info", :locals => {:document => document} %>
32
+
33
+ <div id="document_comments">
34
+ <%= render :partial => 'activities/comments', :locals => { :activity => document.post_activity } %>
35
+ <%= render :partial => 'comments/new', :locals => { :activity => document.post_activity } %>
36
+ </div>
@@ -1,18 +1,14 @@
1
- <% content_for :headers do %>
2
- <%= stylesheet_link_tag "documents" %>
3
- <% end %>
4
-
5
1
  <%= div_for document, :class => 'content_size' do %>
6
2
 
7
3
  <div class="attachment_thumb">
8
4
  <%= link_to thumb_for(document, 16),
9
- {:controller => "documents", :action => "download", :id => document},
5
+ document,
10
6
  :class => "" %>
11
7
  </div>
12
8
 
13
9
  <div class="attachment_text">
14
10
  <%= t('document.msg') %><%= link_to "\""+document.file_file_name+"\"",
15
- {:controller => "documents", :action => "download", :id => document},
11
+ document,
16
12
  :class => "attachment_text_link" %>
17
13
  </div>
18
14
 
@@ -0,0 +1,7 @@
1
+ <%= div_for document, :class => 'content_size' do %>
2
+
3
+ <div class="document_show">
4
+ <%= thumb_for(document, 48) %>
5
+ </div>
6
+
7
+ <% end %>
@@ -1 +1 @@
1
- <%=render(:partial => 'common-documents/index') %>
1
+ <%=render(:partial => 'common_documents/index') %>
@@ -1,2 +1,2 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => @document } %>
1
+ <%= render :partial => 'common_documents/show',
2
+ :locals => { :document => @document } %>
@@ -2,24 +2,25 @@
2
2
 
3
3
  <div class="attachment_thumb picture_link">
4
4
  <%= link_to thumb_for(picture, 16),
5
- {:controller => "documents", :action => "download", :id => picture},
6
- :type => picture.type,
7
- :title => picture.file_file_name,
8
- :path => document_path(picture) %>
5
+ picture_path(picture),
6
+ :type => picture.type,
7
+ :title => picture.file_file_name,
8
+ :path => document_path(picture) %>
9
9
  </div>
10
10
 
11
11
  <div class="attachment_text picture_summary_class picture_link">
12
- <%= t('picture.msg') %><%= link_to "\""+picture.file_file_name+"\"",
13
- {:controller => "documents", :action => "download", :id => picture},
14
- :alt => picture.file_file_name,
15
- :type => picture.type,
16
- :path => document_path(picture),
17
- :class => "attachment_text_link" %>
12
+ <%= t('picture.msg') %>
13
+ <%= link_to "\""+picture.file_file_name+"\"",
14
+ picture_path(picture),
15
+ :alt => picture.file_file_name,
16
+ :type => picture.type,
17
+ :path => document_path(picture),
18
+ :class => "attachment_text_link" %>
18
19
  </div>
19
20
 
20
21
  <div class="picture_link picture_thumbnail_show">
21
22
  <%= link_to thumb_for(picture, 130),
22
- picture,
23
+ download_document_path(picture),
23
24
  :type => picture.type,
24
25
  :title => picture.file_file_name,
25
26
  :path => document_path(picture) %>
@@ -38,4 +39,4 @@
38
39
  imageBtnNext: 'assets/lightbox-btn-next.gif',
39
40
  imageBlank: 'assets/lightbox-blank.gif'});
40
41
  })
41
- <% end %>
42
+ <% end %>
@@ -0,0 +1,26 @@
1
+ <%= div_for picture, :class => 'content_size' do %>
2
+ <div class="picture_show">
3
+ <%= link_to image_tag_for(picture),
4
+ download_document_path(picture),
5
+ :id => dom_id(picture) + "_a",
6
+ :type => picture.type,
7
+ :title => picture.file_file_name,
8
+ :path => document_path(picture) %>
9
+ </div>
10
+ <% end %>
11
+
12
+
13
+ <%= javascript_tag do %>
14
+ $(document).ready(function() {
15
+ $("#<%= dom_id picture %> #<%= dom_id picture %>_img").aeImageResize({ height: 500, width: 500 });
16
+ $("#<%= dom_id picture %> #<%= dom_id picture %>_a").lightBox({
17
+ maxHeight: 920,
18
+ maxWidth: 920,
19
+ imageLoading: '../assets/lightbox-ico-loading.gif',
20
+ imageBtnClose: '../assets/lightbox-btn-close.gif',
21
+ imageBtnPrev: '../assets/lightbox-btn-prev.gif',
22
+ imageBtnNext: '../assets/lightbox-btn-next.gif',
23
+ imageBlank: '../assets/lightbox-blank.gif'});
24
+
25
+ })
26
+ <% end %>
@@ -1 +1 @@
1
- <%=render(:partial => 'common-documents/index') %>
1
+ <%=render(:partial => 'common_documents/index') %>
@@ -1,2 +1,2 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => @picture } %>
1
+ <%= render :partial => 'common_documents/show',
2
+ :locals => { :document => @picture } %>
@@ -3,8 +3,8 @@
3
3
  $("#jpId<%=video.id%>").jPlayer( {
4
4
  ready: function () {
5
5
  $(this).jPlayer("setMedia", {
6
- webmv: "<%= video_path(video)+"?style=webm" %>", // Defines the webm url
7
- flv: "<%= video_path(video)+"?style=flv" %>"
6
+ webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
7
+ flv: "<%= video_url(video, :format => 'flv') %>"
8
8
  });
9
9
  },
10
10
  solution:"flash, html",
@@ -1,14 +1,15 @@
1
1
  <div class="attachment_thumb">
2
2
  <%= link_to thumb_for(video, 16),
3
- {:controller => "documents", :action => "download", :id => video},
3
+ video_path(video),
4
+ :id => video,
4
5
  :class => "" %>
5
6
  </div>
6
7
  <div class="attachment_text">
7
8
  <%= t('video.msg') %><%= link_to "\""+video.file_file_name+"\"",
8
- {:controller => "documents", :action => "download", :id => video},
9
+ video,
9
10
  :class => "attachment_text_link" %>
10
11
  <div id="video_thumbnail_<%= video.id%>" class="video_thumbnail_class">
11
- <%= image_tag(video_path(video)+"?style=thumb", :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
12
+ <%= image_tag(video_path(video, :format => :png, :style => 'thumb0'), :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
12
13
  </div>
13
14
  <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
14
15
  <div class="jp-type-single">
@@ -0,0 +1,64 @@
1
+ <% content_for :javascript do %>
2
+
3
+ $("#jpId<%=video.id%>").jPlayer( {
4
+ ready: function () {
5
+ $(this).jPlayer("setMedia", {
6
+ webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
7
+ flv: "<%= video_url(video, :format => 'flv') %>"
8
+ });
9
+ },
10
+ solution:"flash, html",
11
+ preload: "none",
12
+ supplied: "webmv, flv",
13
+ swfPath: "assets",
14
+ cssSelectorAncestor: "#jp_interface_<%=video.id%>"
15
+ });
16
+
17
+ <% end %>
18
+
19
+ <%= div_for video, :class => 'content_size' do %>
20
+ <div class="video_show">
21
+ <% if video.file_processing %>
22
+ <div class="processing_text">
23
+ <%= t('video.processing')%>
24
+ </div>
25
+ <% else %>
26
+ <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
27
+ <div class="jp-type-single">
28
+ <div id="jpId<%= video.id%>" class="jp-jplayer"></div>
29
+ <div id="jp_interface_<%= video.id%>" class="jp-interface">
30
+ <div class="jp-video-play"></div>
31
+ <ul class="jp-controls">
32
+ <li>
33
+ <a href="#" class="jp-play" tabindex="1">play</a>
34
+ </li>
35
+ <li>
36
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
37
+ </li>
38
+ <li>
39
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
40
+ </li>
41
+ <li>
42
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
43
+ </li>
44
+ <li>
45
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
46
+ </li>
47
+ </ul>
48
+ <div class="jp-progress">
49
+ <div class="jp-seek-bar">
50
+ <div class="jp-play-bar"></div>
51
+ </div>
52
+ </div>
53
+ <div class="jp-volume-bar">
54
+ <div class="jp-volume-bar-value"></div>
55
+ </div>
56
+ <div class="jp-current-time"></div>
57
+ <div class="jp-duration"></div>
58
+ </div>
59
+ <div id="jp_playlist_<%= video.id%>" class="jp-playlist"></div>
60
+ </div>
61
+ </div>
62
+ <% end %>
63
+ </div>
64
+ <% end %>
@@ -1 +1 @@
1
- <%=render(:partial => 'common-documents/index') %>
1
+ <%=render(:partial => 'common_documents/index') %>
@@ -1,2 +1,2 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => @video } %>
1
+ <%= render :partial => 'common_documents/show',
2
+ :locals => { :document => @video } %>
@@ -7,10 +7,22 @@ en:
7
7
  not_mine: "Audios"
8
8
  processing: "Processing audio clip"
9
9
  document:
10
- all: "All documents"
10
+ actions:
11
+ delete: "Delete"
12
+ download: "Download"
13
+ edit: "Edit"
14
+ all: "All documents"
11
15
  confirm_delete: "Delete document?"
12
16
  form:
13
17
  title: "File"
18
+ info:
19
+ date:
20
+ created_at: "Created at"
21
+ updated_at: "Updated at"
22
+ description:
23
+ title: "Description"
24
+ title:
25
+ title: "Title"
14
26
  mine: "My documents"
15
27
  msg: "Uploaded a document:"
16
28
  not_mine: "Documents"
@@ -22,6 +34,12 @@ en:
22
34
  mine: "My pictures"
23
35
  msg: "Uploaded a picture:"
24
36
  not_mine: "Pictures"
37
+ repository:
38
+ title: "Repository"
39
+ order:
40
+ by: "Order by"
41
+ last_modified: "Last modified"
42
+ most_popular: "Most popular"
25
43
  resource:
26
44
  all: "All Resources"
27
45
  confirm_delete: "Delete resource?"
@@ -7,10 +7,22 @@ es:
7
7
  not_mine: "Audios"
8
8
  processing: "Procesando fichero de audio..."
9
9
  document:
10
+ actions:
11
+ delete: "Borrar"
12
+ download: "Descargar"
13
+ edit: "Editar"
10
14
  all: "Todos los documentos"
11
15
  confirm_delete: "¿Borrar documento?"
12
16
  form:
13
17
  title: "Fichero"
18
+ info:
19
+ date:
20
+ created_at: "Creado"
21
+ updated_at: "Última modificación"
22
+ description:
23
+ title: "Descripción"
24
+ title:
25
+ title: "Título"
14
26
  mine: "Mis documentos"
15
27
  msg: "Subió un documento:"
16
28
  not_mine: "Documentos"
@@ -22,6 +34,12 @@ es:
22
34
  mine: "Mis imágenes"
23
35
  msg: "Subió una imagen:"
24
36
  not_mine: "Imágenes"
37
+ repository:
38
+ title: "Repositorio"
39
+ order:
40
+ by: "Ordenar por"
41
+ last_modified: "Última modificación"
42
+ most_popular: "Popularidad"
25
43
  resource:
26
44
  all: "Todos los recursos"
27
45
  confirm_delete: "¿Borrar recursos?"
@@ -29,9 +29,11 @@ module SocialStream
29
29
  Mime::Type.register "audio/x-wav", :wav, [ "audio/wav" ]
30
30
  Mime::Type.register "audio/mpeg", :mpeg
31
31
  Mime::Type.register "audio/x-vorbis+ogg", :ogg, [ "application/ogg" ]
32
+ Mime::Type.register "audio/webm", :webma
32
33
 
33
34
  # Video
34
35
  Mime::Type.register "video/x-flv", :flv
36
+ Mime::Type.register "video/webm", :webm
35
37
  end
36
38
 
37
39
  initializer "social_stream-documents.toolbar_config" do
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.3.3".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.9.22')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.9.23')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  s.add_runtime_dependency('paperclip','2.3.11')
18
18
  s.add_runtime_dependency('delayed_paperclip','>= 0.7.2')
@@ -21,9 +21,15 @@ describe DocumentsController do
21
21
  response.body.should =~ /small.pdf/
22
22
  end
23
23
 
24
- it "should render receiver's show" do
24
+ it "should render receiver's html show" do
25
25
  get :show, :id => @public_document.to_param
26
26
  response.should be_success
27
+ response.headers["Content-Type"].should include('text/html')
28
+ end
29
+
30
+ it "should render receiver's format pdf download" do
31
+ get :download, :id => @public_document.to_param
32
+ response.should be_success
27
33
  response.headers["Content-Type"].should include('application/pdf')
28
34
  end
29
35
  end
@@ -40,9 +46,15 @@ describe DocumentsController do
40
46
  response.body.should =~ /small.pdf/
41
47
  end
42
48
 
43
- it "should render show" do
49
+ it "should render html show" do
44
50
  get :show, :id => @public_document.to_param
45
51
  response.should be_success
52
+ response.headers["Content-Type"].should include('text/html')
53
+ end
54
+
55
+ it "should render format pdf download" do
56
+ get :download, :id => @public_document.to_param, :format => :pdf
57
+ response.should be_success
46
58
  response.headers["Content-Type"].should include('application/pdf')
47
59
  end
48
60
  end
@@ -77,4 +89,30 @@ describe DocumentsController do
77
89
  end
78
90
  end
79
91
  end
92
+
93
+ context "with public picture" do
94
+ before do
95
+ @public_picture = Factory(:public_picture)
96
+ end
97
+
98
+ describe "when not authenticated" do
99
+ it "should render receiver's format png download" do
100
+ get :download, :id => @public_picture.to_param
101
+ response.should be_success
102
+ response.headers["Content-Type"].should include('image/png')
103
+ end
104
+ end
105
+
106
+ describe "when authenticated" do
107
+ before do
108
+ sign_in Factory(:user)
109
+ end
110
+
111
+ it "should render format png download" do
112
+ get :download, :id => @public_picture.to_param
113
+ response.should be_success
114
+ response.headers["Content-Type"].should include('image/png')
115
+ end
116
+ end
117
+ end
80
118
  end
@@ -21,10 +21,10 @@ describe PicturesController do
21
21
  response.body.should =~ /rails.png/
22
22
  end
23
23
 
24
- it "should render receiver's show" do
24
+ it "should render receiver's html show" do
25
25
  get :show, :id => @public_picture.to_param
26
26
  response.should be_success
27
- response.headers["Content-Type"].should include('image/png')
27
+ response.headers["Content-Type"].should include('text/html')
28
28
  end
29
29
  end
30
30
 
@@ -40,10 +40,10 @@ describe PicturesController do
40
40
  response.body.should =~ /rails.png/
41
41
  end
42
42
 
43
- it "should render show" do
43
+ it "should render html show" do
44
44
  get :show, :id => @public_picture.to_param
45
45
  response.should be_success
46
- response.headers["Content-Type"].should include('image/png')
46
+ response.headers["Content-Type"].should include('text/html')
47
47
  end
48
48
  end
49
49
  end #end of the context
@@ -11,7 +11,6 @@ Dummy::Application.configure do
11
11
 
12
12
  # Show full error reports and disable caching
13
13
  config.consider_all_requests_local = true
14
- config.action_view.debug_rjs = true
15
14
  config.action_controller.perform_caching = false
16
15
 
17
16
  # Don't care if the mailer can't send
@@ -32,4 +32,6 @@ Dummy::Application.configure do
32
32
 
33
33
  # Print deprecation notices to the stderr
34
34
  config.active_support.deprecation = :stderr
35
+
36
+ config.assets.enabled = true
35
37
  end