social_stream 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,13 @@
1
1
  Rails.application.routes.draw do
2
2
  #Background tasks
3
- mount Resque::Server, :at => "/resque"
3
+ resque_constraint = lambda do |request|
4
+ #request.env['warden'].authenticate? and request.env['warden'].user.admin?
5
+ true
6
+ end
7
+
8
+ constraints resque_constraint do
9
+ mount Resque::Server, :at => "/resque"
10
+ end
4
11
 
5
12
  root :to => "frontpage#index"
6
13
 
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require File.join(File.dirname(__FILE__), 'lib', 'social_stream', 'base', 'version')
2
3
 
3
4
  Gem::Specification.new do |s|
@@ -163,6 +163,9 @@
163
163
  top:0px;
164
164
  width: 180px;
165
165
  z-index:1;
166
+ width: 180px;
167
+ height: 135px;
168
+ overflow: hidden;
166
169
  }
167
170
 
168
171
  .video_thumbnail_play_over {
@@ -3,45 +3,43 @@
3
3
  {:controller => "documents", :action => "download", :id => audio},
4
4
  :class => "" %>
5
5
  </div>
6
- <div class="attachment_content">
7
- <div class="attachment_text">
8
- <%= t('audio.msg') %><%= link_to "\""+audio.file_file_name+"\"",
9
- {:controller => "documents", :action => "download", :id => audio},
10
- :class => "attachment_text_link" %>
11
- </div>
12
- <div id="jpId<%= audio.id%>" class="jpId_size0"></div>
13
- <div class="jp-audio">
14
- <div class="jp-type-single">
15
- <div id="jp_interface_<%= audio.id%>" class="jp-interface">
16
- <ul class="jp-controls">
17
- <li>
18
- <a href="#" class="jp-play" tabindex="1">play</a>
19
- </li>
20
- <li>
21
- <a href="#" class="jp-pause" tabindex="1">pause</a>
22
- </li>
23
- <li>
24
- <a href="#" class="jp-stop" tabindex="1">stop</a>
25
- </li>
26
- <li>
27
- <a href="#" class="jp-mute" tabindex="1">mute</a>
28
- </li>
29
- <li>
30
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
31
- </li>
32
- </ul>
33
- <div class="jp-progress">
34
- <div class="jp-seek-bar">
35
- <div class="jp-play-bar"></div>
36
- </div>
37
- </div>
38
- <div class="jp-volume-bar">
39
- <div class="jp-volume-bar-value"></div>
6
+ <div class="attachment_text">
7
+ <%= t('audio.msg') %><%= link_to "\""+audio.file_file_name+"\"",
8
+ {:controller => "documents", :action => "download", :id => audio},
9
+ :class => "attachment_text_link" %>
10
+ </div>
11
+ <div id="jpId<%= audio.id%>" class="jpId_size0"></div>
12
+ <div class="jp-audio">
13
+ <div class="jp-type-single">
14
+ <div id="jp_interface_<%= audio.id%>" class="jp-interface">
15
+ <ul class="jp-controls">
16
+ <li>
17
+ <a href="#" class="jp-play" tabindex="1">play</a>
18
+ </li>
19
+ <li>
20
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
21
+ </li>
22
+ <li>
23
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
24
+ </li>
25
+ <li>
26
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
27
+ </li>
28
+ <li>
29
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
30
+ </li>
31
+ </ul>
32
+ <div class="jp-progress">
33
+ <div class="jp-seek-bar">
34
+ <div class="jp-play-bar"></div>
40
35
  </div>
41
- <div class="jp-current-time"></div>
42
- <div class="jp-duration"></div>
43
36
  </div>
44
- <div id="jp_playlist_<%= audio.id%>" class="jp-playlist"></div>
37
+ <div class="jp-volume-bar">
38
+ <div class="jp-volume-bar-value"></div>
39
+ </div>
40
+ <div class="jp-current-time"></div>
41
+ <div class="jp-duration"></div>
45
42
  </div>
43
+ <div id="jp_playlist_<%= audio.id%>" class="jp-playlist"></div>
46
44
  </div>
47
45
  </div>
@@ -8,7 +8,7 @@
8
8
  {:controller => "documents", :action => "download", :id => video},
9
9
  :class => "attachment_text_link" %>
10
10
  <div id="video_thumbnail_<%= video.id%>" class="video_thumbnail_class">
11
- <%= image_tag(video_path(video)+"?style=thumb", :class => "video_thumbnail_image")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
11
+ <%= image_tag(video_path(video)+"?style=thumb", :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
12
12
  </div>
13
13
  <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
14
14
  <div class="jp-type-single">
@@ -0,0 +1,5 @@
1
+ module SocialStream
2
+ module Documents
3
+ VERSION = "0.2.7".freeze
4
+ end
5
+ end
@@ -1,7 +1,9 @@
1
1
  # encoding: UTF-8
2
+ require File.join(File.dirname(__FILE__), 'lib', 'social_stream', 'documents', 'version')
3
+
2
4
  Gem::Specification.new do |s|
3
5
  s.name = "social_stream-documents"
4
- s.version = "0.2.6"
6
+ s.version = SocialStream::Documents::VERSION.dup
5
7
  s.authors = ["Víctor Sánchez Belmar", "GING - DIT - UPM"]
6
8
  s.summary = "File capabilities for Social Stream, the core for building social network websites"
7
9
  s.description = "Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.\n\nThis gem allow you upload almost any kind of file as new social stream activity."
@@ -10,7 +12,7 @@ Gem::Specification.new do |s|
10
12
  s.files = `git ls-files`.split("\n")
11
13
 
12
14
  # Gem dependencies
13
- s.add_runtime_dependency('social_stream-base','>= 0.9.2')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.9.7')
14
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
15
17
  s.add_runtime_dependency('paperclip','2.3.11')
16
18
  s.add_runtime_dependency('delayed_paperclip','>= 0.7.2')
@@ -0,0 +1,5 @@
1
+ module SocialStream
2
+ module Events
3
+ VERSION = "0.0.2".freeze
4
+ end
5
+ end
@@ -1,6 +1,9 @@
1
+ # encoding: UTF-8
2
+ require File.join(File.dirname(__FILE__), 'lib', 'social_stream', 'events', 'version')
3
+
1
4
  Gem::Specification.new do |s|
2
5
  s.name = "social_stream-events"
3
- s.version = "0.0.2"
6
+ s.version = SocialStream::Events::VERSION.dup
4
7
  s.authors = ["Diego Carrera", "Antonio Tapiador", "GING - DIT - UPM"]
5
8
  s.summary = "Events and Video conferences capabilities for Social Stream, the core for building social network websites"
6
9
  s.description = "Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.\n\nThis gem allow you to add events and videoconferences as new social stream activity."
@@ -0,0 +1,26 @@
1
+ module SocialStream
2
+ module Release
3
+ class << self
4
+ def create(*args)
5
+ dependencies = Global::Release.new.dependencies
6
+
7
+ components = args.map do |a|
8
+ name, version = a.split(":")
9
+
10
+ if dependencies.include?(name)
11
+ Component::Release.new(name, version).release!
12
+ else
13
+ @target = name
14
+ end
15
+ end
16
+
17
+ Global::Release.new(@target).release!
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ %w(dependency_update global/release global/version_file component/release component/version_file).each do |file|
24
+ require File.expand_path("../release/#{ file }", __FILE__)
25
+ end
26
+
@@ -0,0 +1,29 @@
1
+ module SocialStream
2
+ module Release
3
+ module Component
4
+ class Release < ::SocialStream::Release::Global::Release
5
+ attr_reader :name
6
+
7
+ def initialize(name, version)
8
+ @name, @target = name, version
9
+ end
10
+
11
+ def version_file
12
+ @version_file ||= Component::VersionFile.new(@name, @target)
13
+ end
14
+
15
+ def gemspec
16
+ "#{ name }/social_stream-#{ name }.gemspec"
17
+ end
18
+
19
+ def commit_command
20
+ "git commit #{ commit_files } -m #{ @name }#{ @version }"
21
+ end
22
+
23
+ def rake_release_command
24
+ "cd #{ @name } && rake release"
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,18 @@
1
+ module SocialStream
2
+ module Release
3
+ module Component
4
+ class VersionFile < Global::VersionFile
5
+ attr_reader :name
6
+
7
+ def initialize(name, target = nil)
8
+ @name = name
9
+ super(target)
10
+ end
11
+
12
+ def filename
13
+ "#{ name }/lib/social_stream/#{ name }/version.rb"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,14 @@
1
+ module SocialStream
2
+ module Release
3
+ class DependencyUpdate < Thor
4
+ include Thor::Actions
5
+
6
+ desc :update, "Update gemfile's dependency with some version"
7
+ def update gemspec, dependency, version
8
+ gsub_file gemspec,
9
+ /social_stream-#{ dependency }.*(\d+\.\d+\.\d+)/,
10
+ "social_stream-#{ dependency }', '~> #{ version }"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,89 @@
1
+ module SocialStream
2
+ module Release
3
+ module Global
4
+ class Release
5
+ include Thor::Actions
6
+
7
+ DEPENDENCY_REGEXP = /dependency.*social_stream-(\w*)/
8
+
9
+ attr_reader :name, :version
10
+
11
+ class << self
12
+ def create(*args)
13
+ dependencies = new.dependencies
14
+
15
+ components = args.map do |a|
16
+ name, version = a.split(":")
17
+
18
+ if dependencies.include?(name)
19
+ ComponentRelease.new(name, version).release!
20
+ else
21
+ target = name
22
+ end
23
+ end
24
+
25
+
26
+ new(target).release!
27
+ end
28
+ end
29
+
30
+ def initialize(target = nil)
31
+ @target = target
32
+ end
33
+
34
+ def release!
35
+ bump_version
36
+
37
+ update_dependencies
38
+
39
+ commit
40
+
41
+ rake_release
42
+ end
43
+
44
+ def bump_version
45
+ @version = version_file.bump!
46
+ end
47
+
48
+ def version_file
49
+ @version_file ||= VersionFile.new(@target)
50
+ end
51
+
52
+ def dependencies
53
+ @dependencies ||=
54
+ File.read(gemspec).scan(DEPENDENCY_REGEXP).flatten
55
+ end
56
+
57
+ def update_dependencies
58
+ dependencies.each do |d|
59
+ DependencyUpdate.new.invoke(:update, [ gemspec, d, Component::VersionFile.new(d).old_number ])
60
+ end
61
+ end
62
+
63
+ def gemspec
64
+ "social_stream.gemspec"
65
+ end
66
+
67
+ def commit
68
+ system(commit_command) || raise(RuntimeError.new)
69
+ end
70
+
71
+ def commit_command
72
+ "git commit #{ commit_files } -m #{ @version }"
73
+ end
74
+
75
+ def commit_files
76
+ "#{ @version_file.filename } #{ gemspec }"
77
+ end
78
+
79
+ def rake_release
80
+ system(rake_release_command) || raise(RuntimeError.new)
81
+ end
82
+
83
+ def rake_release_command
84
+ "rake release"
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,68 @@
1
+ module SocialStream
2
+ module Release
3
+ module Global
4
+ # Manage component's version files
5
+ #
6
+ # This code is based on gem_release's version_file.rb
7
+ # https://github.com/svenfuchs/gem-release
8
+ #
9
+ # Copyright (c) 2010 Sven Fuchs <svenfuchs@artweb-design.de>
10
+ class VersionFile
11
+ VERSION_PATTERN = /(VERSION\s*=\s*(?:"|'))(\d+\.\d+\.\d+)("|')/
12
+ NUMBER_PATTERN = /(\d+)\.(\d+)\.(\d+)/
13
+
14
+ attr_reader :target
15
+
16
+ def initialize(target)
17
+ @target = target || :patch
18
+ end
19
+
20
+ def bump!
21
+ # Must load content before writing to it
22
+ content
23
+
24
+ File.open(filename, 'w+') { |f| f.write(bumped_content) }
25
+
26
+ new_number
27
+ end
28
+
29
+ def new_number
30
+ @new_number ||= old_number.sub(NUMBER_PATTERN) do
31
+ respond_to?(target) ? send(target, $1, $2, $3) : target
32
+ end
33
+ end
34
+
35
+ def old_number
36
+ @old_number ||= content =~ VERSION_PATTERN && $2
37
+ end
38
+
39
+ def filename
40
+ "lib/social_stream/version.rb"
41
+ end
42
+
43
+ protected
44
+
45
+ def major(major, minor, patch)
46
+ "#{major.to_i + 1}.0.0"
47
+ end
48
+
49
+ def minor(major, minor, patch)
50
+ "#{major}.#{minor.to_i + 1}.0"
51
+ end
52
+
53
+ def patch(major, minor, patch)
54
+ "#{major}.#{minor}.#{patch.to_i + 1}"
55
+ end
56
+
57
+ def content
58
+ @content ||= File.read(filename)
59
+ end
60
+
61
+ def bumped_content
62
+ content.sub(VERSION_PATTERN) { "#{$1}#{new_number}#{$3}" }
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+
@@ -1,3 +1,3 @@
1
1
  module SocialStream
2
- VERSION = "0.9.3".freeze
2
+ VERSION = "0.9.4".freeze
3
3
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  # Gem dependencies
14
14
  s.add_runtime_dependency('social_stream-base', '~> 0.9.7')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.2.6')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.2.7')
16
16
 
17
17
  # Development Gem dependencies
18
18
  #
data/social_stream.thor CHANGED
@@ -1,110 +1,10 @@
1
+ require File.expand_path('../lib/social_stream/release', __FILE__)
2
+
1
3
  # SocialStream release tasks
2
4
  class SocialStream < Thor
3
- include Thor::Actions
4
-
5
- # Manage component's version files
6
- #
7
- # This code is based on gem_release's version_file.rb
8
- # https://github.com/svenfuchs/gem-release
9
- #
10
- # Copyright (c) 2010 Sven Fuchs <svenfuchs@artweb-design.de>
11
- class VersionFile
12
- VERSION_PATTERN = /(VERSION\s*=\s*(?:"|'))(\d+\.\d+\.\d+)("|')/
13
- NUMBER_PATTERN = /(\d+)\.(\d+)\.(\d+)/
14
-
15
- attr_reader :component, :target
16
-
17
- def initialize(arg = "")
18
- @component, @target = arg.split(":")
19
- @target ||= :patch
20
- end
21
-
22
- def bump!
23
- # Must load content before writing to it
24
- content
25
-
26
- File.open(filename, 'w+') { |f| f.write(bumped_content) }
27
-
28
- commit
29
-
30
- [ component, new_number ]
31
- end
32
-
33
- def new_number
34
- @new_number ||= old_number.sub(NUMBER_PATTERN) do
35
- respond_to?(target) ? send(target, $1, $2, $3) : target
36
- end
37
- end
38
-
39
- def old_number
40
- @old_number ||= content =~ VERSION_PATTERN && $2
41
- end
42
-
43
- def filename
44
- component ?
45
- "#{ component }/lib/social_stream/#{ component }/version.rb" :
46
- "lib/social_stream/version.rb"
47
- end
48
-
49
- def commit
50
- files = filename
51
- files += " social_stream.gemspec" if component.nil?
52
-
53
- system "git commit #{ files } -m #{ component }#{ new_number }"
54
- end
55
-
56
- protected
57
-
58
- def major(major, minor, patch)
59
- "#{major.to_i + 1}.0.0"
60
- end
61
-
62
- def minor(major, minor, patch)
63
- "#{major}.#{minor.to_i + 1}.0"
64
- end
65
-
66
- def patch(major, minor, patch)
67
- "#{major}.#{minor}.#{patch.to_i + 1}"
68
- end
69
-
70
- def content
71
- @content ||= File.read(filename)
72
- end
73
-
74
- def bumped_content
75
- content.sub(VERSION_PATTERN) { "#{$1}#{new_number}#{$3}" }
76
- end
77
- end
78
-
79
5
 
80
6
  desc "release", "release SocialStream's gems"
81
- def release(*components)
82
- component_releases = components.map{ |c| release_component(c) }
83
-
84
- update_components(component_releases)
85
-
86
- VersionFile.new.bump!
87
-
88
- system "rake release"
89
- end
90
-
91
- private
92
-
93
- def release_component(component)
94
- component, version = VersionFile.new(component).bump!
95
-
96
- system "cd #{ component } && rake release"
97
-
98
- [ component, version ]
99
- end
100
-
101
- def update_components(releases)
102
- releases.each do |r|
103
- component, version = r
104
-
105
- gsub_file 'social_stream.gemspec',
106
- /social_stream-#{ component }.*(\d+\.\d+\.\d+)/,
107
- "social_stream-#{ component }', '~> #{ version }"
108
- end
7
+ def release(*args)
8
+ ::SocialStream::Release.create *args
109
9
  end
110
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 3
10
- version: 0.9.3
9
+ - 4
10
+ version: 0.9.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - GING - DIT - UPM
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-23 00:00:00 +02:00
19
+ date: 2011-09-26 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -43,12 +43,12 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- hash: 27
46
+ hash: 25
47
47
  segments:
48
48
  - 0
49
49
  - 2
50
- - 6
51
- version: 0.2.6
50
+ - 7
51
+ version: 0.2.7
52
52
  type: :runtime
53
53
  version_requirements: *id002
54
54
  - !ruby/object:Gem::Dependency
@@ -861,6 +861,7 @@ files:
861
861
  - documents/lib/generators/social_stream/documents/install_generator.rb
862
862
  - documents/lib/social_stream-documents.rb
863
863
  - documents/lib/social_stream/documents/engine.rb
864
+ - documents/lib/social_stream/documents/version.rb
864
865
  - documents/lib/social_stream/migrations/documents.rb
865
866
  - documents/lib/social_stream/toolbar_config/documents.rb
866
867
  - documents/social_stream-documents.gemspec
@@ -1058,6 +1059,7 @@ files:
1058
1059
  - events/lib/generators/social_stream/events/install_generator.rb
1059
1060
  - events/lib/social_stream-events.rb
1060
1061
  - events/lib/social_stream/events/engine.rb
1062
+ - events/lib/social_stream/events/version.rb
1061
1063
  - events/lib/social_stream/migrations/events.rb
1062
1064
  - events/lib/social_stream/toolbar_config/events.rb
1063
1065
  - events/social_stream-events.gemspec
@@ -1066,6 +1068,12 @@ files:
1066
1068
  - lib/generators/social_stream/USAGE
1067
1069
  - lib/generators/social_stream/install_generator.rb
1068
1070
  - lib/social_stream.rb
1071
+ - lib/social_stream/release.rb
1072
+ - lib/social_stream/release/component/release.rb
1073
+ - lib/social_stream/release/component/version_file.rb
1074
+ - lib/social_stream/release/dependency_update.rb
1075
+ - lib/social_stream/release/global/release.rb
1076
+ - lib/social_stream/release/global/version_file.rb
1069
1077
  - lib/social_stream/version.rb
1070
1078
  - social_stream.gemspec
1071
1079
  - social_stream.thor