lib/pivotal-tracker/story.rb in pivotal-tracker-0.5.1 vs lib/pivotal-tracker/story.rb in pivotal-tracker-0.5.3

- old
+ new

@@ -63,9 +63,14 @@ def update(attrs={}) update_attributes(attrs) response = Client.connection["/projects/#{project_id}/stories/#{id}"].put(self.to_xml, :content_type => 'application/xml') return Story.parse(response) end + + def move(position, story) + raise ArgumentError, "Can only move :before or :after" unless [:before, :after].include? position + Story.parse(Client.connection["/projects/#{project_id}/stories/#{id}/moves?move\[move\]=#{position}&move\[target\]=#{story.id}"].post('')) + end def delete Client.connection["/projects/#{project_id}/stories/#{id}"].delete end