From 4606762389c9b3987175b0523848f3b92a62c9cd Mon Sep 17 00:00:00 2001 From: cblanc Date: Mon, 18 May 2015 17:24:18 +0100 Subject: [PATCH 1/4] Remove rcon from log model --- app/models/log.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/log.rb b/app/models/log.rb index 4a24f5f..71e0794 100644 --- a/app/models/log.rb +++ b/app/models/log.rb @@ -21,8 +21,6 @@ class Log < ActiveRecord::Base attr_accessor :text DOMAIN_LOG = 1 - DOMAIN_RCON_COMMAND = 2 - DOMAIN_RCON_RESPONSE = 3 DOMAIN_INFO = 4 TEAM_MARINES = 1 @@ -52,10 +50,6 @@ class Log < ActiveRecord::Base belongs_to :actor, :class_name => "Rounder" belongs_to :target, :class_name => "Rounder" - # def domains - # return {DOMAIN_LOG => "HL Log", DOMAIN_RCON_COMMAND => "Rcon Command Log", DOMAIN_RCON_RESPONSE => "Rcon Response Log", DOMAIN_INFO => "Action Log"} - # end - def since (created_at - round.start).to_i end From 8d224be12fc4683a60437f22dff578e123a38b97 Mon Sep 17 00:00:00 2001 From: cblanc Date: Mon, 18 May 2015 17:24:31 +0100 Subject: [PATCH 2/4] Remove rcon from readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7c9e71..efe83c8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Features: - Map database - Votable polls - Twitter feed -- Server database and RCON interface +- Server database - Log file parsing (partially complete) ## Contributors From 83bdf550bbf5a5ecc9f6c4d3b6e15e79913f5a1c Mon Sep 17 00:00:00 2001 From: cblanc Date: Mon, 18 May 2015 17:30:45 +0100 Subject: [PATCH 3/4] Remove rcon column from servers table --- app/models/server.rb | 4 +--- app/views/servers/_form.html.erb | 4 ---- db/migrate/20150518162749_remove_rcon_from_servers.rb | 9 +++++++++ db/schema.rb | 3 +-- spec/models/server_spec.rb | 1 - 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 db/migrate/20150518162749_remove_rcon_from_servers.rb diff --git a/app/models/server.rb b/app/models/server.rb index aa0339f..129f684 100644 --- a/app/models/server.rb +++ b/app/models/server.rb @@ -8,7 +8,6 @@ # dns :string(255) # ip :string(255) # port :string(255) -# rcon :string(255) # password :string(255) # irc :string(255) # user_id :integer @@ -44,7 +43,7 @@ class Server < ActiveRecord::Base attr_protected :id, :user_id, :updated_at, :created_at, :map, :players, :maxplayers, :ping, :version validates_length_of [:name, :dns,], :in => 1..30 - validates_length_of [:rcon, :password, :irc], :maximum => 30, :allow_blank => true + validates_length_of [:password, :irc], :maximum => 30, :allow_blank => true validates_length_of :description, :maximum => 255, :allow_blank => true validates_format_of :ip, :with => /\A[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\z/ validates_format_of :port, :with => /\A[0-9]{1,5}\z/ @@ -81,7 +80,6 @@ class Server < ActiveRecord::Base non_versioned_columns << 'dns' non_versioned_columns << 'ip' non_versioned_columns << 'port' - non_versioned_columns << 'rcon' non_versioned_columns << 'password' non_versioned_columns << 'irc' non_versioned_columns << 'user_id' diff --git a/app/views/servers/_form.html.erb b/app/views/servers/_form.html.erb index 97c0403..ab8bcdb 100644 --- a/app/views/servers/_form.html.erb +++ b/app/views/servers/_form.html.erb @@ -16,10 +16,6 @@ -
- <%= f.label :rcon %> - <%= f.text_field :rcon %> -
<%= f.label :password %> <%= f.text_field :password %> diff --git a/db/migrate/20150518162749_remove_rcon_from_servers.rb b/db/migrate/20150518162749_remove_rcon_from_servers.rb new file mode 100644 index 0000000..400c2e3 --- /dev/null +++ b/db/migrate/20150518162749_remove_rcon_from_servers.rb @@ -0,0 +1,9 @@ +class RemoveRconFromServers < ActiveRecord::Migration + def up + remove_column :servers, :rcon + end + + def down + add_column :servers, :rcon, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 0839005..e0aad41 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20141010193221) do +ActiveRecord::Schema.define(:version => 20150518162749) do create_table "admin_requests", :force => true do |t| t.string "addr" @@ -722,7 +722,6 @@ ActiveRecord::Schema.define(:version => 20141010193221) do t.string "dns" t.string "ip" t.string "port" - t.string "rcon" t.string "password" t.string "irc" t.integer "user_id" diff --git a/spec/models/server_spec.rb b/spec/models/server_spec.rb index 19374e8..a4ec8cf 100644 --- a/spec/models/server_spec.rb +++ b/spec/models/server_spec.rb @@ -8,7 +8,6 @@ # dns :string(255) # ip :string(255) # port :string(255) -# rcon :string(255) # password :string(255) # irc :string(255) # user_id :integer From ab2d0f3b269c208e6e1c069908ba4dc3e298fc3c Mon Sep 17 00:00:00 2001 From: cblanc Date: Mon, 18 May 2015 17:33:38 +0100 Subject: [PATCH 4/4] Remove rcon from test --- spec/support/features/server_helpers.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/support/features/server_helpers.rb b/spec/support/features/server_helpers.rb index b28df90..446f34c 100644 --- a/spec/support/features/server_helpers.rb +++ b/spec/support/features/server_helpers.rb @@ -4,7 +4,6 @@ module Features dns = 'ServerDns.com' ip = '192.168.1.1' port = '8000' - rcon = 'whatsrcon' password = 'secret' name = 'MyNsServer' description = 'My NS Server'