Sha256: e642881ed2b313ac5d36115a75607d48e29df4f35f96898ec5d66f8c963d6904

Contents?: true

Size: 778 Bytes

Versions: 6

Compression:

Stored size: 778 Bytes

Contents

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

require 'ruby-xcdm'
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

6 entries across 6 versions & 1 rubygems

Version Path
cdq-1.0.4 lib/cdq.rb
cdq-1.0.3 lib/cdq.rb
cdq-1.0.2 lib/cdq.rb
cdq-1.0.1 lib/cdq.rb
cdq-1.0.0 lib/cdq.rb
cdq-0.1.11 lib/cdq.rb