Sha256: c6ad3c53c1e7aa4d25123e21df6e22d2bf8ca6c3ee1915b234c1c25a25f240b7

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 Bytes

Contents

unless defined?(Motion::Project::App)
  raise "This must be required from within a RubyMotion Rakefile"
end

require 'ruby-xcdm'
require 'yaml'
require 'motion-yaml'

ENV['COLUMNS'] ||= `tput cols`.strip

Motion::Project::App.setup do |app|
  parent = File.join(File.dirname(__FILE__), '..')
  app.files.unshift(Dir.glob(File.join(parent, "motion/cdq/**/*.rb")))
  app.files.unshift(Dir.glob(File.join(parent, "motion/*.rb")))
  app.frameworks += %w{ CoreData }
  app.vendor_project(File.join(parent, 'vendor/cdq/ext'), :static)
  if app.respond_to?(:xcdm)
    cdqfile = File.join(app.project_dir, 'resources/cdq.yml')
    if File.exists?(cdqfile)
      hash = YAML.load(File.read(cdqfile))
      if hash
        app.xcdm.name = hash['model_name'] || hash['name']
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cdq-2.0.0 lib/cdq.rb
cdq-1.0.8 lib/cdq.rb