summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/manifest_file.rb10
-rw-r--r--lib/bundler/runtime.rb12
3 files changed, 17 insertions, 7 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index d79feb3cdb..1d39c97a29 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -43,4 +43,4 @@ module Bundler
end
end
end
- end
+end
diff --git a/lib/bundler/manifest_file.rb b/lib/bundler/manifest_file.rb
index aa0222fee1..0d97225cf4 100644
--- a/lib/bundler/manifest_file.rb
+++ b/lib/bundler/manifest_file.rb
@@ -2,7 +2,8 @@ module Bundler
class DefaultManifestNotFound < StandardError; end
class ManifestFile
- attr_reader :sources, :dependencies, :gem_path, :bindir
+ attr_reader :sources, :dependencies
+ attr_accessor :gem_path, :bindir
def self.load(filename = nil)
new(filename).load
@@ -32,11 +33,8 @@ module Bundler
end
def load_manifest
- builder = ManifestBuilder.load(self, filename)
- Manifest.new(sources,
- dependencies,
- bindir,
- gem_path)
+ ManifestBuilder.load(self, filename)
+ Manifest.new(sources, dependencies, bindir, gem_path)
end
def gem_path
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 265eb2b69f..50706f9052 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -20,6 +20,18 @@ module Bundler
@manifest_file = manifest_file
end
+ def bundle_path(path)
+ path = Pathname.new(path)
+ @manifest_file.gem_path = (path.relative? ?
+ @manifest_file.root.join(path) : path).expand_path
+ end
+
+ def bin_path(path)
+ path = Pathname.new(path)
+ @manifest_file.bindir = (path.relative? ?
+ @manifest_file.root.join(path) : path).expand_path
+ end
+
def source(source)
@manifest_file.sources << source
end