Skip to content

Commit 2a86113

Browse files
committed
Minor changes to cleanup code. Finished GemSpec. Added changelog.
1 parent dd9a1d8 commit 2a86113

4 files changed

Lines changed: 62 additions & 7 deletions

File tree

CHANGELOG.md

Whitespace-only changes.

Gemfile.lock

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
PATH
2+
remote: .
3+
specs:
4+
secrets-manager (1.0.0)
5+
aws-sdk-secretsmanager (>= 1.31.0)
6+
concurrent-ruby (>= 1.0)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
aws-eventstream (1.0.3)
12+
aws-partitions (1.213.0)
13+
aws-sdk-core (3.68.0)
14+
aws-eventstream (~> 1.0, >= 1.0.2)
15+
aws-partitions (~> 1.0)
16+
aws-sigv4 (~> 1.1)
17+
jmespath (~> 1.0)
18+
aws-sdk-secretsmanager (1.31.0)
19+
aws-sdk-core (~> 3, >= 3.61.1)
20+
aws-sigv4 (~> 1.1)
21+
aws-sigv4 (1.1.0)
22+
aws-eventstream (~> 1.0, >= 1.0.2)
23+
concurrent-ruby (1.1.5)
24+
diff-lcs (1.3)
25+
jmespath (1.4.0)
26+
rake (10.5.0)
27+
rspec (3.8.0)
28+
rspec-core (~> 3.8.0)
29+
rspec-expectations (~> 3.8.0)
30+
rspec-mocks (~> 3.8.0)
31+
rspec-core (3.8.2)
32+
rspec-support (~> 3.8.0)
33+
rspec-expectations (3.8.4)
34+
diff-lcs (>= 1.2.0, < 2.0)
35+
rspec-support (~> 3.8.0)
36+
rspec-mocks (3.8.1)
37+
diff-lcs (>= 1.2.0, < 2.0)
38+
rspec-support (~> 3.8.0)
39+
rspec-support (3.8.2)
40+
41+
PLATFORMS
42+
ruby
43+
44+
DEPENDENCIES
45+
bundler (~> 2.0)
46+
rake (~> 10.0)
47+
rspec (~> 3.0)
48+
secrets-manager!
49+
50+
BUNDLED WITH
51+
2.0.2

lib/secrets-manager.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# frozen_string_literal: true
2+
13
require "version"
4+
require "aws-sdk-secretsmanager"
25
require "concurrent-ruby"
36
require "json"
47

@@ -40,6 +43,8 @@ def secret_env
4043
end
4144

4245
def client
46+
return @aws_client if @aws_client
47+
4348
@_client ||= Aws::SecretsManager::Client.new({
4449
region: ENV.fetch('AWS_SECRETS_REGION', 'us-east-1'),
4550
credentials: Aws::Credentials.new(ENV['AWS_SECRETS_KEY'], ENV['AWS_SECRETS_SECRET'])

secrets-manager.gemspec

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ Gem::Specification.new do |spec|
88
spec.authors = ["Christopher Ostrowski", "Matt Hooks", "Evan Waters"]
99
spec.email = ["chris@dutchie.com", "matt.hooks@dutchie.com", "evan.waters@dutchie.com"]
1010

11-
spec.summary = %q{TODO: Write a short summary, because RubyGems requires one.}
12-
spec.description = %q{TODO: Write a longer description or delete this line.}
13-
spec.homepage = "TODO: Put your gem's website or public repo URL here."
14-
15-
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
11+
spec.summary = %q{Ruby + AWS Secrets Manager}
12+
spec.description = %q{Ruby AWS Secrets Manager interface. Allows for env specific secrets, in-memory caching with custom TTL, file storage, and simple API.}
13+
spec.homepage = "https://github.com/GetDutchie/SecretsManager"
1614

1715
spec.metadata["homepage_uri"] = spec.homepage
18-
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
19-
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
16+
spec.metadata["source_code_uri"] = "https://github.com/GetDutchie/SecretsManager.git"
17+
spec.metadata["changelog_uri"] = "https://github.com/GetDutchie/SecretsManager/blob/master/CHANGELOG.md"
2018

2119
# Specify which files should be added to the gem when it is released.
2220
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -28,6 +26,7 @@ Gem::Specification.new do |spec|
2826
spec.require_paths = ["lib"]
2927

3028
spec.add_dependency "concurrent-ruby", ">= 1.0"
29+
spec.add_dependency 'aws-sdk-secretsmanager', '>= 1.31.0'
3130

3231
spec.add_development_dependency "bundler", "~> 2.0"
3332
spec.add_development_dependency "rake", "~> 10.0"

0 commit comments

Comments
 (0)