SuperBox v. 0.2

140 views
Skip to first unread message

awdogsgo2heaven

unread,
Mar 10, 2013, 3:25:53 PM3/10/13
to rubym...@googlegroups.com

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.


awdogsgo2heaven

unread,
Mar 17, 2013, 12:33:48 AM3/17/13
to rubym...@googlegroups.com
As a heads up, 0.3 will be coming fairly soon in the next couple of days (maybe tomorrow even!) incase anyone was messing with it. The next version will include AES encrypted properties. I was able to get RNCryptor to work with Rubymotion, and it makes the process fairly simple to encrypt/decrypt. Will also include a more encompassing documentation on how SuperBox can be used, more specs, and perhaps I will push it out in a Gem. (im a little concerned how well Gems and cocoapods will work together..., if they do at all)

toamit

unread,
May 20, 2013, 9:54:09 AM5/20/13
to rubym...@googlegroups.com
Were you able to get RNCryptor working for RM ?

I keep getting: 

Undefined symbols for architecture i386:
  "_kRNCryptorAES256Settings", referenced from:
      _MREP_1E3E949AFEC24311A7E0C34E8BB4F54B in chart_data.rb.o

Any clue ?

Will Jessop

unread,
Feb 25, 2015, 1:45:38 PM2/25/15
to rubym...@googlegroups.com
I'm having the same issue. Did you ever find a fix?

Caram Dache

unread,
Feb 25, 2015, 2:28:01 PM2/25/15
to rubym...@googlegroups.com
I’m using RNCryptor with RM without any issue.

Are you trying to use the const kRNCryptorAES256Settings in RM?
In which case you need to add a capital K, KRNCryptorAES256Settings.

Caram


--
You received this message because you are subscribed to the Google Groups "RubyMotion - Ruby for iOS, OS X, and Android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubymotion+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubymotion/19e22bdc-6743-4ede-abea-6b20c92b73f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages