Skip to content

Commit bf88aaa

Browse files
author
Ben Tillman
committed
Merge branch 'master' of github.com:crossroads/fat_free_crm
2 parents 0caf26a + b3d4c3c commit bf88aaa

File tree

6 files changed

+35
-1
lines changed

6 files changed

+35
-1
lines changed

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ group :test do
7171
gem 'database_cleaner'
7272
gem 'ci_reporter', :git => 'http://github.com/crossroads/ci_reporter.git'
7373
end
74+
75+
group :production do
76+
gem "newrelic_rpm"
77+
end

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ GEM
147147
net-ssh (2.0.23)
148148
net-ssh-gateway (1.0.1)
149149
net-ssh (>= 1.99.1)
150+
newrelic_rpm (2.13.3)
150151
nokogiri (1.4.4)
151152
pg (0.9.0)
152153
polyglot (0.3.1)
@@ -243,6 +244,7 @@ DEPENDENCIES
243244
hoptoad_notifier
244245
is_paranoid!
245246
meta_search!
247+
newrelic_rpm
246248
paperclip!
247249
pg (>= 0.9.0)
248250
rails (= 3.0.3)

app/views/opportunities/_top_section.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
-# Add [-- None --] account choice when editing existing opportunity that has an account.
4747
- options = { :selected => @account.id || 0 }
48-
- options[:include_blank] = t(:select_none) unless @opportunity.new_record? || @opportunity.account.blank?
48+
- options[:include_blank] = true
4949

5050
= collection_select :account, :id, @accounts, :id, :name, options, { :style => "width:330px; display:none;" }
5151
= a.text_field :name, :style => "width:324px; display:none;"

config/deploy.rb

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
load 'recipes/postgresql.rb'
1111
load 'recipes/whenever.rb'
1212
load 'recipes/stack.rb'
13+
load 'recipes/newrelic.rb'
14+
load 'recipes/log.rb'
1315

1416
default_run_options[:pty] = true
1517

recipes/log.rb

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace :log do
2+
3+
desc "tail production log files"
4+
task :tail, :roles => :app do
5+
run "tail -f #{shared_path}/log/production.log" do |channel, stream, data|
6+
puts # for an extra line break before the host name
7+
puts "#{channel[:host]}: #{data}"
8+
break if stream == :err
9+
end
10+
end
11+
12+
end

recipes/newrelic.rb

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace :newrelic do
2+
3+
task :default do
4+
newrelic.yml
5+
end
6+
7+
desc "Copy newrelic.yml"
8+
task :yml do
9+
run "ln -sf #{deploy_to}/shared/config/newrelic.yml #{release_path}/config/newrelic.yml"
10+
end
11+
12+
end
13+
14+
before "deploy:symlink", "newrelic:yml"

0 commit comments

Comments
 (0)