Skip to content

Commit

Permalink
Use File.join where possible for better cross-platform compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Harold Giménez committed Oct 14, 2011
1 parent 552c654 commit 45faf41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/create.rb
Expand Up @@ -13,7 +13,7 @@ def self.run!(project_path, repo)
end

def initialize(project_path, repo)
self.project_path = project_path
self.project_path = File.expand_path(project_path)
validate_project_path
validate_project_name
self.repo = repo if present?(repo)
Expand Down Expand Up @@ -56,11 +56,11 @@ def validate_project_path
end

def template
File.expand_path(File.dirname(__FILE__) + "/../template/suspenders.rb")
File.expand_path(File.join("..", "template", "suspenders.rb"), File.dirname(__FILE__))
end

def gemfile
File.expand_path(File.dirname(__FILE__) + "/../template/trout/Gemfile")
File.expand_path(File.join("..", "template", "trout", "Gemfile"), File.dirname(__FILE__))
end

def rails_version
Expand Down

0 comments on commit 45faf41

Please sign in to comment.