mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove add_gem_entry_filter from GeneratorAppBase:
The add_gem_entry_filter was introduce in
f7e0758714
and doesn't work this
feature
This commit is contained in:
parent
bb69d1967f
commit
3b9f5e3f4b
2 changed files with 0 additions and 30 deletions
|
@ -122,12 +122,6 @@ module Rails
|
|||
cable_gemfile_entry].flatten.find_all(&@gem_filter)
|
||||
end
|
||||
|
||||
def add_gem_entry_filter # :doc:
|
||||
@gem_filter = lambda { |next_filter, entry|
|
||||
yield(entry) && next_filter.call(entry)
|
||||
}.curry[@gem_filter]
|
||||
end
|
||||
|
||||
def builder # :doc:
|
||||
@builder ||= begin
|
||||
builder_class = get_builder_class
|
||||
|
|
|
@ -15,7 +15,6 @@ module Rails
|
|||
include(Module.new {
|
||||
def gemfile_entries; super; end
|
||||
def invoke_all; super; self; end
|
||||
def add_gem_entry_filter; super; end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -25,29 +24,6 @@ module Rails
|
|||
assert klass.start(["new", "blah"])
|
||||
end
|
||||
|
||||
def test_filter
|
||||
klass = make_builder_class
|
||||
generator = klass.start(["new", "blah"])
|
||||
gems = generator.gemfile_entries
|
||||
generator.add_gem_entry_filter { |gem|
|
||||
gem.name != gems.first.name
|
||||
}
|
||||
assert_equal gems.drop(1), generator.gemfile_entries
|
||||
end
|
||||
|
||||
def test_two_filters
|
||||
klass = make_builder_class
|
||||
generator = klass.start(["new", "blah"])
|
||||
gems = generator.gemfile_entries
|
||||
generator.add_gem_entry_filter { |gem|
|
||||
gem.name != gems.first.name
|
||||
}
|
||||
generator.add_gem_entry_filter { |gem|
|
||||
gem.name != gems[1].name
|
||||
}
|
||||
assert_equal gems.drop(2), generator.gemfile_entries
|
||||
end
|
||||
|
||||
def test_recommended_rails_versions
|
||||
klass = make_builder_class
|
||||
generator = klass.start(["new", "blah"])
|
||||
|
|
Loading…
Reference in a new issue