Fixes for development

Temporary fix for puma.rb
Rename .env.dev
Fix more merge conflicts

Dev env runs and tests run (with fails)
This commit is contained in:
Ari Timonen 2020-03-14 21:43:19 +02:00
parent 2c71b1147d
commit 88721b28df
8 changed files with 36 additions and 84 deletions

View file

@ -2,7 +2,7 @@ source 'http://rubygems.org'
ruby '2.2.10'
gem 'dotenv-rails', '~> 0.10.0'
gem 'dotenv-rails'
gem 'rails', '~> 4.1.16'
gem 'mysql2', '~> 0.3.18'
gem 'dalli', '~> 2.7.0'

View file

@ -1,5 +1,5 @@
GIT
remote: git://github.com/koraktor/steam-condenser-ruby.git
remote: https://github.com/koraktor/steam-condenser-ruby.git
revision: 2cb441f0518a0b8d20a017dfcc42783ae878311a
specs:
steam-condenser (1.3.11)
@ -360,7 +360,7 @@ DEPENDENCIES
country_select
dalli (~> 2.7.0)
database_cleaner (~> 1.2.0)
dotenv-rails (~> 0.10.0)
dotenv-rails
dynamic_form (~> 1.1.4)
exceptional (~> 2.0.33)
factory_girl_rails (~> 4.4.1)

View file

@ -5,7 +5,6 @@ class ShoutmsgsController < ApplicationController
@shoutmsgs = Shoutmsg.last.typebox
end
>>>>>>> Stashed changes
def show
if params[:id2]
@shoutmsgs = Shoutmsg.recent.of_object(params[:id], params[:id2]).reverse

View file

@ -120,15 +120,6 @@ class Match < ActiveRecord::Base
"red" if contester2.team == friendly && score2 < score1
end
<<<<<<< HEAD
def preds(contester)
perc = Prediction.count(conditions: ["match_id = ? AND score#{contester} > 2", id])
perc != 0 ? (perc / predictions.count.to_f * 100).round : 0
end
def mercs(contester)
matchers.all conditions: { merc: true, contester_id: contester.id }
=======
def preds contester
perc = Prediction.where("match_id = ? AND score#{contester} > 2", id).count()
perc != 0 ? (perc/predictions.count.to_f*100).round : 0
@ -136,7 +127,6 @@ class Match < ActiveRecord::Base
def mercs contester
matchers.where(merc: true, contester_id: contester.id)
>>>>>>> feature/rails-4
end
def get_hltv
@ -148,19 +138,11 @@ class Match < ActiveRecord::Base
end
def team1_lineup
<<<<<<< HEAD
matchers.all(conditions: { contester_id: contester1_id })
end
def team2_lineup
matchers.all(conditions: { contester_id: contester2_id })
=======
matchers.where(contester_id: contester1_id)
end
def team2_lineup
matchers.where(contester_id: contester2_id)
>>>>>>> feature/rails-4
end
def get_friendly(param = nil)
@ -193,11 +175,7 @@ class Match < ActiveRecord::Base
end
def send_notifications
<<<<<<< HEAD
Profile.includes(:user).where(notify_any_match: 1).find_each do |p|
=======
Profile.where("notify_any_match", 1).includes(:user).each do |p|
>>>>>>> feature/rails-4
Notifications.match p.user, self if p.user
end
contester2.team.teamers.active.each do |teamer|

View file

@ -1,27 +1,25 @@
require "dotenv"
Dotenv.load()
base_path = (ENV['DEPLOY_PATH'] || Dir.pwd)
#current_path = "#{base_path}/current"
#shared_path = "#{base_path}/shared"
stderr_path = "#{base_path}/log/puma.stderr.log"
stdout_path = "#{base_path}/log/puma.stdout.log"
tag 'ENSL'
preload_app!
daemonize false
directory base_path
pidfile "#{base_path}/tmp/pids/puma.pid"
state_path "#{base_path}/tmp/pids/puma.state"
stdout_redirect stdout_path, stderr_path
environment ENV['RACK_ENV'] || 'production'
# FIXME
#base_path = (ENV['DEPLOY_PATH'] || Dir.pwd)
#stderr_path = "#{base_path}/log/puma.stderr.log"
#stdout_path = "#{base_path}/log/puma.stdout.log"
#directory base_path
#pidfile "#{base_path}/tmp/pids/puma.pid"
#state_path "#{base_path}/tmp/pids/puma.state"
#stdout_redirect stdout_path, stderr_path
rackup DefaultRackup
bind "unix://#{base_path}/tmp/sockets/puma.sock"
environment ENV['RACK_ENV'] || 'production'
#bind "unix://#{base_path}/tmp/sockets/puma.sock"
port Integer(ENV['PUMA_PORT'] || 4000)
worker_timeout Integer(ENV['PUMA_TIMEOUT'] || 30)
workers Integer(ENV['PUMA_WORKERS'] || 4)
threads Integer(ENV['PUMA_MIN_THREADS'] || 1), Integer(ENV['PUMA_MAX_THREADS'] || 16)

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(:version => 20171109165433) do
ActiveRecord::Schema.define(version: 20190917222520) do
create_table "admin_requests", force: true do |t|
t.string "addr"
@ -27,9 +27,6 @@ ActiveRecord::Schema.define(:version => 20171109165433) do
add_index "admin_requests", ["server_id"], name: "index_admin_requests_on_server_id", using: :btree
add_index "admin_requests", ["user_id"], name: "index_admin_requests_on_user_id", using: :btree
create_table "article_versions", force: true do |t|
ActiveRecord::Schema.define(version: 20190917222520) do
create_table "article_versions", force: true do |t|
t.integer "article_id"
t.integer "version"
@ -75,10 +72,9 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.integer "creator_id"
end
add_index "bans", ["creator_id"], :name => "index_bans_on_creator_id"
add_index "bans", ["server_id"], :name => "index_bans_on_server_id"
add_index "bans", ["user_id"], :name => "index_bans_on_user_id"
add_index "bans", ["creator_id"], name: "index_bans_on_creator_id", using: :btree
add_index "bans", ["server_id"], name: "index_bans_on_server_id", using: :btree
add_index "bans", ["user_id"], name: "index_bans_on_user_id", using: :btree
create_table "bracketers", force: true do |t|
t.integer "bracket_id"
@ -206,8 +202,8 @@ ActiveRecord::Schema.define(version: 20190917222520) do
create_table "custom_urls", force: true do |t|
t.string "name"
t.integer "article_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "custom_urls", ["article_id"], name: "index_custom_urls_on_article_id", using: :btree
@ -250,7 +246,7 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.boolean "hidden", default: false, null: false
end
add_index "directories", ["parent_id"], :name => "index_directories_on_parent_id"
add_index "directories", ["parent_id"], name: "index_directories_on_parent_id", using: :btree
create_table "firms", force: true do |t|
t.string "name"
@ -267,8 +263,6 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.datetime "updated_at"
end
add_index "directories", ["parent_id"], name: "index_directories_on_parent_id", using: :btree
create_table "forumers", force: true do |t|
t.integer "forum_id"
t.integer "group_id"
@ -341,8 +335,7 @@ ActiveRecord::Schema.define(version: 20190917222520) do
add_index "gathers", ["captain1_id"], name: "index_gathers_on_captain1_id", using: :btree
add_index "gathers", ["captain2_id"], name: "index_gathers_on_captain2_id", using: :btree
add_index "gathers", ["map1_id"], name: "index_gathers_on_map1_id", using: :btree
add_index "gathers", ["map2_id"], name: "index_gathers_on_map2_id",
create_table "log_files", force: true do |t|using: :btree
add_index "gathers", ["map2_id"], name: "index_gathers_on_map2_id", using: :btree
add_index "gathers", ["server_id"], name: "index_gathers_on_server_id", using: :btree
create_table "gathers_users", id: false, force: true do |t|
@ -456,7 +449,8 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.integer "status"
end
add_index "match_proposals", ["status"], :name => "index_match_proposals_on_status"
add_index "match_proposals", ["match_id"], name: "index_match_proposals_on_match_id", using: :btree
add_index "match_proposals", ["status"], name: "index_match_proposals_on_status", using: :btree
create_table "matchers", force: true do |t|
t.integer "match_id", null: false
@ -540,10 +534,7 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.integer "length"
t.integer "match_id"
t.integer "status"
t.string "name"
t.integer "foreign_key"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "category_id"
end
add_index "movies", ["file_id"], name: "index_movies_on_file_id", using: :btree
@ -552,7 +543,7 @@ ActiveRecord::Schema.define(version: 20190917222520) do
add_index "movies", ["status"], name: "index_movies_on_status", using: :btree
add_index "movies", ["user_id"], name: "index_movies_on_user_id", using: :btree
create_table "nodes", :force => true do |t|
create_table "nodes", force: true do |t|
t.string "name"
t.integer "foreign_key"
t.datetime "created_at"
@ -772,7 +763,7 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.string "recording"
t.datetime "idle"
t.integer "default_id"
w t.boolean "active", default: true, null: false
t.boolean "active", default: true, null: false
t.string "recordable_type"
t.integer "recordable_id"
t.integer "category_id"
@ -789,20 +780,8 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.datetime "updated_at"
end
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
create_table "shoutmsg_archive", force: true do |t|
t.integer "user_id"
t.string "text"
t.datetime "created_at"
t.datetime "updated_at"
t.string "shoutable_type"
t.integer "shoutable_id"
end
add_index "shoutmsg_archive", ["shoutable_type", "shoutable_id"], name: "index_shoutmsgs_on_shoutable_type_and_shoutable_id", using: :btree
add_index "shoutmsg_archive", ["user_id"], name: "index_shoutmsgs_on_user_id", using: :btree
add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree
add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
create_table "shoutmsgs", force: true do |t|
t.integer "user_id"
@ -898,14 +877,11 @@ ActiveRecord::Schema.define(version: 20190917222520) do
t.date "birthdate"
t.string "time_zone"
t.integer "version"
t.boolean "public_email", :default => false, :null => false
t.boolean "public_email", default: false, null: false
end
add_index "users", ["email"], :name => "index_users_on_email"
add_index "users", ["lastvisit"], :name => "index_users_on_lastvisit"
add_index "users", ["password"], :name => "index_users_on_password"
add_index "users", ["team_id"], :name => "index_users_on_team_id"
add_index "users", ["username"], :name => "index_users_on_username"
add_index "users", ["lastvisit"], name: "index_users_on_lastvisit", using: :btree
add_index "users", ["team_id"], name: "index_users_on_team_id", using: :btree
create_table "versions", force: true do |t|
t.string "item_type", null: false

View file

@ -3,8 +3,9 @@ version: "3"
services:
web:
# Debug
#command: /bin/bash
#tty: true
stdin_open: true
command: /bin/bash
tty: true
build:
context: ./
dockerfile: Dockerfile.dev
@ -20,7 +21,7 @@ services:
# - redis
db:
# Debug
# command: bash
#command: bash
#tty: true
command: mysqld_safe --skip-grant-tables
image: mariadb:latest