This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module InheritsFromHash | |
| def select(*args, &block) | |
| dup.tap { |hash| hash.select!(*args, &block) } | |
| end | |
| def reject(*args, &block) | |
| dup.tap { |hash| hash.reject!(*args, &block) } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN { | |
| require 'net/http' | |
| Net::HTTP.module_eval do | |
| alias_method '__initialize__', 'initialize' | |
| def initialize(*args,&block) | |
| __initialize__(*args, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array(1) | |
| => [1] | |
| Array([1,2]) | |
| => [1,2] | |
| Array(nil) | |
| => [] | |
| [*1] | |
| => [1] | |
| [*[1,2]] | |
| => [1,2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| search: | |
| build: ../ | |
| volumes: | |
| - ../:/app | |
| ports: | |
| - "4567:4567" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IMAGE_NAME := "foo" | |
| docker-build: | |
| @(docker build -t $(IMAGE_NAME) -f Dockerfile .) | |
| test: docker-build | |
| @(docker-compose -f dockercompose/test.yml up -d) | |
| @(docker-compose -f dockercompose/test.yml run search bash -c "rspec") | |
| @(docker-compose -f dockercompose/test.yml down) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IMAGE_NAME := "foo" | |
| docker-build: | |
| @(docker build -t $(IMAGE_NAME) -f Dockerfile .) | |
| test: docker-build | |
| @(docker-compose -f dockercompose/test.yml up -d) | |
| @(docker-compose -f dockercompose/test.yml run search bash -c "sleep 15; rspec") | |
| @(docker-compose -f dockercompose/test.yml down) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IMAGE_NAME := "foo" | |
| docker-build: | |
| @(docker build -t $(IMAGE_NAME) -f Dockerfile .) | |
| test: docker-build | |
| @(docker-compose -f dockercompose/test.yml up -d) | |
| @(docker-compose -f dockercompose/test.yml run wait) | |
| @(docker-compose -f dockercompose/test.yml run search bash -c "rspec") | |
| @(docker-compose -f dockercompose/test.yml down) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :logging, true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NewRelic rpm | |
| # agent_logger.rb#L134-L136 | |
| def wants_stdout? | |
| ::NewRelic::Agent.config[:log_file_path].upcase == "STDOUT" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The newrelic agent generates its own log file to keep its logging | |
| # information separate from that of your application. Specify its | |
| # log level here. | |
| log_level: 'error' | |
| # Optionally set the path to the log file This is expanded from the | |
| # root directory (may be relative or absolute, e.g. 'log/' or | |
| # '/var/log/') The agent will attempt to create this directory if it | |
| # does not exist. | |
| # log_file_path: 'log' |