repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/default/serverspec/default_spec.rb | test/integration/default/serverspec/default_spec.rb | require 'spec_helper'
describe 'newrelic::default' do
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/helpers/serverspec/spec_helper.rb | test/integration/helpers/serverspec/spec_helper.rb | require 'serverspec'
set :backend, :exec
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/nodejs-agent-recipe/serverspec/default_spec.rb | test/integration/nodejs-agent-recipe/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe command('cd /var/m... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/nodejs-agent/serverspec/default_spec.rb | test/integration/nodejs-agent/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe command('cd /var/m... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/ruby-agent/serverspec/default_spec.rb | test/integration/ruby-agent/serverspec/default_spec.rb | require 'spec_helper'
set :path, '/opt/rbenv/shims:/opt/rbenv/bin:/opt/rbenv/plugins/ruby_build/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:$PATH'
describe file('/opt/newrelic/ruby') do
it { should be_directory }
end
describe package('newrelic_rpm') do
it { should be_installed.by('gem') }
end
des... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/php-agent-php5enmod/serverspec/default_spec.rb | test/integration/php-agent-php5enmod/serverspec/default_spec.rb | require 'spec_helper'
describe file('/etc/php5/conf.d/newrelic.ini'), if: %w(12.04).include?(os[:release]) do
it { is_expected.to be_file }
end
describe file('/etc/php5/mods-available/newrelic.ini'), if: %w(14.04).include?(os[:release]) do
it { is_expected.to be_file }
end
describe file('/etc/php/7.0/mods-availa... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/server-monitor/serverspec/default_spec.rb | test/integration/server-monitor/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe package 'newrelic-s... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/php-agent/serverspec/default_spec.rb | test/integration/php-agent/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe package 'newrelic-d... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/infrastructure-agent/serverspec/default_spec.rb | test/integration/infrastructure-agent/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic-infra'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic-infra.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe file('/... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/python-agent-recipe/serverspec/default_spec.rb | test/integration/python-agent-recipe/serverspec/default_spec.rb | require 'spec_helper'
describe yumrepo('newrelic'), if: os[:family] == 'redhat' do
it { is_expected.to exist }
it { is_expected.to be_enabled }
end
describe file('/etc/apt/sources.list.d/newrelic.list'), if: %w(debian ubuntu).include?(os[:family]) do
it { is_expected.to be_file }
end
describe command('pip show... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/integration/java-agent/serverspec/default_spec.rb | test/integration/java-agent/serverspec/default_spec.rb | require 'spec_helper'
describe file('/opt/tomcat_java_test_app/newrelic.jar') do
it { is_expected.to exist }
end
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/metadata.rb | test/fixtures/cookbooks/newrelic_lwrp_test/metadata.rb | name 'newrelic_lwrp_test'
maintainer 'David Joos'
maintainer_email 'development@davidjoos.com'
license 'MIT'
description 'Installs/Configures newrelic_poc'
version '0.1.0'
depends 'apache2'
depends 'java'
depends 'newrelic'
depends 'nodejs'
depends 'php'
depends 'tomcat'
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_java.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_java.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_java
#
# Copyright:: (c) 2016, David Joos
#
include_recipe 'java'
tomcat_install 'java_test_app' do
tomcat_user 'tomcat_user'
tomcat_group 'tomcat_group'
end
newrelic_agent_java 'Install' do
license node['newrelic']['license']
install_dir node['newrelic']['j... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_php.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_php.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_php
#
# Copyright:: (c) 2016, David Joos
#
include_recipe 'apache2'
node.normal['php']['pear'] = 'pear'
include_recipe 'php'
newrelic_agent_php 'Install' do
license node['newrelic']['license']
service_name node['newrelic']['php_agent']['web_server']['service_nam... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_python.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_python.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_python
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_python 'Install' do
license node['newrelic']['license']
config_file '/etc/newrelic/newrelic.ini'
cookbook 'newrelic'
source 'agent/python/newrelic.ini.erb'
app_name 'my_python_app'
enabled true
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/lwrp_yml.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/lwrp_yml.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: lwrp_yml
#
# Copyright:: (c) 2016, David Joos
#
include_recipe 'java'
tomcat_install 'java_test_app' do
tomcat_user 'tomcat_user'
tomcat_group 'tomcat_group'
end
newrelic_yml "#{node['newrelic']['java_agent']['install_dir']}/newrelic.yml" do
app_name 'java_test_app'... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_nodejs_recipe.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_nodejs_recipe.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_nodejs_recipe
#
# Copyright:: (c) 2016, David Joos
#
# version one dot thirty eight dot two has invalid readable stream version two dot two dot three
nodeapp = { 'app_path' => '/var/mynode_app', 'app_name' => 'My Node Application', 'app_log_level' => 'info', 'app_log_... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_nodejs.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_nodejs.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_nodejs
#
# Copyright:: (c) 2016, David Joos
#
include_recipe 'nodejs'
directory '/var/mynode_app' do
mode '0755'
recursive true
action :create
end
newrelic_agent_nodejs '/var/mynode_app' do
license node['newrelic']['license']
# version one dot thirty eight... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_python_recipe.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_python_recipe.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_python_recipe
#
# Copyright:: (c) 2016, David Joos
#
node.default['newrelic']['application_monitoring']['app_name'] = 'My Python Application'
node.default['newrelic']['application_monitoring']['error_collector']['enable'] = 'false'
node.default['newrelic']['applicatio... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_infrastructure.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_infrastructure.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_infrastructure
#
# Copyright:: (c) 2017, David Joos
#
newrelic_agent_infrastructure 'Install' do
on_host_integrations_enable true
end
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_ruby.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_ruby.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_java
#
# Copyright:: (c) 2016, David Joos
#
package 'ruby'
package node['rubygems'] do
action :install
end
newrelic_agent_ruby 'Install' do
license node['newrelic']['license']
app_name 'ruby_test_app'
app_user 'root'
app_group 'root'
version node['newrel... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/server_monitor.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/server_monitor.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: server_monitor
#
# Copyright:: (c) 2016, David Joos
#
newrelic_server_monitor 'Install' do
license node['newrelic']['license']
end
# newrelic_server_remove 'Remove' do
# action :remove
# end
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_dotnet.rb | test/fixtures/cookbooks/newrelic_lwrp_test/recipes/agent_dotnet.rb | #
# Cookbook:: newrelic_lwrp_test
# Recipe:: agent_dotnet
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_dotnet 'Install' do
license node['newrelic']['license']
app_name 'My Application;Sub Application'
end
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/java_agent.rb | recipes/java_agent.rb | #
# Cookbook:: newrelic
# Recipe:: java_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_java 'Install' do
license lazy { NewRelic.application_monitoring_license(node) }
version node['newrelic']['java_agent']['version'] unless node['newrelic']['java_agent']['version'].nil?
install_dir node['newrelic']... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/repository.rb | recipes/repository.rb | #
# Cookbook:: newrelic
# Recipe:: repository
#
# Copyright:: (c) 2016, David Joos
#
case node['platform_family']
when 'debian'
apt_repository 'newrelic' do
uri node['newrelic']['repository']['uri']
distribution node['newrelic']['repository']['distribution']
components node['newrelic']['repository']['com... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/python_agent.rb | recipes/python_agent.rb | #
# Cookbook:: newrelic
# Recipe:: python_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_python 'new python agent' do
license lazy { NewRelic.application_monitoring_license(node) }
config_file node['newrelic']['python_agent']['config_file'] unless node['newrelic']['python_agent']['config_file'].nil?
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/default.rb | recipes/default.rb | #
# Cookbook:: newrelic
# Recipe:: default
#
# Copyright:: (c) 2016, David Joos
#
include_recipe 'newrelic::server_monitor_agent'
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/php_agent.rb | recipes/php_agent.rb | #
# Cookbook:: newrelic
# Recipe:: php_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_php 'Install' do
license lazy { NewRelic.application_monitoring_license(node) }
version node['newrelic']['php_agent']['version'] unless node['newrelic']['php_agent']['version'].nil?
config_file node['newrelic']['ph... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/ruby_agent.rb | recipes/ruby_agent.rb | #
# Cookbook:: newrelic
# Recipe:: ruby_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_ruby 'Install' do
license lazy { NewRelic.application_monitoring_license(node) }
version node['newrelic']['ruby_agent']['version'] unless node['newrelic']['ruby_agent']['version']
template_cookbook node['newrelic'... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/nodejs_agent.rb | recipes/nodejs_agent.rb | #
# Cookbook:: newrelic
# Recipe:: nodejs_agent
#
# Copyright:: (c) 2016, David Joos
#
node['newrelic']['nodejs_agent']['apps'].each do |nodeapp|
newrelic_agent_nodejs nodeapp['app_path'] do
license lazy { NewRelic.application_monitoring_license(node) }
version nodeapp['version'] unless nodeapp['version'].ni... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/server_monitor_agent.rb | recipes/server_monitor_agent.rb | #
# Cookbook:: newrelic
# Recipe:: server_monitor_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_server_monitor 'Install' do
license lazy { NewRelic.server_monitoring_license(node) }
logfile node['newrelic']['server_monitoring']['logfile'] unless node['newrelic']['server_monitoring']['logfile'].nil?
logle... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/dotnet_agent.rb | recipes/dotnet_agent.rb | #
# Cookbook:: newrelic
# Recipe:: dotnet_agent
#
# Copyright:: (c) 2016, David Joos
#
newrelic_agent_dotnet 'Install' do
https_download node['newrelic']['dotnet_agent']['https_download'] unless node['newrelic']['dotnet_agent']['https_download'].nil?
install_level node['newrelic']['dotnet_agent']['install_level'] ... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/recipes/infrastructure_agent.rb | recipes/infrastructure_agent.rb | #
# Cookbook:: newrelic
# Recipe:: infrastructure_agent
#
# Copyright:: (c) 2017, David Joos
#
newrelic_agent_infrastructure 'Install'
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/yml.rb | providers/yml.rb | #
# Cookbook:: newrelic
# Provider:: yml
#
# Copyright:: (c) 2016, David Joos
#
require 'uri'
action :generate do
template new_resource.yml_path do
cookbook new_resource.template_cookbook
source new_resource.template_source
owner new_resource.owner
group new_resource.group
mode '0644'
variab... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_java.rb | providers/agent_java.rb | #
# Cookbook:: newrelic
# Recipe:: agent_java
#
# Copyright:: (c) 2016, David Joos
#
require 'uri'
# include helper methods
include NewRelic::Helpers
action :install do
# Check license key provided
check_license
create_install_directory
agent_jar
generate_agent_config
allow_app_group_write_to_log_file_pa... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_php.rb | providers/agent_php.rb | #
# Cookbook:: newrelic
# Provider:: agent_php
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
# Check license key provided
check_license
# check config_file attribute value
raise "Please specify the path to your New Relic php agent config file (#{... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_python.rb | providers/agent_python.rb | #
# Cookbook:: newrelic
# Provider:: agent_python
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
# Check license key provided
check_license
newrelic_repository
install_python_agent
create_config_dir
generate_agent_config
end
action :remove do
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_nodejs.rb | providers/agent_nodejs.rb | #
# Cookbook:: newrelic
# Provider:: agent_nodejs
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
# Check license key provided
check_license
raise 'Cannot install newrelic nodejs agent. Missing npm. Please ensure nodejs and npm are installed before ca... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_infrastructure.rb | providers/agent_infrastructure.rb | #
# Cookbook:: newrelic
# Provider:: agent_infrastructure
#
# Copyright:: (c) 2017, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
check_license
newrelic_repository_infrastructure
case node['platform_family']
when 'debian', 'rhel', 'amazon'
install_newrelic_infrastructu... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/deployment.rb | providers/deployment.rb | #
# Cookbook:: newrelic
# Provider:: deployment
#
# Copyright:: (c) 2016, David Joos
#
action :notify do
key = new_resource.key
# @todo take out deprecated api_key logic
unless new_resource.api_key.nil?
Chef::Log.warn "The 'api_key'-attribute has been deprecated. Please make use of the key and key_type attr... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_ruby.rb | providers/agent_ruby.rb | #
# Cookbook:: newrelic
# Recipe:: agent_ruby
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
# Check license key provided
check_license
create_install_directory
install_newrelic
generate_agent_config
end
action :remove do
remove_newrelic
end
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/server_monitor.rb | providers/server_monitor.rb | #
# Cookbook:: newrelic
# Provider:: server_monitor
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
include NewRelic::ServerMonitorHelpers
action :install do
check_license
newrelic_repository
case node['platform_family']
when 'debian', 'rhel', 'fedora', 'amazon'
i... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/providers/agent_dotnet.rb | providers/agent_dotnet.rb | #
# Cookbook:: newrelic
# Recipe:: agent_dotnet
#
# Copyright:: (c) 2016, David Joos
#
# include helper methods
include NewRelic::Helpers
action :install do
check_license
install_newrelic
end
action :remove do
remove_newrelic
end
def install_newrelic
windows_package 'Install New Relic .NET Agent' do
sou... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/java_agent.rb | attributes/java_agent.rb | #
# Cookbook:: newrelic
# Attributes:: java_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['java_agent']['version'] = 'latest'
default['newrelic']['java_agent']['install_dir'] = '/opt/newrelic/java'
default['newrelic']['java_agent']['app_user'] = 'newrelic'
default['newrelic']['java_agent']['app_grou... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/repository.rb | attributes/repository.rb | #
# Cookbook:: newrelic
# Attributes:: repository
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['repository']['key'] = 'http://download.newrelic.com/548C16BF.gpg'
default['newrelic']['repository']['ssl_verify'] = true
case node['platform_family']
when 'debian'
default['newrelic']['repository']['uri'] = ... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/python_agent.rb | attributes/python_agent.rb | #
# Cookbook:: newrelic
# Attributes:: python_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['python_agent']['agent_action'] = 'install'
default['newrelic']['python_agent']['config_file'] = '/etc/newrelic/newrelic.ini'
default['newrelic']['python_agent']['template']['cookbook'] = 'newrelic'
default['... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/default.rb | attributes/default.rb | #
# Cookbook:: newrelic
# Attributes:: default
#
# Copyright:: (c) 2016, David Joos
#
##############
# BASIC CONFIG
##############
# license(s), all default to node['newrelic']['license']
default['newrelic']['license'] = nil
default['newrelic']['server_monitoring']['license'] = nil
default['newrelic']['application_mon... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/php_agent.rb | attributes/php_agent.rb | #
# Cookbook:: newrelic
# Attributes:: php_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['php_agent']['version'] = nil
default['newrelic']['php_agent']['agent_action'] = nil
default['newrelic']['php_agent']['install_silently'] = nil
default['newrelic']['php_agent']['startup_mode'] = nil
default['new... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/ruby_agent.rb | attributes/ruby_agent.rb | #
# Cookbook:: newrelic
# Attributes:: ruby_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['ruby_agent']['agent_action'] = 'install'
default['newrelic']['ruby_agent']['version'] = 'latest'
default['newrelic']['ruby_agent']['install_dir'] = ''
default['newrelic']['ruby_agent']['app_user'] = 'newrelic'... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/nodejs_agent.rb | attributes/nodejs_agent.rb | #
# Cookbook:: newrelic
# Attributes:: nodejs_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['nodejs_agent']['agent_action'] = 'install'
default['newrelic']['nodejs_agent']['apps'] = []
default['newrelic']['nodejs_agent']['template']['cookbook'] = 'newrelic'
default['newrelic']['nodejs_agent']['templ... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/server_monitor_agent.rb | attributes/server_monitor_agent.rb | #
# Cookbook:: newrelic
# Attributes:: server_monitor_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['server_monitor_agent']['agent_action'] = nil
default['newrelic']['server_monitor_agent']['service_notify_action'] = nil
default['newrelic']['server_monitor_agent']['service_actions'] = nil
default['... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/attributes/dotnet_agent.rb | attributes/dotnet_agent.rb | #
# Cookbook:: newrelic
# Attributes:: dotnet_agent
#
# Copyright:: (c) 2016, David Joos
#
default['newrelic']['dotnet_agent']['https_download'] = nil
default['newrelic']['dotnet_agent']['install_level'] = nil
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/spec_helper.rb | spec/spec_helper.rb | require 'rspec/expectations'
require 'chefspec'
require 'chefspec/berkshelf'
::LOG_LEVEL = :info
def stub_resources
stub_command('/usr/sbin/apache2 -t').and_return(true)
stub_command('/usr/sbin/httpd -t').and_return(true)
shellout = double('shellout')
shellout.stub(:run_command)
shellout.stub(:error?)
Mix... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/server_monitor_spec.rb | spec/unit/server_monitor_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::server_monitor' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_server_monitor']) do |node|
stub_node_resources(n... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/default_spec.rb | spec/unit/default_spec.rb | require 'spec_helper'
describe 'newrelic::default' do
let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) }
it 'includes the server_monitor_agent recipe' do
expect(chef_run).to include_recipe('newrelic::server_monitor_agent')
end
end
| ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_ruby_spec.rb | spec/unit/agent_ruby_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_ruby' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_ruby']) do |node|
stub_node_resources(node)
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/repository_spec.rb | spec/unit/repository_spec.rb | require 'spec_helper'
describe 'newrelic::repository' do
# before(:each) do
# stub_command('apt-key list | grep 548C16BF').and_return(true)
# end
context 'Ubuntu 14.04' do
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '14.04').converge(described_recipe) }
it 'installs the N... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_java_spec.rb | spec/unit/agent_java_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_java' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_java']) do |node|
stub_node_resources(node)
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/license_spec.rb | spec/unit/license_spec.rb | require 'spec_helper'
require_relative '../../libraries/newrelic'
describe 'libraries/newrelic.rb' do
# helper to build different kinds of node objects
def build_node(lic = nil, server = nil, app = nil)
node = {}
node['newrelic'] = {}
node['newrelic']['license'] = lic if lic
if server
node[... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_php_spec.rb | spec/unit/agent_php_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_php' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_php']) do |node|
stub_node_resources(node)
... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_dotnet_spec.rb | spec/unit/agent_dotnet_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_dotnet' do
before do
stub_resources
end
context 'Windows' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'windows', version: '2012', step_into: ['newrelic_agent_dotnet']) do |node|
stub_node_resources(... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_python_spec.rb | spec/unit/agent_python_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_python' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_python']) do |node|
stub_node_resources(node)... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_infrastructure_spec.rb | spec/unit/agent_infrastructure_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_infrastructure' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_infrastructure']) do |node|
stub_node... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/spec/unit/agent_nodejs_spec.rb | spec/unit/agent_nodejs_spec.rb | require 'spec_helper'
describe 'newrelic_lwrp_test::agent_nodejs' do
before do
stub_resources
end
context 'Centos' do
let(:chef_run) do
ChefSpec::SoloRunner.new(log_level: LOG_LEVEL, platform: 'centos', version: '6', step_into: ['newrelic_agent_nodejs']) do |node|
stub_resources
st... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/libraries/matchers.rb | libraries/matchers.rb | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false | |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/libraries/newrelic.rb | libraries/newrelic.rb | # NewRelic module
module NewRelic
def self.license(node)
node['newrelic'] && node['newrelic']['license']
end
def self.server_monitoring_license(node)
node['newrelic'] && node['newrelic']['server_monitoring'] && node['newrelic']['server_monitoring']['license'] || license(node)
end
def self.applicatio... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/libraries/helpers.rb | libraries/helpers.rb | # NewRelic helpers
module NewRelic
# helpers module
module Helpers
def newrelic_repository
install_newrelic_repo
end
def newrelic_repository_infrastructure
install_newrelic_repo_infrastructure
end
def check_license
# check license key provided
raise 'The NewRelic key is... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/libraries/server_monitor_helpers.rb | libraries/server_monitor_helpers.rb | require 'net/http'
require 'net/https'
require 'json'
# NewRelic module
module NewRelic
# Server monitor helper module
module ServerMonitorHelpers
def update_alert_policy(alert_policy_id, hostname = nil)
api_path = 'https://api.newrelic.com/v2'
api_alert_path = api_path + '/alert_policies'
ne... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/yml.rb | resources/yml.rb | #
# Cookbook:: newrelic
# Resource:: yml
#
# Copyright:: (c) 2016, David Joos
#
actions :generate
default_action :generate
attribute :yml_path, kind_of: String, name_attribute: true
attribute :template_cookbook, kind_of: String, default: 'newrelic'
attribute :template_source, kind_of: String, default: 'agent/newrelic... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_java.rb | resources/agent_java.rb | #
# Cookbook:: newrelic
# Resource:: agent_java
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, default: lazy { NewRelic.application_monitoring_license(node) }
attribute :version, kind_of: String, default: 'latest'
attribute :install_dir, ki... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_php.rb | resources/agent_php.rb | #
# Cookbook:: newrelic
# Resource:: agent_php
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, default: lazy { NewRelic.application_monitoring_license(node) }
attribute :version, kind_of: String, default: nil
attribute :config_file, kind_of... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_python.rb | resources/agent_python.rb | #
# Cookbook:: newrelic
# Resource:: agent_python
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, required: true
attribute :config_file, kind_of: String, default: '/etc/newrelic/newrelic.ini'
attribute :cookbook, kind_of: String, default: '... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_nodejs.rb | resources/agent_nodejs.rb | #
# Cookbook:: newrelic
# Resource:: agent_nodejs
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, required: true
attribute :version, kind_of: String, default: 'latest'
attribute :app_name, kind_of: String, default: 'My Node App'
attribute :... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_infrastructure.rb | resources/agent_infrastructure.rb | #
# Cookbook:: newrelic
# Resource:: agent_infrastructure
#
# Copyright:: (c) 2017, David Joos
#
actions :install
default_action :install
attribute :license, kind_of: String, default: lazy { NewRelic.application_monitoring_license(node) }
attribute :version, kind_of: String, default: nil
attribute :display_name, kin... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/deployment.rb | resources/deployment.rb | #
# Cookbook:: newrelic
# Resource:: deployment
#
# Copyright:: (c) 2016, David Joos
#
actions :notify
default_action :notify
attribute :url, kind_of: String, default: 'https://api.newrelic.com/deployments.xml'
attribute :key_type, kind_of: String, equal_to: %w(license_key api_key), default: 'api_key'
attribute :key,... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_ruby.rb | resources/agent_ruby.rb | #
# Cookbook:: newrelic
# Resource:: agent_ruby
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, default: lazy { NewRelic.application_monitoring_license(node) }
attribute :version, kind_of: String, default: 'latest'
attribute :agent_type, kin... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/server_monitor.rb | resources/server_monitor.rb | #
# Cookbook:: newrelic
# Resource:: server_monitor
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :license, kind_of: String, default: lazy { NewRelic.server_monitoring_license(node) }
attribute :logfile, kind_of: String, default: nil
attribute :loglevel, kind_of: ... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
djoos-cookbooks/newrelic | https://github.com/djoos-cookbooks/newrelic/blob/ebfc1a95ff740022050dd91037e2a76d5ac6edf2/resources/agent_dotnet.rb | resources/agent_dotnet.rb | #
# Cookbook:: newrelic
# Resource:: agent_dotnet
#
# Copyright:: (c) 2016, David Joos
#
actions :install, :remove
default_action :install
attribute :https_download, kind_of: String, default: 'https://download.newrelic.com/dot_net_agent/latest_release/NewRelicDotNetAgent_x64.msi'
attribute :install_level, kind_of: St... | ruby | MIT | ebfc1a95ff740022050dd91037e2a76d5ac6edf2 | 2026-01-04T17:38:43.987988Z | false |
KrauseFx/twitter-unfollow | https://github.com/KrauseFx/twitter-unfollow/blob/7471dc6a81540ef85019e63afddcbecf069bc365/unfollow.rb | unfollow.rb | require 'twitter'
require 'shellwords'
class Unfollow
def run
raise "Please create a list called 'Old Follows'" if old_follows_list.nil?
followings = client.following
followings.each do |user|
next if user.screen_name == "KrauseFx" # trolololol
puts "Unfollowing user #{user.screen_name} (#{... | ruby | MIT | 7471dc6a81540ef85019e63afddcbecf069bc365 | 2026-01-04T17:38:45.042120Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/test_helper.rb | rails-app-with-knapsack_pro/test-unit/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# don't load this because it breaks CI
# require 'test/unit/rails/test_help'
# To use test-unit we need to ensure the minitest is not loaded
# because shoulda_test detect it.
# https://github.com/michaelgpearce/shared_should/bl... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/models/article_test.rb | rails-app-with-knapsack_pro/test-unit/models/article_test.rb | require 'test_helper'
class ArticleTest < Test::Unit::TestCase
test "the truth" do
assert true
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/models/foo_test.rb | rails-app-with-knapsack_pro/test-unit/models/foo_test.rb | require 'test_helper'
class FooTest < Test::Unit::TestCase
class << self
def startup
puts 'STARTUP --------'
end
def shutdown
puts 'SHUTDOWN --------'
end
end
def setup
puts 'SETUP --------'
end
def teardown
puts 'TEARDOWN --------'
end
test "the truth" do
asse... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/models/shared_should_test.rb | rails-app-with-knapsack_pro/test-unit/models/shared_should_test.rb | require 'test_helper'
class Book
attr_accessor :rentable, :purchasable
def available_for_checkout?
true
end
end
class SharedShouldTest < Test::Unit::TestCase
test "shared should 1" do
assert true
end
test "shared should 2" do
assert true
end
context "Book" do
context "with an in-sto... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/models/bar_test.rb | rails-app-with-knapsack_pro/test-unit/models/bar_test.rb | require 'test_helper'
class BarTest < Test::Unit::TestCase
test "the truth" do
assert true
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/models/foobar_test.rb | rails-app-with-knapsack_pro/test-unit/models/foobar_test.rb | require 'test_helper'
class FoobarTest < Test::Unit::TestCase
test "foobar test" do
puts 'test-unit foobar test'
assert true
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/test-unit/meme/meme_test.rb | rails-app-with-knapsack_pro/test-unit/meme/meme_test.rb | require 'test_helper'
class MemeTest < Test::Unit::TestCase
def setup
@meme = Meme.new
end
def test_that_kitty_can_eat
assert_equal "OHAI!", @meme.i_can_has_cheezburger?
end
def test_that_it_will_not_blend
refute_match /^no/i, @meme.will_it_blend?
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/jobs/application_job.rb | rails-app-with-knapsack_pro/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/services/calculator.rb | rails-app-with-knapsack_pro/app/services/calculator.rb | class Calculator
def add(x, y)
x + y
end
def mal(x, y)
x * y
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/services/meme.rb | rails-app-with-knapsack_pro/app/services/meme.rb | # Example from https://github.com/seattlerb/minitest
class Meme
def i_can_has_cheezburger?
"OHAI!"
end
def will_it_blend?
"YES!"
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/helpers/application_helper.rb | rails-app-with-knapsack_pro/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/controllers/articles_controller.rb | rails-app-with-knapsack_pro/app/controllers/articles_controller.rb | class ArticlesController < ApplicationController
before_action :set_article, only: [:show, :edit, :update, :destroy]
# GET /articles
# GET /articles.json
def index
@articles = Article.all
end
# GET /articles/1
# GET /articles/1.json
def show
end
# GET /articles/new
def new
@article = Ar... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/controllers/welcome_controller.rb | rails-app-with-knapsack_pro/app/controllers/welcome_controller.rb | class WelcomeController < ApplicationController
def index
end
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/controllers/calculator_controller.rb | rails-app-with-knapsack_pro/app/controllers/calculator_controller.rb | class CalculatorController < ApplicationController
def index
@result = nil
end
def create
calculator = Calculator.new
@result = calculator.add(x, y)
render 'index'
end
private
def x
@x = strong_params[:x].to_i
end
def y
@y = strong_params[:y].to_i
end
def strong_params
... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/controllers/pending_controller.rb | rails-app-with-knapsack_pro/app/controllers/pending_controller.rb | class PendingController < ApplicationController
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/controllers/application_controller.rb | rails-app-with-knapsack_pro/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
allow_browser versions: :modern
# Changes to the importmap will invalidate the etag for HTML responses
stale_when_importmap_changes
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/models/article.rb | rails-app-with-knapsack_pro/app/models/article.rb | class Article < ApplicationRecord
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/models/application_record.rb | rails-app-with-knapsack_pro/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
primary_abstract_class
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/app/mailers/application_mailer.rb | rails-app-with-knapsack_pro/app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
default from: "from@example.com"
layout "mailer"
end
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/turnip/rails_helper.rb | rails-app-with-knapsack_pro/turnip/rails_helper.rb | # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
ActiveRecord::Migration.maintain_test_sc... | ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
KnapsackPro/knapsack_pro-ruby | https://github.com/KnapsackPro/knapsack_pro-ruby/blob/04da025adfa702ef7bfcdda588049512550b3127/rails-app-with-knapsack_pro/turnip/spec_helper.rb | rails-app-with-knapsack_pro/turnip/spec_helper.rb | require "knapsack_pro"
KnapsackPro::Adapters::RSpecAdapter.bind
module FooSteps
step "I have a two" do
@input = 2
end
step "I add one" do
@input += 1
end
step "I expect a three" do
expect(@input).to eq 3
end
end
RSpec.configure { |c| c.include FooSteps }
| ruby | MIT | 04da025adfa702ef7bfcdda588049512550b3127 | 2026-01-04T17:38:43.340996Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.