-
Notifications
You must be signed in to change notification settings - Fork 16
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
Salmon 13 14 acu127014 attributor mvp #2
Conversation
…initions for Types that ruby has not seen yet (and allows a type to have an attribute of its own type) acu109132
…om example generation. acu127014
min = options[:min] || 0 | ||
max = options[:max] || 1000 | ||
|
||
rand(max-min) + min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This computes the range [min, max) (i.e. max is non-inclusive). Max should not be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should, although it won't break anything as-is at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, we should change it to be inclusive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, will wait for this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an issue to track this: https://github.com/rightscale/attributor/issues/6
acu127014
attribute 'chicken', Chicken | ||
attribute 'duck', Duck | ||
attribute 'turkey', Turkey | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This is actually broken at the moment because the :email identity does not exist (or actually exists in multiple sub attributes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also didn't really mean to check it in. Whoops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
Will wait for this to be updated. The Turducken example seems like it is a valid test case, it is just broken by the :email identity. Maybe replace email with weight.
end | ||
|
||
|
||
def check_option!(name, definition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic code here needs to be documented in the gem README file as well as a method comment above this so users know what they can and cannot do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That, and a whole pile of other documentation, for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an issue to track this: https://github.com/rightscale/attributor/issues/11 🎱
@@ -0,0 +1,96 @@ | |||
require 'ostruct' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required? Don't see any OpenStruct.new usage
Also deleted some commented-out code.
…e_coverage Salmon 13 14 acu128253 add code coverage
…nitions for it. acu127014
Also remove dead code and fix Turducken identity error. acu127014
…or_mvp Salmon 13 14 acu127014 attributor mvp
No description provided.