Permalink
Browse files

removed files_dependencies

  • Loading branch information...
1 parent 7c7caab commit 501b298d4b8e1601e00a193bb5d2bca15c21fd74 @weibel committed Aug 22, 2012
Showing with 7 additions and 20 deletions.
  1. +7 −20 lib/map-kit-wrapper.rb
View
@@ -4,27 +4,14 @@
end
Motion::Project::App.setup do |app|
- @load_count ||= 0
- if @load_count == 0
- Dir.glob(File.join(File.dirname(__FILE__), 'map-kit-wrapper/*.rb')).each do |file|
- app.files.unshift(file)
- end
+ base_path = "#{File.dirname(__FILE__)}/map-kit-wrapper"
+ graph = Codependency::Graph.new("#{base_path}/map_view.rb")
- base_path = "#{File.dirname(__FILE__)}/map-kit-wrapper"
- graph = Codependency::Graph.new("#{base_path}/map_view.rb")
-
- files = {}
- # path hack from http://www.rdoc.info/github/mattetti/BubbleWrap/Motion/Project/Config#files_dependencies-instance_method
- graph_files = graph.files.reverse.map do |x|
- /^\.?\//.match(x) ? x : File.join('.', x)
- end
- (0 .. graph_files.count - 2).each do |i|
- files[graph_files[i]] = graph_files[i+1]
- end
- app.files_dependencies files
-
- app.frameworks += ['CoreLocation', 'MapKit']
+ files = (graph.files + Dir.glob(File.join(File.dirname(__FILE__), 'map-kit-wrapper/*.rb')).map { |file| file }).uniq
+ files.reverse.each do |file|
+ app.files.unshift(file)
end
- @load_count += 1
+
+ app.frameworks += ['CoreLocation', 'MapKit']
end

0 comments on commit 501b298

Please sign in to comment.