Skip to content

Commit

Permalink
Merge pull request huginn#1001 from cantino/db_less_strict
Browse files Browse the repository at this point in the history
Enable `strict: false` in database.yml
  • Loading branch information
cantino committed Sep 7, 2015
2 parents 62b747a + be7f240 commit 2824161
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/agent_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.log_length
protected

def scrub_message
if message_changed?
if message_changed? && !message.nil?
self.message = message.inspect unless message.is_a?(String)
self.message.scrub!{ |bytes| "<#{bytes.unpack('H*')[0]}>" }
end
Expand Down
3 changes: 3 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ development:
host: <%= ENV['DATABASE_HOST'] || "" %>
port: <%= ENV['DATABASE_PORT'] || "" %>
socket: <%= ENV['DATABASE_SOCKET'] || ["/var/run/mysqld/mysqld.sock", "/opt/local/var/run/mysql5/mysqld.sock", "/tmp/mysql.sock"].find { |path| File.exist? path } %>
strict: false

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
Expand All @@ -23,6 +24,7 @@ test:
password: <%= ENV['DATABASE_PASSWORD'].presence || "" %>
socket: <%= ENV['DATABASE_SOCKET'] || ["/var/run/mysqld/mysqld.sock", "/opt/local/var/run/mysql5/mysqld.sock", "/tmp/mysql.sock"].find { |path| File.exist? path } %>
port: <%= ENV['DATABASE_PORT'] || "" %>
strict: false

production:
adapter: <%= ENV['DATABASE_ADAPTER'].presence || "mysql2" %>
Expand All @@ -35,3 +37,4 @@ production:
host: <%= ENV['DATABASE_HOST'] || "" %>
port: <%= ENV['DATABASE_PORT'] || "" %>
socket: <%= ENV['DATABASE_SOCKET'] || ["/var/run/mysqld/mysqld.sock", "/opt/local/var/run/mysql5/mysqld.sock", "/tmp/mysql.sock"].find{ |path| File.exist? path } %>
strict: false

0 comments on commit 2824161

Please sign in to comment.