davydovanton / shallow_attributes

Simple and lightweight Virtus analog.
MIT License
101 stars 18 forks source link

Feature/present option for attributes #17

Closed nesaulov closed 7 years ago

nesaulov commented 7 years ago

Hi! Firstly, thank you for this gem, i find it really great and would like to contribute my work to it.

I've implemented present: option that is mentioned in #4

So now one can specify, for example:

attribute :name, String, present: true

And error will be raised if this attribute is not provided.

Also i've improved some typos in documentation and have bumped version if you don't mind :)

Please let me know what do you think of these changes.

Have a great day!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 43bb0cac561338aacccc1aaab65798aed9ae6e53 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 43bb0cac561338aacccc1aaab65798aed9ae6e53 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 43bb0cac561338aacccc1aaab65798aed9ae6e53 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 43bb0cac561338aacccc1aaab65798aed9ae6e53 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 43bb0cac561338aacccc1aaab65798aed9ae6e53 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

nesaulov commented 7 years ago

Surely, i've reverted this.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 45f621903881d187743d7bd4d11d04b3b5676dce on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

nesaulov commented 7 years ago

And updated the README a bit (added link to mandatory-attributes section)

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 6152a77a4391bad27496a6a47529ca1d92b8f7d0 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 99.263% when pulling 6152a77a4391bad27496a6a47529ca1d92b8f7d0 on nesaulov:feature/present-option-for-attributes into 7df3220cf0ff2357bedd9661d16fd1b6433443da on davydovanton:master.