bwillis / versioncake

:cake: Version Cake is an unobtrusive way to version APIs in your Rails or Rack apps
655 stars 47 forks source link

VersionChecker initialize bug? #97

Closed owen-c closed 3 years ago

owen-c commented 3 years ago

Am I crazy or is this code wrong because of the order?

def initialize(version, resource)
  @version, @resource = resource, version
end
owen-c commented 3 years ago

Ah not a bug because it is called like so. Just really confusing :P

def check_version(resource, version)
  VersionCake::VersionChecker.new(resource, version).execute
end
bwillis commented 3 years ago

Oh wow, nice find! We should fix that for sure, feel free to open a PR or I'll get to it in a few days or so 🤞

owen-c commented 3 years ago

Fixed