Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hanami support #272

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ippachi
Copy link

@ippachi ippachi commented Feb 10, 2020

I add hanami support. 🌸

# in Gemfile
group :plugins do
  gem "config"
end
bundle exec hanami config

This code works well in 1.7.0 of rubyconfig/config.
But this is not usable in 2.2.1. Because dry-validation version is difference in gemspec

# in rubyconfig/config
s.add_dependency 'dry-validation', '~> 1.0', '>= 1.0.0'	

# in hanami/validations	
spec.add_dependency 'dry-validation', '~> 0.11', '< 0.12'

I don't know what to do for this problem.
I hope this PR helps you!. 😄

@pkuczynski
Copy link
Member

This looks pretty cool, thank you! It looks that hanami 2.0.0.alpha1 is already using newer dry-validation, so this could work.

Could you please also add an example app to the tests, so we can test it against this newer hanami? You can have a look at how this has been done with rails using appraisal.

@ippachi
Copy link
Author

ippachi commented Apr 19, 2020

I'll do!

@ippachi
Copy link
Author

ippachi commented Apr 19, 2020

2.0alpha doesn't even seem to be implemented with the new command, so it's hard to add tests at this point.
So I will add a test when 2.0beta comes out.

@pkuczynski
Copy link
Member

Sure thing. We could also add this to the earlier version of config gem (I think we added dry-validation in 2.1), but not sure if it's worth it. Better wait I guess...

Thanks for following up!

@pkuczynski
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 15
           

See the complete overview on Codacy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants