method
dependencies_to_gemfile
v2_6_3 -
Show latest stable
-
0 notes -
Class: Specification
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
dependencies_to_gemfile(dependencies, group = nil)
private
Hide source
# File lib/bundler/rubygems_ext.rb, line 121 def dependencies_to_gemfile(dependencies, group = nil) gemfile = String.new if dependencies.any? gemfile << "group :#{group} do\n" if group dependencies.each do |dependency| gemfile << " " if group gemfile << %(gem "#{dependency.name}") req = dependency.requirements_list.first gemfile << %(, "#{req}") if req gemfile << "\n" end gemfile << "end\n" if group end gemfile end