Skip to content

Commit

Permalink
Use fetch, that's what it's for.
Browse files Browse the repository at this point in the history
  • Loading branch information
relistan committed May 4, 2015
1 parent cd3fbf5 commit 691f308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/centurion/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ def self.from_hash(name, definition)
s.hostname = definition[:hostname]
s.dns = definition[:dns]

(definition[:volumes] || []).each do |port|
definition.fetch(:volumes, []).each do |port|
s.add_volume(port[:host_volume], port[:container_volume])
end

(definition[:port_bindings] || []).each do |binding|
definition.fetch(:port_bindings, []).each do |binding|
s.add_port_bindings(
binding[:host_port],
binding[:container_port],
Expand Down

0 comments on commit 691f308

Please sign in to comment.