Closed GregPK closed 7 years ago
Fix some minor issues with the formatter logic:
(Note: I bumped the version number)
Given action.keys = [[["DELETE /api/v2/resource/:id"]], /api/v2/resource/:id"]]]
action.keys
[[["DELETE /api/v2/resource/:id"]], /api/v2/resource/:id"]]]
running:
actions.keys.map {|action| action.scan(/\[([A-Z]+)\]/).flatten[0] }
gives us [nil,nil] which in turn raises the exception. Changing the regexp from
[nil,nil]
/\[([A-Z]+)\]/
to
/\[([A-Z]+).*\]/
solves the issue
shared_examples
Defining shared_examples doesn't have parents, so that parent[:action].nil? raises NoMethodError because parent is nil. Changed to check parent also.
parent[:action].nil?
NoMethodError
parent
Thank you for contribution!
I pushed your changes to Rubygems and bumped the version to 0.1.3
My pleasure, thanks for the gem!
Fix some minor issues with the formatter logic:
(Note: I bumped the version number)
bug in catching uniqueness logic:
Given
action.keys
=[[["DELETE /api/v2/resource/:id"]], /api/v2/resource/:id"]]]
running:
gives us
[nil,nil]
which in turn raises the exception. Changing the regexp from/\[([A-Z]+)\]/
to
/\[([A-Z]+).*\]/
solves the issue
bug regarding
shared_examples
Defining
shared_examples
doesn't have parents, so thatparent[:action].nil?
raisesNoMethodError
becauseparent
is nil. Changed to check parent also.fix typo: 'resoure' -> 'resource'