lib/octopi/repository.rb in octopi-0.2.8 vs lib/octopi/repository.rb in octopi-0.3.0

- old
+ new

@@ -109,14 +109,18 @@ end def collaborators property('collaborators', [self.owner, self.name].join('/')).values.map { |v| User.find(v.join) } end + + def languages + property('languages', [self.owner, self.name].join('/')).values.inject({}){|sum,map| map.each{|k,v| sum[k] = v}} + end def self.create(options={}) raise AuthenticationRequired, "To create a repository you must be authenticated." if Api.api.read_only? self.validate_args(options[:name] => :repo) - new(Api.api.post(path_for(:create), options)["repository"]) + new(Api.api.post(path_for(:create), options.merge( :cache => false ))["repository"]) end def delete! raise APIError, "You must be authenticated as the owner of this repository to delete it" if Api.me.login != owner.login token = Api.api.post(self.class.path_for(:delete), :id => self.name)['delete_token']