Skip to content

Commit

Permalink
removed s3 and phono for local burningman install
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Aug 23, 2011
1 parent 5ab73b6 commit f36f12e
Show file tree
Hide file tree
Showing 23 changed files with 96 additions and 91 deletions.
29 changes: 3 additions & 26 deletions Gemfile
@@ -1,35 +1,12 @@
source 'http://rubygems.org' source 'http://rubygems.org'


gem 'rails', '3.0.9' gem 'rails', '3.0.9'
gem "aws-s3", :require => "aws/s3"
gem "rest-client" gem "rest-client"
gem "rake", "0.8.7" gem "rake", "0.8.7"
gem "flickraw"

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2', '~> 0.2.6' gem 'mysql2', '~> 0.2.6'


# Use unicorn as the web server # used for heroku and web app
# gem 'unicorn' # gem "aws-s3", :require => "aws/s3"

# gem "flickraw"
# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'


# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'


# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
21 changes: 6 additions & 15 deletions Gemfile.lock
Expand Up @@ -29,25 +29,18 @@ GEM
activesupport (= 3.0.9) activesupport (= 3.0.9)
activesupport (3.0.9) activesupport (3.0.9)
arel (2.0.10) arel (2.0.10)
aws-s3 (0.6.2)
builder
mime-types
xml-simple
builder (2.1.2) builder (2.1.2)
erubis (2.6.6) erubis (2.6.6)
abstract (>= 1.0.0) abstract (>= 1.0.0)
flickraw (0.8.4)
json (>= 1.1.1)
i18n (0.5.0) i18n (0.5.0)
json (1.5.3)
mail (2.2.19) mail (2.2.19)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mime-types (1.16) mime-types (1.16)
mysql2 (0.2.11) mysql2 (0.2.13)
polyglot (0.3.1) polyglot (0.3.2)
rack (1.2.3) rack (1.2.3)
rack-mount (0.6.14) rack-mount (0.6.14)
rack (>= 1.0.0) rack (>= 1.0.0)
Expand All @@ -68,21 +61,19 @@ GEM
rdoc (~> 3.4) rdoc (~> 3.4)
thor (~> 0.14.4) thor (~> 0.14.4)
rake (0.8.7) rake (0.8.7)
rdoc (3.8) rdoc (3.9.2)
rest-client (1.6.3) rest-client (1.6.6)
mime-types (>= 1.16) mime-types (>= 1.16)
thor (0.14.6) thor (0.14.6)
treetop (1.4.9) treetop (1.4.10)
polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.29) tzinfo (0.3.29)
xml-simple (1.1.0)


PLATFORMS PLATFORMS
ruby ruby


DEPENDENCIES DEPENDENCIES
aws-s3
flickraw
mysql2 (~> 0.2.6) mysql2 (~> 0.2.6)
rails (= 3.0.9) rails (= 3.0.9)
rake (= 0.8.7) rake (= 0.8.7)
Expand Down
Binary file modified app/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions app/controllers/conferences_controller.rb
@@ -1,5 +1,9 @@
class ConferencesController < ApplicationController class ConferencesController < ApplicationController


def offline
render :layout => false
end

# GET /conferences # GET /conferences
# GET /conferences.xml # GET /conferences.xml
def index def index
Expand Down
1 change: 1 addition & 0 deletions app/controllers/upload_controller.rb
Expand Up @@ -4,6 +4,7 @@ def index
end end
def uploadFile def uploadFile
post = DataFile.save(params[:filename]) post = DataFile.save(params[:filename])
# post = DataFile.save(params[:upload])
@conference = Conference.find(:first, :conditions => ['inprogress = ?', true]) @conference = Conference.find(:first, :conditions => ['inprogress = ?', true])
if @conference if @conference
@conference.inprogress = false @conference.inprogress = false
Expand Down
25 changes: 17 additions & 8 deletions app/models/data_file.rb
@@ -1,19 +1,28 @@
class DataFile < ActiveRecord::Base class DataFile < ActiveRecord::Base


require 'rubygems' require 'rubygems'
require 'aws/s3' # require 'aws/s3'


def self.save(upload) def self.save(upload)
name = upload.original_filename name = upload.original_filename
# name = upload['datafile'].original_filename


if name.length > 0 if name #.length > 0


AWS::S3::Base.establish_connection!( # AWS::S3::Base.establish_connection!(
:access_key_id => CONFIG['aws_access_key_id'], # :access_key_id => CONFIG['aws_access_key_id'],
:secret_access_key => CONFIG['aws_secret_access_key'] # :secret_access_key => CONFIG['aws_secret_access_key']

#
) # )
AWS::S3::S3Object.store(name, open(upload), CONFIG['aws_bucket'], :access => :public_read) # AWS::S3::S3Object.store(name, open(upload), CONFIG['aws_bucket'], :access => :public_read)

# local writes
directory = "public/data"
# create the file path
path = File.join(directory, name)
# write the file
File.open(path, "wb") { |f| f.write(upload.read) }
# File.open(path, "wb") { |f| f.write(upload['datafile'].read) }


end end
end end
Expand Down
1 change: 1 addition & 0 deletions app/views/conferences/offline.html.erb
@@ -0,0 +1 @@
Voice Board is Live!
34 changes: 0 additions & 34 deletions app/views/layouts/application.html.erb
Expand Up @@ -7,40 +7,6 @@
<%= javascript_include_tag :defaults %> <%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %> <%= csrf_meta_tag %>


<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<!-- <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js' type='text/javascript'></script> -->
<script src='/fullScreenMusic/soundmanager/script/soundmanager2.js' type='text/javascript'></script>
<script src='/fullScreenMusic/ttwFullScreenMusic.js' type='text/javascript'></script>
<link href='/fullScreenMusic/css/style.css' rel='stylesheet' type='text/css'>


<script>
//<![CDATA[
soundManager.flashVersion = 9;
soundManager.useHighPerformance = true;
soundManager.wmode = 'transparent';
soundManager.useFastPolling = true;
soundManager.url = '/fullScreenMusic/soundmanager/swf/';
soundManager.debugMode = false;
soundManager.autoPlay = true;
soundManager.autoAdvance = true;
// soundManager.showPlaylist = true;

soundManager.onload = function() {
// $('.playlist').ttwFullScreenMusic({style:'page-list'});
$('.playlist').ttwFullScreenMusic({style:'fullscreen'});
}
//]]>
</script>

<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/ui-blitzer/jquery-ui.css"/>
<script type="text/javascript" src="http://s.phono.com/releases/0.2/jquery.phono.js"></script>
<script type="text/javascript" src="http://s.phono.com/addons/callme/79a53b7/jquery.callme.js"></script>


</head> </head>
<body> <body>


Expand Down
50 changes: 50 additions & 0 deletions app/views/layouts/applicationx.html.erb
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>Voiceboard</title>

<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>

<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<!-- <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js' type='text/javascript'></script> -->
<script src='/fullScreenMusic/soundmanager/script/soundmanager2.js' type='text/javascript'></script>
<script src='/fullScreenMusic/ttwFullScreenMusic.js' type='text/javascript'></script>
<link href='/fullScreenMusic/css/style.css' rel='stylesheet' type='text/css'>


<script>
//<![CDATA[
soundManager.flashVersion = 9;
soundManager.useHighPerformance = true;
soundManager.wmode = 'transparent';
soundManager.useFastPolling = true;
soundManager.url = '/fullScreenMusic/soundmanager/swf/';
soundManager.debugMode = false;
soundManager.autoPlay = true;
soundManager.autoAdvance = true;
// soundManager.showPlaylist = true;

soundManager.onload = function() {
// $('.playlist').ttwFullScreenMusic({style:'page-list'});
$('.playlist').ttwFullScreenMusic({style:'fullscreen'});
}
//]]>
</script>

<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/ui-blitzer/jquery-ui.css"/>
<script type="text/javascript" src="http://s.phono.com/releases/0.2/jquery.phono.js"></script>
<script type="text/javascript" src="http://s.phono.com/addons/callme/79a53b7/jquery.callme.js"></script>


</head>
<body>

<%= yield %>

</body>
</html>
5 changes: 2 additions & 3 deletions app/views/upload/uploadfile.html.erb
Expand Up @@ -2,9 +2,8 @@
<h1>File Upload</h1> <h1>File Upload</h1>
<div style="clear: both;">&nbsp;</div> <div style="clear: both;">&nbsp;</div>


<%= form_tag ({:action => 'uploadFile'}, <%= form_tag({:action => 'uploadFile'}, :multipart => true) %>
:multipart => true) %>
<p><label for="upload_file">Select File</label> : <p><label for="upload_file">Select File</label> :
<%= file_field 'upload', 'datafile' %></p> <%= file_field 'upload', 'datafile' %></p>
<%= submit_tag "Upload" %><%= submit_tag "Upload" %> <%= submit_tag "Upload" %>
</form> </form>
3 changes: 2 additions & 1 deletion config/routes.rb
Expand Up @@ -57,7 +57,8 @@


# You can have the root of your site routed with "root" # You can have the root of your site routed with "root"
# just remember to delete public/index.html. # just remember to delete public/index.html.
root :to => "conferences#index" # root :to => "conferences#index"
root :to => "conferences#offline"


# See how all your routes lay out with "rake routes" # See how all your routes lay out with "rake routes"


Expand Down
Binary file modified public/.DS_Store
Binary file not shown.
Binary file added public/data/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions public/data/73s.txt
@@ -0,0 +1 @@
{"datafile"=>"73s.txt"}
Binary file added public/data/ChrisMatthieu_Resume_Voxeo.pdf
Binary file not shown.
Binary file added public/data/audio2174036677509342730.mp3
Binary file not shown.
Binary file added public/data/audio339806556977355226.mp3
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions public/data/free-pass-photo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/data/nodefussh.txt
@@ -0,0 +1 @@
nodefussh.txt
Binary file added public/data/vivatjesus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion tropo_sms.rb
Expand Up @@ -4,7 +4,9 @@
require 'open-uri' require 'open-uri'
require 'json' require 'json'


url = 'http://voiceboard.heroku.com/api/smsnumbers/' + $currentCall.callerID + '.json' # url = 'http://voiceboard.heroku.com/api/smsnumbers/' + $currentCall.callerID + '.json'
url = 'http://50.16.198.185/api/smsnumbers/' + $currentCall.callerID + '.json'

mymessage = $currentCall.initialText mymessage = $currentCall.initialText


#JSON data to a Ruby hash #JSON data to a Ruby hash
Expand Down
7 changes: 4 additions & 3 deletions tropo_voicememo.rb
Expand Up @@ -5,8 +5,8 @@
myvoice = "Kate" myvoice = "Kate"


# apiurl = 'http://web1.tunnlr.com:11053' #test # apiurl = 'http://web1.tunnlr.com:11053' #test
apiurl = 'http://voiceboard.heroku.com' #production # apiurl = 'http://voiceboard.heroku.com' #production

apiurl = "http://50.16.198.185"


say "welcome to the burning man voice board!", {:voice => myvoice} say "welcome to the burning man voice board!", {:voice => myvoice}


Expand Down Expand Up @@ -38,7 +38,8 @@
lastmsg = memo["conference"]["id"] lastmsg = memo["conference"]["id"]
memorec = RestClient.get apiurl + '/conferences/' + memo["conference"]["id"].to_s + '.json?callerid=' + $currentCall.callerID memorec = RestClient.get apiurl + '/conferences/' + memo["conference"]["id"].to_s + '.json?callerid=' + $currentCall.callerID
memorecdata = JSON.parse(memorec) memorecdata = JSON.parse(memorec)
say "http://voicememo-uploads.s3.amazonaws.com/" + memorecdata["conference"]["filename"] say apiurl + "/data/" + memorecdata["conference"]["filename"]
# say "http://voicememo-uploads.s3.amazonaws.com/" + memorecdata["conference"]["filename"]
end end
end end


Expand Down

0 comments on commit f36f12e

Please sign in to comment.