Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
quickfix some code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robey Pointer committed Jul 1, 2010
1 parent 8f0c930 commit a1b9b00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/gizzard/commands.rb
Expand Up @@ -63,7 +63,7 @@ def up(id)
if links.empty?
id
else
links.map{|link| link.up_id }.find{|up_id| up(up_id) }
links.map { |link| link.up_id }.find { |up_id| up(up_id) }
end
end

Expand Down Expand Up @@ -106,8 +106,8 @@ def run
up_id, down_id, weight = argv
help! if argv.length != 3
weight = weight.to_i
up_id = ShardId.parse(up_id)
down_id = ShardId.parse(down_id)
up_id = ShardId.parse(up_id)
down_id = ShardId.parse(down_id)
link = LinkInfo.new(up_id, down_id, weight)
service.add_link(link.up_id, link.down_id, link.weight)
puts link.to_unix
Expand All @@ -117,8 +117,8 @@ def run
class UnlinkCommand < Command
def run
up_id, down_id = argv
up_id = ShardId.parse(up_id)
down_id = ShardId.parse(down_id)
up_id = ShardId.parse(up_id)
down_id = ShardId.parse(down_id)
service.remove_link(up_id, down_id)
end
end
Expand All @@ -128,7 +128,7 @@ def run
shard_ids = argv
help! "No shards specified" if shard_ids.empty?
shard_ids.each do |shard_id_string|
shard_id = ShardId.parse(shard_id_string)
shard_id = ShardId.parse(shard_id_string)
service.list_upward_links(shard_id).each do |uplink|
service.list_downward_links(shard_id).each do |downlink|
service.add_link(uplink.up_id, downlink.down_id, uplink.weight)
Expand Down

0 comments on commit a1b9b00

Please sign in to comment.