Module: Bundler::Override

Defined in:
lib/bundler-override.rb,
lib/bundler/override/version.rb,
lib/bundler/override/dsl_patch.rb,
lib/bundler/override/specset_patch.rb,
lib/bundler/override/sharedhelpers_patch.rb

Defined Under Namespace

Modules: DslPatch, SharedHelpersPatch, SpecSetPatch

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.add(name, drop, requirements) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/bundler-override.rb', line 22

def add(name, drop, requirements)
  @gems = Set.new unless @gems
  return if @gems.include? name
  @gems << name
  @params = Array.new unless @params
  @params << { :name=>name, :drop=>drop || [], :requirements=>requirements }
end

.override?(name) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/bundler-override.rb', line 11

def override?(name)
  return unless @gems
  @gems.include? name
end

.params(name) ⇒ Object



16
17
18
19
20
# File 'lib/bundler-override.rb', line 16

def params(name)
  return [] unless @gems
  return [] unless @gems.include? name
  @params.find { |o| o[:name] == name }
end