motion-sparkle 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE +21 -0
  5. data/README.md +206 -0
  6. data/Rakefile +20 -0
  7. data/lib/motion-sparkle.rb +11 -0
  8. data/lib/motion/project/appcast.rb +106 -0
  9. data/lib/motion/project/appcast/release_notes.content.html +22 -0
  10. data/lib/motion/project/appcast/release_notes.template.erb +19 -0
  11. data/lib/motion/project/package.rb +44 -0
  12. data/lib/motion/project/project.rb +47 -0
  13. data/lib/motion/project/rake_tasks.rb +72 -0
  14. data/lib/motion/project/setup.rb +79 -0
  15. data/lib/motion/project/sparkle.rb +166 -0
  16. data/lib/motion/project/templates.rb +40 -0
  17. data/lib/motion/project/version.rb +5 -0
  18. data/motion-sparkle.gemspec +22 -0
  19. data/spec/sparkle_spec.rb +74 -0
  20. data/spec/spec_helper.rb +35 -0
  21. data/vendor/Sparkle.framework/Headers/SUAppcast.h +33 -0
  22. data/vendor/Sparkle.framework/Headers/SUAppcastItem.h +47 -0
  23. data/vendor/Sparkle.framework/Headers/SUUpdater.h +118 -0
  24. data/vendor/Sparkle.framework/Headers/SUVersionComparisonProtocol.h +27 -0
  25. data/vendor/Sparkle.framework/Headers/Sparkle.h +21 -0
  26. data/vendor/Sparkle.framework/Resources/Info.plist +24 -0
  27. data/vendor/Sparkle.framework/Resources/License.txt +7 -0
  28. data/vendor/Sparkle.framework/Resources/SUModelTranslation.plist +174 -0
  29. data/vendor/Sparkle.framework/Resources/SUStatus.nib/classes.nib +56 -0
  30. data/vendor/Sparkle.framework/Resources/SUStatus.nib/info.nib +20 -0
  31. data/vendor/Sparkle.framework/Resources/SUStatus.nib/keyedobjects.nib +0 -0
  32. data/vendor/Sparkle.framework/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  33. data/vendor/Sparkle.framework/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  34. data/vendor/Sparkle.framework/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  35. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  36. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdateAlert.nib/info.nib +20 -0
  37. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  38. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  39. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  40. data/vendor/Sparkle.framework/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  41. data/vendor/Sparkle.framework/Resources/de.lproj/Sparkle.strings +0 -0
  42. data/vendor/Sparkle.framework/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  43. data/vendor/Sparkle.framework/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  44. data/vendor/Sparkle.framework/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  45. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  46. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdateAlert.nib/info.nib +20 -0
  47. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  48. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  49. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib +21 -0
  50. data/vendor/Sparkle.framework/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  51. data/vendor/Sparkle.framework/Resources/en.lproj/Sparkle.strings +0 -0
  52. data/vendor/Sparkle.framework/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  53. data/vendor/Sparkle.framework/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  54. data/vendor/Sparkle.framework/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  55. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  56. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdateAlert.nib/info.nib +20 -0
  57. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  58. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  59. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  60. data/vendor/Sparkle.framework/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  61. data/vendor/Sparkle.framework/Resources/es.lproj/Sparkle.strings +0 -0
  62. data/vendor/Sparkle.framework/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  63. data/vendor/Sparkle.framework/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib +16 -0
  64. data/vendor/Sparkle.framework/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  65. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  66. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdateAlert.nib/info.nib +16 -0
  67. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  68. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  69. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  70. data/vendor/Sparkle.framework/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  71. data/vendor/Sparkle.framework/Resources/fr.lproj/Sparkle.strings +0 -0
  72. data/vendor/Sparkle.framework/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  73. data/vendor/Sparkle.framework/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  74. data/vendor/Sparkle.framework/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  75. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  76. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdateAlert.nib/info.nib +20 -0
  77. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  78. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  79. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  80. data/vendor/Sparkle.framework/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  81. data/vendor/Sparkle.framework/Resources/it.lproj/Sparkle.strings +0 -0
  82. data/vendor/Sparkle.framework/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  83. data/vendor/Sparkle.framework/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib +18 -0
  84. data/vendor/Sparkle.framework/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  85. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  86. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdateAlert.nib/info.nib +16 -0
  87. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  88. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  89. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  90. data/vendor/Sparkle.framework/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  91. data/vendor/Sparkle.framework/Resources/nl.lproj/Sparkle.strings +0 -0
  92. data/vendor/Sparkle.framework/Resources/relaunch +0 -0
  93. data/vendor/Sparkle.framework/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  94. data/vendor/Sparkle.framework/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  95. data/vendor/Sparkle.framework/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  96. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  97. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdateAlert.nib/info.nib +20 -0
  98. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  99. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  100. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib +18 -0
  101. data/vendor/Sparkle.framework/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  102. data/vendor/Sparkle.framework/Resources/ru.lproj/Sparkle.strings +0 -0
  103. data/vendor/Sparkle.framework/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  104. data/vendor/Sparkle.framework/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  105. data/vendor/Sparkle.framework/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  106. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib +39 -0
  107. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdateAlert.nib/info.nib +18 -0
  108. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  109. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  110. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  111. data/vendor/Sparkle.framework/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  112. data/vendor/Sparkle.framework/Resources/sv.lproj/Sparkle.strings +0 -0
  113. data/vendor/Sparkle.framework/Sparkle +0 -0
  114. data/vendor/Sparkle.framework/Versions/A/Headers/SUAppcast.h +33 -0
  115. data/vendor/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h +47 -0
  116. data/vendor/Sparkle.framework/Versions/A/Headers/SUUpdater.h +118 -0
  117. data/vendor/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h +27 -0
  118. data/vendor/Sparkle.framework/Versions/A/Headers/Sparkle.h +21 -0
  119. data/vendor/Sparkle.framework/Versions/A/Resources/Info.plist +24 -0
  120. data/vendor/Sparkle.framework/Versions/A/Resources/License.txt +7 -0
  121. data/vendor/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist +174 -0
  122. data/vendor/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib +56 -0
  123. data/vendor/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib +20 -0
  124. data/vendor/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib +0 -0
  125. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  126. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  127. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  128. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  129. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib +20 -0
  130. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  131. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  132. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  133. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  134. data/vendor/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings +0 -0
  135. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  136. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  137. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  138. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  139. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib +20 -0
  140. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  141. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  142. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib +21 -0
  143. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  144. data/vendor/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings +0 -0
  145. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  146. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  147. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  148. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  149. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib +20 -0
  150. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  151. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  152. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  153. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  154. data/vendor/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings +0 -0
  155. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  156. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib +16 -0
  157. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  158. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  159. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib +16 -0
  160. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  161. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  162. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  163. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  164. data/vendor/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings +0 -0
  165. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  166. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  167. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  168. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  169. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib +20 -0
  170. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  171. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  172. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  173. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  174. data/vendor/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings +0 -0
  175. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  176. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib +18 -0
  177. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  178. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  179. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib +16 -0
  180. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  181. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  182. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  183. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  184. data/vendor/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings +0 -0
  185. data/vendor/Sparkle.framework/Versions/A/Resources/relaunch +0 -0
  186. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  187. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  188. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  189. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  190. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib +20 -0
  191. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  192. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  193. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib +18 -0
  194. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  195. data/vendor/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings +0 -0
  196. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  197. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  198. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  199. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib +39 -0
  200. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib +18 -0
  201. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  202. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  203. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  204. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  205. data/vendor/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings +0 -0
  206. data/vendor/Sparkle.framework/Versions/A/Sparkle +0 -0
  207. data/vendor/Sparkle.framework/Versions/Current/Headers/SUAppcast.h +33 -0
  208. data/vendor/Sparkle.framework/Versions/Current/Headers/SUAppcastItem.h +47 -0
  209. data/vendor/Sparkle.framework/Versions/Current/Headers/SUUpdater.h +118 -0
  210. data/vendor/Sparkle.framework/Versions/Current/Headers/SUVersionComparisonProtocol.h +27 -0
  211. data/vendor/Sparkle.framework/Versions/Current/Headers/Sparkle.h +21 -0
  212. data/vendor/Sparkle.framework/Versions/Current/Resources/Info.plist +24 -0
  213. data/vendor/Sparkle.framework/Versions/Current/Resources/License.txt +7 -0
  214. data/vendor/Sparkle.framework/Versions/Current/Resources/SUModelTranslation.plist +174 -0
  215. data/vendor/Sparkle.framework/Versions/Current/Resources/SUStatus.nib/classes.nib +56 -0
  216. data/vendor/Sparkle.framework/Versions/Current/Resources/SUStatus.nib/info.nib +20 -0
  217. data/vendor/Sparkle.framework/Versions/Current/Resources/SUStatus.nib/keyedobjects.nib +0 -0
  218. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  219. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  220. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  221. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  222. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdateAlert.nib/info.nib +20 -0
  223. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  224. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  225. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  226. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  227. data/vendor/Sparkle.framework/Versions/Current/Resources/de.lproj/Sparkle.strings +0 -0
  228. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  229. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  230. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  231. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  232. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdateAlert.nib/info.nib +20 -0
  233. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  234. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  235. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib +21 -0
  236. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  237. data/vendor/Sparkle.framework/Versions/Current/Resources/en.lproj/Sparkle.strings +0 -0
  238. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  239. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  240. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  241. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  242. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdateAlert.nib/info.nib +20 -0
  243. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  244. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  245. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  246. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  247. data/vendor/Sparkle.framework/Versions/Current/Resources/es.lproj/Sparkle.strings +0 -0
  248. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  249. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib +16 -0
  250. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  251. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  252. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdateAlert.nib/info.nib +16 -0
  253. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  254. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  255. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  256. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  257. data/vendor/Sparkle.framework/Versions/Current/Resources/fr.lproj/Sparkle.strings +0 -0
  258. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  259. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  260. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  261. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  262. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdateAlert.nib/info.nib +20 -0
  263. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  264. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  265. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  266. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  267. data/vendor/Sparkle.framework/Versions/Current/Resources/it.lproj/Sparkle.strings +0 -0
  268. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  269. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib +18 -0
  270. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  271. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  272. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdateAlert.nib/info.nib +16 -0
  273. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  274. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  275. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib +16 -0
  276. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  277. data/vendor/Sparkle.framework/Versions/Current/Resources/nl.lproj/Sparkle.strings +0 -0
  278. data/vendor/Sparkle.framework/Versions/Current/Resources/relaunch +0 -0
  279. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  280. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  281. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  282. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib +67 -0
  283. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdateAlert.nib/info.nib +20 -0
  284. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  285. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  286. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib +18 -0
  287. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  288. data/vendor/Sparkle.framework/Versions/Current/Resources/ru.lproj/Sparkle.strings +0 -0
  289. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib +50 -0
  290. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib +20 -0
  291. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib +0 -0
  292. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib +39 -0
  293. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdateAlert.nib/info.nib +18 -0
  294. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib +0 -0
  295. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/classes.nib +59 -0
  296. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/info.nib +20 -0
  297. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib +0 -0
  298. data/vendor/Sparkle.framework/Versions/Current/Resources/sv.lproj/Sparkle.strings +0 -0
  299. data/vendor/Sparkle.framework/Versions/Current/Sparkle +0 -0
  300. metadata +1009 -0
@@ -0,0 +1,44 @@
1
+ module Motion::Project
2
+ class Sparkle
3
+
4
+ def package
5
+ return unless setup_ok?
6
+ create_release_folder
7
+ @config.build_mode = :release
8
+ return unless create_zip_file
9
+ App.info "Release", version_string
10
+ App.info "Version", @config.version
11
+ App.info "Build", @config.short_version || 'unspecified in Rakefile'
12
+ App.info "Size", @package_size.to_s
13
+ sign_package
14
+ create_appcast
15
+ create_release_notes
16
+ `open #{sparkle_release_path}`
17
+ end
18
+
19
+ def create_zip_file
20
+ unless File.exist?(app_bundle_path)
21
+ App.fail "You need to build your app with the Release target to use Sparkle"
22
+ end
23
+ if File.exist?("#{sparkle_release_path}/#{zip_file}")
24
+ App.fail "Release already exists at ./#{sparkle_release_path}/#{zip_file} (remove it manually with `rake sparkle:clean`)"
25
+ end
26
+ FileUtils.cd(app_release_path) do
27
+ `zip -r #{zip_file} "#{app_file}"`
28
+ end
29
+ FileUtils.mv "#{app_release_path}/#{zip_file}", "./#{sparkle_release_path}/"
30
+ App.info "Create", "./#{sparkle_release_path}/#{zip_file}"
31
+ @package_file = zip_file
32
+ @package_size = File.size "./#{sparkle_release_path}/#{zip_file}"
33
+ end
34
+
35
+ def sign_package
36
+ package = "./#{sparkle_release_path}/#{zip_file}"
37
+ @package_signature = `#{openssl} dgst -sha1 -binary < "#{package}" | #{openssl} dgst -dss1 -sign "#{private_key_path}" | #{openssl} enc -base64`
38
+ @package_signature = @package_signature.strip
39
+ App.info "Signature", "\"#{@package_signature}\""
40
+ end
41
+
42
+
43
+ end
44
+ end
@@ -0,0 +1,47 @@
1
+ module Motion::Project
2
+
3
+ class Config
4
+ variable :sparkle
5
+
6
+ def sparkle(&block)
7
+ @sparkle ||= Motion::Project::Sparkle.new(self)
8
+ if block
9
+ @sparkle.instance_eval &block
10
+ end
11
+ @sparkle
12
+ end
13
+ end
14
+
15
+ class App
16
+ class << self
17
+ def build_with_sparkle(platform, opts = {})
18
+ if App.config.sparkle.setup_ok?
19
+ App.info "Sparkle", "Setup OK"
20
+ else
21
+ exit 1
22
+ end
23
+ build_without_sparkle(platform, opts)
24
+ end
25
+
26
+ alias_method "build_without_sparkle", "build"
27
+ alias_method "build", "build_with_sparkle"
28
+ end
29
+ end
30
+
31
+ # In 10.9, `codesign` no longer uses the `--deep` flag by default
32
+ # To make sure `Sparkle.framework` is signed, we need to override
33
+ # this part of the RubyMotion build process to pass it
34
+ # FIXME: this will probably be taken care of upstream
35
+ class Builder
36
+ def codesign(config, platform)
37
+ app_bundle = config.app_bundle_raw('MacOSX')
38
+ entitlements = File.join(config.versionized_build_dir(platform), "Entitlements.plist")
39
+ if File.mtime(config.project_file) > File.mtime(app_bundle) \
40
+ or !system("/usr/bin/codesign --verify \"#{app_bundle}\" >& /dev/null")
41
+ App.info 'Codesign', app_bundle
42
+ File.open(entitlements, 'w') { |io| io.write(config.entitlements_data) }
43
+ sh "/usr/bin/codesign --deep --force --sign \"#{config.codesign_certificate}\" --entitlements \"#{entitlements}\" \"#{app_bundle}\""
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,72 @@
1
+ # Rake tasks
2
+ namespace :sparkle do
3
+
4
+ desc "Setup Sparkle configuration"
5
+ task :setup do
6
+ sparkle = App.config.sparkle
7
+ sparkle.setup
8
+ end
9
+
10
+ desc "Create a ZIP file with you application .app release build"
11
+ task :package do
12
+ sparkle = App.config.sparkle
13
+ sparkle.package
14
+ end
15
+
16
+ task :setup_certificates do
17
+ sparkle = App.config.sparkle
18
+ sparkle.generate_keys
19
+ end
20
+
21
+ desc "Sign the ZIP file with appropriate certificates"
22
+ task :sign do
23
+ sparkle = App.config.sparkle
24
+ sparkle.sign_package
25
+ end
26
+
27
+ task :recreate_public_key do
28
+ sparkle = App.config.sparkle
29
+ sparkle.generate_public_key
30
+ end
31
+
32
+ task :copy_release_notes_templates do
33
+ sparkle = App.config.sparkle
34
+ sparkle.copy_templates(force = true)
35
+ end
36
+
37
+ desc "Generate the appcast xml feed"
38
+ task :feed do
39
+ sparkle = App.config.sparkle
40
+ sparkle.create_appcast
41
+ end
42
+
43
+ desc "Update the release notes of this build"
44
+ task :release_notes do
45
+ sparkle = App.config.sparkle
46
+ sparkle.create_release_notes
47
+ end
48
+
49
+ desc "Upload to configured location"
50
+ task :upload do
51
+ end
52
+
53
+ desc "Clean the Sparkle release folder"
54
+ task :clean do
55
+ dir = Motion::Project::Sparkle::RELEASE_PATH
56
+ if File.exist?("./#{dir}")
57
+ App.info 'Delete', "./#{dir}"
58
+ rm_rf dir
59
+ end
60
+ end
61
+ end
62
+
63
+ namespace :clean do
64
+ # Delete Sparkle release folder when cleaning all
65
+ task :all do
66
+ dir = Motion::Project::Sparkle::RELEASE_PATH
67
+ if File.exist?("./#{dir}")
68
+ App.info 'Delete', "./#{dir}"
69
+ rm_rf dir
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,79 @@
1
+ module Motion::Project
2
+ class Sparkle
3
+
4
+ def setup_ok?
5
+ config_ok?
6
+ certificates_ok?
7
+ end
8
+
9
+ def config_ok?
10
+ base_url_check = appcast.base_url.to_s
11
+ if base_url_check.nil? or base_url_check.empty?
12
+ App.fail "Sparkle :base_url missing. Use `release :base_url, 'http://example.com/your_app_folder'` in your Rakefile's `app.sparkle` block"
13
+ end
14
+ feed_url_check = @config.info_plist['SUFeedURL']
15
+ feed_filename_check = appcast.feed_filename
16
+ if feed_url_check.nil? or feed_url_check.empty? or feed_filename_check.nil? or feed_filename_check.empty?
17
+ App.fail "Sparkle :feed_filename is nil or blank. Please check your Rakefile."
18
+ end
19
+ public_key_check = @config.info_plist['SUPublicDSAKeyFile'].to_s
20
+ if public_key_check.nil? or public_key_check.empty?
21
+ App.fail "Sparkle :public_key is nil or blank. Please check your Rakefile."
22
+ end
23
+ true
24
+ end
25
+
26
+ def certificates_ok?(silence=false)
27
+ unless File.exist?("./#{Sparkle::CONFIG_PATH}")
28
+ if silence
29
+ return false
30
+ else
31
+ App.fail "Missing `#{Sparkle::CONFIG_PATH}`. Run `rake sparkle:setup` to get started"
32
+ end
33
+ end
34
+ unless File.exist?(private_key_path)
35
+ if silence
36
+ return false
37
+ else
38
+ App.fail "Missing `#{private_key_path}`. Please run `rake sparkle:setup_certificates` or check the docs to know where to put them."
39
+ end
40
+ end
41
+ unless File.exist?(public_key_path)
42
+ if silence
43
+ return false
44
+ else
45
+ App.fail "Missing `#{public_key_path}`. Did you configure `release :public_key` correctly in the Rakefile? Advanced: recreate your public key with `rake sparkle:recreate_public_key`"
46
+ end
47
+ end
48
+ true
49
+ end
50
+
51
+ def setup
52
+ create_sparkle_folder
53
+ copy_templates
54
+ if config_ok?
55
+ App.info "Sparkle", "Config found"
56
+ else
57
+ return false
58
+ end
59
+
60
+ silence = true
61
+ if certificates_ok?(silence)
62
+ App.info "Sparkle", "Certificates found"
63
+ else
64
+ App.info "Sparkle", "Certificates not found
65
+ Please generate your private and public keys with
66
+ `rake sparkle:setup_certificates`
67
+ If you already have your certificates and only need to include them in the project, follow these steps:
68
+ 1. Rename your private key to `./#{private_key_path}`
69
+ 2. Place your public key in `./#{public_key_path}`
70
+ 3. If you wish to use a different name or location for your public key within the resources dir,
71
+ make sure you add `publish :public_key, 'folder/new_name.pem'` to the sparkle config in your Rakefile
72
+ "
73
+ return false
74
+ end
75
+ App.info "Sparkle", "Setup OK. After `rake build:release`, you can now run `rake sparkle:package`."
76
+ end
77
+
78
+ end
79
+ end
@@ -0,0 +1,166 @@
1
+ module Motion::Project
2
+
3
+ class Sparkle
4
+
5
+ SPARKLE_ROOT = "sparkle"
6
+ CONFIG_PATH = "#{SPARKLE_ROOT}/config"
7
+ RELEASE_PATH = "#{SPARKLE_ROOT}/release"
8
+
9
+ def initialize(config)
10
+ @config = config
11
+ publish :public_key, 'dsa_pub.pem'
12
+ embed_framework
13
+ end
14
+
15
+ def appcast
16
+ @appcast ||= Appcast.new
17
+ end
18
+
19
+ def publish(key, value)
20
+ case key
21
+ when :feed_url
22
+ feed_url value
23
+ when :public_key
24
+ public_key value
25
+ when :version
26
+ version value
27
+ when :base_url
28
+ appcast.base_url = value
29
+ feed_url appcast.full_feed_url
30
+ when :notes_filename, :package_filename
31
+ appcast.send(key.to_s + '=', value)
32
+ when :feed_filename
33
+ appcast.feed_filename = value
34
+ feed_url appcast.full_feed_url
35
+ else
36
+ raise "Unknown Sparkle config option #{key}"
37
+ end
38
+ end
39
+ alias_method :release, :publish
40
+
41
+ def embed_framework
42
+ framework_path = Pathname.new File.dirname(__FILE__)
43
+ framework_path = (framework_path.parent.parent.parent + 'vendor/Sparkle.framework').to_s
44
+ @config.embedded_frameworks << framework_path
45
+ end
46
+
47
+ def version(vstring)
48
+ @config.version = vstring.to_s
49
+ @config.short_version = vstring.to_s
50
+ end
51
+
52
+ def version_string
53
+ "#{@config.version} (#{@config.short_version})"
54
+ end
55
+
56
+ def feed_url(url)
57
+ @config.info_plist['SUFeedURL'] = url
58
+ end
59
+
60
+ def public_key(path_in_resources_folder)
61
+ @config.info_plist['SUPublicDSAKeyFile'] = path_in_resources_folder
62
+ end
63
+
64
+ # File manipulation and certificates
65
+
66
+ def create_sparkle_folder
67
+ create_config_folder
68
+ create_release_folder
69
+ end
70
+
71
+ def create_config_folder
72
+ FileUtils.mkdir_p(sparkle_config_path) unless File.exist?(sparkle_config_path)
73
+ end
74
+
75
+ def create_release_folder
76
+ FileUtils.mkdir_p(sparkle_release_path) unless File.exist?(sparkle_release_path)
77
+ end
78
+
79
+ def generate_keys
80
+ return false unless config_ok?
81
+ unless File.exist?(sparkle_config_path)
82
+ FileUtils.mkdir_p sparkle_config_path
83
+ end
84
+ [dsa_param_path, private_key_path, public_key_path].each do |file|
85
+ if File.exist? file
86
+ App.info "Sparkle", "Error: file exists.
87
+ There's already a '#{file}'. Be careful not to override or lose your certificates. \n
88
+ Delete this file if you're sure. \n
89
+ Aborting (no action performed)
90
+ "
91
+ return
92
+ end
93
+ end
94
+ `#{openssl} dsaparam 1024 < /dev/urandom > #{dsa_param_path}`
95
+ `#{openssl} gendsa #{dsa_param_path} -out #{private_key_path}`
96
+ generate_public_key
97
+ `rm #{dsa_param_path}`
98
+ App.info "Sparkle", "Generated private and public certificates.
99
+ Details:
100
+ * Private certificate: ./#{private_key_path}
101
+ * Public certificate: ./#{public_key_path}
102
+ Warning:
103
+ ADD YOUR PRIVATE CERTIFICATE TO YOUR GITIGNORE OR EQUIVALENT AND BACK IT UP!
104
+ KEEP IT PRIVATE AND SAFE!
105
+ If you lose it, your users will be unable to upgrade.
106
+ "
107
+ end
108
+
109
+ def generate_public_key
110
+ `#{openssl} dsa -in #{private_key_path} -pubout -out #{public_key_path}`
111
+ end
112
+
113
+ # A few helpers
114
+
115
+ def openssl
116
+ "/usr/bin/openssl"
117
+ end
118
+
119
+ def project_path
120
+ @project_path ||= Pathname.new(@config.project_dir)
121
+ end
122
+
123
+ def sparkle_release_path
124
+ project_path + RELEASE_PATH
125
+ end
126
+
127
+ def sparkle_config_path
128
+ project_path + CONFIG_PATH
129
+ end
130
+
131
+ def dsa_param_path
132
+ sparkle_config_path + "dsaparam.pem"
133
+ end
134
+
135
+ def private_key_path
136
+ sparkle_config_path + "dsa_priv.pem"
137
+ end
138
+
139
+ def public_key_path
140
+ pub_key_file = @config.info_plist['SUPublicDSAKeyFile']
141
+ project_path + "resources/#{pub_key_file}"
142
+ end
143
+
144
+ def app_bundle_path
145
+ Pathname.new @config.app_bundle_raw('MacOSX')
146
+ end
147
+
148
+ def app_release_path
149
+ app_bundle_path.parent.to_s
150
+ end
151
+
152
+ def app_name
153
+ File.basename(app_bundle_path, '.app')
154
+ end
155
+
156
+ def zip_file
157
+ appcast.package_filename || "#{app_name}.zip"
158
+ end
159
+
160
+ def app_file
161
+ "#{app_name}.app"
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,40 @@
1
+ require 'erb'
2
+ require 'rexml/document'
3
+
4
+ module Motion; module Project
5
+
6
+ class Sparkle
7
+ # for ERB
8
+ # attr_reader :name
9
+
10
+ TemplatePaths = [
11
+ File.expand_path(File.join(__FILE__, '../appcast'))
12
+ ]
13
+
14
+ Templates = TemplatePaths.map { |path| Dir.glob(path + '/*') }.flatten.map { |x| File.basename(x) }
15
+
16
+ def all_templates
17
+ @all_templates ||= begin
18
+ templates = {}
19
+ TemplatePaths.map { |path| Dir.glob(path + '/*') }.flatten.each do |template_path|
20
+ templates[File.basename(template_path)] = template_path
21
+ end
22
+ templates
23
+ end
24
+ end
25
+
26
+ def copy_templates(force=false)
27
+ all_templates.each_pair do |tmpl, path|
28
+ result = "#{sparkle_config_path}/#{tmpl}"
29
+ if File.exist?(result) and !force
30
+ App.info 'Exists', result
31
+ else
32
+ FileUtils.cp(path, "#{sparkle_config_path}/")
33
+ App.info 'Create', "./#{sparkle_config_path}/#{tmpl.to_s}"
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+
40
+ end; end