Permalink
Browse files

Stop using Bundler for requiring dependencies

This won't work for projects without an own Gemfile. Seems like Bundler
just isn't ready for such "external" use yet. See issue #6.
Aside from that, RubyGems should handle dependencies well enough.
  • Loading branch information...
1 parent d93af43 commit 808b0f3c442e727d81f2b49fee05916adbb8f373 @koraktor committed Jun 15, 2011
Showing with 2 additions and 20 deletions.
  1. +0 −10 lib/metior.rb
  2. +2 −9 lib/metior/vcs.rb
  3. +0 −1 metior.gemspec
View
@@ -3,8 +3,6 @@
#
# Copyright (c) 2011, Sebastian Staudt
-require 'bundler'
-
require 'core_ext/object'
require 'metior/git'
require 'metior/github'
@@ -16,14 +14,6 @@
# @author Sebastian Staudt
module Metior
- # Returns the Bundler runtime to access Metior's dependencies
- #
- # @return [Bundler::Runtime] The Bundler runtime instance
- def self.runtime
- @@runtime ||= Bundler::Runtime.new File.dirname(__FILE__),
- Bundler.definition
- end
-
# Creates a new repository for the given repository type and path
#
# @param [Symbol] type The type of the repository, e.g. `:git`
View
@@ -58,16 +58,9 @@ def const_missing(const)
# This initializes the VCS's implementation `Module`
#
- # First the corresponding Bundler group is loaded so all dependencies are
- # met. Afterwards the `Actor`, `Commit` and `Repository` classes are
- # required.
- #
- # @see Bundler.require
+ # This requires the `Actor`, `Commit` and `Repository` classes for that
+ # VCS implementation.
def init
- Metior.runtime.dependencies_for(self::NAME).each do |dep|
- gem dep.name, dep.requirement
- end
-
path = self::NAME.to_s
require "metior/#{path}/actor"
require "metior/#{path}/commit"
View
@@ -12,7 +12,6 @@ Gem::Specification.new do |s|
s.summary = 'A source code history analyzer API'
s.description = 'Metior is a source code history analyzer that provides various statistics about a source code repository and its change over time.'
- s.add_dependency 'bundler', '~> 1.0.14'
Bundler.definition.dependencies.each do |dep|
if dep.groups.include?(:development) || dep.groups.include?(:test)
s.add_development_dependency(dep.name, dep.requirement.to_s)

0 comments on commit 808b0f3

Please sign in to comment.