Skip to content

Commit

Permalink
Merge pull request #62 from thedebugger/use_id_in_path
Browse files Browse the repository at this point in the history
Use id (if present) in the service def file path
  • Loading branch information
reset committed Oct 27, 2014
2 parents 3f76738 + 9c8dad7 commit 950a1e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/service_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def self.validate_check(check)
end

def path
::File.join(node['consul']['config_dir'], "service-#{name}.json")
# Use id (if present) instead of name since it is unique
::File.join(node['consul']['config_dir'], "service-#{id || name}.json")
end

def to_json
Expand Down

0 comments on commit 950a1e7

Please sign in to comment.