Commit de3f4c589975f56b30c628f0c42937021f352b6d

Authored by Fernando Brito
Committed by libras
1 parent 3c628436
Exists in master and in 1 other branch devel

Atualiza caminho dos diretorios para novo padrão

Gemfile.lock
... ... @@ -42,14 +42,17 @@ GEM
42 42 annotate (2.4.1.beta1)
43 43 arel (3.0.2)
44 44 autotest-rails (4.1.2)
45   - ZenTest (~> 4.5)
46 45 awesome_print (1.0.2)
47 46 bcrypt-ruby (3.0.1)
48 47 builder (3.0.0)
  48 + capybara (2.2.1)
  49 + mime-types (>= 1.16)
  50 + nokogiri (>= 1.3.3)
  51 + rack (>= 1.0.0)
  52 + rack-test (>= 0.5.4)
  53 + xpath (~> 2.0)
49 54 carrierwave (0.5.8)
50 55 activesupport (~> 3.0)
51   - childprocess (0.3.1)
52   - ffi (~> 1.0.6)
53 56 ckeditor (3.7.0.rc3)
54 57 mime-types (~> 1.17.2)
55 58 orm_adapter (~> 0.0.6)
... ... @@ -108,9 +111,11 @@ GEM
108 111 mime-types (1.17.2)
109 112 mini_magick (3.4)
110 113 subexec (~> 0.2.1)
  114 + mini_portile (0.5.3)
111 115 multi_json (1.1.0)
112 116 mysql2 (0.3.11)
113   - nokogiri (1.5.2)
  117 + nokogiri (1.6.1)
  118 + mini_portile (~> 0.5.0)
114 119 oj (2.1.4)
115 120 orm_adapter (0.0.6)
116 121 pdf-reader (1.0.0)
... ... @@ -192,12 +197,6 @@ GEM
192 197 rspec (~> 2.8.0)
193 198 ruby-graphviz (0.9.21)
194 199 ruby-rc4 (0.1.5)
195   - rubyzip (0.9.6.1)
196   - selenium-webdriver (2.20.0)
197   - childprocess (>= 0.2.5)
198   - ffi (~> 1.0)
199   - multi_json (~> 1.0)
200   - rubyzip
201 200 settingslogic (2.0.8)
202 201 sexp_processor (3.1.0)
203 202 simple_form (1.3.1)
... ... @@ -231,7 +230,7 @@ GEM
231 230 warden (1.1.1)
232 231 rack (>= 1.0)
233 232 workflow (0.8.1)
234   - xpath (0.1.4)
  233 + xpath (2.0.0)
235 234 nokogiri (~> 1.3)
236 235  
237 236 PLATFORMS
... ...
app/controllers/api/videos_controller.rb
... ... @@ -6,9 +6,9 @@ class Api::VideosController < Api::BaseController
6 6 create! {
7 7  
8 8 if @video.closed_caption == 1 || @video.closed_caption == 3
9   - cmd = "../gtaaas/./gtaaas #{@video.closed_caption} public#{@video.url} 1 #{@video.subtitle.window_position} #{@video.window_size} #{@video.transparency} #{@video.id} &"
  9 + cmd = "../vlibras-core/./gtaaas #{@video.closed_caption} public#{@video.url} 1 #{@video.subtitle.window_position} #{@video.window_size} #{@video.transparency} #{@video.id} &"
10 10 else
11   - cmd = "../gtaaas/./gtaaas 2 public#{@video.url} public#{@video.legend} 1 #{@video.window_position} #{@video.window_size} #{@video.transparency} #{@video.id} &"
  11 + cmd = "../vlibras-core/./gtaaas 2 public#{@video.url} public#{@video.legend} 1 #{@video.window_position} #{@video.window_size} #{@video.transparency} #{@video.id} &"
12 12 end
13 13 system(cmd)
14 14 }
... ...
app/controllers/static_controller.rb
... ... @@ -29,9 +29,9 @@ class StaticController < ApplicationController
29 29 end
30 30  
31 31 if @presenter.subtitle.closed_caption == 1 || @presenter.subtitle.closed_caption == 3
32   - cmd = "../gtaaas/./gtaaas #{@presenter.subtitle.closed_caption} public#{@presenter.subtitle.url} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
  32 + cmd = "../vlibras-core/./gtaaas #{@presenter.subtitle.closed_caption} public#{@presenter.subtitle.url} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
33 33 else
34   - cmd = "../gtaaas/./gtaaas 2 public#{@presenter.subtitle.url} public#{@presenter.subtitle.legend} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
  34 + cmd = "../vlibras-core/./gtaaas 2 public#{@presenter.subtitle.url} public#{@presenter.subtitle.legend} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
35 35 end
36 36 #raise cmd.inspect
37 37 system(cmd)
... ...
app/controllers/static_controller.rb~
... ... @@ -1,62 +0,0 @@
1   -# Author - Igor Portela - igorportela.com | Copyright(c) 2013. All rights reserved.
2   -class StaticController < ApplicationController
3   - #before_filter :authenticate_user!
4   -
5   - def choice
6   - end
7   -
8   - def preview
9   - end
10   -
11   - def upload
12   - @presenter = Static::IndexPresenter.new if authenticate_user!
13   -
14   - end
15   -
16   - def subtitle
17   - @presenter = Static::IndexPresenter.new(params[:id])
18   - end
19   -
20   - def window
21   - @presenter = Static::IndexPresenter.new(params[:id])
22   - end
23   -
24   - def generate
25   - @presenter = Static::IndexPresenter.new(params[:id])
26   - if !@presenter.subtitle.window_size.present?
27   -
28   - @presenter.subtitle.update_attributes(:window_size => params[:window_size], :window_position => params[:window_position], :closed_caption => params[:closed_caption], :user_id => current_user.id)
29   - end
30   -
31   - if @presenter.subtitle.closed_caption == 1 || @presenter.subtitle.closed_caption == 3
32   - cmd = "../gtaaas/./gtaaas #{@presenter.subtitle.closed_caption} public#{@presenter.subtitle.url} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
33   - else
34   - cmd = "../gtaaas/./gtaaas 2 public#{@presenter.subtitle.url} public#{@presenter.subtitle.legend} 1 #{@presenter.subtitle.window_position} #{@presenter.subtitle.window_size} #{@presenter.subtitle.transparency} #{@presenter.subtitle.id} &"
35   - end
36   - #raise cmd.inspect
37   - system(cmd)
38   - end
39   -
40   - def result
41   - require "rexml/document"
42   -
43   - path = "public/uploads/videos/#{params[:id]}/#{params[:id]}.xml"
44   - path_2 = "/home/gtaaas/32.xml"
45   - arquivo = File.new(path,"r")
46   - arquivo_2 = File.new(path_2,"r")
47   - obj = REXML::Document.new(arquivo)
48   - obj_2 = REXML::Document.new(arquivo_2)
49   -
50   - obj.elements.each("request") do |element|
51   - @id = element.text("id")
52   - @finished = element.text("finished")
53   - end
54   -
55   - if @finished == "true"
56   - @presenter = Static::IndexPresenter.new(@id)
57   - redirect_to video_path(@id)
58   - else
59   - render :generate
60   - end
61   - end
62   -end
app/views/videos/index.html.haml
... ... @@ -3,29 +3,6 @@
3 3  
4 4 .breadcrumb
5 5 %h3= t('videos.list')
6   -.span12
7   - :javascript
8   - $(function () {
9   - new Highcharts.Chart({
10   - chart: { renderTo: 'orders_chart_user', type: 'bar' },
11   - title: { text: "Seus Vídeos" },
12   - colors: ['#888'],
13   - credits: { enabled: false },
14   - xAxis: {
15   - categories: #{raw @presenter.videos_only_user.map { |video| video.user.name.html_safe }}
16   - },
17   - yAxis: {
18   - title: { text: "Quantidade" }
19   - },
20   - series: [{
21   - data: #{raw @presenter.videos_only_user_size.map { |video| video[1] }},
22   - name: 'Vídeos'
23   - }]
24   - });
25   - });
26   - .span7
27   - #orders_chart_user{ style: "height:300px; width:700px; margin-left:150px;"}
28   -
29 6 .center_box
30 7 - @videos.each do |video|
31 8 .span3
... ...
app/views/wikilibras/wikivideos/index.html.haml
... ... @@ -3,28 +3,6 @@
3 3  
4 4 .breadcrumb
5 5 %h3= t('wikivideos.list')
6   -.span12
7   - :javascript
8   - $(function () {
9   - new Highcharts.Chart({
10   - chart: { renderTo: 'orders_chart_user', type: 'bar', colors: '#4572A7' },
11   - title: { text: "Seus Vídeos" },
12   - colors: ['#888'],
13   - credits: { enabled: false },
14   - xAxis: {
15   - categories: #{raw @presenter.wikivideos_only_user.map { |video| video.user.name.html_safe }}
16   - },
17   - yAxis: {
18   - title: { text: "Quantidade" }
19   - },
20   - series: [{
21   - data: #{raw @presenter.wikivideos_only_user_size.map { |video| video[1] }},
22   - name: 'Vídeos'
23   - }]
24   - });
25   - });
26   - .span7
27   - #orders_chart_user{ style: "height:300px; width:700px; margin-left:150px;"}
28 6 .center_box
29 7 - @wikivideos.each do |wikivideo|
30 8 .span3
... ...
build_project.sh
... ... @@ -8,7 +8,7 @@ rake db:create
8 8 rake db:migrate
9 9 rake db:seed
10 10 sudo service nginx start
11   -unicorn_rails -c $HOME/gtaaas_web/config/unicorn.rb -D
  11 +unicorn_rails -c $HOME/vlibras-web/config/unicorn.rb -D
12 12  
13 13 #git clone git@git.lavid.ufpb.br:gtaaas gtaaas_web
14 14 #git ckeckout web
... ...
config/unicorn.rb
... ... @@ -3,7 +3,7 @@
3 3 # Author Igor Amorim - www.igoramorim.com
4 4 #
5 5 worker_processes 2
6   -APP_PATH = "/home/gtaaas/gtaaas_web/"
  6 +APP_PATH = "/home/libras/vlibras-web/"
7 7 working_directory APP_PATH
8 8  
9 9 # This loads the application in the master process before forking
... ...
gtaaas_user
... ... @@ -1 +0,0 @@
1   -/home/gtaaas
2 0 \ No newline at end of file
log/.gitkeep