Method: Bundler::Dsl#path

Defined in:
lib/bundler/dsl.rb

#path(path, options = {}, &blk) ⇒ Object


141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/bundler/dsl.rb', line 141

def path(path, options = {}, &blk)
  source_options = normalize_hash(options).merge(
    "path" => Pathname.new(path),
    "root_path" => gemfile_root,
    "gemspec" => gemspecs.find {|g| g.name == options["name"] }
  )

  source_options["global"] = true unless block_given?

  source = @sources.add_path_source(source_options)
  with_source(source, &blk)
end