-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use official Ruby Lambda images for S3-mpeg
- Loading branch information
Showing
18 changed files
with
343 additions
and
93 deletions.
There are no files selected for viewing
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
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,7 @@ | ||
require_relative "lib/encrypted_credentials" | ||
|
||
namespace :credentials do | ||
task :edit do | ||
EncryptedCredentials::EncryptedFile.new.edit | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require "yaml" | ||
require "erb" | ||
require "pathname" | ||
require "encrypted_credentials" | ||
|
||
class AppSettings | ||
DEFAULT_SETTINGS_PATH = Pathname(File.expand_path("app_settings.yml", __dir__)) | ||
|
||
class << self | ||
attr_reader :app_settings | ||
|
||
def fetch(key) | ||
settings.fetch(key.to_s) | ||
end | ||
|
||
def env | ||
ENV.fetch("APP_ENV", "development") | ||
end | ||
|
||
def [](key) | ||
settings[key.to_s] | ||
end | ||
|
||
def credentials | ||
@credentials ||= EncryptedCredentials::EncryptedFile.new.credentials.fetch(env, {}) | ||
end | ||
|
||
private | ||
|
||
def settings | ||
@settings ||= begin | ||
data = YAML.load(DEFAULT_SETTINGS_PATH.read, aliases: true).fetch(env, {}) | ||
YAML.load(ERB.new(data.to_yaml).result) | ||
end | ||
end | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
default: &default | ||
|
||
production: &production | ||
<<: *default | ||
sentry_dsn: "<%= AppSettings.credentials.fetch('sentry_dsn') %>" | ||
|
||
staging: | ||
<<: *production | ||
|
||
development: &development | ||
<<: *default | ||
stub_regions: true | ||
|
||
test: | ||
<<: *development |
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 @@ | ||
Zzn6DieMrW83+d0fWqlbJQ== |
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,6 @@ | ||
require "sentry-ruby" | ||
|
||
Sentry.init do |config| | ||
config.dsn = AppSettings[:sentry_dsn] | ||
config.environment = AppSettings.env | ||
end |
Oops, something went wrong.