Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
wimsymons committed Sep 17, 2021
2 parents f6b56ed + 32f6a3a commit d3ab44f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.3

Metrics/LineLength:
Max: 140
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ And then execute:

### CLI

After installation, 2 executeable scripts will be installed: `smps` & `smps-cli`:
After installation, 2 executable scripts will be installed: `smps` & `smps-cli`:

- smps: the simple version of this utility.
- smps-cli: The thor cli executable offers a different interface.
Expand Down Expand Up @@ -122,10 +122,12 @@ Set the parameter to this value

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
After checking out the repo, run `./bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

To test the `smps` utility on your local machine, run `bundle exec smps --help` to see command-line options.

## Contributing

We use git flow in this project. To create your pull request, you can either use the git-flow helper or
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ end
desc 'Tags version, pushes to remote, and pushes gem'
task release: :build do
sh 'git', 'tag', '-m', changelog, "v#{SmPs::VERSION}"
#sh 'git push origin master'
#sh "git push origin v#{SmPs::VERSION}"
#sh 'ls pkg/*.gem | xargs -n 1 gem push'
# sh 'git push origin master'
# sh "git push origin v#{SmPs::VERSION}"
# sh 'ls pkg/*.gem | xargs -n 1 gem push'
end

task doc: :yard
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Version format based on http://semver.org/

## [Unreleased]

## [0.5.4] - 2021-09-17

### Changed

- Added automatic client side throttling to avoid Aws::SSM::Errors::ThrottlingException.

## [0.5.3] - 2020-04-01

### Changed
Expand Down
12 changes: 6 additions & 6 deletions lib/smps/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module SmPs
# Allows querying and writing Paramstore parameters.
class Client
def initialize(options = {})
@credentials = options[:credentials]
@options = options
@parameters = {}
end

Expand Down Expand Up @@ -90,11 +90,11 @@ def store_parameters(params)
# end

def initialize_ssm_client
if @credentials.nil?
Aws::SSM::Client.new
else
Aws::SSM::Client.new(credentials: @credentials)
end
# see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SSM/Client.html#initialize-instance_method
all_options = @options.merge(max_attempts: 10,
retry_mode: 'adaptive')
# puts all_options
Aws::SSM::Client.new(all_options)
end
end
end
2 changes: 1 addition & 1 deletion lib/smps/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module SmPs
# Current version.
VERSION = '0.5.3'
VERSION = '0.5.4'
end
2 changes: 1 addition & 1 deletion smps.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'aws-sdk-core', '> 3.0'
spec.add_runtime_dependency 'aws-sdk-ssm', '> 1.0'

spec.required_ruby_version = '>= 2.1'
spec.required_ruby_version = '>= 2.3'
end

0 comments on commit d3ab44f

Please sign in to comment.