roo_on_rails 1.22.0 → 2.0.0.pre.pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +0,0 @@
1
- sudo: required
2
- language: ruby
3
- rvm:
4
- - 2.2.7
5
- - 2.3.3
6
- - 2.4.1
7
- - ruby-head
8
- gemfile:
9
- - gemfiles/rails_3.gemfile
10
- - gemfiles/rails_4.gemfile
11
- - gemfiles/rails_5.gemfile
12
- - gemfiles/rails_5_1.gemfile
13
- install:
14
- - bundle install --jobs=3 --retry=3 --path=vendor/bundle
15
- cache:
16
- bundler: true
17
- directories:
18
- - vendor/bundle
19
- - vendor/bundle-scaffold
20
- before_script:
21
- - unset RACK_ENV
22
- - unset RAILS_ENV
23
- - mkdir -p $PWD/tmp && sudo mount -t tmpfs -o size=1024m tmpfs $PWD/tmp
24
- - gem install bundler
25
- matrix:
26
- allow_failures:
27
- - rvm: ruby-head
28
- exclude:
29
- - rvm: 2.4.1
30
- gemfile: gemfiles/rails_3.gemfile
31
- - rvm: ruby-head
32
- gemfile: gemfiles/rails_3.gemfile
33
- services:
34
- - redis-server
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "guard"
6
- gem "guard-rspec"
7
- gem "appraisal"
8
- gem "webmock"
9
- gem "pg", "~> 0.11"
10
- gem "sqlite3"
11
- gem "rails", "~> 3.2"
12
- gem "sidekiq", "< 5"
13
-
14
- gemspec path: "../"
@@ -1,41 +0,0 @@
1
- module RooOnRails
2
- module Railties
3
- class NewRelic < Rails::Railtie
4
- initializer 'roo_on_rails.new_relic' do
5
- Rails.logger.with initializer: 'roo_on_rails.new_relic' do |log|
6
- log.debug 'loading'
7
- license_key = ENV['NEW_RELIC_LICENSE_KEY']
8
-
9
- if %w(test development).exclude?(Rails.env.to_s) && (license_key == 'override-me')
10
- abort 'Aborting: NEW_RELIC_LICENSE_KEY must be set in production environments'
11
- end
12
-
13
- abort 'Aborting: NEW_RELIC_LICENSE_KEY is required' if license_key.nil?
14
-
15
- # Report application stats to a per-service (worker, web) New Relic app, and to a main
16
- # application for all services.
17
- base_name = ENV['BASE_NEW_RELIC_APP_NAME']
18
- service_name = ENV['HOPPER_SERVICE_NAME']
19
- if !base_name.blank? && ENV['NEW_RELIC_APP_NAME'].blank?
20
- task_app_name = service_name.present? ? "#{base_name} - #{service_name}" : nil
21
- ENV['NEW_RELIC_APP_NAME'] = [task_app_name, base_name].compact.join(';')
22
- end
23
-
24
- path = %w(newrelic.yml config/newrelic.yml).map do |p|
25
- Pathname.new(p)
26
- end.find(&:exist?)
27
- if path
28
- abort "Aborting: newrelic.yml detected in '#{path.parent.realpath}', should not exist"
29
- end
30
-
31
- sync_startup = (ENV.fetch('NEW_RELIC_SYNC_STARTUP', 'YES') =~ /\A(YES|TRUE|ON|1)\Z/i)
32
-
33
- require 'newrelic_rpm'
34
- unless Rails.env.test?
35
- ::NewRelic::Control.instance.init_plugin(sync_startup: sync_startup)
36
- end
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,25 +0,0 @@
1
- namespace :newrelic do
2
- desc 'Notifies New Relic that a deployment has occurred'
3
- task notice_deployment: :environment do
4
- begin
5
- require 'newrelic_rpm'
6
- require 'new_relic/cli/command'
7
-
8
- appname = ENV.fetch('NEW_RELIC_APP_NAME')
9
-
10
- Rails.logger.info("Notifying New Relic of deployment to #{appname}")
11
- NewRelic::Cli::Deployments.new(
12
- environment: Rails.env.to_s,
13
- revision: ENV.fetch('SOURCE_VERSION', 'unknown'),
14
- changelog: '',
15
- description: '',
16
- appname: appname,
17
- user: '',
18
- license_key: ENV.fetch('NEW_RELIC_LICENSE_KEY')
19
- ).run
20
- rescue => e
21
- Rails.logger.error("Failed to notify New Relic (#{e.class.name}: #{e.message})")
22
- Rails.logger.info(e.backtrace.take(10).join("\n"))
23
- end
24
- end
25
- end