Hello everyone, I updated my project SuperBox on github,
Its a wrapper around Core Data, as of right now its still experimental.
Using it:
class User < SBXManagedObject
include SuperBox::Core
property :name => "name", :type => NSStringAttributeType, :optional => true
property :name => "created_by", :type => NSStringAttributeType
property :name => "password", :type => NSStringAttributeType
end
class User < SBXManagedObject
include SuperBox::Core
string :name
string :created_by
string :password
end
Subclass SBXManagedObject, and include SuperBox::Core, SuperBox::Core is a global instance of your Core Data model
After that just create the object like so:
user = User.create(:name => "awdogsgo2heaven")
SuperBox::Core.save #or SBX::Core.save
and everything will be saved for you. Also, if you make a small modification to the model later , it will auto migrate it for you.
I am also working on a connivence method for heavy migrations incase the model change is very large. (Look at heavy_migrate function in Core module)
This version also includes filters (Special Thanks to Steve/MotionModel for letting me use his pluralize implementation)
Examples:
SuperBox::Users.all
SBX::Users.all
SBX::Users.where("core data predicate here").all
SBX::Users.single
SBX::Users.top(2)
SBX::Users.order_by(:name => asc).all
Finally, I've also included a spec, admittedly a small one, but I hope to grow it more for the next release 0.3
Still no GEM, but if there is any interest, I may make one for the next release.