Sha256: 3e5b385c03c5145680ee13cbbef599cc3df96835e37593421ea931f1d1ce883b

Contents?: true

Size: 1.15 KB

Versions: 22

Compression:

Stored size: 1.15 KB

Contents

unless defined?(Motion::Project::Config)
  raise "The MotionKit gem must be required within a RubyMotion project Rakefile."
end


require 'dbt'


Motion::Project::App.setup do |app|
  core_lib = File.join(File.dirname(__FILE__), 'motion-kit')
  cocoa_lib = File.join(File.dirname(__FILE__), 'motion-kit-cocoa')
  platform = app.respond_to?(:template) ? app.template : :ios
  platform_lib = File.join(File.dirname(__FILE__), "motion-kit-#{platform}")
  unless File.exists? platform_lib
    raise "Sorry, the platform #{platform.inspect} is not supported by MotionKit"
  end

  # scans app.files until it finds app/ (the default)
  # if found, it inserts just before those files, otherwise it will insert to
  # the end of the list
  insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0

  Dir.glob(File.join(platform_lib, '**/*.rb')).reverse.each do |file|
    app.files.insert(insert_point, file)
  end
  Dir.glob(File.join(cocoa_lib, '**/*.rb')).reverse.each do |file|
    app.files.insert(insert_point, file)
  end
  Dir.glob(File.join(core_lib, '**/*.rb')).reverse.each do |file|
    app.files.insert(insert_point, file)
  end

  DBT.analyze(app)
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
motion-kit-0.15.0 lib/motion-kit.rb
motion-kit-0.14.2 lib/motion-kit.rb
motion-kit-0.14.1 lib/motion-kit.rb
motion-kit-0.14.0 lib/motion-kit.rb
motion-kit-0.13.0 lib/motion-kit.rb
motion-kit-0.12.0 lib/motion-kit.rb
motion-kit-0.11.2 lib/motion-kit.rb
motion-kit-0.11.1 lib/motion-kit.rb
motion-kit-0.11.0 lib/motion-kit.rb
motion-kit-0.10.11 lib/motion-kit.rb
motion-kit-0.10.10 lib/motion-kit.rb
motion-kit-0.10.9 lib/motion-kit.rb
motion-kit-0.10.8 lib/motion-kit.rb
motion-kit-0.10.7 lib/motion-kit.rb
motion-kit-0.10.6 lib/motion-kit.rb
motion-kit-0.10.5 lib/motion-kit.rb
motion-kit-0.10.4 lib/motion-kit.rb
motion-kit-0.10.3 lib/motion-kit.rb
motion-kit-0.10.2 lib/motion-kit.rb
motion-kit-0.10.1 lib/motion-kit.rb