mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
47f0248b08
* test/rubygems: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
39 lines
549 B
Ruby
39 lines
549 B
Ruby
##
|
|
# A semi-compatible DSL for Bundler's Gemfile format
|
|
|
|
class Gem::RequestSet::GemDepedencyAPI
|
|
|
|
def initialize set, path
|
|
@set = set
|
|
@path = path
|
|
end
|
|
|
|
def load
|
|
instance_eval File.read(@path).untaint, @path, 1
|
|
end
|
|
|
|
# :category: Bundler Gemfile DSL
|
|
|
|
def gem name, *reqs
|
|
# Ignore the opts for now.
|
|
reqs.pop if reqs.last.kind_of?(Hash)
|
|
|
|
@set.gem name, *reqs
|
|
end
|
|
|
|
def group *what
|
|
end
|
|
|
|
def platform what
|
|
if what == :ruby
|
|
yield
|
|
end
|
|
end
|
|
|
|
alias :platforms :platform
|
|
|
|
def source url
|
|
end
|
|
|
|
end
|
|
|