Commit 036a3a3f authored by Fabio Pelosin's avatar Fabio Pelosin

Remove Rake dependency

Related #1080
parent 39104c45
......@@ -2,6 +2,14 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
###### Enhancements
* Reduced external dependencies and deprecation of Rake::FileList.
[#1080](https://github.com/CocoaPods/CocoaPods/issues/1080)
## 0.20.2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.20.1...0.20.2)
......
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 7872523b25a9d7cca082da1c866fec46a07f0b78
revision: f37f918876c9c3139316ef93127c8103c61a3733
branch: master
specs:
cocoapods-core (0.20.2)
......@@ -72,7 +72,6 @@ PATH
escape (~> 0.0.4)
json (~> 1.8.0)
open4 (~> 1.3.0)
rake (~> 10.0.0)
xcodeproj (~> 0.6.0)
GEM
......
......@@ -36,7 +36,6 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json', '~> 1.8.0'
s.add_runtime_dependency 'open4', '~> 1.3.0'
s.add_runtime_dependency 'rake', '~> 10.0.0'
s.add_runtime_dependency 'activesupport', '~> 3.2.13'
s.add_development_dependency 'bacon', '~> 1.1'
......
......@@ -7,7 +7,6 @@ module Pod
require 'cocoapods/gem_version'
require 'cocoapods-core'
require 'cocoapods/file_list'
require 'cocoapods/config'
require 'cocoapods/downloader'
......
if RUBY_VERSION >= "1.9"
require 'rake/file_list'
else
require 'rake'
end
# This makes Rake::FileList usable with the Specification attributes
# source_files, public_header_files, preserve_paths, and resources.
#
# @todo This needs to be deprecated as we no have the PathList List
#
module Rake
class FileList
def prepend_patterns(pathname)
@pending_add.map! { |pattern| (pathname + pattern).to_s }
end
def directory?
false
end
def glob
to_a.map { |path| Pathname.new(path) }
end
def inspect
"<##{self.class} pending_add=#{@pending_add}>"
end
alias :to_s :inspect
end
end
# TODO Defined in CocoaPods Core
# module Pod
# FileList = Rake::FileList
# end
......@@ -172,7 +172,7 @@ module Pod
# Matches the given patterns to the file present in the root of the path
# list.
#
# @param [Array<String, FileList>] patterns
# @param [Array<String>] patterns
# The patterns to expand.
#
# @param [String] dir_pattern
......@@ -189,22 +189,8 @@ module Pod
#
def expanded_paths(patterns, options = {})
return [] if patterns.empty?
file_lists = patterns.select { |p| p.is_a?(FileList) }
glob_patterns = patterns - file_lists
result = []
result << path_list.glob(glob_patterns, options)
result << file_lists.map do |file_list|
file_list.prepend_patterns(path_list.root)
file_list.glob
end
unless file_lists.empty?
# TODO Restore warning in 0.17 proper
# UI.warn "[#{spec_consumer.spec.name}] The usage of Rake FileList is deprecated. Use `exclude_files`."
end
result << path_list.glob(patterns, options)
result.flatten.compact.uniq
end
......
......@@ -147,18 +147,6 @@ module Pod
end
describe "#expanded_paths" do
it "can handle Rake FileLists" do
@spec_consumer.stubs(:source_files).returns([FileList['Classes/Banana.*']])
@accessor.source_files.sort.should == [
@root + "Classes/Banana.h",
@root + "Classes/Banana.m",
]
end
end
end
#-------------------------------------------------------------------------#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment