social_stream-documents 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/audio.rb +10 -1
- data/app/models/document.rb +11 -0
- data/app/models/picture.rb +10 -1
- data/app/models/video.rb +9 -0
- data/app/views/audios/_audio_with_details.html.erb +3 -0
- data/app/views/documents/_document_with_details.html.erb +13 -0
- data/app/views/pictures/_picture_with_details.html.erb +2 -0
- data/app/views/videos/_video_with_details.html.erb +2 -0
- data/config/locales/en.yml +0 -7
- data/config/locales/es.yml +38 -0
- data/db/migrate/20111005112707_add_title_and_description_to_document.rb +11 -0
- data/lib/social_stream/documents/version.rb +1 -1
- data/social_stream-documents.gemspec +1 -1
- metadata +14 -8
data/app/models/audio.rb
CHANGED
@@ -5,7 +5,16 @@ class Audio < Document
|
|
5
5
|
:styles => {:webma => {:format => 'webm'}
|
6
6
|
},:processors => [:ffmpeg]
|
7
7
|
|
8
|
-
process_in_background :file
|
8
|
+
process_in_background :file
|
9
|
+
|
10
|
+
define_index do
|
11
|
+
indexes title
|
12
|
+
indexes file_file_name, :as => :file_name
|
13
|
+
indexes description
|
14
|
+
indexes activity_object.tags.name, :as => :tags
|
15
|
+
|
16
|
+
has created_at
|
17
|
+
end
|
9
18
|
|
10
19
|
# Thumbnail file
|
11
20
|
def thumb(size, helper)
|
data/app/models/document.rb
CHANGED
@@ -13,6 +13,17 @@ class Document < ActiveRecord::Base
|
|
13
13
|
|
14
14
|
validates_attachment_presence :file
|
15
15
|
|
16
|
+
define_index do
|
17
|
+
indexes title
|
18
|
+
indexes file_file_name, :as => :file_name
|
19
|
+
indexes description
|
20
|
+
indexes activity_object.tags.name, :as => :tags
|
21
|
+
|
22
|
+
where "type IS NULL"
|
23
|
+
|
24
|
+
has created_at
|
25
|
+
end
|
26
|
+
|
16
27
|
class << self
|
17
28
|
def new(*args)
|
18
29
|
if !(self.name == "Document")
|
data/app/models/picture.rb
CHANGED
@@ -4,7 +4,16 @@ class Picture < Document
|
|
4
4
|
:path => ':rails_root/documents/:class/:id_partition/:style.:extension',
|
5
5
|
:styles => {:thumb => ["48x48#"],
|
6
6
|
:thumb0 => ["130x80#"]
|
7
|
-
}
|
7
|
+
}
|
8
|
+
|
9
|
+
define_index do
|
10
|
+
indexes title
|
11
|
+
indexes file_file_name, :as => :file_name
|
12
|
+
indexes description
|
13
|
+
indexes activity_object.tags.name, :as => :tags
|
14
|
+
|
15
|
+
has created_at
|
16
|
+
end
|
8
17
|
# Thumbnail file
|
9
18
|
def thumb(size, helper)
|
10
19
|
case size
|
data/app/models/video.rb
CHANGED
@@ -9,6 +9,15 @@ class Video < Document
|
|
9
9
|
},:processors => [:ffmpeg]
|
10
10
|
|
11
11
|
process_in_background :file
|
12
|
+
|
13
|
+
define_index do
|
14
|
+
indexes title
|
15
|
+
indexes file_file_name, :as => :file_name
|
16
|
+
indexes description
|
17
|
+
indexes activity_object.tags.name, :as => :tags
|
18
|
+
|
19
|
+
has created_at
|
20
|
+
end
|
12
21
|
|
13
22
|
# Thumbnail file
|
14
23
|
def thumb(size, helper)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="model_with_details">
|
2
|
+
<div class="logo">
|
3
|
+
<%= link_to thumb_for(document, 48), document %>
|
4
|
+
</div>
|
5
|
+
<div class="sub-block">
|
6
|
+
<div class="name black" >
|
7
|
+
<%= link_to truncate_name(document.file_file_name), document %>
|
8
|
+
</div>
|
9
|
+
<div class="brief">
|
10
|
+
<%= t 'like.n', :count => document.like_count %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
data/config/locales/en.yml
CHANGED
@@ -6,13 +6,6 @@ en:
|
|
6
6
|
msg: "Uploaded an audio:"
|
7
7
|
not_mine: "Audios"
|
8
8
|
processing: "Processing audio clip"
|
9
|
-
conference:
|
10
|
-
all: "All conferences"
|
11
|
-
confirm_delete: "Delete conference?"
|
12
|
-
title: "Conferences"
|
13
|
-
mine: "My conferences"
|
14
|
-
msg: "Uploaded a conference:"
|
15
|
-
not_mine: "Conferences"
|
16
9
|
document:
|
17
10
|
all: "All documents"
|
18
11
|
confirm_delete: "Delete document?"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
es:
|
2
|
+
audio:
|
3
|
+
confirm_delete: "¿Borrar audios?"
|
4
|
+
title: "Audios"
|
5
|
+
mine: "Mis audios"
|
6
|
+
msg: "Subió un audio:"
|
7
|
+
not_mine: "Audios"
|
8
|
+
processing: "Procesando fichero de audio..."
|
9
|
+
document:
|
10
|
+
all: "Todos los documentos"
|
11
|
+
confirm_delete: "¿Borrar documento?"
|
12
|
+
form:
|
13
|
+
title: "Fichero"
|
14
|
+
mine: "Mis documentos"
|
15
|
+
msg: "Subió un documento:"
|
16
|
+
not_mine: "Documentos"
|
17
|
+
simple_all: "Todos"
|
18
|
+
title: "Documentos"
|
19
|
+
picture:
|
20
|
+
confirm_delete: "¿Borrar imagen?"
|
21
|
+
title: "Imágenes"
|
22
|
+
mine: "Mis imágenes"
|
23
|
+
msg: "Subió una imagen:"
|
24
|
+
not_mine: "Imágenes"
|
25
|
+
resource:
|
26
|
+
all: "Todos los recursos"
|
27
|
+
confirm_delete: "¿Borrar recursos?"
|
28
|
+
title: "Recursos"
|
29
|
+
mine: "Mis recursos"
|
30
|
+
msg: "Subió un recurso:"
|
31
|
+
not_mine: "Recursos"
|
32
|
+
video:
|
33
|
+
confirm_delete: "¿Borrar vídeo?"
|
34
|
+
title: "Vídeos"
|
35
|
+
mine: "Mis vídeos"
|
36
|
+
msg: "Subió un vídeo:"
|
37
|
+
not_mine: "Vídeos"
|
38
|
+
processing: "Procesando vídeo..."
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddTitleAndDescriptionToDocument < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :documents, :title, :string
|
4
|
+
add_column :documents, :description, :text
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :documents, :title
|
9
|
+
remove_column :documents, :description
|
10
|
+
end
|
11
|
+
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.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 0.9.15')
|
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')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-documents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "V\xC3\xADctor S\xC3\xA1nchez Belmar"
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-10-06 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -27,12 +27,12 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 37
|
31
31
|
segments:
|
32
32
|
- 0
|
33
33
|
- 9
|
34
|
-
-
|
35
|
-
version: 0.9.
|
34
|
+
- 15
|
35
|
+
version: 0.9.15
|
36
36
|
name: social_stream-base
|
37
37
|
version_requirements: *id001
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -251,6 +251,7 @@ files:
|
|
251
251
|
- app/views/audios/_audio.html.erb
|
252
252
|
- app/views/audios/_audio_processed.html.erb
|
253
253
|
- app/views/audios/_audio_processing.html.erb
|
254
|
+
- app/views/audios/_audio_with_details.html.erb
|
254
255
|
- app/views/audios/_mediapreviews.html.erb
|
255
256
|
- app/views/audios/_new.html.erb
|
256
257
|
- app/views/audios/destroy.js.erb
|
@@ -259,6 +260,7 @@ files:
|
|
259
260
|
- app/views/audios/show.html.erb
|
260
261
|
- app/views/common-documents/_index.html.erb
|
261
262
|
- app/views/documents/_document.html.erb
|
263
|
+
- app/views/documents/_document_with_details.html.erb
|
262
264
|
- app/views/documents/_header.html.erb
|
263
265
|
- app/views/documents/_new_activity.html.erb
|
264
266
|
- app/views/documents/_new_activity_fields.html.erb
|
@@ -269,6 +271,7 @@ files:
|
|
269
271
|
- app/views/pictures/_mediapreviews.html.erb
|
270
272
|
- app/views/pictures/_new.html.erb
|
271
273
|
- app/views/pictures/_picture.html.erb
|
274
|
+
- app/views/pictures/_picture_with_details.html.erb
|
272
275
|
- app/views/pictures/destroy.js.erb
|
273
276
|
- app/views/pictures/index.html.erb
|
274
277
|
- app/views/pictures/index.js.erb
|
@@ -278,15 +281,18 @@ files:
|
|
278
281
|
- app/views/videos/_video.html.erb
|
279
282
|
- app/views/videos/_video_processed.html.erb
|
280
283
|
- app/views/videos/_video_processing.html.erb
|
284
|
+
- app/views/videos/_video_with_details.html.erb
|
281
285
|
- app/views/videos/destroy.js.erb
|
282
286
|
- app/views/videos/index.html.erb
|
283
287
|
- app/views/videos/show.html.erb
|
284
288
|
- app/worker/audioencoder.rb
|
285
289
|
- app/worker/videoencoder.rb
|
286
290
|
- config/locales/en.yml
|
291
|
+
- config/locales/es.yml
|
287
292
|
- config/routes.rb
|
288
293
|
- db/migrate/20110615143707_create_social_stream_documents.rb
|
289
294
|
- db/migrate/20110922173707_add_file_processing_to_document.rb
|
295
|
+
- db/migrate/20111005112707_add_title_and_description_to_document.rb
|
290
296
|
- lib/generators/social_stream/documents/install_generator.rb
|
291
297
|
- lib/social_stream-documents.rb
|
292
298
|
- lib/social_stream/documents/engine.rb
|