Browse files

removed s3 and phono for local burningman install

  • Loading branch information...
1 parent 5ab73b6 commit f36f12ef194d23744b9157492e7722153b6a121b @chrismatthieu committed Aug 23, 2011
View
29 Gemfile
@@ -1,35 +1,12 @@
source 'http://rubygems.org'
gem 'rails', '3.0.9'
-gem "aws-s3", :require => "aws/s3"
gem "rest-client"
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'
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# 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'
+# used for heroku and web app
+# gem "aws-s3", :require => "aws/s3"
+# gem "flickraw"
-# 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
View
21 Gemfile.lock
@@ -29,25 +29,18 @@ GEM
activesupport (= 3.0.9)
activesupport (3.0.9)
arel (2.0.10)
- aws-s3 (0.6.2)
- builder
- mime-types
- xml-simple
builder (2.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
- flickraw (0.8.4)
- json (>= 1.1.1)
i18n (0.5.0)
- json (1.5.3)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- mysql2 (0.2.11)
- polyglot (0.3.1)
+ mysql2 (0.2.13)
+ polyglot (0.3.2)
rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
@@ -68,21 +61,19 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.8.7)
- rdoc (3.8)
- rest-client (1.6.3)
+ rdoc (3.9.2)
+ rest-client (1.6.6)
mime-types (>= 1.16)
thor (0.14.6)
- treetop (1.4.9)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
- xml-simple (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
- aws-s3
- flickraw
mysql2 (~> 0.2.6)
rails (= 3.0.9)
rake (= 0.8.7)
View
BIN app/.DS_Store
Binary file not shown.
View
4 app/controllers/conferences_controller.rb
@@ -1,5 +1,9 @@
class ConferencesController < ApplicationController
+ def offline
+ render :layout => false
+ end
+
# GET /conferences
# GET /conferences.xml
def index
View
1 app/controllers/upload_controller.rb
@@ -4,6 +4,7 @@ def index
end
def uploadFile
post = DataFile.save(params[:filename])
+ # post = DataFile.save(params[:upload])
@conference = Conference.find(:first, :conditions => ['inprogress = ?', true])
if @conference
@conference.inprogress = false
View
25 app/models/data_file.rb
@@ -1,19 +1,28 @@
class DataFile < ActiveRecord::Base
require 'rubygems'
- require 'aws/s3'
+ # require 'aws/s3'
def self.save(upload)
name = upload.original_filename
+ # name = upload['datafile'].original_filename
- if name.length > 0
+ if name #.length > 0
- AWS::S3::Base.establish_connection!(
- :access_key_id => CONFIG['aws_access_key_id'],
- :secret_access_key => CONFIG['aws_secret_access_key']
-
- )
- AWS::S3::S3Object.store(name, open(upload), CONFIG['aws_bucket'], :access => :public_read)
+ # AWS::S3::Base.establish_connection!(
+ # :access_key_id => CONFIG['aws_access_key_id'],
+ # :secret_access_key => CONFIG['aws_secret_access_key']
+ #
+ # )
+ # 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
View
1 app/views/conferences/offline.html.erb
@@ -0,0 +1 @@
+Voice Board is Live!
View
34 app/views/layouts/application.html.erb
@@ -7,40 +7,6 @@
<%= 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>
View
50 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>
View
5 app/views/upload/uploadfile.html.erb
@@ -2,9 +2,8 @@
<h1>File Upload</h1>
<div style="clear: both;">&nbsp;</div>
-<%= form_tag ({:action => 'uploadFile'},
- :multipart => true) %>
+<%= form_tag({:action => 'uploadFile'}, :multipart => true) %>
<p><label for="upload_file">Select File</label> :
<%= file_field 'upload', 'datafile' %></p>
-<%= submit_tag "Upload" %><%= submit_tag "Upload" %>
+<%= submit_tag "Upload" %>
</form>
View
3 config/routes.rb
@@ -57,7 +57,8 @@
# You can have the root of your site routed with "root"
# 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"
View
BIN public/.DS_Store
Binary file not shown.
View
BIN public/data/.DS_Store
Binary file not shown.
View
1 public/data/73s.txt
@@ -0,0 +1 @@
+{"datafile"=>"73s.txt"}
View
BIN public/data/ChrisMatthieu_Resume_Voxeo.pdf
Binary file not shown.
View
BIN public/data/audio2174036677509342730.mp3
Binary file not shown.
View
BIN public/data/audio339806556977355226.mp3
Binary file not shown.
View
0 public/data/audio5942987993304184473.mp3
No changes.
View
1 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.
View
1 public/data/nodefussh.txt
@@ -0,0 +1 @@
+nodefussh.txt
View
BIN 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.
View
4 tropo_sms.rb
@@ -4,7 +4,9 @@
require 'open-uri'
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
#JSON data to a Ruby hash
View
7 tropo_voicememo.rb
@@ -5,8 +5,8 @@
myvoice = "Kate"
# 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}
@@ -38,7 +38,8 @@
lastmsg = memo["conference"]["id"]
memorec = RestClient.get apiurl + '/conferences/' + memo["conference"]["id"].to_s + '.json?callerid=' + $currentCall.callerID
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

0 comments on commit f36f12e

Please sign in to comment.