motion-firebase 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/.gitignore +17 -0
  2. data/.travis.yml +2 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +28 -0
  5. data/README.md +511 -0
  6. data/Rakefile +11 -0
  7. data/app/app_delegate.rb +156 -0
  8. data/lib/firebase/firebase.rb +242 -0
  9. data/lib/firebase/firebase_auth_client.rb +49 -0
  10. data/lib/firebase/version.rb +5 -0
  11. data/lib/motion-firebase-auth.rb +19 -0
  12. data/lib/motion-firebase-facebook.rb +17 -0
  13. data/lib/motion-firebase.rb +19 -0
  14. data/lib/vendor/FacebookSDK.framework/FacebookSDK +0 -0
  15. data/lib/vendor/FacebookSDK.framework/Headers/FBAccessTokenData.h +115 -0
  16. data/lib/vendor/FacebookSDK.framework/Headers/FBCacheDescriptor.h +42 -0
  17. data/lib/vendor/FacebookSDK.framework/Headers/FBError.h +274 -0
  18. data/lib/vendor/FacebookSDK.framework/Headers/FBFrictionlessRecipientCache.h +86 -0
  19. data/lib/vendor/FacebookSDK.framework/Headers/FBFriendPickerViewController.h +290 -0
  20. data/lib/vendor/FacebookSDK.framework/Headers/FBGraphLocation.h +77 -0
  21. data/lib/vendor/FacebookSDK.framework/Headers/FBGraphObject.h +224 -0
  22. data/lib/vendor/FacebookSDK.framework/Headers/FBGraphPlace.h +60 -0
  23. data/lib/vendor/FacebookSDK.framework/Headers/FBGraphUser.h +90 -0
  24. data/lib/vendor/FacebookSDK.framework/Headers/FBInsights.h +271 -0
  25. data/lib/vendor/FacebookSDK.framework/Headers/FBLoginView.h +178 -0
  26. data/lib/vendor/FacebookSDK.framework/Headers/FBNativeDialogs.h +170 -0
  27. data/lib/vendor/FacebookSDK.framework/Headers/FBOpenGraphAction.h +127 -0
  28. data/lib/vendor/FacebookSDK.framework/Headers/FBPlacePickerViewController.h +257 -0
  29. data/lib/vendor/FacebookSDK.framework/Headers/FBProfilePictureView.h +80 -0
  30. data/lib/vendor/FacebookSDK.framework/Headers/FBRequest.h +504 -0
  31. data/lib/vendor/FacebookSDK.framework/Headers/FBRequestConnection.h +389 -0
  32. data/lib/vendor/FacebookSDK.framework/Headers/FBSession.h +751 -0
  33. data/lib/vendor/FacebookSDK.framework/Headers/FBSessionTokenCachingStrategy.h +152 -0
  34. data/lib/vendor/FacebookSDK.framework/Headers/FBSettings.h +136 -0
  35. data/lib/vendor/FacebookSDK.framework/Headers/FBTestSession.h +135 -0
  36. data/lib/vendor/FacebookSDK.framework/Headers/FBUserSettingsViewController.h +127 -0
  37. data/lib/vendor/FacebookSDK.framework/Headers/FBViewController.h +118 -0
  38. data/lib/vendor/FacebookSDK.framework/Headers/FBWebDialogs.h +234 -0
  39. data/lib/vendor/FacebookSDK.framework/Headers/FacebookSDK.h +132 -0
  40. data/lib/vendor/FacebookSDK.framework/Headers/NSError+FBError.h +59 -0
  41. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  42. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  43. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo.png +0 -0
  44. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo@2x.png +0 -0
  45. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape.jpg +0 -0
  46. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape@2x.jpg +0 -0
  47. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait.jpg +0 -0
  48. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait@2x.jpg +0 -0
  49. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait.jpg +0 -0
  50. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait@2x.jpg +0 -0
  51. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal.png +0 -0
  52. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal@2x.png +0 -0
  53. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed.png +0 -0
  54. data/lib/vendor/FacebookSDK.framework/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed@2x.png +0 -0
  55. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  56. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  57. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBDialog/images/close.png +0 -0
  58. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBDialog/images/close@2x.png +0 -0
  59. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBDialog/images/fbicon.png +0 -0
  60. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBFriendPickerView/images/default.png +0 -0
  61. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/bluetint.png +0 -0
  62. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/f_logo.png +0 -0
  63. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/facebook.png +0 -0
  64. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png +0 -0
  65. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png +0 -0
  66. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png +0 -0
  67. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png +0 -0
  68. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBPlacePickerView/images/fb_generic_place.png +0 -0
  69. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_portrait.png +0 -0
  70. data/lib/vendor/FacebookSDK.framework/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_square.png +0 -0
  71. data/lib/vendor/FacebookSDK.framework/Resources/Info.plist +20 -0
  72. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBAccessTokenData.h +115 -0
  73. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBCacheDescriptor.h +42 -0
  74. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBConnect.h +22 -0
  75. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBDialog.h +165 -0
  76. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBError.h +274 -0
  77. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFrictionlessRecipientCache.h +86 -0
  78. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFrictionlessRequestSettings.h +85 -0
  79. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFriendPickerViewController.h +290 -0
  80. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphLocation.h +77 -0
  81. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObject.h +224 -0
  82. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphPlace.h +60 -0
  83. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphUser.h +90 -0
  84. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBInsights.h +271 -0
  85. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBLoginDialog.h +48 -0
  86. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBLoginView.h +178 -0
  87. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBNativeDialogs.h +170 -0
  88. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBOpenGraphAction.h +127 -0
  89. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBPlacePickerViewController.h +257 -0
  90. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBProfilePictureView.h +80 -0
  91. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequest.h +504 -0
  92. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequestConnection.h +389 -0
  93. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSBJSON.h +75 -0
  94. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSBJsonBase.h +86 -0
  95. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSBJsonParser.h +87 -0
  96. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSBJsonWriter.h +129 -0
  97. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSession.h +751 -0
  98. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionManualTokenCachingStrategy.h +32 -0
  99. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionTokenCachingStrategy.h +152 -0
  100. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSettings.h +136 -0
  101. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBTestSession.h +135 -0
  102. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBUserSettingsViewController.h +127 -0
  103. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBViewController.h +118 -0
  104. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBWebDialogs.h +234 -0
  105. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/Facebook.h +281 -0
  106. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FacebookSDK.h +132 -0
  107. data/lib/vendor/FacebookSDK.framework/Versions/A/DeprecatedHeaders/NSError+FBError.h +59 -0
  108. data/lib/vendor/FacebookSDK.framework/Versions/A/FacebookSDK +0 -0
  109. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBAccessTokenData.h +115 -0
  110. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBCacheDescriptor.h +42 -0
  111. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBError.h +274 -0
  112. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBFrictionlessRecipientCache.h +86 -0
  113. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBFriendPickerViewController.h +290 -0
  114. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBGraphLocation.h +77 -0
  115. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBGraphObject.h +224 -0
  116. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBGraphPlace.h +60 -0
  117. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBGraphUser.h +90 -0
  118. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBInsights.h +271 -0
  119. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBLoginView.h +178 -0
  120. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBNativeDialogs.h +170 -0
  121. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBOpenGraphAction.h +127 -0
  122. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBPlacePickerViewController.h +257 -0
  123. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBProfilePictureView.h +80 -0
  124. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBRequest.h +504 -0
  125. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBRequestConnection.h +389 -0
  126. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBSession.h +751 -0
  127. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBSessionTokenCachingStrategy.h +152 -0
  128. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBSettings.h +136 -0
  129. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBTestSession.h +135 -0
  130. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBUserSettingsViewController.h +127 -0
  131. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBViewController.h +118 -0
  132. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FBWebDialogs.h +234 -0
  133. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/FacebookSDK.h +132 -0
  134. data/lib/vendor/FacebookSDK.framework/Versions/A/Headers/NSError+FBError.h +59 -0
  135. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  136. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  137. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo.png +0 -0
  138. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo@2x.png +0 -0
  139. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape.jpg +0 -0
  140. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape@2x.jpg +0 -0
  141. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait.jpg +0 -0
  142. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait@2x.jpg +0 -0
  143. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait.jpg +0 -0
  144. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait@2x.jpg +0 -0
  145. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal.png +0 -0
  146. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal@2x.png +0 -0
  147. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed.png +0 -0
  148. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed@2x.png +0 -0
  149. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  150. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  151. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBDialog/images/close.png +0 -0
  152. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBDialog/images/close@2x.png +0 -0
  153. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBDialog/images/fbicon.png +0 -0
  154. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBFriendPickerView/images/default.png +0 -0
  155. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/bluetint.png +0 -0
  156. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/f_logo.png +0 -0
  157. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/facebook.png +0 -0
  158. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png +0 -0
  159. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png +0 -0
  160. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png +0 -0
  161. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png +0 -0
  162. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBPlacePickerView/images/fb_generic_place.png +0 -0
  163. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_portrait.png +0 -0
  164. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_square.png +0 -0
  165. data/lib/vendor/FacebookSDK.framework/Versions/A/Resources/Info.plist +20 -0
  166. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBAccessTokenData.h +115 -0
  167. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBCacheDescriptor.h +42 -0
  168. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBConnect.h +22 -0
  169. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBDialog.h +165 -0
  170. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBError.h +274 -0
  171. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBFrictionlessRecipientCache.h +86 -0
  172. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBFrictionlessRequestSettings.h +85 -0
  173. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBFriendPickerViewController.h +290 -0
  174. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBGraphLocation.h +77 -0
  175. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBGraphObject.h +224 -0
  176. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBGraphPlace.h +60 -0
  177. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBGraphUser.h +90 -0
  178. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBInsights.h +271 -0
  179. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBLoginDialog.h +48 -0
  180. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBLoginView.h +178 -0
  181. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBNativeDialogs.h +170 -0
  182. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBOpenGraphAction.h +127 -0
  183. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBPlacePickerViewController.h +257 -0
  184. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBProfilePictureView.h +80 -0
  185. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBRequest.h +504 -0
  186. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBRequestConnection.h +389 -0
  187. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSBJSON.h +75 -0
  188. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSBJsonBase.h +86 -0
  189. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSBJsonParser.h +87 -0
  190. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSBJsonWriter.h +129 -0
  191. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSession.h +751 -0
  192. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSessionManualTokenCachingStrategy.h +32 -0
  193. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSessionTokenCachingStrategy.h +152 -0
  194. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBSettings.h +136 -0
  195. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBTestSession.h +135 -0
  196. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBUserSettingsViewController.h +127 -0
  197. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBViewController.h +118 -0
  198. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FBWebDialogs.h +234 -0
  199. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/Facebook.h +281 -0
  200. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/FacebookSDK.h +132 -0
  201. data/lib/vendor/FacebookSDK.framework/Versions/Current/DeprecatedHeaders/NSError+FBError.h +59 -0
  202. data/lib/vendor/FacebookSDK.framework/Versions/Current/FacebookSDK +0 -0
  203. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBAccessTokenData.h +115 -0
  204. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBCacheDescriptor.h +42 -0
  205. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBError.h +274 -0
  206. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBFrictionlessRecipientCache.h +86 -0
  207. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBFriendPickerViewController.h +290 -0
  208. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBGraphLocation.h +77 -0
  209. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBGraphObject.h +224 -0
  210. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBGraphPlace.h +60 -0
  211. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBGraphUser.h +90 -0
  212. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBInsights.h +271 -0
  213. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBLoginView.h +178 -0
  214. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBNativeDialogs.h +170 -0
  215. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBOpenGraphAction.h +127 -0
  216. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBPlacePickerViewController.h +257 -0
  217. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBProfilePictureView.h +80 -0
  218. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBRequest.h +504 -0
  219. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBRequestConnection.h +389 -0
  220. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBSession.h +751 -0
  221. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBSessionTokenCachingStrategy.h +152 -0
  222. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBSettings.h +136 -0
  223. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBTestSession.h +135 -0
  224. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBUserSettingsViewController.h +127 -0
  225. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBViewController.h +118 -0
  226. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FBWebDialogs.h +234 -0
  227. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/FacebookSDK.h +132 -0
  228. data/lib/vendor/FacebookSDK.framework/Versions/Current/Headers/NSError+FBError.h +59 -0
  229. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  230. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  231. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo.png +0 -0
  232. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/facebook-logo@2x.png +0 -0
  233. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape.jpg +0 -0
  234. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadLandscape@2x.jpg +0 -0
  235. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait.jpg +0 -0
  236. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPadPortrait@2x.jpg +0 -0
  237. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait.jpg +0 -0
  238. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/loginBackgroundIPhonePortrait@2x.jpg +0 -0
  239. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal.png +0 -0
  240. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/silver-button-normal@2x.png +0 -0
  241. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed.png +0 -0
  242. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FBUserSettingsViewResources.bundle/images/silver-button-pressed@2x.png +0 -0
  243. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/Contents/Resources/en.lproj/Localizable.strings +0 -0
  244. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/Contents/Resources/he.lproj/Localizable.strings +0 -0
  245. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBDialog/images/close.png +0 -0
  246. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBDialog/images/close@2x.png +0 -0
  247. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBDialog/images/fbicon.png +0 -0
  248. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBFriendPickerView/images/default.png +0 -0
  249. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/bluetint.png +0 -0
  250. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/f_logo.png +0 -0
  251. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/facebook.png +0 -0
  252. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png +0 -0
  253. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png +0 -0
  254. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png +0 -0
  255. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png +0 -0
  256. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBPlacePickerView/images/fb_generic_place.png +0 -0
  257. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_portrait.png +0 -0
  258. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/FacebookSDKResources.bundle/FBProfilePictureView/images/fb_blank_profile_square.png +0 -0
  259. data/lib/vendor/FacebookSDK.framework/Versions/Current/Resources/Info.plist +20 -0
  260. data/lib/vendor/Firebase.framework/Firebase +0 -0
  261. data/lib/vendor/Firebase.framework/Headers/FDataSnapshot.h +146 -0
  262. data/lib/vendor/Firebase.framework/Headers/FEventType.h +43 -0
  263. data/lib/vendor/Firebase.framework/Headers/FMutableData.h +134 -0
  264. data/lib/vendor/Firebase.framework/Headers/FQuery.h +229 -0
  265. data/lib/vendor/Firebase.framework/Headers/FTransactionResult.h +50 -0
  266. data/lib/vendor/Firebase.framework/Headers/Firebase.h +629 -0
  267. data/lib/vendor/Firebase.framework/Versions/A/Firebase +0 -0
  268. data/lib/vendor/Firebase.framework/Versions/A/Headers/FDataSnapshot.h +146 -0
  269. data/lib/vendor/Firebase.framework/Versions/A/Headers/FEventType.h +43 -0
  270. data/lib/vendor/Firebase.framework/Versions/A/Headers/FMutableData.h +134 -0
  271. data/lib/vendor/Firebase.framework/Versions/A/Headers/FQuery.h +229 -0
  272. data/lib/vendor/Firebase.framework/Versions/A/Headers/FTransactionResult.h +50 -0
  273. data/lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h +629 -0
  274. data/lib/vendor/Firebase.framework/Versions/Current/Firebase +0 -0
  275. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FDataSnapshot.h +146 -0
  276. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FEventType.h +43 -0
  277. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FMutableData.h +134 -0
  278. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FQuery.h +229 -0
  279. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FTransactionResult.h +50 -0
  280. data/lib/vendor/Firebase.framework/Versions/Current/Headers/Firebase.h +629 -0
  281. data/lib/vendor/FirebaseAuthClient.framework/FirebaseAuthClient +0 -0
  282. data/lib/vendor/FirebaseAuthClient.framework/Headers/FATypes.h +48 -0
  283. data/lib/vendor/FirebaseAuthClient.framework/Headers/FAUser.h +85 -0
  284. data/lib/vendor/FirebaseAuthClient.framework/Headers/FirebaseAuthClient.h +149 -0
  285. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/FirebaseAuthClient +0 -0
  286. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FATypes.h +48 -0
  287. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FAUser.h +85 -0
  288. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FirebaseAuthClient.h +149 -0
  289. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/FirebaseAuthClient +0 -0
  290. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FATypes.h +48 -0
  291. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FAUser.h +85 -0
  292. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FirebaseAuthClient.h +149 -0
  293. data/motion-firebase.gemspec +23 -0
  294. data/resources/Default-568h@2x.png +0 -0
  295. metadata +357 -0
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ .repl_history
2
+ build
3
+ tags
4
+ app/pixate_code.rb
5
+ resources/*.nib
6
+ resources/*.momd
7
+ resources/*.storyboardc
8
+ .DS_Store
9
+ nbproject
10
+ .redcar
11
+ #*#
12
+ *~
13
+ *.sw[po]
14
+ .eprj
15
+ .sass-cache
16
+ .idea
17
+ *.gem
data/.travis.yml ADDED
@@ -0,0 +1,2 @@
1
+ language: objective-c
2
+ before_install: rvm use 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'sugarcube'
5
+
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ motion-firebase (1.0.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.1)
10
+ rake (10.0.3)
11
+ rspec (2.13.0)
12
+ rspec-core (~> 2.13.0)
13
+ rspec-expectations (~> 2.13.0)
14
+ rspec-mocks (~> 2.13.0)
15
+ rspec-core (2.13.1)
16
+ rspec-expectations (2.13.0)
17
+ diff-lcs (>= 1.1.3, < 2.0)
18
+ rspec-mocks (2.13.0)
19
+ sugarcube (0.19.4)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ motion-firebase!
26
+ rake
27
+ rspec
28
+ sugarcube
data/README.md ADDED
@@ -0,0 +1,511 @@
1
+ motion-firebase
2
+ --------
3
+
4
+ A RubyMotion wrapper for the Firebase SDK.
5
+
6
+ Just the main class `Firebase` is wrapped.
7
+
8
+ Versioning
9
+ -------
10
+
11
+ versioning matches Firebase's SDK major and minor version numbers, but revision
12
+ numbers could be different.
13
+
14
+ SDK
15
+ ---
16
+
17
+ # Firebase Class Reference
18
+
19
+ ## Overview
20
+
21
+ A `Firebase` reference represents a particular location in your Firebase and can
22
+ be used for reading or writing data to that Firebase location.
23
+
24
+ This class is the starting point for all Firebase operations. After you’ve
25
+ initialized it with `Firebase.new` you can use it to read data (ie. `on() {}`),
26
+ write data (ie. `[key]=`), and to create new Firebase references (ie. `[]`).
27
+
28
+ ## Tasks
29
+
30
+ ##### Initializing a Firebase object
31
+
32
+ Firebase.new(url)
33
+
34
+ ##### Getting references to children locations
35
+
36
+ firebase[path]
37
+ firebase[] # childByAutoId
38
+ firebase['fred'] # childByAppendingPath('fred')
39
+
40
+ ##### Writing data
41
+
42
+ firebase << {'key': 'value'}
43
+ # => firebase.childByAutoId.updateChildValues(values), returns the new child
44
+
45
+ # set value
46
+ firebase.value = value
47
+ firebase.set(value)
48
+ firebase.set(value) { 'completion block' }
49
+ firebase.set(value, priority: priority)
50
+ firebase.set(value, priority: priority) { 'completion block' }
51
+
52
+ # set value of child node
53
+ firebase['first_name'] = 'fred' # childByAppendingPath('fred').set('fred')
54
+
55
+ # remove value
56
+ firebase.clear!
57
+ firebase.clear! { 'completion block' }
58
+
59
+ # priority
60
+ firebase.priority = priority
61
+ firebase.priority(priority)
62
+ firebase.priority(priority) { |error| 'completion block' }
63
+
64
+ firebase.update(values)
65
+ firebase.update(values) { |error| 'completion block' }
66
+
67
+ ##### Attaching observers to read data
68
+
69
+ handle = firebase.on(event_type) { |snapshot| 'completion block' }
70
+ handle = firebase.on(event_type) { |snapshot, previous_sibling_name| 'completion block' }
71
+ handle = firebase.on(event_type,
72
+ completion: proc { |snapshot, previous_sibling_name| 'completion block' },
73
+ disconnect: proc { 'completion block' }
74
+ )
75
+ handle = firebase.once(event_type) { |snapshot| 'completion block' }
76
+ handle = firebase.once(event_type) { |snapshot, previous_sibling_name| 'completion block' }
77
+ handle = firebase.once(event_type,
78
+ completion: proc { |snapshot, previous_sibling_name| 'completion block' },
79
+ disconnect: proc { 'completion block' }
80
+ )
81
+
82
+ ##### Detaching observers
83
+
84
+ firebase.off
85
+ firebase.off(handle)
86
+
87
+ ##### Querying and limiting
88
+
89
+ # these are not wrapped at the moment, because I don't completely understand
90
+ # what they do.
91
+ # firebase.queryStartingAtPriority()
92
+ # firebase.queryStartingAtPriority(andChildName:)
93
+ # firebase.queryEndingAtPriority()
94
+ # firebase.queryEndingAtPriority(andChildName:)
95
+ # firebase.queryLimitedToNumberOfChildren()
96
+
97
+ ##### Managing presence
98
+
99
+ firebase.on_disconnect(value)
100
+ firebase.on_disconnect(value) { |error| 'completion block' }
101
+ firebase.on_disconnect(value, priority:priority)
102
+ firebase.on_disconnect(value, priority:priority) { |error| 'completion block' }
103
+ firebase.on_disconnect(nil)
104
+ firebase.on_disconnect(nil) { |error| 'completion block' }
105
+ firebase.on_disconnect({ child: values })
106
+ firebase.on_disconnect({ child: values }) { |error| 'completion block' }
107
+ firebase.cancel_disconnect
108
+ firebase.cancel_disconnect { |error| 'completion block' }
109
+
110
+ ##### Authenticating
111
+
112
+ firebase.auth(credential)
113
+ firebase.auth(credential) { |error, data| 'completion block' }
114
+ firebase.auth(credential,
115
+ completion: proc { |error, data| 'completion block' },
116
+ disconnect: proc { |error| 'completion block', },
117
+ )
118
+ firebase.unauth
119
+
120
+ ##### Transactions
121
+
122
+ firebase.run { |data| 'transaction block' }
123
+ firebase.run(
124
+ transaction: proc { |data| 'transaction block' },
125
+ completion: proc { |error, committed, snapshot| }
126
+ )
127
+ firebase.run(
128
+ transaction: proc { |data| 'transaction block' },
129
+ completion: proc { |error, committed, snapshot| }
130
+ local: true || false,
131
+ )
132
+
133
+ ##### Retrieving String Representation
134
+
135
+ firebase.to_s
136
+
137
+ ##### Properties
138
+
139
+ firebase.parent
140
+ firebase.root
141
+ firebase.name
142
+
143
+ ##### Global configuration and settings
144
+
145
+ Firebase.dispatch_queue=(queue)
146
+ Firebase.sdkVersion
147
+
148
+
149
+ ## Properties
150
+
151
+ #### name
152
+
153
+ Gets last token in a Firebase location (e.g. ‘fred’ in https://SampleChat.firebaseIO-demo.com/users/fred))
154
+
155
+ ###### Return Value
156
+
157
+ The name of the location this reference points to.
158
+
159
+
160
+ #### parent
161
+
162
+ Get a Firebase reference for the parent location. If this instance refers to the
163
+ root of your Firebase, it has no parent, and therefore parent( ) will return `nil`.
164
+
165
+ ###### Return Value
166
+
167
+ A Firebase reference for the parent location.
168
+
169
+
170
+ #### root
171
+
172
+ Get a Firebase reference for the root location
173
+
174
+ ###### Return Value
175
+
176
+ A new Firebase reference to root location.
177
+
178
+
179
+ ## Class Methods
180
+
181
+ #### sdkVersion
182
+
183
+ Retrieve the Firebase SDK version.
184
+
185
+
186
+ #### dispatch_queue=(queue)
187
+
188
+ Set the default dispatch queue for event blocks.
189
+
190
+ ###### Parameters
191
+
192
+ queue
193
+ *The queue to set as the default for running blocks for all Firebase event
194
+ types.*
195
+
196
+ ## Instance Methods
197
+
198
+
199
+ #### auth(credential, options={}, &and_then) { |error| }
200
+
201
+ ###### Parameters
202
+
203
+ Authenticate access to this Firebase using the provided credentials. The
204
+ completion block will be called with the results of the authenticated attempt,
205
+ and the disconnect block will be called if the credentials become invalid at
206
+ some point after authentication has succeeded.
207
+
208
+ credential
209
+ *The Firebase authentication JWT generated by a secure code on a remote server.*
210
+
211
+ and_then || options[:completion]
212
+ *This block will be called with the results of the authentication attempt*
213
+
214
+ options[:disconnect]
215
+ *This block will be called if at any time in the future the credentials become
216
+ invalid*
217
+
218
+
219
+ #### cancel_disconnect(&and_then)
220
+
221
+ Cancel any operations that are set to run on disconnect. If you previously
222
+ called `on_disconnect`, and no longer want the values updated when the
223
+ connection is lost, call `cancel_disconnect`
224
+
225
+ ###### Parameters
226
+
227
+ and_then
228
+ *A block that will be triggered once the Firebase servers have acknowledged the
229
+ cancel request.*
230
+
231
+
232
+ #### [](*children)
233
+
234
+ Get a Firebase reference for the location at the specified relative path. The
235
+ relative path can either be a simple child name (e.g. ‘fred’) or a deeper
236
+ slash-separated path (e.g. ‘fred/name/first’).
237
+
238
+ firebase['fred']
239
+ firebase['fred/name/first']
240
+ firebase['fred', 'name', 'first']
241
+
242
+ ###### Parameters
243
+
244
+ children
245
+ *A relative path from this location to the desired child location(s).*
246
+
247
+ ###### Return Value
248
+
249
+ A Firebase reference for the specified relative path.
250
+
251
+
252
+ #### []
253
+
254
+ `firebase[]` generates a new child location using a unique name and returns a
255
+ Firebase reference to it. This is useful when the children of a Firebase
256
+ location represent a list of items.
257
+
258
+ The unique name generated by `firebase[]` is prefixed with a client-generated
259
+ timestamp so that the resulting list will be chronologically-sorted.
260
+
261
+ ###### Return Value
262
+
263
+ A Firebase reference for the generated location.
264
+
265
+
266
+ #### to_s
267
+
268
+ Gets the absolute URL of this Firebase location.
269
+
270
+
271
+ #### Firebase.new(url)
272
+
273
+ Initialize this Firebase reference with an absolute URL.
274
+
275
+ ###### Parameters
276
+
277
+ url
278
+ *The Firebase URL (ie: https://SampleChat.firebaseIO-demo.com)*
279
+
280
+
281
+ #### on(event_type, options, &and_then) { |snapshot| }
282
+ #### on(event_type, options, &and_then) { |snapshot, previous_sibling_name| }
283
+
284
+ `on()` is used to listen for data changes at a particular location. This is the
285
+ primary way to read data from Firebase. Your block will be triggered for the
286
+ initial data and again whenever the data changes.
287
+
288
+ If the block accepts two arguments, events of type `:added`, `:moved`, and
289
+ `:changed` will be passed the name of the previous node by priority order.
290
+
291
+ Use `off(handle)` to stop receiving updates.
292
+
293
+ Supported events types for all realtime observers are specified as:
294
+
295
+ :added # fired when a new child node is added to a location
296
+ :removed # fired when a child node is removed from a location
297
+ :changed # fired when a child node at a location changes
298
+ :moved # fired when a child node moves relative to the other child nodes at a location
299
+ :value # fired when any data changes at a location and, recursively, any children
300
+
301
+ ###### Parameters
302
+
303
+ event_type
304
+ *The type of event to listen for.*
305
+
306
+ and_then || options[:completion]
307
+ *The block that should be called with initial data and updates as a
308
+ `FDataSnapshot`, and optionally the previous child’s name.*
309
+
310
+ options[:disconnect]
311
+ *The block that should be called if this client no longer has permission to
312
+ receive these events*
313
+
314
+ ###### Return Value
315
+
316
+ A handle used to unregister this block later using `off(handle)`
317
+
318
+
319
+ #### once(event_type, options, &and_then) { |snapshot| }
320
+ #### once(event_type, options, &and_then) { |snapshot, previous_sibling_name| }
321
+
322
+ #### observeSingleEventOfType:andPreviousSiblingNameWithBlock:
323
+
324
+ This is equivalent to `on()`, except the block is immediately canceled after the
325
+ initial data is returned.
326
+
327
+ If the block accepts two arguments, events of type `:added`, `:moved`, and
328
+ `:changed` will be passed the name of the previous node by priority order.
329
+
330
+ ###### Parameters
331
+
332
+ event_type
333
+ *The type of event to listen for.*
334
+
335
+ and_then || options[:completion]
336
+ *The block that should be called with initial data and updates as a
337
+ `FDataSnapshot`, and optionally the previous child’s name.*
338
+
339
+ options[:disconnect]
340
+ *The block that should be called if this client no longer has permission to
341
+ receive these events*
342
+
343
+
344
+ #### on_disconnect(nil, &and_then) { |error| }
345
+ #### on_disconnect(value, &and_then) { |error| }
346
+ #### on_disconnect(values, &and_then) { |error| }
347
+ #### on_disconnect(value, priority:priority, &and_then) { |error| }
348
+
349
+ Ensure the data at this location is removed when the client is disconnected (due
350
+ to closing the app, navigating to a new page, or network issues).
351
+
352
+ `on_disconnect` is especially useful for implementing “presence” systems.
353
+
354
+ ###### Parameters
355
+ value
356
+ *The value to be set after the connection is lost. Special value `nil` will
357
+ remove the value, and a dictionary can be sent to update multiple child node
358
+ names and the values to set them to.*
359
+
360
+ priority
361
+ *The priority to be set after the connection is lost.*
362
+
363
+ and_then
364
+ *Block to be triggered when the operation has been queued up on the Firebase
365
+ servers*
366
+
367
+
368
+ #### off
369
+ #### off(handle)
370
+
371
+ Detach a block previously attached with `on()`, or remove all observer events.
372
+
373
+ ###### Parameters
374
+ handle
375
+ The handle returned by the call to observeEventType:withBlock: which we are
376
+ trying to remove. If no handle is passed, all ovservers are removed.
377
+
378
+
379
+ #### clear!(&and_then) { |error| }
380
+
381
+ Remove the data at this Firebase location. Any data at child locations will also
382
+ be deleted.
383
+
384
+ The effect of the delete will be visible immediately and the corresponding
385
+ events will be triggered. Synchronization of the delete to the Firebase servers
386
+ will also be started.
387
+
388
+ `clear!` is equivalent to calling `value(nil)`
389
+
390
+ ###### Parameters
391
+ and_then
392
+ *The block to be called after the remove has been committed to the Firebase
393
+ servers.*
394
+
395
+ #### run(options={}, &transaction) { |data| }
396
+
397
+ Performs an optimistic-concurrency transactional update to the data at this
398
+ location. Your block will be called with an FMutableData instance that contains
399
+ the current data at this location. Your block should update this data to the
400
+ value you wish to write to this location, and then return an instance of
401
+ FTransactionResult with the new data.
402
+
403
+ If, when the operation reaches the server, it turns out that this client had
404
+ stale data, your block will be run again with the latest data from the server.
405
+
406
+ When your block is run, you may decide to abort the transaction by return
407
+ `FTransactionResult.abort`.
408
+
409
+ Since your block may be run multiple times, this client could see several
410
+ immediate states that don’t exist on the server. You can suppress those
411
+ immediate states until the server confirms the final state of the transaction.
412
+
413
+ ###### Parameters
414
+ transaction || options[:transaction]
415
+ *This block receives the current data at this location and must return an
416
+ instance of FTransactionResult*
417
+
418
+ options[:completion]
419
+ *This block will be triggered once the transaction is complete, whether it was
420
+ successful or not. It will indicate if there was an error, whether or not the
421
+ data was committed, and what the current value of the data at this location is.*
422
+
423
+ options[:local]
424
+ *Set this to `false` to suppress events raised for intermediate states, and only
425
+ get events based on the final state of the transaction.*
426
+
427
+
428
+ #### priority=(priority)
429
+ #### priority(priority, &and_then) { |error| }
430
+
431
+ Set a priority for the data at this Firebase location. Priorities can be used to
432
+ provide a custom ordering for the children at a location (if no priorities are
433
+ specified, the children are ordered by name).
434
+
435
+ You cannot set a priority on an empty location. For this reason
436
+ `value(priority:)` should be used when setting initial data with a specific
437
+ priority and `priority()` should be used when updating the priority of existing
438
+ data.
439
+
440
+ Children are sorted based on this priority using the following rules:
441
+
442
+ Children with no priority (a `nil` priority) come first. They are ordered
443
+ lexicographically by name. Children with a priority that is parsable as a number
444
+ come next. They are sorted numerically by priority first (small to large) and
445
+ lexicographically by name second (A to z). Children with non-numeric priorities
446
+ come last. They are sorted lexicographically by priority first and
447
+ lexicographically by name second. Setting the priority to `nil` removes any
448
+ existing priority. Note that priorities are parsed and ordered as IEEE 754
449
+ double-precision floating-point numbers.
450
+
451
+ ###### Parameters
452
+ priority
453
+ *The priority to set at the specified location.*
454
+
455
+ and_then
456
+ *The block that is triggered after the priority has been written on the
457
+ servers.*
458
+
459
+
460
+ #### value=(value)
461
+ #### value(value)
462
+
463
+ Write data to this Firebase location.
464
+
465
+ This will overwrite any data at this location and all child locations.
466
+
467
+ Data types that can be set are:
468
+
469
+ String, 'Hello World'
470
+ Numeric, Boolean — true, 43, 4.333
471
+ Hash, {'key' => 'value', 'nested' => {'another': 'value' => }
472
+ Array, []
473
+
474
+ The effect of the write will be visible immediately and the corresponding events
475
+ will be triggered. Synchronization of the data to the Firebase servers will also
476
+ be started.
477
+
478
+ Passing `nil` for the new value is equivalent to calling `clear!` all data at
479
+ this location or any child location will be deleted.
480
+
481
+ Note that `value` will remove any priority stored at this location, so if
482
+ priority is meant to be preserved, you should use `value(priority:)` instead.
483
+
484
+ Priorities are used to order items.
485
+
486
+ ###### Parameters
487
+ value
488
+ *The value to be written.*
489
+
490
+ priority
491
+ *The priority to be attached to that data.*
492
+
493
+
494
+ #### unauth
495
+
496
+ Removes any credentials associated with this Firebase
497
+
498
+
499
+ #### update(values)
500
+ #### update(values, &and_then) { |error| }
501
+
502
+ Update changes the values of the keys specified in the dictionary without
503
+ overwriting other keys at this location.
504
+
505
+ ###### Parameters
506
+ values
507
+ *A dictionary of the keys to change and their new values*
508
+
509
+ and_then
510
+ *The block that is triggered after the update has been written on the Firebase servers*
511
+
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ # -*- coding: utf-8 -*-
2
+ $:.unshift("/Library/RubyMotion/lib")
3
+ require 'motion/project'
4
+ require 'bundler'
5
+ Bundler.require
6
+
7
+
8
+ Motion::Project::App.setup do |app|
9
+ # Use `rake config' to see complete project settings.
10
+ app.name = 'motion-firebase'
11
+ end