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

Support deep coercion for Hash attributes #112

Merged
merged 9 commits into from Oct 1, 2012

Conversation

greyblake
Copy link
Contributor

Issue #98

Here we are.

@travisbot
Copy link

This pull request fails (merged 5ab13ce into 0d72026).

@travisbot
Copy link

This pull request fails (merged 17a6240 into 0d72026).

@dkubb
Copy link
Collaborator

dkubb commented Sep 2, 2012

@greyblake it looks like you left in a require 'pry' line in the specs, and travis is blowing up because it's not a gem dependency. I'd suggest removing that line since we don't want to add any dependencies that aren't absolutely necessary.

Also, this may be something you're already doing, but make sure you run rake ci which will run through the tests as well as some deeper checks of the code that we require the code to meet.

@travisbot
Copy link

This pull request passes (merged c9e592f into 0d72026).

@greyblake
Copy link
Contributor Author

@dkubb, thanks for catching pry. I just used it for local debug. Removed in 05bd947

rake ci allowed me to detect that one of my methods is not covered, but the output is pretty urgly:

rake ci
[warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: YARD::Parser::UndocumentableError for class Virtus::Attribute
[warn]:     in file 'lib/virtus/attribute.rb':10:

    10: include Equalizer.new(inspect) << :name << :options

Coverage: 99.8% (threshold: 100.0%)
[warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: YARD::Parser::UndocumentableError for class Virtus::Attribute
[warn]:     in file 'lib/virtus/attribute.rb':10:

    10: include Equalizer.new(inspect) << :name << :options

rake aborted!
Coverage must be at least 100.0% but was 99.8%

There defenetly should be a way to find out what code is not covered.
Finally with simple cov i detect it and write a spec: c4a9101

Thanks.

@dkubb
Copy link
Collaborator

dkubb commented Sep 2, 2012

@greyblake yeah, you can run the yardstick_measure rake task, and then check the report in ./measurements.

Most of the output comes from parsing errors in YARD so other than silencing them I don't know if there's anything I can do in yardstick to make them go away.

# @api public
attr_reader :value_type


Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a tiny point, but there's an extra blank line here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in 0242d1c

@greyblake
Copy link
Contributor Author

@dkubb To avoid yardstick warnings we can extract module created dynamically into a constant:

    # Some doc
    AttributeEalizer = Equalizer.new(inspect) << :name << :options
    include AttributeEalizer

@travisbot
Copy link

This pull request passes (merged 0242d1c into 0d72026).

@travisbot
Copy link

This pull request passes (merged 68793d2 into 0d72026).

@greyblake
Copy link
Contributor Author

@dkubb @solnic Does something remain to do to merge this pull request?

@solnic
Copy link
Owner

solnic commented Sep 25, 2012

Yes. Me or @dkubb must find time to do the final review and merge :) I'll work on it when I'm in Kiev next weekend :) conferences == OSS hacking :)

On Tuesday, September 25, 2012 at 3:00 PM, Sergey Potapov wrote:

@dkubb (https://github.com/dkubb) @solnic (https://github.com/solnic) Does something remain to do to merge this pull request?


Reply to this email directly or view it on GitHub (#112 (comment)).

@greyblake
Copy link
Contributor Author

Ok.
Btw, I look forward to your talk in Kiev and hope I'll catch you there:)

@solnic solnic merged commit 01922f8 into solnic:master Oct 1, 2012
@solnic
Copy link
Owner

solnic commented Oct 1, 2012

@greyblake thanks for that. I just merged it in :)

@greyblake
Copy link
Contributor Author

Great! Thanks))

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.

None yet

4 participants