From c5e4b283f188993f809f7b357e066e8dfc68da02 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Fri, 12 Apr 2019 12:49:30 +0800 Subject: [PATCH 1/4] Install latest newrelic_rpm gem with test mode --- Gemfile | 1 + Gemfile.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index fe95d3e65e..c2eb769eb0 100644 --- a/Gemfile +++ b/Gemfile @@ -142,6 +142,7 @@ end group :development do gem 'byebug', '~> 9.0.0' # 9.1 requires ruby 2.2 + gem "newrelic_rpm", "~> 3.0" gem 'pry-byebug', '>= 3.4.3' gem 'debugger-linecache' gem 'guard' diff --git a/Gemfile.lock b/Gemfile.lock index 0d86913a2c..e8f1b94a93 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -542,6 +542,7 @@ GEM nenv (0.3.0) net-http-persistent (3.0.0) connection_pool (~> 2.2) + newrelic_rpm (3.18.1.330) nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) notiffany (0.1.1) @@ -824,6 +825,7 @@ DEPENDENCIES letter_opener (>= 1.4.1) listen (= 3.0.8) momentjs-rails + newrelic_rpm (~> 3.0) nokogiri (>= 1.6.7.1) oauth2 (~> 1.4.1) ofn-qz! From d983e400cd921411dac9b4253036f8233ce6501f Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Fri, 12 Apr 2019 12:52:15 +0800 Subject: [PATCH 2/4] Add config/newrelic.yml.example for newrelic_rpm gem --- config/newrelic.yml.example | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 config/newrelic.yml.example diff --git a/config/newrelic.yml.example b/config/newrelic.yml.example new file mode 100644 index 0000000000..1df566ee3f --- /dev/null +++ b/config/newrelic.yml.example @@ -0,0 +1,4 @@ +development: + app_name: Open Food Network (Development) + developer_mode: true + monitor_mode: false From 6f5a024be23a6442a616dea36916f35bec4d4821 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Fri, 12 Apr 2019 13:03:05 +0800 Subject: [PATCH 3/4] Update script/setup to create default newrelic.yml --- script/setup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/setup b/script/setup index 08fc3fb677..5baa0e862b 100755 --- a/script/setup +++ b/script/setup @@ -46,6 +46,12 @@ if [ ! -f config/application.yml ]; then printf "${YELLOW}Copied config/application.yml Make sure to fill it with the appropriate configuration values.\n\n${NO_COLOR}" fi +# Set up newrelic.yml for development environment, used by the newrelic_rpm gem +if [ ! -f config/newrelic.yml ]; then + cp config/newrelic.yml.example config/newrelic.yml + printf "${YELLOW}Copied config/newrelic.yml which configures the development environment for the newrelic_rpm gem.\n\n${NO_COLOR}" +fi + # Set up the database for both development and test # Confirming the default user and password Spree prompts printf '\n\n' | bundle exec rake db:setup db:test:prepare From 53bd421389e6fc31f3fcf587a5d8ed64803cce7e Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Fri, 12 Apr 2019 13:06:36 +0800 Subject: [PATCH 4/4] Add newrelic.yml to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 88a12db1be..82f0380039 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ NERD_tree* coverage libpeerconnection.log /config/application.yml +/config/newrelic.yml node_modules vendor/bundle/ coverage