Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
RACK_ENV=development
RAILS_ENV=development
APP_SECRET=fe837ea72667ec3d8ecb94cfba1a1bba

DEPLOY_PATH=/var/www

PUMA_WORKERS=1
PUMA_MIN_THREADS=1
PUMA_MAX_THREADS=16
PUMA_PORT=4000
PUMA_TIMEOUT=30

MYSQL_HOST=db
MYSQL_DATABASE=ensl
MYSQL_USERNAME=ensl
MYSQL_PASSWORD=ensl
MYSQL_ROOT_PASSWORD=ensl
MYSQL_CONNECTION_POOL=8

NEW_RELIC_APP_NAME=ENSL
NEW_RELIC_LICENSE_KEY=

EXCEPTIONAL_API_KEY=

GOOGLE_API_KEY=
GOOGLE_CALENDAR_ID=
26 changes: 26 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
RACK_ENV=test
RAILS_ENV=test
APP_SECRET=fe837ea72667ec3d8ecb94cfba1a1bba

DEPLOY_PATH=/var/www

PUMA_WORKERS=1
PUMA_MIN_THREADS=1
PUMA_MAX_THREADS=16
PUMA_PORT=4000
PUMA_TIMEOUT=30

MYSQL_HOST=db
MYSQL_DATABASE=ensl_test
MYSQL_USERNAME=ensl
MYSQL_PASSWORD=ensl
MYSQL_ROOT_PASSWORD=ensl
MYSQL_CONNECTION_POOL=8

NEW_RELIC_APP_NAME=ENSL
NEW_RELIC_LICENSE_KEY=

EXCEPTIONAL_API_KEY=

GOOGLE_API_KEY=
GOOGLE_CALENDAR_ID=
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/koraktor/steam-condenser-ruby.git
revision: 5795d15152995cc6bada5265fa379cfc57103618
revision: 2cb441f0518a0b8d20a017dfcc42783ae878311a
specs:
steam-condenser (1.3.11)
multi_json (~> 1.6)
Expand Down Expand Up @@ -312,7 +312,7 @@ GEM
websocket (1.0.7)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
websocket-extensions (0.1.5)
will_paginate (3.0.12)
xpath (2.1.0)
nokogiri (~> 1.3)
Expand Down
4 changes: 2 additions & 2 deletions app/models/gather.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def check_captains
def refresh cuser
if status == STATE_RUNNING
gatherers.idle.destroy_all
elsif status == STATE_VOTING and updated_at < 60.seconds.ago and updated_at > 5.days.ago
if status == STATE_VOTING and updated_at < 60.seconds.ago
elsif status == STATE_VOTING and updated_at < 80.seconds.ago and updated_at > 5.days.ago
if status == STATE_VOTING and updated_at < 80.seconds.ago
self.status = STATE_PICKING
save!
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/about/staff.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</table>
</div>
<div class="tab" id="contributors">
<h3>Admins</h3>
<h3>Contributors</h3>
<table class="striped staff">
<tr>
<th></th>
Expand Down
6 changes: 3 additions & 3 deletions app/views/gathers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
success: function(response, text, request) {
if (request.getResponseHeader('Gather') == 'voting') {
if (!played) {
var startTime = 110;
var startTime = 0;
$("#jplayer").jPlayer({
ready: function() {
$(this).jPlayer("setMedia", {
mp3: "https://www.ensl.org/sounds/gather-1.mp3"
mp3: "https://www.ensl.org/sounds/gather-6.mp3"
}).jPlayer("play", startTime);

var click = document.ontouchstart === undefined ? 'click' : 'touchstart';
Expand All @@ -50,7 +50,7 @@
document.documentElement.addEventListener(click, kickoff, true);
},
loop: false,
volume: 0.45,
volume: 0.4,
swfPath: "/flash"
});

Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
add_index "predictions", ["match_id"], :name => "index_predictions_on_match_id"
add_index "predictions", ["user_id"], :name => "index_predictions_on_user_id"

create_table "profiles", :force => true do |t|
create_table "profiles", :options => 'ENGINE=MyISAM', :force => true do |t|
t.integer "user_id"
t.string "msn"
t.string "icq"
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ version: "3"

services:
web:
# Debug
stdin_open: true
command: /bin/bash
tty: true
build:
context: ./
dockerfile: Dockerfile.dev
Expand All @@ -17,7 +21,7 @@ services:
# - redis
db:
# Debug
# command: bash
#command: bash
#tty: true
command: mysqld_safe --skip-grant-tables
image: mariadb:latest
Expand Down
3 changes: 3 additions & 0 deletions ext/mysql.conf.d/opt.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ innodb_flush_method = O_DIRECT
#innodb_additional_mem_pool_size = 20M
innodb_file_per_table = 1
transaction-isolation = READ-COMMITTED

innodb_file_per_table=1
innodb_file_format = Barracuda
Binary file added public/sounds/gather-6.mp3
Binary file not shown.
14 changes: 9 additions & 5 deletions script/entry.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash

env
cd /var/www

source /var/www/.env
rm -rf /var/www/public/assets
mv /home/web/assets /var/www/public/
chown -R web:web /var/www/public

su -c "cd /var/www && bundle exec rake assets:precompile" -s /bin/bash -l web
if [ $RAILS_ENV = "production" ]; then
rm -rf /var/www/public/assets
mv /home/web/assets /var/www/public/
chown -R web:web /var/www
fi

su -c "bundle config github.https true; cd /var/www && bundle install --path /var/bundle --jobs 4" -s /bin/bash -l web
su -c "cd /var/www && bundle exec puma -C config/puma.rb" -s /bin/bash -l web
bash