appjam 0.1.8.8 → 0.1.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/README.md +22 -62
  2. data/lib/appjam/generators/gist.yml +1 -1
  3. data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.pbxproj +1166 -482
  4. data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  5. data/lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Prefix.pch.tt +26 -0
  6. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.h +52 -0
  7. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.m +412 -0
  8. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.h +44 -0
  9. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.m +97 -0
  10. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted.png +0 -0
  11. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted@2x.png +0 -0
  12. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton.png +0 -0
  13. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton@2x.png +0 -0
  14. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted.png +0 -0
  15. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted@2x.png +0 -0
  16. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem.png +0 -0
  17. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem@2x.png +0 -0
  18. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted.png +0 -0
  19. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted@2x.png +0 -0
  20. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus.png +0 -0
  21. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus@2x.png +0 -0
  22. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star.png +0 -0
  23. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star@2x.png +0 -0
  24. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.h +167 -0
  25. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.m +639 -0
  26. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.h +97 -0
  27. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.m +1080 -0
  28. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.h +451 -0
  29. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.m +865 -0
  30. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.h +42 -0
  31. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.m +56 -0
  32. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.h +90 -0
  33. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.m +316 -0
  34. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.h +104 -0
  35. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.m +516 -0
  36. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldConstants.h +49 -0
  37. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.h +18 -0
  38. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.m +88 -0
  39. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left.png +0 -0
  40. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left@2x.png +0 -0
  41. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right.png +0 -0
  42. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right@2x.png +0 -0
  43. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.h +25 -0
  44. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.m +76 -0
  45. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.h +131 -0
  46. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.m +941 -0
  47. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide.psd +0 -0
  48. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide2.psd +0 -0
  49. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.h +46 -0
  50. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.m +82 -0
  51. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.h +39 -0
  52. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.m +72 -0
  53. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.h +42 -0
  54. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.m +100 -0
  55. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.h +34 -0
  56. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.m +140 -0
  57. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.h +17 -0
  58. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.m +57 -0
  59. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.h +30 -0
  60. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.m +233 -0
  61. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.h +19 -0
  62. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.m +122 -0
  63. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewDataSource.h +24 -0
  64. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.h +20 -0
  65. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.m +56 -0
  66. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine.png +0 -0
  67. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine@2x.png +0 -0
  68. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone.png +0 -0
  69. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone@2x.png +0 -0
  70. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar.png +0 -0
  71. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar@2x.png +0 -0
  72. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine.png +0 -0
  73. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine@2x.png +0 -0
  74. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone.png +0 -0
  75. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone@2x.png +0 -0
  76. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.h +124 -0
  77. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.m +545 -0
  78. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.h +22 -0
  79. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.m +32 -0
  80. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.h +344 -0
  81. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.m +848 -0
  82. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.h +135 -0
  83. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.m +441 -0
  84. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.h +40 -0
  85. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.m +36 -0
  86. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.h +76 -0
  87. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.m +270 -0
  88. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.h +95 -0
  89. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.m +78 -0
  90. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.h +144 -0
  91. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.m +311 -0
  92. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.h +40 -0
  93. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.m +54 -0
  94. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.h +18 -0
  95. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.m +70 -0
  96. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.h +102 -0
  97. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.m +226 -0
  98. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.h +25 -0
  99. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.m +339 -0
  100. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.h +167 -0
  101. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.m +244 -0
  102. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageOperation.h +15 -0
  103. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.h +58 -0
  104. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.m +127 -0
  105. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.h +173 -0
  106. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.m +129 -0
  107. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.h +140 -0
  108. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.m +84 -0
  109. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationProgram.h +28 -0
  110. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationSequence.h +28 -0
  111. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationStep.h +49 -0
  112. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationProgram.m +100 -0
  113. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationSequence.m +85 -0
  114. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationStep.m +122 -0
  115. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.h +1074 -0
  116. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.m +7430 -0
  117. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.h +14 -0
  118. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.m +158 -0
  119. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.h +12 -0
  120. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.m +88 -0
  121. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.h +56 -0
  122. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.m +104 -0
  123. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h +45 -0
  124. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m +195 -0
  125. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.h +119 -0
  126. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.m +2708 -0
  127. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPLogging.h +136 -0
  128. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.h +48 -0
  129. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.m +113 -0
  130. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPResponse.h +149 -0
  131. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.h +205 -0
  132. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.m +772 -0
  133. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.h +65 -0
  134. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.m +529 -0
  135. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h +33 -0
  136. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.m +86 -0
  137. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h +23 -0
  138. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.m +211 -0
  139. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h +75 -0
  140. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m +405 -0
  141. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h +13 -0
  142. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m +79 -0
  143. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h +52 -0
  144. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m +292 -0
  145. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h +9 -0
  146. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m +38 -0
  147. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h +25 -0
  148. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m +237 -0
  149. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h +12 -0
  150. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m +73 -0
  151. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.h +105 -0
  152. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.m +791 -0
  153. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h +7 -0
  154. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m +160 -0
  155. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h +11 -0
  156. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m +372 -0
  157. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h +7 -0
  158. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m +49 -0
  159. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h +8 -0
  160. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m +69 -0
  161. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.h +54 -0
  162. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.m +102 -0
  163. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.h +103 -0
  164. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.m +200 -0
  165. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.h +10 -0
  166. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.m +197 -0
  167. data/lib/appjam/version.rb +1 -1
  168. metadata +164 -3
@@ -0,0 +1,78 @@
1
+ //
2
+ // MKAnnotationView+WebCache.m
3
+ // SDWebImage
4
+ //
5
+ // Created by Olivier Poitrey on 14/03/12.
6
+ // Copyright (c) 2012 Dailymotion. All rights reserved.
7
+ //
8
+
9
+ #import "MKAnnotationView+WebCache.h"
10
+ #import "objc/runtime.h"
11
+
12
+ static char operationKey;
13
+
14
+ @implementation MKAnnotationView (WebCache)
15
+
16
+ - (void)setImageWithURL:(NSURL *)url
17
+ {
18
+ [self setImageWithURL:url placeholderImage:nil options:0 completed:nil];
19
+ }
20
+
21
+ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
22
+ {
23
+ [self setImageWithURL:url placeholderImage:placeholder options:0 completed:nil];
24
+ }
25
+
26
+ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
27
+ {
28
+ [self setImageWithURL:url placeholderImage:placeholder options:options completed:nil];
29
+ }
30
+
31
+ - (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock
32
+ {
33
+ [self setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock];
34
+ }
35
+
36
+ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock
37
+ {
38
+ [self setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock];
39
+ }
40
+
41
+ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock
42
+ {
43
+ [self cancelCurrentImageLoad];
44
+
45
+ self.image = placeholder;
46
+
47
+ if (url)
48
+ {
49
+ __weak MKAnnotationView *wself = self;
50
+ id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
51
+ {
52
+ __strong MKAnnotationView *sself = wself;
53
+ if (!sself) return;
54
+ if (image)
55
+ {
56
+ sself.image = image;
57
+ }
58
+ if (completedBlock && finished)
59
+ {
60
+ completedBlock(image, error, cacheType);
61
+ }
62
+ }];
63
+ objc_setAssociatedObject(self, &operationKey, operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
64
+ }
65
+ }
66
+
67
+ - (void)cancelCurrentImageLoad
68
+ {
69
+ // Cancel in progress downloader from queue
70
+ id<SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
71
+ if (operation)
72
+ {
73
+ [operation cancel];
74
+ objc_setAssociatedObject(self, &operationKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
75
+ }
76
+ }
77
+
78
+ @end
@@ -0,0 +1,144 @@
1
+ /*
2
+ * This file is part of the SDWebImage package.
3
+ * (c) Olivier Poitrey <rs@dailymotion.com>
4
+ *
5
+ * For the full copyright and license information, please view the LICENSE
6
+ * file that was distributed with this source code.
7
+ */
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "SDWebImageCompat.h"
11
+
12
+ enum SDImageCacheType
13
+ {
14
+ /**
15
+ * The image wasn't available the SDWebImage caches, but was downloaded from the web.
16
+ */
17
+ SDImageCacheTypeNone = 0,
18
+ /**
19
+ * The image was obtained from the disk cache.
20
+ */
21
+ SDImageCacheTypeDisk,
22
+ /**
23
+ * The image was obtained from the memory cache.
24
+ */
25
+ SDImageCacheTypeMemory
26
+ };
27
+ typedef enum SDImageCacheType SDImageCacheType;
28
+
29
+ /**
30
+ * SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
31
+ * asynchronous so it doesn’t add unnecessary latency to the UI.
32
+ */
33
+ @interface SDImageCache : NSObject
34
+
35
+ /**
36
+ * The maximum length of time to keep an image in the cache, in seconds
37
+ */
38
+ @property (assign, nonatomic) NSInteger maxCacheAge;
39
+
40
+ /**
41
+ * Returns global shared cache instance
42
+ *
43
+ * @return SDImageCache global instance
44
+ */
45
+ + (SDImageCache *)sharedImageCache;
46
+
47
+ /**
48
+ * Init a new cache store with a specific namespace
49
+ *
50
+ * @param ns The namespace to use for this cache store
51
+ */
52
+ - (id)initWithNamespace:(NSString *)ns;
53
+
54
+ /**
55
+ * Store an image into memory and disk cache at the given key.
56
+ *
57
+ * @param image The image to store
58
+ * @param key The unique image cache key, usually it's image absolute URL
59
+ */
60
+ - (void)storeImage:(UIImage *)image forKey:(NSString *)key;
61
+
62
+ /**
63
+ * Store an image into memory and optionally disk cache at the given key.
64
+ *
65
+ * @param image The image to store
66
+ * @param key The unique image cache key, usually it's image absolute URL
67
+ * @param toDisk Store the image to disk cache if YES
68
+ */
69
+ - (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
70
+
71
+ /**
72
+ * Store an image into memory and optionally disk cache at the given key.
73
+ *
74
+ * @param image The image to store
75
+ * @param data The image data as returned by the server, this representation will be used for disk storage
76
+ * instead of converting the given image object into a storable/compressed image format in order
77
+ * to save quality and CPU
78
+ * @param key The unique image cache key, usually it's image absolute URL
79
+ * @param toDisk Store the image to disk cache if YES
80
+ */
81
+ - (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk;
82
+
83
+ /**
84
+ * Query the disk cache asynchronously.
85
+ *
86
+ * @param key The unique key used to store the wanted image
87
+ */
88
+ - (void)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock;
89
+
90
+ /**
91
+ * Query the memory cache synchronously.
92
+ *
93
+ * @param key The unique key used to store the wanted image
94
+ */
95
+ - (UIImage *)imageFromMemoryCacheForKey:(NSString *)key;
96
+
97
+ /**
98
+ * Query the disk cache synchronously after checking the memory cache.
99
+ *
100
+ * @param key The unique key used to store the wanted image
101
+ */
102
+ - (UIImage *)imageFromDiskCacheForKey:(NSString *)key;
103
+
104
+ /**
105
+ * Remove the image from memory and disk cache synchronously
106
+ *
107
+ * @param key The unique image cache key
108
+ */
109
+ - (void)removeImageForKey:(NSString *)key;
110
+
111
+ /**
112
+ * Remove the image from memory and optionaly disk cache synchronously
113
+ *
114
+ * @param key The unique image cache key
115
+ * @param fromDisk Also remove cache entry from disk if YES
116
+ */
117
+ - (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk;
118
+
119
+ /**
120
+ * Clear all memory cached images
121
+ */
122
+ - (void)clearMemory;
123
+
124
+ /**
125
+ * Clear all disk cached images
126
+ */
127
+ - (void)clearDisk;
128
+
129
+ /**
130
+ * Remove all expired cached image from disk
131
+ */
132
+ - (void)cleanDisk;
133
+
134
+ /**
135
+ * Get the size used by the disk cache
136
+ */
137
+ - (unsigned long long)getSize;
138
+
139
+ /**
140
+ * Get the number of images in the disk cache
141
+ */
142
+ - (int)getDiskCount;
143
+
144
+ @end
@@ -0,0 +1,311 @@
1
+ /*
2
+ * This file is part of the SDWebImage package.
3
+ * (c) Olivier Poitrey <rs@dailymotion.com>
4
+ *
5
+ * For the full copyright and license information, please view the LICENSE
6
+ * file that was distributed with this source code.
7
+ */
8
+
9
+ #import "SDImageCache.h"
10
+ #import "SDWebImageDecoder.h"
11
+ #import <CommonCrypto/CommonDigest.h>
12
+ #import <mach/mach.h>
13
+ #import <mach/mach_host.h>
14
+
15
+ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
16
+
17
+ @interface SDImageCache ()
18
+
19
+ @property (strong, nonatomic) NSCache *memCache;
20
+ @property (strong, nonatomic) NSString *diskCachePath;
21
+ @property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t ioQueue;
22
+
23
+ @end
24
+
25
+
26
+ @implementation SDImageCache
27
+
28
+ + (SDImageCache *)sharedImageCache
29
+ {
30
+ static dispatch_once_t once;
31
+ static id instance;
32
+ dispatch_once(&once, ^{instance = self.new;});
33
+ return instance;
34
+ }
35
+
36
+ - (id)init
37
+ {
38
+ return [self initWithNamespace:@"default"];
39
+ }
40
+
41
+ - (id)initWithNamespace:(NSString *)ns
42
+ {
43
+ if ((self = [super init]))
44
+ {
45
+ NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
46
+
47
+ // Create IO serial queue
48
+ _ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);
49
+
50
+ // Init default values
51
+ _maxCacheAge = kDefaultCacheMaxCacheAge;
52
+
53
+ // Init the memory cache
54
+ _memCache = [[NSCache alloc] init];
55
+ _memCache.name = fullNamespace;
56
+
57
+ // Init the disk cache
58
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
59
+ _diskCachePath = [paths[0] stringByAppendingPathComponent:fullNamespace];
60
+
61
+ #if TARGET_OS_IPHONE
62
+ // Subscribe to app events
63
+ [[NSNotificationCenter defaultCenter] addObserver:self
64
+ selector:@selector(clearMemory)
65
+ name:UIApplicationDidReceiveMemoryWarningNotification
66
+ object:nil];
67
+
68
+ [[NSNotificationCenter defaultCenter] addObserver:self
69
+ selector:@selector(cleanDisk)
70
+ name:UIApplicationWillTerminateNotification
71
+ object:nil];
72
+ #endif
73
+ }
74
+
75
+ return self;
76
+ }
77
+
78
+ - (void)dealloc
79
+ {
80
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
81
+ SDDispatchQueueRelease(_ioQueue);
82
+ }
83
+
84
+ #pragma mark SDImageCache (private)
85
+
86
+ - (NSString *)cachePathForKey:(NSString *)key
87
+ {
88
+ const char *str = [key UTF8String];
89
+ unsigned char r[CC_MD5_DIGEST_LENGTH];
90
+ CC_MD5(str, (CC_LONG)strlen(str), r);
91
+ NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
92
+ r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
93
+
94
+ return [self.diskCachePath stringByAppendingPathComponent:filename];
95
+ }
96
+
97
+ #pragma mark ImageCache
98
+
99
+ - (void)storeImage:(UIImage *)image imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk
100
+ {
101
+ if (!image || !key)
102
+ {
103
+ return;
104
+ }
105
+
106
+ [self.memCache setObject:image forKey:key cost:image.size.height * image.size.width * image.scale];
107
+
108
+ if (toDisk)
109
+ {
110
+ dispatch_async(self.ioQueue, ^
111
+ {
112
+ NSData *data = imageData;
113
+
114
+ if (!data)
115
+ {
116
+ if (image)
117
+ {
118
+ #if TARGET_OS_IPHONE
119
+ data = UIImageJPEGRepresentation(image, (CGFloat)1.0);
120
+ #else
121
+ data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil];
122
+ #endif
123
+ }
124
+ }
125
+
126
+ if (data)
127
+ {
128
+ // Can't use defaultManager another thread
129
+ NSFileManager *fileManager = NSFileManager.new;
130
+
131
+ if (![fileManager fileExistsAtPath:_diskCachePath])
132
+ {
133
+ [fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:NULL];
134
+ }
135
+
136
+ [fileManager createFileAtPath:[self cachePathForKey:key] contents:data attributes:nil];
137
+ }
138
+ });
139
+ }
140
+ }
141
+
142
+ - (void)storeImage:(UIImage *)image forKey:(NSString *)key
143
+ {
144
+ [self storeImage:image imageData:nil forKey:key toDisk:YES];
145
+ }
146
+
147
+ - (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk
148
+ {
149
+ [self storeImage:image imageData:nil forKey:key toDisk:toDisk];
150
+ }
151
+
152
+ - (UIImage *)imageFromMemoryCacheForKey:(NSString *)key
153
+ {
154
+ return [self.memCache objectForKey:key];
155
+ }
156
+
157
+ - (UIImage *)imageFromDiskCacheForKey:(NSString *)key
158
+ {
159
+ // First check the in-memory cache...
160
+ UIImage *image = [self imageFromMemoryCacheForKey:key];
161
+ if (image)
162
+ {
163
+ return image;
164
+ }
165
+
166
+ // Second check the disk cache...
167
+ UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]])];
168
+
169
+ if (diskImage)
170
+ {
171
+ CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
172
+ [self.memCache setObject:diskImage forKey:key cost:cost];
173
+ }
174
+
175
+ return diskImage;
176
+ }
177
+
178
+ - (void)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock
179
+ {
180
+ if (!doneBlock) return;
181
+
182
+ if (!key)
183
+ {
184
+ doneBlock(nil, SDImageCacheTypeNone);
185
+ return;
186
+ }
187
+
188
+ // First check the in-memory cache...
189
+ UIImage *image = [self imageFromMemoryCacheForKey:key];
190
+ if (image)
191
+ {
192
+ doneBlock(image, SDImageCacheTypeMemory);
193
+ return;
194
+ }
195
+
196
+ dispatch_async(self.ioQueue, ^
197
+ {
198
+ UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]])];
199
+
200
+ if (diskImage)
201
+ {
202
+ CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
203
+ [self.memCache setObject:diskImage forKey:key cost:cost];
204
+ }
205
+
206
+ dispatch_async(dispatch_get_main_queue(), ^
207
+ {
208
+ doneBlock(diskImage, SDImageCacheTypeDisk);
209
+ });
210
+ });
211
+ }
212
+
213
+ - (void)removeImageForKey:(NSString *)key
214
+ {
215
+ [self removeImageForKey:key fromDisk:YES];
216
+ }
217
+
218
+ - (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk
219
+ {
220
+ if (key == nil)
221
+ {
222
+ return;
223
+ }
224
+
225
+ [self.memCache removeObjectForKey:key];
226
+
227
+ if (fromDisk)
228
+ {
229
+ dispatch_async(self.ioQueue, ^
230
+ {
231
+ [[NSFileManager defaultManager] removeItemAtPath:[self cachePathForKey:key] error:nil];
232
+ });
233
+ }
234
+ }
235
+
236
+ - (void)clearMemory
237
+ {
238
+ [self.memCache removeAllObjects];
239
+ }
240
+
241
+ - (void)clearDisk
242
+ {
243
+ dispatch_async(self.ioQueue, ^
244
+ {
245
+ [[NSFileManager defaultManager] removeItemAtPath:self.diskCachePath error:nil];
246
+ [[NSFileManager defaultManager] createDirectoryAtPath:self.diskCachePath
247
+ withIntermediateDirectories:YES
248
+ attributes:nil
249
+ error:NULL];
250
+ });
251
+ }
252
+
253
+ - (void)cleanDisk
254
+ {
255
+ dispatch_async(self.ioQueue, ^
256
+ {
257
+ NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge];
258
+ // convert NSString path to NSURL path
259
+ NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES];
260
+ // build an enumerator by also prefetching file properties we want to read
261
+ NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtURL:diskCacheURL
262
+ includingPropertiesForKeys:@[ NSURLIsDirectoryKey, NSURLContentModificationDateKey ]
263
+ options:NSDirectoryEnumerationSkipsHiddenFiles
264
+ errorHandler:NULL];
265
+ for (NSURL *fileURL in fileEnumerator)
266
+ {
267
+ // skip folder
268
+ NSNumber *isDirectory;
269
+ [fileURL getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:NULL];
270
+ if ([isDirectory boolValue])
271
+ {
272
+ continue;
273
+ }
274
+
275
+ // compare file date with the max age
276
+ NSDate *fileModificationDate;
277
+ [fileURL getResourceValue:&fileModificationDate forKey:NSURLContentModificationDateKey error:NULL];
278
+ if ([[fileModificationDate laterDate:expirationDate] isEqualToDate:expirationDate])
279
+ {
280
+ [[NSFileManager defaultManager] removeItemAtURL:fileURL error:nil];
281
+ }
282
+ }
283
+ });
284
+ }
285
+
286
+ -(unsigned long long)getSize
287
+ {
288
+ unsigned long long size = 0;
289
+ NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
290
+ for (NSString *fileName in fileEnumerator)
291
+ {
292
+ NSString *filePath = [self.diskCachePath stringByAppendingPathComponent:fileName];
293
+ NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
294
+ size += [attrs fileSize];
295
+ }
296
+ return size;
297
+ }
298
+
299
+ - (int)getDiskCount
300
+ {
301
+ int count = 0;
302
+ NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
303
+ for (NSString *fileName in fileEnumerator)
304
+ {
305
+ count += 1;
306
+ }
307
+
308
+ return count;
309
+ }
310
+
311
+ @end