diff --git a/build b/build index 9b97f9176..6d408c180 100755 --- a/build +++ b/build @@ -66,7 +66,7 @@ DEB_SERVER=http://localhost:9010/apt-`uname -p` GEM_SERVER=http://localhost:9000/gems # if still going, then push all debs up - if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then + if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* || "$GIT_BRANCH" == *release* ]]; then echo "" echo "PUSHING DB ARTIFACTS" @@ -129,7 +129,7 @@ GEM_SERVER=http://localhost:9000/gems popd > /dev/null else - echo "Skipping publish since branch is neither master or develop..." + echo "Skipping publish since branch is not master, develop, or release/*. branch is $GIT_BRANCH" fi fi diff --git a/db/manifest b/db/manifest index 627a79b18..91ea92c29 100755 --- a/db/manifest +++ b/db/manifest @@ -143,5 +143,5 @@ emails.sql email_batch.sql user_progress_tracking2.sql bands_did_session.sql +email_change_default_sender.sql affiliate_partners.sql - diff --git a/db/up/email_change_default_sender.sql b/db/up/email_change_default_sender.sql new file mode 100644 index 000000000..e729980f0 --- /dev/null +++ b/db/up/email_change_default_sender.sql @@ -0,0 +1 @@ +ALTER TABLE email_batches ALTER column from_email SET DEFAULT 'noreply@jamkazam.com'::character varying; \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/mailers/invited_user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/invited_user_mailer.rb index 566cd7d22..e01846424 100644 --- a/ruby/lib/jam_ruby/app/mailers/invited_user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/invited_user_mailer.rb @@ -9,7 +9,7 @@ module JamRuby class InvitedUserMailer < ActionMailer::Base include SendGrid - DEFAULT_SENDER = "support@jamkazam.com" + DEFAULT_SENDER = "noreply@jamkazam.com" default :from => DEFAULT_SENDER diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index f0909d7eb..cd7134591 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -11,7 +11,7 @@ layout "user_mailer" - DEFAULT_SENDER = "support@jamkazam.com" + DEFAULT_SENDER = "noreply@jamkazam.com" default :from => DEFAULT_SENDER diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.html.erb index bb943b508..7c85b9df4 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.html.erb @@ -1,5 +1,5 @@ <% provide(:title, 'Confirm Email') %> -

Welcome to Jamkazam, <%= @user.first_name %>!

+

Welcome to JamKazam, <%= @user.first_name %>!

To confirm this email address, please go to the signup confirmation page.

diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.text.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.text.erb index 73ad001bd..d412a7b92 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.text.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/confirm_email.text.erb @@ -1,3 +1,3 @@ -Welcome to Jamkazam, <%= @user.first_name %>! +Welcome to JamKazam, <%= @user.first_name %>! To confirm this email address, please go to the signup confirmation page at: <%= @signup_confirm_url %>. \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_changed.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_changed.html.erb index 534066c5a..026c41daf 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_changed.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_changed.html.erb @@ -1,3 +1,3 @@ -<% provide(:title, 'Jamkazam Password Changed') %> +<% provide(:title, 'JamKazam Password Changed') %> You just changed your password at JamKazam. diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.html.erb index a69fe4da5..49a0a90bd 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.html.erb @@ -1,3 +1,3 @@ -<% provide(:title, 'Jamkazam Password Reset') %> +<% provide(:title, 'JamKazam Password Reset') %> -Visit this link so that you can change your Jamkazam password: reset password. \ No newline at end of file +Visit this link so that you can change your JamKazam password: reset password. \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.text.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.text.erb index f0f0e7502..4cbcc6646 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.text.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/password_reset.text.erb @@ -1 +1 @@ -Visit this link so that you can change your Jamkazam password: Reset Password. \ No newline at end of file +Visit this link so that you can change your JamKazam password: Reset Password. \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb index 4ca9c6e5d..6a27ed8a7 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updated_email.html.erb @@ -1,3 +1,3 @@ -<% provide(:title, 'Jamkazam Email Confirmed') %> +<% provide(:title, 'JamKazam Email Confirmed') %> <%= @user.email %> has been confirmed as your new email address. \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb index 3573d8ea6..0617f81ae 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/updating_email.html.erb @@ -1,3 +1,3 @@ -<% provide(:title, 'Please Confirm New Jamkazam Email') %> +<% provide(:title, 'Please Confirm New JamKazam Email') %> Please click the following link to confirm your change in email: confirm email. \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/layouts/README.md b/ruby/lib/jam_ruby/app/views/layouts/README.md index f24c4abc7..367552121 100644 --- a/ruby/lib/jam_ruby/app/views/layouts/README.md +++ b/ruby/lib/jam_ruby/app/views/layouts/README.md @@ -1,4 +1,4 @@ -Understanding Jamkazam Email Layouts +Understanding JamKazam Email Layouts ==================================== We have two types of layouts; diff --git a/ruby/lib/jam_ruby/models/band.rb b/ruby/lib/jam_ruby/models/band.rb index 210753784..3a4a07f60 100644 --- a/ruby/lib/jam_ruby/models/band.rb +++ b/ruby/lib/jam_ruby/models/band.rb @@ -10,7 +10,7 @@ module JamRuby self.primary_key = 'id' before_save :stringify_photo_info , :if => :updating_photo - validates :biography, no_profanity: true, presence:true + validates :biography, no_profanity: true, presence:true, length: {maximum: 4000} validates :name, presence: true validates :country, presence: true, :unless => :skip_location_validation validates :state, presence: true, :unless => :skip_location_validation diff --git a/ruby/lib/jam_ruby/models/email_batch.rb b/ruby/lib/jam_ruby/models/email_batch.rb index 309b63305..74dff06ec 100644 --- a/ruby/lib/jam_ruby/models/email_batch.rb +++ b/ruby/lib/jam_ruby/models/email_batch.rb @@ -12,7 +12,7 @@ module JamRuby VAR_FIRST_NAME = '@FIRSTNAME' VAR_LAST_NAME = '@LASTNAME' - DEFAULT_SENDER = "support@jamkazam.com" + DEFAULT_SENDER = "noreply@jamkazam.com" BATCH_SIZE = 1000 BODY_TEMPLATE =< -1) { - return "Win32_asio4all" - } - else { - return "Win32_asio"; - } + else if (operatingSystem == "Win32") { + if (context.jamClient.FTUEIsMusicDeviceWDM(deviceId)) { + return "Win32_wdm"; + } + else if (displayName.toLowerCase().indexOf("asio4all") > -1) { + return "Win32_asio4all" + } + else { + return "Win32_asio"; + } } else { return "Linux"; @@ -122,25 +133,27 @@ var loadedDevices = {}; // augment these devices by determining their type - context._.each(devices, function(displayName, deviceId) { + context._.each(devices, function (displayName, deviceId) { var deviceInfo = {}; deviceInfo.id = deviceId; deviceInfo.type = determineDeviceType(deviceId, displayName); deviceInfo.displayType = audioDeviceBehavior[deviceInfo.type].display; - deviceInfo.displayName = deviceInfo.displayName; + deviceInfo.displayName = displayName; loadedDevices[deviceId] = deviceInfo; + + logger.debug("loaded device: ", deviceInfo); }) - deviceInformation = context._.keys(loadedDevices).sort(); + deviceInformation = loadedDevices; - logger.debug(context.JK.dlen(deviceInformation) + " devices loaded." , deviceInformation); + logger.debug(context.JK.dlen(deviceInformation) + " devices loaded.", deviceInformation); } - // returns a deviceInfo hash for the device matching the deviceId, or null. + // returns a deviceInfo hash for the device matching the deviceId, or undefined. function findDevice(deviceId) { - return {}; + return deviceInformation[deviceId]; } function selectedAudioInput() { @@ -164,22 +177,21 @@ } function initializeNextButtonState() { - console.log(context.jamClient.FTUEGetDevices(false)); - console.log("chat devices", jamClient.FTUEGetChatInputs()); $nextButton.removeClass('button-orange button-grey'); - if(validScore) $nextButton.addClass('button-orange'); + if (validScore) $nextButton.addClass('button-orange'); else $nextButton.addClass('button-grey'); } function initializeAudioInput() { var optionsHtml = ''; optionsHtml = ''; - context._.each(deviceInformation, function(deviceInfo, deviceId) { + context._.each(deviceInformation, function (deviceInfo, deviceId) { + + console.log(arguments) optionsHtml += ''; }); $audioInput.html(optionsHtml); - alert(optionsHtml) context.JK.dropdown($audioInput); initializeAudioInputChanged(); @@ -188,7 +200,7 @@ function initializeAudioOutput() { var optionsHtml = ''; optionsHtml = ''; - context._.each(deviceInformation, function(deviceInfo, deviceId) { + context._.each(deviceInformation, function (deviceInfo, deviceId) { optionsHtml += ''; }); $audioOutput.html(optionsHtml); @@ -198,11 +210,146 @@ } function initializeFramesize() { + context.JK.dropdown($frameSize); + } + function initializeBuffers() { + context.JK.dropdown($bufferIn); + context.JK.dropdown($bufferOut); + } + + // finds out if the $port argument is from a different port pair than what's currently selected + function isNewlySelectedPair($port) { + var portId = $port.attr('data-id'); + // get all inputs currently selected except this one + var $selectedInputs = $inputPorts.find('input[type="checkbox"]:checked').filter('[data-id="' + portId + '"]'); + + console.log("$selectedInputs", $selectedInputs); + var isNewlySelected = true; + context._.each($selectedInputs, function($current) { + var testPairInfo = $($current).data('pair'); + + context._.each(testPairInfo.ports, function(port) { + // if we can find the newly selected item in this pair, then it's not a different pair... + if(port.id == portId) { + isNewlySelected = false; + return false; // break loop + } + }); + + if(isNewlySelected) return false; // break loop + }); + + return isNewlySelected; + } + + // set checkbox state for all items in the pair + function setCheckedForAllInPair($portBox, pairInfo, checked, signalBackend) { + context._.each(pairInfo.ports, function(port) { + var portId = port.id; + var $input = $portBox.find('input[type="checkbox"][data-id="' + portId + '"]'); + if($input.is(':checked') != checked) { + if(checked) { + $input.iCheck('check').attr('checked', 'checked'); + //context.jamClient.FTUESetMusicInput2($input.id); + } + else { + $input.iCheck('uncheck').removeAttr('checked'); + //context.jamClient.FTUEUnsetMusicInput2($input.id); + } + } + }) + } + + function inputPortChanged() { + if(iCheckIgnore) return; + + var $checkbox = $(this); + var portId = $checkbox.data('data-id'); + var inputPortChecked = $checkbox.is(':checked'); + console.log('inputPortChecked: ' + inputPortChecked); + + if(inputPortChecked) { + if(isNewlySelectedPair($checkbox)) { + setCheckedForAllInPair($inputPorts, $checkbox.data('pair'), true, true); + } + else { + //context.jamClient.FTUESetMusicInput2($input.id); + } + } + else { + // context.jamClient.FTUEUnsetMusicInput2($input.id);; + } + } + + // should be called in a ifChanged callback if you want to cancel. bleh. + function cancelICheckChange($checkbox) { + iCheckIgnore = true; + var checked = $checkbox.is(':checked'); + setTimeout(function() { + if(checked) $checkbox.iCheck('uncheck').removeAttr('checked'); + else $checkbox.iCheck('check').attr('checked', 'checked'); + iCheckIgnore = false; + }, 1); + } + + function outputPortChanged() { + if(iCheckIgnore) return; + + var $checkbox = $(this); + var portId = $checkbox.data('data-id'); + var outputPortChecked = $checkbox.is(':checked'); + console.log('outputPortChecked: ' + outputPortChecked); + + if(outputPortChecked) { + var $selectedInputs = $outputPorts.find('input[type="checkbox"]:checked').filter('[data-id="' + portId + '"]'); + $selectedInputs.iCheck('uncheck').removeAttr('checked'); + var pairInfo = $checkbox.data('pair'); + setCheckedForAllInPair($outputPorts, pairInfo, true, false); + console.log("Setting music output"); + context.jamClient.FTUESetMusicOutput(pairInfo.ports.map(function(i) {return i.id}).join(PROFILE_DEV_SEP_TOKEN)); + } + else { + context.JK.Banner.showAlert('You must have at least one output pair selected.'); + // can't allow uncheck of last output + cancelICheckChange($checkbox); + } + } + + function initializeInputPorts(inputPorts) { + context._.each(inputPorts, function(inputPairs) { + // there is no guarantee that a pair has two items. + context._.each(inputPairs.ports, function(inputInPair) { + var inputPort = $(context._.template($templateAudioPort.html(), inputInPair, { variable: 'data' })); + var $checkbox = inputPort.find('input'); + $checkbox.data('pair', inputPairs); // so when it's selected, we can see what other ports, if any, are in the same pair + context.JK.checkbox($checkbox); + $checkbox.on('ifChanged', inputPortChanged); + $inputPorts.append(inputPort); + }); + }); + } + + function initializeOutputPorts(outputPorts) { + var first = true; + context._.each(outputPorts, function(outputPairs) { + context._.each(outputPairs.ports, function(outputInPair) { + var outputPort = $(context._.template($templateAudioPort.html(), outputInPair, { variable: 'data' })); + var $checkbox = outputPort.find('input'); + $checkbox.data('pair', outputPairs); // so when it's selected, we can see what other ports, if any, are in the same pair + context.JK.checkbox($checkbox); + $checkbox.on('ifChanged', outputPortChanged); + $outputPorts.append(outputPort); + }); + if(first) { + first = false; + setCheckedForAllInPair($outputPorts, outputPairs, true, false); + } + }); } function initializeFormElements() { - if(!deviceInformation) throw "devices are not initialized"; + if (!deviceInformation) throw "devices are not initialized"; initializeAudioInput(); initializeAudioOutput(); @@ -225,7 +372,9 @@ } function resetScoreReport() { - $scoreReport.empty(); + $ioRateScore.empty(); + $ioVarScore.empty(); + $latencyScore.empty(); } function updateScoreReport(latencyResult) { @@ -233,9 +382,9 @@ var latencyValue = 'N/A'; var validLatency = false; if (latencyResult && latencyResult.latencyknown) { - var latency = latencyResult.latency; + var latencyValue = latencyResult.latency; latencyValue = Math.round(latencyValue * 100) / 100; - if (latency.latency <= 10) { + if (latencyValue <= 10) { latencyClass = "good"; validLatency = true; } else if (latency.latency <= 20) { @@ -248,57 +397,9 @@ validScore = validLatency; // validScore may become based on IO variance too - $scoreReport.html(latencyValue); + $latencyScore.html(latencyValue + ' ms'); } - function loadAudioDrivers() { - var drivers = context.jamClient.FTUEGetDevices(false); - var chatDrivers = jamClient.FTUEGetChatInputs(); - var optionsHtml = ''; - var chatOptionsHtml = ''; - - - var driverOptionFunc = function (driverKey, index, list) { - if(!drivers[driverKey]) { - logger.debug("skipping unknown device:", driverKey) - } - else { - optionsHtml += ''; - } - }; - - var chatOptionFunc = function (driverKey, index, list) { - chatOptionsHtml += ''; - }; - - var selectors = [ - '[layout-wizard-step="0"] .settings-2-device select', - '[layout-wizard-step="2"] .settings-driver select' - ]; - - // handle standard devices - var sortedDeviceKeys = context._.keys(drivers).sort(); - context._.each(sortedDeviceKeys, driverOptionFunc); - $.each(selectors, function (index, selector) { - var $select = $(selector); - $select.empty(); - $select.html(optionsHtml); - context.JK.dropdown($select); - }); - - selectors = ['[layout-wizard-step="0"] .settings-2-voice select']; - var sortedVoiceDeviceKeys = context._.keys(chatDrivers).sort(); - - // handle voice inputs - context._.each(sortedVoiceDeviceKeys, chatOptionFunc); - $.each(selectors, function (index, selector) { - var $select = $(selector); - $select.empty(); - $select.html(chatOptionsHtml); - context.JK.dropdown($select); - }); - - } function audioInputDeviceUnselected() { validScore = false; initializeNextButtonState(); @@ -362,16 +463,16 @@ } function initializeWatchVideo() { - $watchVideoInput.unbind('click').click(function() { + $watchVideoInput.unbind('click').click(function () { var audioDevice = findDevice(selectedAudioInput()); - if(!audioDevice) { + if (!audioDevice) { context.JK.Banner.showAlert('You must first choose an Audio Input Device so that we can determine which video to show you.'); } else { var videoURL = audioDeviceBehavior[audioDevice.type].videoURL; - if(videoURL) { + if (videoURL) { $(this).attr('href', videoURL); return true; } @@ -383,16 +484,16 @@ return false; }); - $watchVideoOutput.unbind('click').click(function() { + $watchVideoOutput.unbind('click').click(function () { var audioDevice = findDevice(selectedAudioOutput()); - if(!audioDevice) { + if (!audioDevice) { throw "this button should be hidden"; } else { var videoURL = audioDeviceBehavior[audioDevice.type].videoURL; - if(videoURL) { + if (videoURL) { $(this).attr('href', videoURL); return true; } @@ -406,35 +507,52 @@ } function initializeAudioInputChanged() { - $audioInput.unbind('change').change(function(evt) { + $audioInput.unbind('change').change(function (evt) { - var audioDeviceId = selectedAudioInput(); - if(!audioDeviceId) { - audioInputDeviceUnselected(); - return false; - } + var audioDeviceId = selectedAudioInput(); + if (!audioDeviceId) { + audioInputDeviceUnselected(); + return false; + } - var audioDevice = findDevice(selectedAudioInput()); - if(!audioDevice) { - context.JK.alertSupportedNeeded('Unable to find device information for: ' + audioDeviceId); - return false; - } + var audioDevice = findDevice(selectedAudioInput()); + if (!audioDevice) { + context.JK.alertSupportedNeeded('Unable to find device information for: ' + audioDeviceId); + return false; + } - renderScoringStarted(); - jamClient.FTUESetMusicDevice(audioDeviceId); - jamClient.FTUESetInputLatency(selectedAudioInput()); - jamClient.FTUESetOutputLatency(selectedAudioOutput()); - jamClient.FTUESetFrameSize(selectedFramesize()); - logger.debug("Calling FTUESave(false)"); - jamClient.FTUESave(false); + renderScoringStarted(); - var latency = jamClient.FTUEGetExpectedLatency(); - console.log("FTUEGetExpectedLatency: %o", latency); + jamClient.FTUESetMusicDevice(audioDeviceId); - renderScoringStopped(); - }); + // enumerate input and output ports + musicInputPorts = jamClient.FTUEGetMusicInputs2(); + console.log(JSON.stringify(musicInputPorts)); + // [{"inputs":[{"id":"i~5~Built-in Microph~0~0","name":"Built-in Microph - Left"},{"id":"i~5~Built-in Microph~1~0","name":"Built-in Microph - Right"}]}] + musicOutputPorts = jamClient.FTUEGetMusicOutputs2(); + console.log(JSON.stringify(musicOutputPorts)); + // [{"outputs":[{"id":"o~5~Built-in Output~0~0","name":"Built-in Output - Left"},{"id":"o~5~Built-in Output~1~0","name":"Built-in Output - Right"}]}] + + + initializeInputPorts(musicInputPorts); + initializeOutputPorts(musicOutputPorts); + + + jamClient.FTUESetInputLatency(selectedAudioInput()); + jamClient.FTUESetOutputLatency(selectedAudioOutput()); + jamClient.FTUESetFrameSize(selectedFramesize()); + + logger.debug("Calling FTUESave(false)"); + jamClient.FTUESave(false); + + var latency = jamClient.FTUEGetExpectedLatency(); + console.log("FTUEGetExpectedLatency: %o", latency); + + updateScoreReport(latency); + renderScoringStopped(); + }); } function initializeAudioOutputChanged() { @@ -498,7 +616,9 @@ function beforeShowStep($step) { var stepInfo = STEPS[step]; - if(!stepInfo) {throw "unknown step: " + step;} + if (!stepInfo) { + throw "unknown step: " + step; + } stepInfo.beforeShow.call(self); } @@ -511,7 +631,7 @@ $currentWizardStep = $nextWizardStep; var $ftueSteps = $(context._.template($templateSteps.html(), {}, { variable: 'data' })); - var $activeStep = $ftueSteps.find('.ftue-stepnumber[data-step-number="'+ step +'"]'); + var $activeStep = $ftueSteps.find('.ftue-stepnumber[data-step-number="' + step + '"]'); $activeStep.addClass('.active'); $activeStep.next().show(); // show the .ftue-step-title $currentWizardStep.find('.ftuesteps').replaceWith($ftueSteps); @@ -528,11 +648,11 @@ var $btnCancel = $ftueButtonsContent.find('.btn-cancel'); // hide back button if 1st step or last step - if(step == 0 && step == TOTAL_STEPS - 1) { + if (step == 0 && step == TOTAL_STEPS - 1) { $btnBack.hide(); } // hide next button if not on last step - if (step == TOTAL_STEPS - 1 ) { + if (step == TOTAL_STEPS - 1) { $btnNext.hide(); } // hide close if on last step @@ -559,7 +679,7 @@ function beforeShow(args) { step = args.d1; - if(!step) step = 0; + if (!step) step = 0; step = parseInt(step); moveToStep(); } @@ -573,14 +693,14 @@ } function back() { - if($(this).is('.button-grey')) return; + if ($(this).is('.button-grey')) return; step = step - 1; moveToStep(); return false; } function next() { - if($(this).is('.button-grey')) return; + if ($(this).is('.button-grey')) return; step = step + 1; @@ -599,6 +719,7 @@ function route() { } + function initialize() { var dialogBindings = { beforeShow: beforeShow, afterShow: afterShow, afterHide: afterHide }; @@ -609,6 +730,7 @@ $wizardSteps = $dialog.find('.wizard-step'); $templateSteps = $('#template-ftuesteps'); $templateButtons = $('#template-ftue-buttons'); + $templateAudioPort = $('#template-audio-port'); $ftueButtons = $dialog.find('.ftue-buttons'); operatingSystem = context.jamClient.GetOSAsString(); diff --git a/web/app/assets/javascripts/launchAppDialog.js b/web/app/assets/javascripts/launchAppDialog.js index fe1d9f76b..417a8c83c 100644 --- a/web/app/assets/javascripts/launchAppDialog.js +++ b/web/app/assets/javascripts/launchAppDialog.js @@ -11,6 +11,7 @@ var $templateAttemptLaunch = null; var $templateLaunchSuccessful = null; var $templateLaunchUnsuccessful = null; + var $gear_modal = false; function renderAttemptLaunch() { var $template = $(context._.template($templateAttemptLaunch.html(), buildOptions(), { variable: 'data' })); @@ -78,14 +79,22 @@ osSpecificSystemTrayLink = 'http://support.apple.com/kb/ht3737'; } - return { osSpecificSystemTray: osSpecificSystemTray, osSpecificSystemTrayLink: osSpecificSystemTrayLink, launchUrl: 'jamkazam:'}; + var message_prefix = $gear_modal ? "To configure your audio gear" : "To create or find and join a session"; + + return { osSpecificSystemTray: osSpecificSystemTray, osSpecificSystemTrayLink: osSpecificSystemTrayLink, launchUrl: 'jamkazam:', messagePrefix: message_prefix}; } function reset() { renderAttemptLaunch(); } - function beforeShow() { + function beforeShow(args) { + if (args) { + $gear_modal = (args.d1 == "gear"); + } + else { + $gear_modal = false; + } reset(); } diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js index 9890d9c43..dd5de4c3b 100644 --- a/web/app/assets/javascripts/utils.js +++ b/web/app/assets/javascripts/utils.js @@ -765,9 +765,9 @@ return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()); } - context.JK.guardAgainstBrowser = function(app) { + context.JK.guardAgainstBrowser = function(app, args) { if(!gon.isNativeClient) { - app.layout.showDialog('launch-app-dialog') + app.layout.showDialog('launch-app-dialog', args) } } diff --git a/web/app/assets/stylesheets/client/gearWizard.css.scss b/web/app/assets/stylesheets/client/gearWizard.css.scss index 49dc7f34b..f2c635714 100644 --- a/web/app/assets/stylesheets/client/gearWizard.css.scss +++ b/web/app/assets/stylesheets/client/gearWizard.css.scss @@ -184,8 +184,30 @@ width:45%; } + + .buffers { + .easydropdown-wrapper:nth-of-type(1) { + left:5px; + } + .easydropdown-wrapper:nth-of-type(2) { + left:35px; + } + .easydropdown, .easydropdown-wrapper { + width:15px; + } + } + + + .ftue-box.results { height: 230px !important; + padding:0; + + .scoring-section { + font-size:15px; + @include border_box_sizing; + height:64px; + } } .audio-output { @@ -510,8 +532,8 @@ .subcolumn.third { right:0px; } - } + .settings-controls { clear:both; diff --git a/web/app/assets/stylesheets/client/jamkazam.css.scss b/web/app/assets/stylesheets/client/jamkazam.css.scss index e7ec359f0..92d551f31 100644 --- a/web/app/assets/stylesheets/client/jamkazam.css.scss +++ b/web/app/assets/stylesheets/client/jamkazam.css.scss @@ -558,4 +558,9 @@ hr { width:100%; height:20px; text-align:center; +} + +body.jam .icheckbox_minimal { + display:inline-block; + position:relative; } \ No newline at end of file diff --git a/web/app/views/clients/_account_audio_profile.html.erb b/web/app/views/clients/_account_audio_profile.html.erb index c16a0394b..57588f1d7 100644 --- a/web/app/views/clients/_account_audio_profile.html.erb +++ b/web/app/views/clients/_account_audio_profile.html.erb @@ -35,7 +35,7 @@
-
ADD NEW PROFILE
BACK
+
ADD NEW GEAR
BACK
diff --git a/web/app/views/clients/_launchAppDialog.html.haml b/web/app/views/clients/_launchAppDialog.html.haml index 92b4482b5..e6d4cbf9f 100644 --- a/web/app/views/clients/_launchAppDialog.html.haml +++ b/web/app/views/clients/_launchAppDialog.html.haml @@ -5,13 +5,15 @@ .dialog-inner %script{type: 'text/template', id: 'template-attempt-launch'} - %p To create or find and join a session, you must use the JamKazam application. + %p + {{data.messagePrefix}}, you must use the JamKazam application. .right.buttons %a.button-grey.btn-cancel{href:'#', 'layout-action' => 'close'} CANCEL %a.button-orange.btn-launch-app{href:'{{data.launchUrl}}'} LAUNCH APP %script{type: 'text/template', id: 'template-unsupported-launch'} - %p To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already. + %p + {{data.messagePrefix}}, you must use the JamKazam application. Please download and install the application if you have not done so already. .right.buttons %a.button-grey.btn-cancel{href:'#', 'layout-action' => 'close'} CANCEL %a.button-orange.btn-go-to-download-page{href:'/downloads'} GO TO APP DOWNLOAD PAGE diff --git a/web/app/views/clients/gear/_gear_wizard.html.haml b/web/app/views/clients/gear/_gear_wizard.html.haml index 0ce16062d..fbeffefbd 100644 --- a/web/app/views/clients/gear/_gear_wizard.html.haml +++ b/web/app/views/clients/gear/_gear_wizard.html.haml @@ -83,6 +83,15 @@ .wizard-step-column %h2 Test Results .ftue-box.results + .left.w50.gold-fill.center.white.scoring-section + .p5 + .latency LATENCY + %span.latency-score + .left.w50.green-fill.center.white.scoring-section + .p5 + .io I/O + %span.io-rate-score + %span.io-var-score .clearall @@ -195,5 +204,11 @@ %a.button-orange.btn-next{href:'#'} NEXT %a.button-orange.btn-close{href:'#', 'layout-action' => 'close'} CLOSE +%script{type: 'text/template', id: 'template-audio-port'} + .audio-port + %input{ type: 'checkbox', 'data-id' => '{{data.id}}' } + %span + = '{{data.name}}' + diff --git a/web/app/views/layouts/client.html.erb b/web/app/views/layouts/client.html.erb index 7797d1dd5..2565a4ec7 100644 --- a/web/app/views/layouts/client.html.erb +++ b/web/app/views/layouts/client.html.erb @@ -7,12 +7,14 @@ <%= stylesheet_link_tag "client/client", media: "all" %> diff --git a/web/app/views/layouts/corporate.html.erb b/web/app/views/layouts/corporate.html.erb index 0b973c562..b852f8341 100644 --- a/web/app/views/layouts/corporate.html.erb +++ b/web/app/views/layouts/corporate.html.erb @@ -4,12 +4,14 @@ <%= full_title(yield(:title)) %> diff --git a/web/app/views/layouts/landing.erb b/web/app/views/layouts/landing.erb index 54c6ef95a..d88d06461 100644 --- a/web/app/views/layouts/landing.erb +++ b/web/app/views/layouts/landing.erb @@ -8,12 +8,14 @@ <%= stylesheet_link_tag "landing/landing", media: "all" %> diff --git a/web/app/views/layouts/minimal.html.erb b/web/app/views/layouts/minimal.html.erb index f3cc26096..f29412ae4 100644 --- a/web/app/views/layouts/minimal.html.erb +++ b/web/app/views/layouts/minimal.html.erb @@ -8,12 +8,14 @@ <%= stylesheet_link_tag "minimal/minimal", media: "all" %> diff --git a/web/app/views/layouts/web.html.erb b/web/app/views/layouts/web.html.erb index 532ee9b06..2515ae9da 100644 --- a/web/app/views/layouts/web.html.erb +++ b/web/app/views/layouts/web.html.erb @@ -8,12 +8,14 @@ <%= stylesheet_link_tag "web/web", media: "all" %> diff --git a/web/app/views/users/_feed_music_session_ajax.html.haml b/web/app/views/users/_feed_music_session_ajax.html.haml index 58d32ca4b..51f461f2c 100644 --- a/web/app/views/users/_feed_music_session_ajax.html.haml +++ b/web/app/views/users/_feed_music_session_ajax.html.haml @@ -6,7 +6,8 @@ / type and artist .left.ml20.w15 .title{hoveraction: 'session', :'session-id' => '{{data.feed_item.id}}' } SESSION - %a.artist{href: "#", :hoveraction => '{{data.feed_item.helpers.artist_hoveraction}}', :'{{data.feed_item.helpers.artist_datakey}}' => '{{data.feed_item.helpers.artist_id}}'} + .artist + %a.artist{href: "#", :hoveraction => '{{data.feed_item.helpers.artist_hoveraction}}', :'{{data.feed_item.helpers.artist_datakey}}' => '{{data.feed_item.helpers.artist_id}}'} = '{{data.feed_item.helpers.artist_name}}' %time.small.created_at.timeago{datetime: '{{data.feed_item.helpers.utc_created_at}}'}= '{{data.feed_item.created_at}}' / name and description diff --git a/web/app/views/users/_feed_recording_ajax.html.haml b/web/app/views/users/_feed_recording_ajax.html.haml index 66595e900..ffe584099 100644 --- a/web/app/views/users/_feed_recording_ajax.html.haml +++ b/web/app/views/users/_feed_recording_ajax.html.haml @@ -6,7 +6,8 @@ / type and artist .left.ml20.w15 .title{hoveraction: 'recording', :'recording-id' => '{{data.candidate_claimed_recording.id}}' } RECORDING - %a.artist{href: "#", :hoveraction => '{{data.feed_item.helpers.artist_hoveraction}}', :'{{data.feed_item.helpers.artist_datakey}}' => '{{data.feed_item.helpers.artist_id}}'} + .artist + %a.artist{href: "#", :hoveraction => '{{data.feed_item.helpers.artist_hoveraction}}', :'{{data.feed_item.helpers.artist_datakey}}' => '{{data.feed_item.helpers.artist_id}}'} = '{{data.feed_item.helpers.artist_name}}' %time.small.created_at.timeago{datetime: '{{data.feed_item.helpers.utc_created_at}}'} = '{{data.feed_item.created_at}}' diff --git a/web/db/schema.rb b/web/db/schema.rb deleted file mode 100644 index 7e4f2a47f..000000000 --- a/web/db/schema.rb +++ /dev/null @@ -1,1106 +0,0 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 0) do - - add_extension "uuid-ossp" - add_extension "fuzzystrmatch" - add_extension "postgis" - add_extension "postgis_tiger_geocoder" - add_extension "postgis_topology" - - create_table "active_admin_comments", :force => true do |t| - t.string "resource_id", :null => false - t.string "resource_type", :null => false - t.integer "author_id" - t.string "author_type" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "namespace" - end - - add_index "active_admin_comments", ["author_type", "author_id"], :name => "index_active_admin_comments_on_author_type_and_author_id" - add_index "active_admin_comments", ["namespace"], :name => "index_active_admin_comments_on_namespace" - add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_comments_on_resource_type_and_resource_id" - - create_table "artifact_updates", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "product", :null => false - t.string "version", :null => false - t.string "uri", :limit => 2000, :null => false - t.string "sha1", :null => false - t.string "environment", :default => "public", :null => false - t.integer "size", :null => false - end - - add_index "artifact_updates", ["product", "version"], :name => "artifact_updates_uniqkey", :unique => true - - create_table "band_invitations", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "band_id", :limit => 64 - t.boolean "accepted" - t.string "creator_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "bands", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "name", :limit => 1024, :null => false - t.string "website", :limit => 4000 - t.string "biography", :limit => 4000, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "city", :limit => 100 - t.string "state", :limit => 100 - t.string "country", :limit => 100 - t.string "photo_url", :limit => 2048 - t.string "logo_url", :limit => 2048 - t.tsvector "name_tsv" - t.string "original_fpfile_photo", :limit => 8000 - t.string "cropped_fpfile_photo", :limit => 8000 - t.string "cropped_s3_path_photo", :limit => 512 - t.string "crop_selection_photo", :limit => 256 - t.decimal "lat", :precision => 15, :scale => 10 - t.decimal "lng", :precision => 15, :scale => 10 - t.string "large_photo_url", :limit => 2048 - t.string "cropped_large_s3_path_photo", :limit => 512 - t.string "cropped_large_fpfile_photo", :limit => 8000 - t.boolean "did_real_session", :default => false - end - - add_index "bands", ["name_tsv"], :name => "bands_name_tsv_index", :using => :gin - - create_table "bands_genres", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "band_id", :limit => 64, :null => false - t.string "genre_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "bands_genres", ["band_id", "genre_id"], :name => "band_genre_uniqkey", :unique => true - - create_table "bands_musicians", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "band_id", :limit => 64, :null => false - t.string "user_id", :limit => 64, :null => false - t.boolean "admin", :default => false, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "bands_musicians", ["band_id", "user_id"], :name => "band_musician_uniqkey", :unique => true - - create_table "cities", :id => false, :force => true do |t| - t.string "city", :null => false - t.string "region", :limit => 2, :null => false - t.string "countrycode", :limit => 2, :null => false - end - - create_table "claimed_recordings", :id => false, :force => true do |t| - t.string "user_id", :limit => 64, :null => false - t.string "recording_id", :limit => 64, :null => false - t.string "id", :limit => 64, :null => false - t.string "name", :limit => 200, :null => false - t.boolean "is_public", :default => true, :null => false - t.string "genre_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "description", :limit => 8000 - t.tsvector "description_tsv" - t.tsvector "name_tsv" - end - - add_index "claimed_recordings", ["description_tsv"], :name => "claimed_recordings_description_tsv_index", :using => :gin - add_index "claimed_recordings", ["name_tsv"], :name => "claimed_recordings_name_tsv_index", :using => :gin - add_index "claimed_recordings", ["user_id", "recording_id"], :name => "musician_recording_uniqkey", :unique => true - - create_table "connections", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "client_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "music_session_id", :limit => 64 - t.string "ip_address", :limit => 64 - t.boolean "as_musician" - t.string "aasm_state", :limit => 64, :default => "idle", :null => false - t.integer "addr", :limit => 8, :null => false - t.float "latitude", :null => false - t.float "longitude", :null => false - t.string "countrycode", :limit => 2 - t.string "region", :limit => 2 - t.string "city" - t.integer "locidispid", :limit => 8, :null => false - t.datetime "joined_session_at" - t.string "client_type", :limit => 256, :null => false - end - - add_index "connections", ["client_id"], :name => "connections_client_id_key", :unique => true - add_index "connections", ["locidispid"], :name => "connections_locidispid_ndx" - - create_table "countries", :id => false, :force => true do |t| - t.string "countrycode", :limit => 2, :null => false - t.string "countryname", :limit => 64 - end - - create_table "crash_dumps", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "client_type", :limit => 64, :null => false - t.string "client_id", :limit => 64 - t.string "user_id", :limit => 64 - t.string "session_id", :limit => 64 - t.datetime "timestamp" - t.string "uri", :limit => 1000 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "client_version", :limit => 100, :null => false - end - - add_index "crash_dumps", ["client_id"], :name => "crash_dumps_client_id_idx" - add_index "crash_dumps", ["timestamp"], :name => "crash_dumps_timestamp_idx" - add_index "crash_dumps", ["user_id"], :name => "crash_dumps_user_id_idx" - - create_table "email_batch_sets", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "email_batch_id", :limit => 64 - t.datetime "started_at" - t.text "user_ids", :default => "", :null => false - t.integer "batch_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "email_batch_sets", ["email_batch_id", "started_at"], :name => "email_batch_set_uniqkey", :unique => true - add_index "email_batch_sets", ["email_batch_id"], :name => "email_batch_set_fkidx" - - create_table "email_batches", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "subject", :limit => 256, :null => false - t.text "body", :null => false - t.string "from_email", :limit => 64, :default => "support@jamkazam.com", :null => false - t.string "aasm_state", :limit => 32, :default => "pending", :null => false - t.text "test_emails", :default => "test@jamkazam.com", :null => false - t.integer "opt_in_count", :default => 0, :null => false - t.integer "sent_count", :default => 0, :null => false - t.integer "lock_version" - t.datetime "started_at" - t.datetime "completed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "email_errors", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "error_type", :limit => 32 - t.string "email_address", :limit => 256 - t.string "status", :limit => 32 - t.datetime "email_date" - t.text "reason" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "email_errors", ["email_address"], :name => "email_error_address_idx" - add_index "email_errors", ["user_id"], :name => "email_error_user_fkidx" - - create_table "event_sessions", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.datetime "starts_at" - t.datetime "ends_at" - t.string "pinned_state" - t.string "img_url", :limit => 1024 - t.integer "img_width" - t.integer "img_height" - t.string "event_id", :limit => 64 - t.string "user_id", :limit => 64 - t.string "band_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "ordinal" - end - - create_table "events", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "slug", :limit => 512, :null => false - t.text "title" - t.text "description" - t.boolean "show_sponser", :default => false, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "social_description" - end - - add_index "events", ["slug"], :name => "events_slug_key", :unique => true - - create_table "facebook_signups", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "lookup_id", :null => false - t.string "last_name", :limit => 100 - t.string "first_name", :limit => 100 - t.string "gender", :limit => 1 - t.string "email", :limit => 1024 - t.string "uid", :limit => 1024 - t.string "token", :limit => 1024 - t.datetime "token_expires_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "facebook_signups", ["lookup_id"], :name => "facebook_signups_lookup_id_key", :unique => true - - create_table "fan_invitations", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "sender_id", :limit => 64 - t.string "receiver_id", :limit => 64 - t.string "music_session_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "feeds", :force => true do |t| - t.string "recording_id", :limit => 64 - t.string "music_session_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "feeds", ["music_session_id"], :name => "feeds_music_session_id_key", :unique => true - add_index "feeds", ["recording_id"], :name => "feeds_recording_id_key", :unique => true - - create_table "follows", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64, :null => false - t.string "followable_id", :limit => 64, :null => false - t.string "followable_type", :limit => 25, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "follows", ["user_id", "followable_id"], :name => "follows_user_uniqkey", :unique => true - - create_table "friend_requests", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "friend_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "status", :limit => 50 - t.string "message", :limit => 4000 - end - - create_table "friendships", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "friend_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "friendships", ["user_id", "friend_id"], :name => "user_friend_uniqkey", :unique => true - - create_table "genres", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "description", :limit => 1024, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "genres_music_sessions", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "genre_id", :limit => 64 - t.string "music_session_id", :limit => 64 - end - -# Could not dump table "geoipblocks" because of following StandardError -# Unknown type 'geometry(Polygon)' for column 'geom' - - create_table "geoipisp", :id => false, :force => true do |t| - t.integer "beginip", :limit => 8, :null => false - t.integer "endip", :limit => 8, :null => false - t.string "company", :limit => 50, :null => false - end - - add_index "geoipisp", ["company"], :name => "geoipisp_company_ndx" - - create_table "geoiplocations", :id => false, :force => true do |t| - t.integer "locid", :null => false - t.string "countrycode", :limit => 2 - t.string "region", :limit => 2 - t.string "city" - t.string "postalcode", :limit => 8 - t.float "latitude", :null => false - t.float "longitude", :null => false - t.integer "metrocode" - t.string "areacode", :limit => 3 - t.integer "geog", :limit => 0 - end - - add_index "geoiplocations", ["geog"], :name => "geoiplocations_geog_gix", :using => :gist - - create_table "icecast_admin_authentications", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "source_pass", :limit => 64, :null => false - t.string "relay_user", :limit => 64, :null => false - t.string "relay_pass", :limit => 64, :null => false - t.string "admin_user", :limit => 64, :null => false - t.string "admin_pass", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_directories", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.integer "yp_url_timeout", :default => 15, :null => false - t.string "yp_url", :limit => 1024, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_limits", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.integer "clients", :default => 1000, :null => false - t.integer "sources", :default => 50, :null => false - t.integer "queue_size", :default => 102400, :null => false - t.integer "client_timeout", :default => 30 - t.integer "header_timeout", :default => 15 - t.integer "source_timeout", :default => 10 - t.integer "burst_size", :default => 65536 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_listen_sockets", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.integer "port", :default => 8001, :null => false - t.string "bind_address", :limit => 1024 - t.string "shoutcast_mount", :limit => 1024 - t.integer "shoutcast_compat" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_loggings", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "access_log", :limit => 1024, :default => "access.log", :null => false - t.string "error_log", :limit => 1024, :default => "error.log", :null => false - t.string "playlist_log", :limit => 1024 - t.integer "log_level", :default => 3, :null => false - t.integer "log_archive" - t.integer "log_size", :default => 10000 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_master_server_relays", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "master_server", :limit => 1024, :null => false - t.integer "master_server_port", :default => 8001, :null => false - t.integer "master_update_interval", :default => 120, :null => false - t.string "master_username", :limit => 64, :null => false - t.string "master_pass", :limit => 64, :null => false - t.integer "relays_on_demand", :default => 1, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_mount_templates", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "name", :limit => 256, :null => false - t.string "source_username", :limit => 64 - t.string "source_pass", :limit => 64 - t.integer "max_listeners", :default => 4 - t.integer "max_listener_duration", :default => 3600 - t.string "dump_file", :limit => 1024 - t.string "intro", :limit => 1024 - t.string "fallback_mount", :limit => 1024 - t.integer "fallback_override", :default => 1 - t.integer "fallback_when_full", :default => 1 - t.string "charset", :limit => 1024, :default => "ISO8859-1" - t.integer "is_public", :default => 0 - t.string "stream_name", :limit => 1024 - t.string "stream_description", :limit => 10000 - t.string "stream_url", :limit => 1024 - t.string "genre", :limit => 256 - t.integer "bitrate" - t.string "mime_type", :limit => 64, :default => "audio/mpeg", :null => false - t.string "subtype", :limit => 64 - t.integer "burst_size" - t.integer "mp3_metadata_interval" - t.integer "hidden", :default => 1 - t.string "on_connect", :limit => 1024 - t.string "on_disconnect", :limit => 1024 - t.string "authentication_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_mounts", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "name", :limit => 1024, :null => false - t.string "source_username", :limit => 64 - t.string "source_pass", :limit => 64 - t.integer "max_listeners", :default => 4 - t.integer "max_listener_duration", :default => 3600 - t.string "dump_file", :limit => 1024 - t.string "intro", :limit => 1024 - t.string "fallback_mount", :limit => 1024 - t.integer "fallback_override", :default => 1 - t.integer "fallback_when_full", :default => 1 - t.string "charset", :limit => 1024, :default => "ISO8859-1" - t.integer "is_public", :default => 0 - t.string "stream_name", :limit => 1024 - t.string "stream_description", :limit => 10000 - t.string "stream_url", :limit => 1024 - t.string "genre", :limit => 256 - t.integer "bitrate" - t.string "mime_type", :limit => 64 - t.string "subtype", :limit => 64 - t.integer "burst_size" - t.integer "mp3_metadata_interval" - t.integer "hidden", :default => 1 - t.string "on_connect", :limit => 1024 - t.string "on_disconnect", :limit => 1024 - t.string "authentication_id", :limit => 64 - t.integer "listeners", :default => 0, :null => false - t.boolean "sourced", :default => false, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "music_session_id", :limit => 64 - t.string "icecast_server_id", :limit => 64, :null => false - t.string "icecast_mount_template_id", :limit => 64 - t.datetime "sourced_needs_changing_at" - end - - add_index "icecast_mounts", ["name"], :name => "icecast_mounts_name_key", :unique => true - - create_table "icecast_paths", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "base_dir", :limit => 1024, :default => "./", :null => false - t.string "log_dir", :limit => 1024, :default => "./logs", :null => false - t.string "pid_file", :limit => 1024, :default => "./icecast.pid" - t.string "web_root", :limit => 1024, :default => "./web", :null => false - t.string "admin_root", :limit => 1024, :default => "./admin", :null => false - t.string "allow_ip", :limit => 1024 - t.string "deny_ip", :limit => 1024 - t.string "alias_source", :limit => 1024 - t.string "alias_dest", :limit => 1024 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_relays", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "server", :limit => 1024, :null => false - t.integer "port", :default => 8001, :null => false - t.string "mount", :limit => 1024, :null => false - t.string "local_mount", :limit => 1024 - t.string "relay_username", :limit => 64 - t.string "relay_pass", :limit => 64 - t.integer "relay_shoutcast_metadata", :default => 0 - t.integer "on_demand", :default => 1 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_securities", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.integer "chroot", :default => 0, :null => false - t.string "change_owner_user", :limit => 64 - t.string "change_owner_group", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_server_groups", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "name", :null => false - end - - add_index "icecast_server_groups", ["name"], :name => "icecast_server_groups_name_key", :unique => true - - create_table "icecast_server_mounts", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "icecast_mount_id", :limit => 64 - t.string "icecast_server_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "icecast_server_mounts", ["icecast_mount_id", "icecast_server_id"], :name => "server_mount_uniqkey", :unique => true - - create_table "icecast_server_relays", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "icecast_relay_id", :limit => 64 - t.string "icecast_server_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "icecast_server_relays", ["icecast_relay_id", "icecast_server_id"], :name => "server_relay_uniqkey", :unique => true - - create_table "icecast_server_sockets", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "icecast_listen_socket_id", :limit => 64 - t.string "icecast_server_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "icecast_server_sockets", ["icecast_listen_socket_id", "icecast_server_id"], :name => "server_socket_uniqkey", :unique => true - - create_table "icecast_servers", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.integer "config_changed", :default => 0 - t.string "limit_id", :limit => 64 - t.string "admin_auth_id", :limit => 64 - t.string "directory_id", :limit => 64 - t.string "master_relay_id", :limit => 64 - t.string "path_id", :limit => 64 - t.string "logging_id", :limit => 64 - t.string "security_id", :limit => 64 - t.string "template_id", :limit => 64, :null => false - t.string "hostname", :limit => 1024, :null => false - t.string "server_id", :limit => 1024, :null => false - t.string "location", :limit => 1024 - t.string "admin_email", :limit => 1024 - t.integer "fileserve" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "icecast_server_group_id", :limit => 64, :default => "default", :null => false - t.string "mount_template_id", :limit => 64 - t.datetime "config_updated_at" - end - - add_index "icecast_servers", ["server_id"], :name => "icecast_servers_server_id_key", :unique => true - - create_table "icecast_template_sockets", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "icecast_listen_socket_id", :limit => 64 - t.string "icecast_template_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "icecast_template_sockets", ["icecast_listen_socket_id", "icecast_template_id"], :name => "template_socket_uniqkey", :unique => true - - create_table "icecast_templates", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "limit_id", :limit => 64 - t.string "admin_auth_id", :limit => 64 - t.string "directory_id", :limit => 64 - t.string "master_relay_id", :limit => 64 - t.string "path_id", :limit => 64 - t.string "logging_id", :limit => 64 - t.string "security_id", :limit => 64 - t.string "location", :limit => 1024, :null => false - t.string "name", :limit => 256, :null => false - t.string "admin_email", :limit => 1024, :default => "admin@jamkazam.com", :null => false - t.integer "fileserve", :default => 1, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "icecast_user_authentications", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "authentication_type", :limit => 16, :default => "url" - t.string "filename", :limit => 1024 - t.integer "allow_duplicate_users" - t.string "mount_add", :limit => 1024 - t.string "mount_remove", :limit => 1024 - t.string "listener_add", :limit => 1024 - t.string "listener_remove", :limit => 1024 - t.string "unused_username", :limit => 64 - t.string "unused_pass", :limit => 64 - t.string "auth_header", :limit => 64, :default => "icecast-auth-user: 1" - t.string "timelimit_header", :limit => 64, :default => "icecast-auth-timelimit:" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "instruments", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "description", :limit => 1024, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "popularity", :default => 0, :null => false - end - - create_table "invitations", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "sender_id", :limit => 64 - t.string "receiver_id", :limit => 64 - t.string "music_session_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "join_request_id", :limit => 64 - end - - add_index "invitations", ["sender_id", "receiver_id", "music_session_id"], :name => "invitations_uniqkey", :unique => true - - create_table "invited_users", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "sender_id", :limit => 64 - t.boolean "autofriend", :null => false - t.string "email", :limit => 256 - t.string "invitation_code", :limit => 256, :null => false - t.boolean "accepted", :default => false - t.text "note" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "invite_medium", :limit => 64 - end - - add_index "invited_users", ["invitation_code"], :name => "invited_users_invitation_code_key", :unique => true - - create_table "isp_score_batch", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.text "json_scoring_data", :null => false - t.datetime "created_at", :null => false - end - - create_table "jamcompany", :primary_key => "coid", :force => true do |t| - t.string "company", :limit => 50, :null => false - end - - add_index "jamcompany", ["company"], :name => "jamcompany_company_ndx", :unique => true - -# Could not dump table "jamisp" because of following StandardError -# Unknown type 'geometry(Polygon)' for column 'geom' - - create_table "join_requests", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "music_session_id", :limit => 64 - t.string "text", :limit => 2000 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "join_requests", ["user_id", "music_session_id"], :name => "user_music_session_uniqkey", :unique => true - - create_table "layer", :id => false, :force => true do |t| - t.integer "topology_id", :null => false - t.integer "layer_id", :null => false - t.string "schema_name", :limit => nil, :null => false - t.string "table_name", :limit => nil, :null => false - t.string "feature_column", :limit => nil, :null => false - t.integer "feature_type", :null => false - t.integer "level", :default => 0, :null => false - t.integer "child_id" - end - - add_index "layer", ["schema_name", "table_name", "feature_column"], :name => "layer_schema_name_table_name_feature_column_key", :unique => true - - create_table "likes", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64, :null => false - t.string "likable_id", :limit => 64, :null => false - t.string "likable_type", :limit => 25, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "likes", ["user_id", "likable_id"], :name => "likes_user_uniqkey", :unique => true - - create_table "max_mind_geo", :id => false, :force => true do |t| - t.string "country", :limit => 2, :null => false - t.string "region", :limit => 2, :null => false - t.string "city", :null => false - t.decimal "lat", :precision => 15, :scale => 10, :null => false - t.decimal "lng", :precision => 15, :scale => 10, :null => false - t.integer "ip_start", :limit => 8, :null => false - t.integer "ip_end", :limit => 8, :null => false - end - - create_table "max_mind_isp", :id => false, :force => true do |t| - t.integer "ip_bottom", :limit => 8, :null => false - t.integer "ip_top", :limit => 8, :null => false - t.string "isp", :limit => 64, :null => false - t.string "country", :limit => 2, :null => false - end - - add_index "max_mind_isp", ["ip_bottom"], :name => "max_mind_isp_ip_bottom_idx" - add_index "max_mind_isp", ["ip_top"], :name => "max_mind_isp_ip_top_idx" - - create_table "mixes", :force => true do |t| - t.string "recording_id", :limit => 64, :null => false - t.string "mix_server", :limit => 64 - t.datetime "started_at" - t.datetime "completed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "ogg_md5", :limit => 100 - t.integer "ogg_length" - t.string "ogg_url", :limit => 1024 - t.boolean "completed", :default => false, :null => false - t.integer "error_count", :default => 0, :null => false - t.text "error_reason" - t.text "error_detail" - t.boolean "should_retry", :default => false, :null => false - t.string "mp3_md5", :limit => 100 - t.integer "mp3_length" - t.string "mp3_url", :limit => 1024 - t.integer "download_count", :default => 0, :null => false - t.datetime "last_downloaded_at" - end - - add_index "mixes", ["completed_at"], :name => "index_completed_at" - add_index "mixes", ["started_at"], :name => "index_started_at" - - create_table "music_session_perf_data", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64 - t.string "client_id", :limit => 64 - t.string "uri", :limit => 1000 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "music_sessions", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "description", :limit => 8000 - t.string "user_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "musician_access", :null => false - t.string "band_id", :limit => 64 - t.boolean "approval_required", :null => false - t.boolean "fan_access", :null => false - t.boolean "fan_chat", :null => false - t.string "claimed_recording_id", :limit => 64 - t.string "claimed_recording_initiator_id", :limit => 64 - t.integer "track_changes_counter", :default => 0 - end - - create_table "music_sessions_comments", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64, :null => false - t.string "creator_id", :limit => 64, :null => false - t.string "comment", :limit => 4000, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.inet "ip_address" - end - - create_table "music_sessions_history", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64, :null => false - t.string "description", :limit => 8000 - t.string "user_id", :limit => 64, :null => false - t.string "band_id", :limit => 64 - t.string "genres" - t.datetime "created_at", :null => false - t.datetime "session_removed_at" - t.integer "play_count", :default => 0, :null => false - t.integer "like_count", :default => 0, :null => false - t.boolean "fan_access", :default => true, :null => false - end - - add_index "music_sessions_history", ["music_session_id"], :name => "music_session_uniqkey", :unique => true - - create_table "music_sessions_likers", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64, :null => false - t.string "liker_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.inet "ip_address" - end - - add_index "music_sessions_likers", ["music_session_id", "liker_id"], :name => "music_sessions_liker_uniqkey", :unique => true - - create_table "music_sessions_user_history", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64, :null => false - t.string "user_id", :limit => 64, :null => false - t.string "client_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "session_removed_at" - t.integer "max_concurrent_connections" - t.integer "rating" - t.string "instruments" - end - - create_table "musicians_instruments", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64, :null => false - t.string "instrument_id", :limit => 64, :null => false - t.integer "proficiency_level", :limit => 2, :null => false - t.integer "priority", :limit => 2, :default => 1, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "musicians_instruments", ["user_id", "instrument_id"], :name => "musician_instrument_uniqkey", :unique => true - - create_table "notifications", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "description", :limit => 32, :null => false - t.string "source_user_id", :limit => 64 - t.string "target_user_id", :limit => 64 - t.string "band_id", :limit => 64 - t.string "session_id", :limit => 64 - t.string "recording_id", :limit => 64 - t.string "invitation_id", :limit => 64 - t.string "join_request_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "friend_request_id", :limit => 64 - t.string "band_invitation_id", :limit => 64 - t.text "message" - end - - create_table "playable_plays", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "playable_id", :limit => 64, :null => false - t.string "playable_type", :limit => 128, :null => false - t.string "player_id", :limit => 64 - t.string "claimed_recording_id", :limit => 64 - t.inet "ip_address" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "promotionals", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "type", :limit => 128, :default => "JamRuby::PromoBuzz", :null => false - t.string "aasm_state", :limit => 64, :default => "hidden" - t.integer "position", :default => 0, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "latest_id", :limit => 64 - t.string "latest_type", :limit => 128 - t.string "image", :limit => 1024 - t.string "text_short", :limit => 512 - t.string "text_long", :limit => 4096 - end - - add_index "promotionals", ["latest_id", "latest_type"], :name => "promo_latest_idx" - - create_table "recorded_tracks", :force => true do |t| - t.string "user_id", :limit => 64, :null => false - t.string "instrument_id", :limit => 64, :null => false - t.string "sound", :limit => 64, :null => false - t.integer "next_part_to_upload", :default => 0, :null => false - t.boolean "fully_uploaded", :default => false, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "upload_id", :limit => 1024 - t.string "recording_id", :limit => 64, :null => false - t.string "md5", :limit => 100 - t.integer "length", :limit => 8 - t.string "client_id", :limit => 64, :null => false - t.string "track_id", :limit => 64, :null => false - t.string "url", :limit => 1024 - t.integer "file_offset", :limit => 8, :default => 0 - t.string "client_track_id", :limit => 64, :null => false - t.boolean "is_part_uploading", :default => false, :null => false - t.integer "upload_failures", :default => 0, :null => false - t.integer "part_failures", :default => 0, :null => false - t.boolean "discard" - t.integer "download_count", :default => 0, :null => false - t.datetime "last_downloaded_at" - end - - create_table "recordings", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "owner_id", :limit => 64, :null => false - t.string "music_session_id", :limit => 64 - t.string "band_id", :limit => 64 - t.integer "duration" - t.boolean "is_done", :default => false - t.boolean "all_discarded", :default => false, :null => false - t.string "name", :limit => 1024 - t.integer "play_count", :default => 0, :null => false - t.integer "like_count", :default => 0, :null => false - end - - create_table "recordings_comments", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "recording_id", :limit => 64, :null => false - t.string "creator_id", :limit => 64, :null => false - t.string "comment", :limit => 4000, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.inet "ip_address" - end - - create_table "recordings_downloads", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "recording_id", :limit => 64, :null => false - t.string "downloader_id", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "recordings_likers", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "recording_id", :limit => 64, :null => false - t.string "liker_id", :limit => 64 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.inet "ip_address" - t.string "claimed_recording_id", :limit => 64, :null => false - t.boolean "favorite", :default => true, :null => false - end - - add_index "recordings_likers", ["recording_id", "liker_id"], :name => "recording_liker_uniqkey", :unique => true - - create_table "regions", :id => false, :force => true do |t| - t.string "region", :limit => 2, :null => false - t.string "regionname", :limit => 64 - t.string "countrycode", :limit => 2, :null => false - end - - create_table "scores", :id => false, :force => true do |t| - t.integer "alocidispid", :limit => 8, :null => false - t.string "anodeid", :limit => 64, :null => false - t.integer "aaddr", :limit => 8, :null => false - t.integer "blocidispid", :limit => 8, :null => false - t.string "bnodeid", :limit => 64, :null => false - t.integer "baddr", :limit => 8, :null => false - t.integer "score", :null => false - t.integer "scorer", :null => false - t.datetime "score_dt", :null => false - end - - add_index "scores", ["alocidispid", "blocidispid", "score_dt"], :name => "scores_alocidispid_blocidispid_score_dt_ndx" - add_index "scores", ["blocidispid", "alocidispid", "score_dt"], :name => "scores_blocidispid_alocidispid_score_dt_ndx" - - create_table "share_tokens", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "token", :limit => 15, :null => false - t.string "shareable_id", :limit => 64, :null => false - t.string "shareable_type", :limit => 50, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "share_tokens", ["token"], :name => "token_uniqkey", :unique => true - - create_table "spatial_ref_sys", :id => false, :force => true do |t| - t.integer "srid", :null => false - t.string "auth_name", :limit => 256 - t.integer "auth_srid" - t.string "srtext", :limit => 2048 - t.string "proj4text", :limit => 2048 - end - - create_table "topology", :force => true do |t| - t.string "name", :limit => nil, :null => false - t.integer "srid", :null => false - t.float "precision", :null => false - t.boolean "hasz", :default => false, :null => false - end - - add_index "topology", ["name"], :name => "topology_name_key", :unique => true - - create_table "tracks", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "connection_id", :limit => 64, :null => false - t.string "instrument_id", :limit => 64 - t.string "sound", :limit => 64, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "client_track_id", :limit => 64, :null => false - end - - create_table "user_authorizations", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "user_id", :limit => 64 - t.string "uid", :null => false - t.string "provider", :null => false - t.string "token" - t.datetime "token_expiration" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret" - end - - add_index "user_authorizations", ["provider", "uid"], :name => "user_authorizations_uniqkey", :unique => true - add_index "user_authorizations", ["user_id"], :name => "user_authorizations_user_id_idx" - - create_table "users", :id => false, :force => true do |t| - t.string "id", :limit => 64, :null => false - t.string "email", :null => false - t.string "remember_token" - t.string "encrypted_password", :null => false - t.boolean "admin", :default => false, :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "musician", :default => false, :null => false - t.string "city", :limit => 100 - t.string "state", :limit => 100 - t.string "country", :limit => 100 - t.string "first_name", :limit => 50 - t.string "last_name", :limit => 50 - t.date "birth_date" - t.string "gender", :limit => 1 - t.string "internet_service_provider", :limit => 50 - t.string "signup_token" - t.boolean "email_confirmed", :default => false - t.string "photo_url", :limit => 2048 - t.string "session_settings", :limit => 4000 - t.string "reset_password_token", :limit => 64 - t.datetime "reset_password_token_created" - t.boolean "can_invite", :default => true, :null => false - t.tsvector "name_tsv" - t.string "environment", :default => "public", :null => false - t.boolean "subscribe_email", :default => true - t.string "update_email", :limit => 1024 - t.string "update_email_token", :limit => 1024 - t.string "original_fpfile", :limit => 8000 - t.string "cropped_fpfile", :limit => 8000 - t.string "cropped_s3_path", :limit => 512 - t.string "crop_selection", :limit => 256 - t.datetime "last_failed_certified_gear_at" - t.string "last_failed_certified_gear_reason", :limit => 256 - t.datetime "first_downloaded_client_at" - t.datetime "first_ran_client_at" - t.datetime "first_certified_gear_at" - t.datetime "first_music_session_at" - t.datetime "first_real_music_session_at" - t.datetime "first_good_music_session_at" - t.datetime "first_invited_at" - t.datetime "first_friended_at" - t.datetime "first_social_promoted_at" - t.boolean "show_whats_next", :default => true - t.text "biography" - t.decimal "lat", :precision => 15, :scale => 10 - t.decimal "lng", :precision => 15, :scale => 10 - t.string "icecast_server_group_id", :limit => 64, :default => "default", :null => false - t.datetime "first_recording_at" - t.string "large_photo_url", :limit => 2048 - t.string "cropped_large_s3_path", :limit => 512 - t.string "cropped_large_fpfile", :limit => 8000 - t.integer "addr", :limit => 8, :default => 0, :null => false - t.integer "locidispid", :limit => 8, :default => 0, :null => false - t.datetime "notification_seen_at" - t.datetime "first_liked_us" - end - - add_index "users", ["email"], :name => "users_email_key", :unique => true - add_index "users", ["name_tsv"], :name => "users_name_tsv_index", :using => :gin - add_index "users", ["remember_token"], :name => "remember_token_idx" - add_index "users", ["remember_token"], :name => "users_remember_token_key", :unique => true - add_index "users", ["signup_token"], :name => "users_signup_token_key", :unique => true - add_index "users", ["update_email_token"], :name => "users_update_email_token_key", :unique => true - -end diff --git a/web/spec/features/bands_spec.rb b/web/spec/features/bands_spec.rb index 96525314e..e11a9461f 100644 --- a/web/spec/features/bands_spec.rb +++ b/web/spec/features/bands_spec.rb @@ -98,7 +98,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do end it "handles max-length field input" do - pending "update this after VRFS-1610 is resolved" + # pending "update this after VRFS-1610 is resolved" max = { name: 1024, bio: 4000, @@ -108,10 +108,14 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do band_name = 'a'*(max[:name] + 1) band_bio = 'b'*(max[:bio] + 1) band_website = 'c'*(max[:website] + 1) - complete_band_setup_form(band_name, band_bio, 'band-website' => band_website) - - expect(page).to have_selector('#band-profile-name', text: band_name.slice(0, max[:name])) - expect(page).to have_selector('#band-profile-biography', text: band_bio.slice(0, max[:bio])) + within('#band-setup-form') do + fill_in 'band-name', with: band_name + fill_in 'band-biography', with: band_bio + all('#band-genres input[type="checkbox"]').first.trigger(:click) + end + sleep 1 + find('#btn-band-setup-next').trigger(:click) + expect(page).to have_selector('#tdBandBiography .error-text li', text: "is too long (maximum is 4000 characters)") end it "handles special characters in text fields" do diff --git a/web/spec/features/launch_app_spec.rb b/web/spec/features/launch_app_spec.rb index e4aaa590c..e351c7e48 100644 --- a/web/spec/features/launch_app_spec.rb +++ b/web/spec/features/launch_app_spec.rb @@ -11,7 +11,12 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature => sign_in_poltergeist user visit options[:screen_path] should have_selector('h1', text: 'Application Notice') - should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already.') + if options[:gear_modal] && options[:gear_modal] == true + should have_selector('p', text: 'To configure your audio gear, you must use the JamKazam application. Please download and install the application if you have not done so already.') + else + should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already.') + end + find('a.btn-go-to-download-page').trigger(:click) find('h3', text: 'SYSTEM REQUIREMENTS:') end @@ -22,7 +27,11 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature => sign_in_poltergeist user visit options[:screen_path] should have_selector('h1', text: 'Application Notice') - should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application.') + if options[:gear_modal] && options[:gear_modal] == true + should have_selector('p', text: 'To configure your audio gear, you must use the JamKazam application.') + else + should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application.') + end should have_selector('.btn-launch-app') find('.btn-launch-app')['href'].start_with?('jamkazam:') end @@ -35,6 +44,7 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature => end it_behaves_like :launch_not_supported, screen_path: '/client#/createSession' it_behaves_like :launch_not_supported, screen_path: '/client#/findSession' + it_behaves_like :launch_not_supported, screen_path: '/client#/account/audio', gear_modal: true end describe "supported" do @@ -44,6 +54,7 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature => end it_behaves_like :launch_supported, screen_path: '/client#/createSession' it_behaves_like :launch_supported, screen_path: '/client#/findSession' + it_behaves_like :launch_supported, screen_path: '/client#/account/audio', gear_modal: true end end