-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Talkdesk/ivoanjo/v1.1.0
Modernize gem + prepare v1.1.0 release
- Loading branch information
Showing
12 changed files
with
82 additions
and
15 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This is the default added code owner and should be changed or overridden. | ||
# This will be the default owner for everything in the repo, unless a | ||
# later match takes precedence | ||
* @Talkdesk/octo | ||
* @Talkdesk/octo @ivoanjo |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/Gemfile.lock | ||
/gems.locked | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
jruby-9.1.12.0 | ||
jruby-9.3.8.0 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require "webrick" | ||
require "pry" | ||
require "warm-blanket" | ||
require "logging" | ||
|
||
puts "Using #{RUBY_DESCRIPTION}" | ||
|
||
PORT = ENV["PORT"] || 8080 | ||
|
||
Logging.logger.root.add_appenders(Logging.appenders.stdout( | ||
layout: Logging.layouts.pattern(pattern: '[%d] %-5l %c: %m\n', date_pattern: '%Y-%m-%d %H:%M:%S') | ||
)) | ||
|
||
WarmBlanket.configure do |config| | ||
common_headers = { | ||
"X-Api-Key": "test-api-key", | ||
} | ||
|
||
config.port = PORT | ||
config.endpoints = [ | ||
{get: "/foo", headers: common_headers}, | ||
{get: "/", headers: common_headers}, | ||
] | ||
config.enabled = true | ||
config.warmup_time_seconds = 3 | ||
end | ||
|
||
WarmBlanket.trigger_warmup | ||
|
||
server = WEBrick::HTTPServer.new(Port: PORT) | ||
|
||
server.mount_proc("/") do |request, response| | ||
response.body = "/ endpoint" | ||
end | ||
|
||
server.mount_proc("/foo") do |request, response| | ||
response.body = "/foo endpoint" | ||
end | ||
|
||
trap("INT") do | ||
server.shutdown | ||
end | ||
|
||
server.start |
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,5 @@ | |
# frozen_string_literal: true | ||
|
||
module WarmBlanket | ||
VERSION = '1.0.0' | ||
VERSION = '1.1.0' | ||
end |
This file contains 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
This file contains 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