config icon indicating copy to clipboard operation
config copied to clipboard

Add hanami support

Open ippachi opened this issue 5 years ago • 5 comments

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!. 😄

ippachi avatar Feb 10 '20 15:02 ippachi

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.

pkuczynski avatar Mar 19 '20 13:03 pkuczynski

I'll do!

ippachi avatar Apr 19 '20 13:04 ippachi

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.

ippachi avatar Apr 19 '20 13:04 ippachi

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 avatar Apr 19 '20 14:04 pkuczynski

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


Issues
======
- Added 15
           

See the complete overview on Codacy

pkuczynski avatar Jun 23 '20 14:06 pkuczynski