social_stream-linkser 1.1.2 → 2.0.0.beta1

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/social_stream/link.js +30 -0
  3. data/app/assets/javascripts/social_stream/linkser.timeline.js +6 -0
  4. data/app/assets/javascripts/social_stream/linkser.wall.js +91 -0
  5. data/app/assets/javascripts/social_stream-linkser.js +1 -1
  6. data/app/assets/stylesheets/social_stream/linkser/explore/search/layout/_search-result.css.sass +13 -0
  7. data/app/assets/stylesheets/social_stream/linkser/explore/timeline/layout/_timeline-result.css.sass +15 -0
  8. data/app/assets/stylesheets/social_stream/linkser/repository/_repository.css.sass +15 -0
  9. data/app/assets/stylesheets/social_stream/linkser/repository/layout/_repository.css.sass +27 -0
  10. data/app/assets/stylesheets/social_stream/linkser/timeline/_timeline-link.css.sass +26 -0
  11. data/app/assets/stylesheets/social_stream/linkser/timeline/layout/_timeline-link.css.sass +44 -0
  12. data/app/assets/stylesheets/social_stream-linkser.css.sass +20 -0
  13. data/app/controllers/links_controller.rb +1 -1
  14. data/app/models/link.rb +14 -7
  15. data/app/views/links/_link.html.erb +14 -35
  16. data/app/views/links/_link_preview.html.erb +1 -1
  17. data/app/views/links/_new_activity.html.erb +6 -0
  18. data/app/views/links/_quick_search_result.html.erb +7 -0
  19. data/app/views/links/_search_result.html.erb +1 -0
  20. data/app/views/links/_timeline.html.erb +26 -0
  21. data/app/views/links/create.js.erb +3 -10
  22. data/app/views/links/show.html.erb +5 -3
  23. data/config/locales/en.yml +3 -1
  24. data/config/locales/es.yml +4 -2
  25. data/lib/generators/social_stream/linkser/install_generator.rb +2 -3
  26. data/lib/social_stream/linkser/version.rb +1 -1
  27. data/lib/social_stream-linkser.rb +3 -4
  28. data/lib/tasks/db/populate.rake +20 -0
  29. data/social_stream-linkser.gemspec +1 -1
  30. metadata +21 -89
  31. data/app/assets/javascripts/linkser.js.erb +0 -82
  32. data/app/assets/stylesheets/linkser.css.scss +0 -69
  33. data/app/assets/stylesheets/social_stream-linkser.css +0 -3
  34. data/config/locales/de.yml +0 -14
  35. data/config/locales/fr.yml +0 -14
  36. data/config/locales/hu.yml +0 -14
  37. data/config/locales/nl.yml +0 -14
  38. data/lib/tasks/db/populate_links.rake +0 -16
  39. data/spec/dummy/Rakefile +0 -7
  40. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  41. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  42. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  43. data/spec/dummy/config/application.rb +0 -45
  44. data/spec/dummy/config/boot.rb +0 -10
  45. data/spec/dummy/config/database.yml +0 -22
  46. data/spec/dummy/config/environment.rb +0 -5
  47. data/spec/dummy/config/environments/development.rb +0 -25
  48. data/spec/dummy/config/environments/production.rb +0 -49
  49. data/spec/dummy/config/environments/test.rb +0 -37
  50. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  51. data/spec/dummy/config/initializers/devise.rb +0 -172
  52. data/spec/dummy/config/initializers/inflections.rb +0 -10
  53. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  54. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  55. data/spec/dummy/config/initializers/session_store.rb +0 -8
  56. data/spec/dummy/config/locales/en.yml +0 -5
  57. data/spec/dummy/config/navigation.rb +0 -0
  58. data/spec/dummy/config/relations.yml +0 -39
  59. data/spec/dummy/config/routes.rb +0 -60
  60. data/spec/dummy/config.ru +0 -4
  61. data/spec/dummy/db/.gitkeep +0 -0
  62. data/spec/dummy/documents/documents/000/000/001/original.pdf +0 -157
  63. data/spec/dummy/documents/documents/000/000/002/original.pdf +0 -157
  64. data/spec/dummy/documents/documents/000/000/003/original.pdf +0 -157
  65. data/spec/dummy/documents/documents/000/000/004/original.pdf +0 -157
  66. data/spec/dummy/documents/documents/000/000/005/original.pdf +0 -157
  67. data/spec/dummy/documents/documents/000/000/006/original.pdf +0 -157
  68. data/spec/dummy/documents/documents/000/000/007/original.pdf +0 -157
  69. data/spec/dummy/documents/documents/000/000/008/original.pdf +0 -157
  70. data/spec/dummy/documents/documents/000/000/009/original.pdf +0 -157
  71. data/spec/dummy/documents/documents/000/000/010/original.pdf +0 -157
  72. data/spec/dummy/documents/pictures/000/000/011/original.png +0 -0
  73. data/spec/dummy/documents/pictures/000/000/011/thumb.png +0 -0
  74. data/spec/dummy/documents/pictures/000/000/011/thumb0.png +0 -0
  75. data/spec/dummy/documents/pictures/000/000/012/original.png +0 -0
  76. data/spec/dummy/documents/pictures/000/000/012/thumb.png +0 -0
  77. data/spec/dummy/documents/pictures/000/000/012/thumb0.png +0 -0
  78. data/spec/dummy/documents/pictures/000/000/013/original.png +0 -0
  79. data/spec/dummy/documents/pictures/000/000/013/thumb.png +0 -0
  80. data/spec/dummy/documents/pictures/000/000/013/thumb0.png +0 -0
  81. data/spec/dummy/documents/pictures/000/000/014/original.png +0 -0
  82. data/spec/dummy/documents/pictures/000/000/014/thumb.png +0 -0
  83. data/spec/dummy/documents/pictures/000/000/014/thumb0.png +0 -0
  84. data/spec/dummy/documents/pictures/000/000/015/original.png +0 -0
  85. data/spec/dummy/documents/pictures/000/000/015/thumb.png +0 -0
  86. data/spec/dummy/documents/pictures/000/000/015/thumb0.png +0 -0
  87. data/spec/dummy/documents/pictures/000/000/016/original.png +0 -0
  88. data/spec/dummy/documents/pictures/000/000/016/thumb.png +0 -0
  89. data/spec/dummy/documents/pictures/000/000/016/thumb0.png +0 -0
  90. data/spec/dummy/documents/pictures/000/000/017/original.png +0 -0
  91. data/spec/dummy/documents/pictures/000/000/017/thumb.png +0 -0
  92. data/spec/dummy/documents/pictures/000/000/017/thumb0.png +0 -0
  93. data/spec/dummy/documents/pictures/000/000/018/original.png +0 -0
  94. data/spec/dummy/documents/pictures/000/000/018/thumb.png +0 -0
  95. data/spec/dummy/documents/pictures/000/000/018/thumb0.png +0 -0
  96. data/spec/dummy/documents/pictures/000/000/019/original.png +0 -0
  97. data/spec/dummy/documents/pictures/000/000/019/thumb.png +0 -0
  98. data/spec/dummy/documents/pictures/000/000/019/thumb0.png +0 -0
  99. data/spec/dummy/documents/pictures/000/000/020/original.png +0 -0
  100. data/spec/dummy/documents/pictures/000/000/020/thumb.png +0 -0
  101. data/spec/dummy/documents/pictures/000/000/020/thumb0.png +0 -0
  102. data/spec/dummy/public/404.html +0 -26
  103. data/spec/dummy/public/422.html +0 -26
  104. data/spec/dummy/public/500.html +0 -26
  105. data/spec/dummy/public/favicon.ico +0 -0
  106. data/spec/dummy/public/javascripts/application.js +0 -2
  107. data/spec/dummy/public/javascripts/controls.js +0 -965
  108. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  109. data/spec/dummy/public/javascripts/effects.js +0 -1123
  110. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  111. data/spec/dummy/public/javascripts/rails.js +0 -191
  112. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  113. data/spec/dummy/script/rails +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b091772880bd736561f95b768fb6cb9916fd0aaa
4
- data.tar.gz: 5ac6d346988eb31990b909717192457b1f6f705b
3
+ metadata.gz: 6e81202e3b1f8e17ad5a375ab065279fd6de2cb7
4
+ data.tar.gz: ee84dc147dda1da36e2a48d48dedc116ee7f56f4
5
5
  SHA512:
6
- metadata.gz: d9a147fc7182da3417cfcfa7ac92e59ad87937b23c93929d5c7903f52fb3c2e7d70e3193fcd4dd701b49daef4b10eea2fc326ec5ae4253a3a1e6482f3c8d4634
7
- data.tar.gz: 62ea29ca6943211c6cbb990868315266636badb56f400a336c827ec042cd233e4916cd695fffbee31d6d00cfdac4542a300d89e317ad2a329430ef336bccdb76
6
+ metadata.gz: 7d1b2cac8fd26b282d19736b56ee0fc8171251507fd900623ae81b059fd14a053634e7e230f4766d230455b7206a0bce8b0cef41ff87c5f680bcc352c90445a2
7
+ data.tar.gz: 3df3e6ae878a3aa5572a31d584bcea8062c9622776701c9fd0b19a02952dd32b4f645e8b4465d70b16494c35ee4b91f63dcb5eb9dba27cc64973f827e17f632e
@@ -0,0 +1,30 @@
1
+ //= require social_stream/callback
2
+
3
+ SocialStream.Link = (function(SS, $) {
4
+ var callback = new SS.Callback();
5
+
6
+ var bindOpenCallback = function() {
7
+ $('.link .play_over').click(openCallback);
8
+ };
9
+
10
+ var openCallback = function(){
11
+ var url = $(this).attr('data-url'),
12
+ h = $(this).attr('data-height'),
13
+ w = $(this).attr('data-width'),
14
+ height = '353';
15
+
16
+ if(w>0 && h>0) {
17
+ height=470*h/w;
18
+ }
19
+
20
+ $(this).closest('.link').html($('<iframe>').attr('src',url).attr('width','470').attr('height',height));
21
+ };
22
+
23
+ callback.register('index', bindOpenCallback);
24
+
25
+ callback.register('show', bindOpenCallback);
26
+
27
+ return callback.extend({
28
+ });
29
+
30
+ })(SocialStream, jQuery);
@@ -0,0 +1,6 @@
1
+ //= require social_stream/timeline
2
+ //= require social_stream/link
3
+
4
+ SocialStream.Timeline.callbackRegister('show', SocialStream.Link.index);
5
+
6
+ SocialStream.Timeline.callbackRegister('update', SocialStream.Link.index);
@@ -0,0 +1,91 @@
1
+ //= require social_stream/wall
2
+
3
+ SocialStream.Linkser.Wall = (function(SS, $) {
4
+ var regexp = /^(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&;:\/~+#-]*[\w@?^=%&;\/~+#-])?$/
5
+
6
+ var urlDetect = function() {
7
+ this.currentValue = $("#post_text").val();
8
+
9
+ if (this.lastValue === null) {
10
+ this.lastValue = "";
11
+ }
12
+
13
+ if (regexp.test($("#post_text").val())) {
14
+ $("#link_url").val($("#post_text").val());
15
+ $("#link_loaded").val(false);
16
+ SS.Wall.changeAction($('#link_preview_loading').attr('data-link_path'));
17
+ SS.Wall.changeRelationSelect('link');
18
+
19
+ if(this.currentValue != this.lastValue) {
20
+ showLoading();
21
+
22
+ this.lastValue = this.currentValue;
23
+ var url = this.currentValue;
24
+ var urlDetect = this;
25
+
26
+ $.ajax({
27
+ type : "GET",
28
+ url : "/linkser_parse?url=" + url,
29
+ dataType: 'html',
30
+ success : function(html) {
31
+ if($("#post_text").val() == url) {//Only show if input value is still the same
32
+ $("#link_preview").html(html);
33
+ $("#link_loaded").val(true);
34
+ }
35
+ },
36
+ error : function(xhr, ajaxOptions, thrownError) {
37
+ if($("#post_text").val() == url) {//Only show if input value is still the same
38
+ $("#link_preview").html($('<div>').addClass('loading').html(I18n.t('link.errors.loading') + " " + url));
39
+ }
40
+ }
41
+ });
42
+ }
43
+
44
+ $("#link_preview").show();
45
+ } else {
46
+ resetWallInput({ postText: false });
47
+ }
48
+ }
49
+
50
+ var resetWallInput = function(options) {
51
+ $("#new_post").attr("action", "/posts");
52
+ $("#link_preview").hide().html('');
53
+ $("#link_url").val("");
54
+ SS.Wall.changeAction();
55
+ SS.Wall.changeRelationSelect('post');
56
+
57
+ if (options.postText) {
58
+ $('#post_text').val('');
59
+ }
60
+ };
61
+
62
+ var showLoading = function() {
63
+ $('#link_preview').html($('#link_preview_loading').html());
64
+ }
65
+
66
+ var init = function(){
67
+ $('#link_preview_loading').hide();
68
+
69
+ if ($("#new_post").length) {
70
+ $("#post_text").change(urlDetect).keyup(urlDetect);
71
+
72
+ $("#post_text").after(
73
+ $('<div>', {
74
+ id: 'link_preview'
75
+ }).css('display', 'none')
76
+ );
77
+ }
78
+ }
79
+
80
+
81
+ var create = function() {
82
+ resetWallInput({ postText: true });
83
+ };
84
+
85
+ SocialStream.Wall.callbackRegister('show', init);
86
+
87
+ return {
88
+ create: create
89
+ }
90
+
91
+ })(SocialStream, jQuery);
@@ -1,6 +1,6 @@
1
1
  //= require social_stream-base
2
2
  //
3
3
  //= require_self
4
- //= require_tree .
4
+ //= require_tree ./social_stream
5
5
 
6
6
  SocialStream.Linkser = SocialStream.Linkser || {};
@@ -0,0 +1,13 @@
1
+ #search-result
2
+ .link
3
+ display: inline-block
4
+ @include makeColumn(3, 0)
5
+ .thumbnail
6
+ @include makeColumnoMargin(1, 0)
7
+ display: inline
8
+ .info
9
+ @include makeColumnoMargin(2, 0)
10
+ display: inline-block
11
+ title
12
+ margin-bottom: 2px
13
+ .description
@@ -0,0 +1,15 @@
1
+ .objects
2
+ .link
3
+ display: inline-block
4
+ margin-left: 0px
5
+ .thumbnail
6
+ @include makeColumnoMargin(1, 0)
7
+ display: inline
8
+ .text
9
+ width: 50%
10
+ display: inline-block
11
+ h6
12
+ margin: 1px 0 3px
13
+ .url
14
+ margin-bottom: 6px
15
+ .description
@@ -0,0 +1,15 @@
1
+ /////////////////////////////////////// EXPLORE SEARCH
2
+ /////////////
3
+
4
+ #repository
5
+
6
+ .link
7
+ .brifing
8
+ .h5
9
+ a
10
+ font-size: 12px
11
+ .author
12
+ @include ellipsis
13
+ font-size: 12px
14
+ color: #888
15
+
@@ -0,0 +1,27 @@
1
+ /////////////////////////////////////// EXPLORE SEARCH
2
+ /////////////
3
+
4
+ #repository
5
+
6
+ .link
7
+ width: 240px
8
+ float: left
9
+ margin-left: 19px
10
+ min-height: 81px
11
+ margin-bottom: 14px
12
+ .thumb
13
+ float: left
14
+ margin-left: 0px
15
+ width: 60px
16
+ display: inline
17
+ margin-top: 14px
18
+ .brifing
19
+ float: left
20
+ margin-left: 0px
21
+ width: 175px
22
+ display: inline-block
23
+ h5
24
+ margin-bottom: 0px
25
+ @include ellipsis
26
+ a
27
+ @include ellipsis
@@ -0,0 +1,26 @@
1
+ #link_preview
2
+ background-color: #f4f4f4
3
+ @include border-bottom-radius(5px)
4
+ .info
5
+ .title,
6
+ .description
7
+
8
+ input,
9
+ textarea
10
+ @include border-radius(5px)
11
+
12
+ .link_error
13
+ color: #9d261d
14
+
15
+ #link_description
16
+ @include border-radius(5px)
17
+ resize: none
18
+
19
+ .link_height
20
+ background-color: $black
21
+
22
+ .activity_objects
23
+ .attachment_thumb
24
+ background: black
25
+ .attachment_text_link
26
+ font-size: 14px
@@ -0,0 +1,44 @@
1
+ #link_preview
2
+ padding: 9px
3
+ img
4
+ display: inline
5
+ margin-right: 2px
6
+ .info
7
+ .title,
8
+ .description
9
+ input,
10
+ textarea
11
+ padding: 5px
12
+ .description
13
+ p
14
+ a
15
+ display: block
16
+
17
+ .link_error
18
+ display: inline-block
19
+
20
+
21
+
22
+ .activity_objects
23
+ margin-left: 56px
24
+ .attachment_thumb
25
+ @include makeColumnoMargin(1, 0)
26
+ .attachment_text_link
27
+ font-size: 14px
28
+ .post
29
+ p
30
+ margin: 0 0 4px
31
+
32
+ .link
33
+ display: inline
34
+ margin-left: 19px
35
+ .thumb
36
+ @include makeColumnoMargin(1, 0)
37
+ display: inline
38
+ .text
39
+ width: 97%
40
+ display: inline-block
41
+ .description
42
+ p
43
+ a
44
+ display: block
@@ -0,0 +1,20 @@
1
+ @import "social_stream/linkser/timeline/timeline-link"
2
+
3
+ @import "social_stream/linkser/timeline/layout/timeline-link"
4
+
5
+
6
+
7
+
8
+ @import "social_stream/linkser/explore/search/layout/search-result"
9
+
10
+
11
+
12
+
13
+ @import "social_stream/linkser/explore/timeline/layout/timeline-result"
14
+
15
+
16
+
17
+
18
+ @import "social_stream/linkser/repository/repository"
19
+
20
+ @import "social_stream/linkser/repository/layout/repository"
@@ -12,6 +12,6 @@ class LinksController < ApplicationController
12
12
  private
13
13
 
14
14
  def allowed_params
15
- [ :url, :image ]
15
+ [ :url, :image, :callback, :width, :height ]
16
16
  end
17
17
  end
data/app/models/link.rb CHANGED
@@ -31,15 +31,22 @@ class Link < ActiveRecord::Base
31
31
  end
32
32
 
33
33
  def check_loaded
34
- if !self.loaded.eql? "true" and self.title.nil? and self.description.nil? and self.image.nil?
35
- begin
36
- o = Linkser.parse self.url, {:max_images => 1}
37
- if o.is_a? Linkser::Objects::HTML
38
- self.fill o
39
- end
40
- rescue
34
+ return if loaded.present?
35
+ begin
36
+ o = Linkser.parse self.url, {:max_images => 1}
37
+
38
+ if o.is_a? Linkser::Objects::HTML
39
+ self.fill o
41
40
  end
41
+ rescue
42
42
  end
43
43
  end
44
44
 
45
+ def improved_callback_url
46
+ if callback_url =~ /youtube\.com\/v\/.+/
47
+ callback_url + '&autoplay=1'
48
+ else
49
+ callback_url
50
+ end
51
+ end
45
52
  end
@@ -1,37 +1,16 @@
1
- <%= div_for link, :class => 'content_size' do %>
2
- <% if link.image %>
3
- <div class="thumbnail">
4
- <% if link.callback_url %>
5
- <%= link_to image_tag(link.image),"javascript:void(0)" %>
6
- <%= link_to image_tag("btn/btn_play.png", :class => "play_button"),"javascript:void(0)" %>
7
- <%= javascript_tag do %>
8
- $("#link_<%= link.id.to_s %> img").each(function(){
9
- $(this).click(function(){
10
- SocialStream.Linkser.Wall.openCallback("link_<%= link.id.to_s %>", "<%= link.callback_url %>", "<%= link.width %>", "<%= link.height %>");
11
- });
12
- });
13
-
14
- <% end %>
15
- <% else %>
16
- <%= link_to image_tag(link.image),link.url, :target => "_blank" %>
17
- <% end %>
18
- </div>
19
- <% end %>
20
- <div class="info">
21
- <% if link.title %>
22
- <div class="title">
23
- <%= link.title %>
24
- </div>
25
- <% end %>
26
- <div class="url">
27
- <%= link_to link.url, link.url, :target => "_blank" %>
28
- </div>
29
- <% if link.description %>
30
- <div class="description">
31
- <%= auto_link(link.description) %>
32
- </div>
33
- <% end %>
1
+ <div class="link">
2
+ <div class="thumb">
3
+ <i class='icon_file_50-link'></i>
34
4
  </div>
35
- <% end %>
5
+ <div class="brifing">
6
+ <h5>
7
+ <%= link_to truncate(link.title), link.url %>
8
+ </h5>
9
+
10
+ <%= link_to truncate(link.url), link.url %>
36
11
 
37
- <br class="clearfloat">
12
+ <div class="author">
13
+ <%= raw t('link.by', author: link_to(link.author.name, link.author_subject)) %>
14
+ </div>
15
+ </div>
16
+ </div>
@@ -1,4 +1,4 @@
1
- <%= div_for link, :class => 'content_size' do %>
1
+ <%= div_for link do %>
2
2
  <% if link.image %>
3
3
  <div class="thumbnail">
4
4
  <%= image_tag(link.image)%>
@@ -0,0 +1,6 @@
1
+ <%= hidden_field_tag 'link[owner_id]', Actor.normalize_id(receiver) %>
2
+ <%= hidden_field_tag 'link[url]' %>
3
+ <%= hidden_field_tag 'link[loaded]', false %>
4
+ <div id="link_preview_loading" data-link_path="<%= links_path %>">
5
+ <%= render partial: 'layouts/loading' %>
6
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class="link">
2
+ <div class="brifing">
3
+ <h5>
4
+ <%= link_to truncate(link.title), link.url %>
5
+ </h5>
6
+ </div>
7
+ </div>
@@ -0,0 +1 @@
1
+ <%= render link %>
@@ -0,0 +1,26 @@
1
+ <%= div_for link do %>
2
+ <% if link.image %>
3
+ <div class="thumb">
4
+ <% if link.callback_url %>
5
+ <%= image_tag(link.image) %>
6
+ <div class="play_over" data-url="<%= link.improved_callback_url %>" data-width="<%= link.width %>" data-height="<%= link.height %>"></div>
7
+ <% else %>
8
+ <%= link_to image_tag(link.image),link.url, :target => "_blank" %>
9
+ <% end %>
10
+ </div>
11
+ <% end %>
12
+ <div class="text">
13
+ <% if link.title %>
14
+ <h6>
15
+ <%= link.title %>
16
+ </h6>
17
+ <% end %>
18
+ <div class="url">
19
+ <%= link_to link.url, link.url, :target => "_blank" %>
20
+ </div>
21
+
22
+ <%= render partial: 'objects/timeline_description',
23
+ object: link,
24
+ as: :obj %>
25
+ </div>
26
+ <% end %>
@@ -1,13 +1,6 @@
1
1
  //Display the new post
2
- $("#wall").prepend("<%= escape_javascript(render @link.post_activity) %>");
3
-
4
- SocialStream.Timeline.create("<%= escape_javascript dom_id(@link.post_activity) %>");
5
-
6
- $("#link_preview").hide();
7
- $("#link_preview").html("");
8
- $("#link_loaded").val(false);
9
- $("#link_preview").html("");
10
- $("#link_url").val("");
11
-
2
+ $(".timeline").prepend("<%= escape_javascript(render @link.post_activity) %>");
12
3
 
4
+ SocialStream.Timeline.update();
13
5
 
6
+ SocialStream.Linkser.Wall.create();
@@ -1,4 +1,6 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => @link } %>
1
+ <section id="link">
2
+ <%= render :partial => 'objects/show',
3
+ :locals => { :object => @link } %>
3
4
 
4
- <%= render @link.post_activity %>
5
+ <%= render @link.post_activity %>
6
+ </section>
@@ -2,6 +2,7 @@ en:
2
2
  linkser:
3
3
  title: "Linkser"
4
4
  link:
5
+ by: "by %{author}"
5
6
  confirm_delete: "Delete link?"
6
7
  errors:
7
8
  loading: "Error loading"
@@ -11,4 +12,5 @@ en:
11
12
  input: "Write the web address"
12
13
  name: "link"
13
14
  one: "a link"
14
- title: "Links"
15
+ other: "links"
16
+ title: "Links"
@@ -2,6 +2,7 @@ es:
2
2
  linkser:
3
3
  title: "Linkser"
4
4
  link:
5
+ by: "por %{author}"
5
6
  confirm_delete: "¿Borrar enlace?"
6
7
  errors:
7
8
  loading: "Error cargando"
@@ -10,5 +11,6 @@ es:
10
11
  title: "Enlace"
11
12
  input: "Escribe una dirección"
12
13
  name: "enlace"
13
- one: "una enlace"
14
- title: "Enlaces"
14
+ one: "un enlace"
15
+ other: "enlaces"
16
+ title: "Enlaces"
@@ -17,8 +17,7 @@ class SocialStream::Linkser::InstallGenerator < Rails::Generators::Base
17
17
  end
18
18
 
19
19
  def require_stylesheets
20
- inject_into_file 'app/assets/stylesheets/application.css',
21
- " *= require social_stream-linkser\n",
22
- :before => ' *= require_tree .'
20
+ append_file 'app/assets/stylesheets/social_stream.css.sass',
21
+ "@import social_stream-linkser\n"
23
22
  end
24
23
  end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Linkser
3
- VERSION = "1.1.2".freeze
3
+ VERSION = "2.0.0.beta1".freeze
4
4
  end
5
5
  end
@@ -1,15 +1,14 @@
1
1
  require 'social_stream-base'
2
+
2
3
  require 'linkser'
3
4
 
4
5
  module SocialStream
5
6
  module Linkser
6
- # Add :link to SocialStream.objects and SocialStream.activity_forms by default
7
+ # Add :link to SocialStream.objects and others by default
7
8
  # It can be configured by users at application's config/initializers/social_stream.rb
8
- #%w(objects activity_forms).each do |m|
9
- %w(objects).each do |m|
9
+ %w(objects activity_forms quick_search_models extended_search_models repository_models).each do |m|
10
10
  SocialStream.__send__(m).push(:link) unless SocialStream.__send__(m).include?(:link)
11
11
  end
12
-
13
12
  end
14
13
  end
15
14
 
@@ -0,0 +1,20 @@
1
+ namespace :db do
2
+ namespace :populate do
3
+
4
+ desc "Create populate data with links"
5
+ task :create => 'create:links'
6
+
7
+ namespace :create do
8
+ desc "Add links to populate data"
9
+ task :links => :read_environment do
10
+ SocialStream::Population::ActivityObject.new Link do |l|
11
+ l.loaded = true
12
+ l.title = Forgery::LoremIpsum.words(1+rand(4),:random => true)
13
+ l.description = Forgery::LoremIpsum.sentences(1+rand(4), :random => true)
14
+
15
+ l.url = "http://#{ Forgery::Internet.domain_name }"
16
+ end
17
+ end
18
+ end
19
+ end
20
+ 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', '~> 1.1.11')
15
+ s.add_runtime_dependency('social_stream-base', '~> 2.0.0.beta1')
16
16
  s.add_runtime_dependency('linkser', '~> 0.0.12')
17
17
  # Development Gem dependencies
18
18
  s.add_development_dependency('sqlite3-ruby')