lib/octopi/user.rb in fcoury-octopi-0.0.5 vs lib/octopi/user.rb in fcoury-octopi-0.0.6

- old
+ new

@@ -3,15 +3,26 @@ include Resource find_path "/user/search/:query" resource_path "/user/show/:id" + def self.find(username) + self.validate_args(username => :user) + super username + end + + def self.find_all(username) + self.validate_args(username => :user) + super username + end + def repositories Repository.find_by_user(login) end def repository(name) + self.class.validate_args(name => :repo) Repository.find(login, name) end # takes one param, deep that indicates if returns # only the user login or an user object @@ -33,6 +44,6 @@ end users end end -end \ No newline at end of file +end