Skip to content

Doppler loader#108

Merged
palkan merged 15 commits into
palkan:masterfrom
prog-supdex:doppler_loader
Mar 6, 2023
Merged

Doppler loader#108
palkan merged 15 commits into
palkan:masterfrom
prog-supdex:doppler_loader

Conversation

@prog-supdex
Copy link
Copy Markdown
Contributor

@prog-supdex prog-supdex commented Jan 11, 2023

What is the purpose of this pull request?

Hello @palkan

Please, review my pr

What changes did you make? (overview)

Add Doppler loader

Checklist

  • I've added tests for this change
  • I've added a Changelog entry
  • I've updated a documentation

Closes #107

Comment thread lib/anyway/loaders/doppler.rb Outdated
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

# dp.st.dev.9IAsQwBQnFDQsmnyukYTtaJBqjCXJhq8zSFdSvkBVHW
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its better not to mention sensitive data in the codebase.

Copy link
Copy Markdown
Owner

@palkan palkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Please, see the comments.

Comment thread CHANGELOG.md Outdated

- Added `manifest.yml` for RBS. ([@palkan][])

## 2.3.0 (2023-01-11)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, do not change the version in the change log; we can not know when this PR will be released

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread lib/anyway/loaders/doppler.rb Outdated
DOPPLER_REQUEST_ERROR = Class.new(StandardError)
DOPPLER_JSON_FORMAT_URL = "https://api.doppler.com/v3/configs/config/secrets/download"

def call(**_options)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably use forwarding here to not care about the method signature

Suggested change
def call(**_options)
def call(...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

but now here I set

(env_prefix:, **_options)

because, I use env_prefix now for Anyway::Env

Comment thread spec/loaders/doppler_spec.rb Outdated
Comment on lines +16 to +17
allow(http_success).to receive(:read_body) { doppler_content.to_json }
expect_any_instance_of(Net::HTTP).to receive(:request) { http_success }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use webmock instead; we don't need to care about the underlying HTTP implementation here; it's likely to change over time (e.g., if we decide to add retry mechanism)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

I included it in spec_helper and disabled all net connections

WebMock.disable_net_connect!(allow_localhost: true)
``

Comment thread lib/anyway/loaders/doppler.rb
Comment thread README.md
@prog-supdex prog-supdex requested a review from palkan January 18, 2023 16:31
@palkan palkan mentioned this pull request Mar 6, 2023
3 tasks
Copy link
Copy Markdown
Owner

@palkan palkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@palkan palkan merged commit 6d16a43 into palkan:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doppler integration

3 participants