Object
# File lib/bundler/rubygems_ext.rb, line 67 67: def add_bundler_dependencies(*groups) 68: Bundler.ui.warn "#add_bundler_dependencies is deprecated and will " "be removed in Bundler 1.0. Instead, please use the #gemspec method " "in your Gemfile, which will pull in any dependencies specified in " "your gemspec" 69: 70: groups = [:default] if groups.empty? 71: Bundler.definition.dependencies.each do |dep| 72: if dep.groups.include?(:development) 73: self.add_development_dependency(dep.name, dep.requirement.to_s) 74: elsif (dep.groups & groups).any? 75: self.add_dependency(dep.name, dep.requirement.to_s) 76: end 77: end 78: end
# File lib/bundler/rubygems_ext.rb, line 20 20: def full_gem_path 21: source.respond_to?(:path) ? 22: Pathname.new(loaded_from).dirname.expand_path.to_s : 23: rg_full_gem_path 24: end
# File lib/bundler/rubygems_ext.rb, line 46 46: def git_version 47: if @loaded_from && File.exist?(File.join(full_gem_path, ".git")) 48: sha = Dir.chdir(full_gem_path){ `git rev-parse HEAD`.strip } 49: " #{sha[0..6]}" 50: end 51: end
# File lib/bundler/rubygems_ext.rb, line 42 42: def groups 43: @groups ||= [] 44: end
# File lib/bundler/rubygems_ext.rb, line 32 32: def load_paths 33: require_paths.map do |require_path| 34: if require_path.include?(full_gem_path) 35: require_path 36: else 37: File.join(full_gem_path, require_path) 38: end 39: end 40: end
# File lib/bundler/rubygems_ext.rb, line 26 26: def loaded_from 27: relative_loaded_from ? 28: source.path.join(relative_loaded_from).to_s : 29: rg_loaded_from 30: end
# File lib/bundler/rubygems_ext.rb, line 63 63: def nondevelopment_dependencies 64: dependencies - development_dependencies 65: end
# File lib/bundler/resolver.rb, line 11 11: def required_by 12: @required_by ||= [] 13: end
# File lib/bundler/rubygems_ext.rb, line 53 53: def to_gemfile(path = nil) 54: gemfile = "source :gemcutter\n" 55: gemfile << dependencies_to_gemfile(nondevelopment_dependencies) 56: unless development_dependencies.empty? 57: gemfile << "\n" 58: gemfile << dependencies_to_gemfile(development_dependencies, :development) 59: end 60: gemfile 61: end
# File lib/bundler/rubygems_ext.rb, line 85 85: def dependencies_to_gemfile(dependencies, group = nil) 86: gemfile = '' 87: if dependencies.any? 88: gemfile << "group :#{group} do\n" if group 89: dependencies.each do |dependency| 90: gemfile << ' ' if group 91: gemfile << %gem "#{dependency.name}"| 92: req = dependency.requirements_list.first 93: gemfile << %, "#{req}"| if req 94: gemfile << "\n" 95: end 96: gemfile << "end\n" if group 97: end 98: gemfile 99: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.