mako 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. checksums.yaml +7 -0
  2. data/bin/mako +85 -117
  3. data/lib/mako/build.rb +87 -55
  4. data/lib/mako/data/flash_widget_dev_core/Dependencies.txt +0 -0
  5. data/lib/mako/data/flash_widget_dev_core/libs/Degrafa_.2.11.swc +0 -0
  6. data/lib/mako/data/flash_widget_dev_core/libs/KogneatoGraphics.swc +0 -0
  7. data/lib/mako/data/flash_widget_dev_core/libs/KogneatoSymbols.swc +0 -0
  8. data/lib/mako/data/flash_widget_dev_core/libs/flash.swc +0 -0
  9. data/lib/mako/data/flash_widget_dev_core/src/assets/images/RichTextEditor.png +0 -0
  10. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/ARLRDBD.TTF +0 -0
  11. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/FTD_____.TTF +0 -0
  12. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdana.ttf +0 -0
  13. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanab.ttf +0 -0
  14. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanai.ttf +0 -0
  15. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanaz.ttf +0 -0
  16. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/DefaultError.png +0 -0
  17. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barbgfill.png +0 -0
  18. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barshadow.png +0 -0
  19. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bold.png +0 -0
  20. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bullets.png +0 -0
  21. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/center.png +0 -0
  22. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/close-x.png +0 -0
  23. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/fullscreenPopup_close.png +0 -0
  24. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc.png +0 -0
  25. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc2.png +0 -0
  26. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc3.png +0 -0
  27. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/qa.png +0 -0
  28. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/so.png +0 -0
  29. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/importIcon.png +0 -0
  30. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/italic.png +0 -0
  31. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/justify.png +0 -0
  32. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/kogLogo.png +0 -0
  33. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/left.png +0 -0
  34. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href-disabled.png +0 -0
  35. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href.png +0 -0
  36. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
  37. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink.png +0 -0
  38. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-delete.png +0 -0
  39. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
  40. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-edit.png +0 -0
  41. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip.png +0 -0
  42. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/pencil.png +0 -0
  43. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/right.png +0 -0
  44. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/underline.png +0 -0
  45. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayButton.png +0 -0
  46. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
  47. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
  48. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
  49. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
  50. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
  51. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
  52. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/creatorStyle.css +0 -0
  53. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/style.css +0 -0
  54. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/embeddedfonts.swf +0 -0
  55. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/helpBubble.swf +0 -0
  56. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
  57. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/videobg.swf +0 -0
  58. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/LICENSE.txt +0 -0
  59. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/CubeRotate.as +0 -0
  60. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Distortion.as +0 -0
  61. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/DistortionConstants.as +0 -0
  62. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Door.as +0 -0
  63. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Flip.as +0 -0
  64. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Gate.as +0 -0
  65. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Pop.as +0 -0
  66. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Push.as +0 -0
  67. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/SimpleDistortion.as +0 -0
  68. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/CubeRotateInstance.as +0 -0
  69. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DistortBaseInstance.as +0 -0
  70. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DoorInstance.as +0 -0
  71. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/FlipInstance.as +0 -0
  72. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/GateInstance.as +0 -0
  73. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PopInstance.as +0 -0
  74. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PushInstance.as +0 -0
  75. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBounds.as +0 -0
  76. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBoundsUtil.as +0 -0
  77. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/SimpleDisplayObjectBoundsUtil.as +0 -0
  78. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/HMAC.as +0 -0
  79. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5.as +0 -0
  80. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5Stream.as +0 -0
  81. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA1.as +0 -0
  82. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA224.as +0 -0
  83. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA256.as +0 -0
  84. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/WSSEUsernameToken.as +0 -0
  85. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFade.as +0 -0
  86. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadeInstance.as +0 -0
  87. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadePopUpBlocker.as +0 -0
  88. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/errors/IllegalStateError.as +0 -0
  89. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Address.as +0 -0
  90. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Email.as +0 -0
  91. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Phone.as +0 -0
  92. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCard.as +0 -0
  93. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCardParser.as +0 -0
  94. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/BitString.as +0 -0
  95. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/JPGEncoder.as +0 -0
  96. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/PNGEncoder.as +0 -0
  97. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/DynamicURLLoader.as +0 -0
  98. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/IURIResolver.as +0 -0
  99. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/MimeTypeMap.as +0 -0
  100. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URI.as +0 -0
  101. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URIEncodingBitmap.as +0 -0
  102. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/proxies/RFC2817Socket.as +0 -0
  103. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Database.as +0 -0
  104. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Definition.as +0 -0
  105. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Dict.as +0 -0
  106. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/DictionaryServer.as +0 -0
  107. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/MatchStrategy.as +0 -0
  108. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Response.as +0 -0
  109. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ConnectedEvent.as +0 -0
  110. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DatabaseEvent.as +0 -0
  111. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionEvent.as +0 -0
  112. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as +0 -0
  113. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DictionaryServerEvent.as +0 -0
  114. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DisconnectedEvent.as +0 -0
  115. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ErrorEvent.as +0 -0
  116. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchEvent.as +0 -0
  117. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchStrategiesEvent.as +0 -0
  118. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/NoMatchEvent.as +0 -0
  119. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/CompleteResponseEvent.as +0 -0
  120. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/SocketHelper.as +0 -0
  121. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSON.as +0 -0
  122. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONDecoder.as +0 -0
  123. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONEncoder.as +0 -0
  124. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONParseError.as +0 -0
  125. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONToken.as +0 -0
  126. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenType.as +0 -0
  127. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenizer.as +0 -0
  128. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/ArrayUtil.as +0 -0
  129. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DateUtil.as +0 -0
  130. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DictionaryUtil.as +0 -0
  131. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/IntUtil.as +0 -0
  132. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/NumberFormatter.as +0 -0
  133. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/StringUtil.as +0 -0
  134. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/XMLUtil.as +0 -0
  135. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/ServiceBase.as +0 -0
  136. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/URLLoaderBase.as +0 -0
  137. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/events/ServiceEvent.as +0 -0
  138. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/geom/ColorMatrix.as +0 -0
  139. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTween.as +0 -0
  140. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweenTimeline.as +0 -0
  141. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweener.as +0 -0
  142. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Back.as +0 -0
  143. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Bounce.as +0 -0
  144. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Circular.as +0 -0
  145. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Cubic.as +0 -0
  146. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Elastic.as +0 -0
  147. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Exponential.as +0 -0
  148. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Linear.as +0 -0
  149. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quadratic.as +0 -0
  150. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quartic.as +0 -0
  151. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quintic.as +0 -0
  152. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Sine.as +0 -0
  153. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/AutoHidePlugin.as +0 -0
  154. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/BlurPlugin.as +0 -0
  155. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorAdjustPlugin.as +0 -0
  156. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorTransformPlugin.as +0 -0
  157. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/CurrentFramePlugin.as +0 -0
  158. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/IGTweenPlugin.as +0 -0
  159. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MatrixPlugin.as +0 -0
  160. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MotionBlurPlugin.as +0 -0
  161. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SmartRotationPlugin.as +0 -0
  162. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SnappingPlugin.as +0 -0
  163. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SoundTransformPlugin.as +0 -0
  164. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/utils/SWFBridgeAS3.as +0 -0
  165. data/lib/mako/data/flash_widget_dev_core/src/etc/GUID.as +0 -0
  166. data/lib/mako/data/flash_widget_dev_core/src/etc/MathExt.as +0 -0
  167. data/lib/mako/data/flash_widget_dev_core/src/gs/OverwriteManager.as +0 -0
  168. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenFilterLite.as +0 -0
  169. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenLite.as +0 -0
  170. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenMax.as +0 -0
  171. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Back.as +0 -0
  172. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Bounce.as +0 -0
  173. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Circ.as +0 -0
  174. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Cubic.as +0 -0
  175. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Elastic.as +0 -0
  176. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Expo.as +0 -0
  177. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Linear.as +0 -0
  178. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quad.as +0 -0
  179. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quart.as +0 -0
  180. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quint.as +0 -0
  181. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Sine.as +0 -0
  182. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Strong.as +0 -0
  183. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/easing_readme.txt +0 -0
  184. data/lib/mako/data/flash_widget_dev_core/src/gs/events/TweenEvent.as +0 -0
  185. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BevelFilterVars.as +0 -0
  186. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BlurFilterVars.as +0 -0
  187. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/ColorMatrixFilterVars.as +0 -0
  188. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/DropShadowFilterVars.as +0 -0
  189. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/GlowFilterVars.as +0 -0
  190. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenFilterLiteVars.as +0 -0
  191. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenLiteVars.as +0 -0
  192. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenMaxVars.as +0 -0
  193. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenEvent.as +0 -0
  194. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenObject.as +0 -0
  195. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenSingleton.as +0 -0
  196. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Constant.as +0 -0
  197. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlow.as +0 -0
  198. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlowFast.as +0 -0
  199. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Shake.as +0 -0
  200. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFast.as +0 -0
  201. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFastSlow.as +0 -0
  202. data/lib/mako/data/flash_widget_dev_core/src/jac/image/ImageUtils.as +0 -0
  203. data/lib/mako/data/flash_widget_dev_core/src/jac/image/ResizeStyle.as +0 -0
  204. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorBase.mxml +0 -0
  205. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorConfig.as +0 -0
  206. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorEvents.as +0 -0
  207. data/lib/mako/data/flash_widget_dev_core/src/materia/Dialog.as +0 -0
  208. data/lib/mako/data/flash_widget_dev_core/src/materia/MateriaButton.as +0 -0
  209. data/lib/mako/data/flash_widget_dev_core/src/materia/PopUpAlert.mxml +0 -0
  210. data/lib/mako/data/flash_widget_dev_core/src/materia/components/GradientBackground.as +0 -0
  211. data/lib/mako/data/flash_widget_dev_core/src/materia/components/PercentField.mxml +0 -0
  212. data/lib/mako/data/flash_widget_dev_core/src/materia/components/ScrollableSizableImage.mxml +0 -0
  213. data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextAreaWithDefaultText.mxml +0 -0
  214. data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextInputWithDefaultText.mxml +0 -0
  215. data/lib/mako/data/flash_widget_dev_core/src/materia/components/VertCenterTextRenderer.mxml +0 -0
  216. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/ImportEvent.as +0 -0
  217. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/itemRenderers/CheckBoxColumn.mxml +0 -0
  218. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDetails.mxml +0 -0
  219. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDisplay.mxml +0 -0
  220. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGrid.mxml +0 -0
  221. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGridEvent.as +0 -0
  222. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerColumn.as +0 -0
  223. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerDataGrid.mxml +0 -0
  224. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputItem.mxml +0 -0
  225. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputObject.as +0 -0
  226. data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/KogneatoToolTip.as +0 -0
  227. data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/TipManager.as +0 -0
  228. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpBubble.mxml +0 -0
  229. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpDot.mxml +0 -0
  230. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpManager.as +0 -0
  231. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpObject.as +0 -0
  232. data/lib/mako/data/flash_widget_dev_core/src/materia/help/IHelpGuided.as +0 -0
  233. data/lib/mako/data/flash_widget_dev_core/src/materia/media/ImageCacherImage.mxml +0 -0
  234. data/lib/mako/data/flash_widget_dev_core/src/materia/media/MateriaUploader.as +0 -0
  235. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/Question.as +0 -0
  236. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionGroup.as +0 -0
  237. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionSet.as +0 -0
  238. data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/KogneatoToolTip.as +0 -0
  239. data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/TipManager.as +0 -0
  240. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/CommonUtils.as +0 -0
  241. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/DateUtils.as +0 -0
  242. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/ImageCacher.as +0 -0
  243. data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/Randomize.as +0 -0
  244. data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/SimpleClone.as +0 -0
  245. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Color.as +0 -0
  246. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Draw.as +0 -0
  247. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dashed.as +0 -0
  248. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dotted.as +0 -0
  249. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Check.as +0 -0
  250. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Rect.as +0 -0
  251. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBevel.as +0 -0
  252. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBorder.as +0 -0
  253. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRound.as +0 -0
  254. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRoundBorder.as +0 -0
  255. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/TriangleEquilateral.as +0 -0
  256. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/X.as +0 -0
  257. data/lib/mako/data/flash_widget_dev_core/src/nm/errors/ScoringError.as +0 -0
  258. data/lib/mako/data/flash_widget_dev_core/src/nm/errors/StorageError.as +0 -0
  259. data/lib/mako/data/flash_widget_dev_core/src/nm/events/ButtonEvent.as +0 -0
  260. data/lib/mako/data/flash_widget_dev_core/src/nm/events/PayloadEvent.as +0 -0
  261. data/lib/mako/data/flash_widget_dev_core/src/nm/events/StandardEvent.as +0 -0
  262. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/Question.as +0 -0
  263. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionGroup.as +0 -0
  264. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionSet.as +0 -0
  265. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/WidgetSettings.as +0 -0
  266. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerEvents.as +0 -0
  267. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerMessageEvent.as +0 -0
  268. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/logging/Log.as +0 -0
  269. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/scoring/Scoring.as +0 -0
  270. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageManager.as +0 -0
  271. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageTable.as +0 -0
  272. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/engines/EngineCore.as +0 -0
  273. data/lib/mako/data/flash_widget_dev_core/src/nm/geom/Dimension.as +0 -0
  274. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/Respondus.as +0 -0
  275. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusAnswer.as +0 -0
  276. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusError.as +0 -0
  277. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuestion.as +0 -0
  278. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuiz.as +0 -0
  279. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/AlertWindow.as +0 -0
  280. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/BlueButton.as +0 -0
  281. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button.as +0 -0
  282. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button_base.as +0 -0
  283. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Component.as +0 -0
  284. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ContentBlocker.as +0 -0
  285. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FlexUIScaler.as +0 -0
  286. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FormInput.as +0 -0
  287. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/GrabZoomClip.as +0 -0
  288. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/HelpLayer.as +0 -0
  289. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Label.as +0 -0
  290. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List.as +0 -0
  291. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List_Base.as +0 -0
  292. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProcessingBar.as +0 -0
  293. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar.as +0 -0
  294. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar_base.as +0 -0
  295. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar.as +0 -0
  296. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar_base.as +0 -0
  297. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollClip.as +0 -0
  298. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText.as +0 -0
  299. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText_base.as +0 -0
  300. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/SimpleScrollBar.as +0 -0
  301. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StageRef.as +0 -0
  302. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTank.as +0 -0
  303. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTankHorizontal.as +0 -0
  304. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ToolTip.as +0 -0
  305. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/TweeningDragDropBankList.as +0 -0
  306. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window.as +0 -0
  307. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window_base.as +0 -0
  308. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/CenterScale.as +0 -0
  309. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowManager.as +0 -0
  310. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowStage.as +0 -0
  311. data/lib/mako/data/flash_widget_dev_core/src/nm/util/BitField.as +0 -0
  312. data/lib/mako/data/flash_widget_dev_core/src/nm/util/ObjPeek.as +0 -0
  313. data/lib/mako/data/flash_widget_dev_core/src/nm/util/Objects.as +0 -0
  314. data/lib/mako/data/flash_widget_dev_core/src/nm/util/Printer.as +0 -0
  315. data/lib/mako/data/flash_widget_dev_core/src/nm/util/StringUtil.as +0 -0
  316. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/FaultEvent.as +0 -0
  317. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingCall.as +0 -0
  318. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingConnection.as +0 -0
  319. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingService.as +0 -0
  320. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/ResultEvent.as +0 -0
  321. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/DistortImage.as +0 -0
  322. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/SandyPoint.as +0 -0
  323. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/Triangle.as +0 -0
  324. data/lib/mako/data/html/thistest.html +0 -0
  325. data/lib/mako/data/strings.yaml +41 -0
  326. data/lib/mako/data/template_creator/src/Creator.mxml +0 -0
  327. data/lib/mako/data/template_creator/src/assets/images/RichTextEditor.png +0 -0
  328. data/lib/mako/data/template_creator/src/assets/materia/images/DefaultError.png +0 -0
  329. data/lib/mako/data/template_creator/src/assets/materia/images/barbgfill.png +0 -0
  330. data/lib/mako/data/template_creator/src/assets/materia/images/barshadow.png +0 -0
  331. data/lib/mako/data/template_creator/src/assets/materia/images/bold.png +0 -0
  332. data/lib/mako/data/template_creator/src/assets/materia/images/bullets.png +0 -0
  333. data/lib/mako/data/template_creator/src/assets/materia/images/center.png +0 -0
  334. data/lib/mako/data/template_creator/src/assets/materia/images/close-x.png +0 -0
  335. data/lib/mako/data/template_creator/src/assets/materia/images/fullscreenPopup_close.png +0 -0
  336. data/lib/mako/data/template_creator/src/assets/materia/images/importIcon.png +0 -0
  337. data/lib/mako/data/template_creator/src/assets/materia/images/italic.png +0 -0
  338. data/lib/mako/data/template_creator/src/assets/materia/images/justify.png +0 -0
  339. data/lib/mako/data/template_creator/src/assets/materia/images/left.png +0 -0
  340. data/lib/mako/data/template_creator/src/assets/materia/images/oml-href-disabled.png +0 -0
  341. data/lib/mako/data/template_creator/src/assets/materia/images/oml-href.png +0 -0
  342. data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
  343. data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink.png +0 -0
  344. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-delete.png +0 -0
  345. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
  346. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-edit.png +0 -0
  347. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip.png +0 -0
  348. data/lib/mako/data/template_creator/src/assets/materia/images/pencil.png +0 -0
  349. data/lib/mako/data/template_creator/src/assets/materia/images/right.png +0 -0
  350. data/lib/mako/data/template_creator/src/assets/materia/images/underline.png +0 -0
  351. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayButton.png +0 -0
  352. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
  353. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
  354. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
  355. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
  356. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
  357. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
  358. data/lib/mako/data/template_creator/src/assets/materia/styles/creatorStyle.css +0 -0
  359. data/lib/mako/data/template_creator/src/assets/materia/styles/style.css +0 -0
  360. data/lib/mako/data/template_creator/src/assets/materia/swf/embeddedfonts.swf +0 -0
  361. data/lib/mako/data/template_creator/src/assets/materia/swf/helpBubble.swf +0 -0
  362. data/lib/mako/data/template_creator/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
  363. data/lib/mako/data/template_creator/src/assets/materia/swf/videobg.swf +0 -0
  364. data/lib/mako/data/template_creator/src/components/SmallRichTextEditor.mxml +0 -0
  365. data/lib/mako/data/template_creator/src/components/SmallRichTextEditorToolbar.mxml +0 -0
  366. data/lib/mako/data/templates/html/README.md +0 -0
  367. data/lib/mako/data/templates/html/_creator/build.yaml +0 -0
  368. data/lib/mako/data/templates/html/_creator/creator.html +0 -0
  369. data/lib/mako/data/templates/html/_creator/css/creator.less +0 -0
  370. data/lib/mako/data/templates/html/_creator/js/creator.coffee +0 -0
  371. data/lib/mako/data/templates/html/_creator/test.html +0 -0
  372. data/lib/mako/data/templates/html/_engine/build.yaml +0 -0
  373. data/lib/mako/data/templates/html/_engine/css/widget.scss +0 -0
  374. data/lib/mako/data/templates/html/_engine/js/widget.coffee +0 -0
  375. data/lib/mako/data/templates/html/_engine/widget.html +0 -0
  376. data/lib/mako/data/templates/html/_icons/icon-275.png +0 -0
  377. data/lib/mako/data/templates/html/_icons/icon-394.png +0 -0
  378. data/lib/mako/data/templates/html/_icons/icon-60.png +0 -0
  379. data/lib/mako/data/templates/html/_icons/icon-92.png +0 -0
  380. data/lib/mako/data/templates/html/_score/score_module.php +0 -0
  381. data/lib/mako/data/templates/html/_score/test_score_module.php +0 -0
  382. data/lib/mako/data/templates/html/_screen-shots/1-thumb.png +0 -0
  383. data/lib/mako/data/templates/html/_screen-shots/1.png +0 -0
  384. data/lib/mako/data/templates/html/_screen-shots/2-thumb.png +0 -0
  385. data/lib/mako/data/templates/html/_screen-shots/2.png +0 -0
  386. data/lib/mako/data/templates/html/_screen-shots/3-thumb.png +0 -0
  387. data/lib/mako/data/templates/html/_screen-shots/3.png +0 -0
  388. data/lib/mako/data/templates/html/build.yaml +0 -0
  389. data/lib/mako/data/templates/html/demo.yaml +0 -0
  390. data/lib/mako/scaffold.rb +3 -1
  391. data/lib/mako/test/test_build.rb +6 -0
  392. data/lib/mako/test/test_path.rb +6 -0
  393. data/lib/mako/test/test_scaffold.rb +40 -0
  394. metadata +13 -75
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ data.tar.gz: ab05c1d4ad519e4c9b4e4d02f77c9a4ee61a23db
4
+ metadata.gz: 9899032ff96705b5014cdf0052c9281eeee00c88
5
+ SHA512:
6
+ data.tar.gz: 6475de9afc105faf1630cbb98a2228531a2f5403019ca071ab8b0ddd51f6b01ab85b069ccee52d01ff96cf11349fbfef8ec0578cba3c95a39face77a2246f970
7
+ metadata.gz: 4eddd22db26c15a87590a7780f8aac1a41d1c4530f2faee70bba9c33c0d37e92f76336019bf80613bdc2e93c8febb861b8a81c0209007339758c4018372b8e3f
data/bin/mako CHANGED
@@ -3,131 +3,99 @@
3
3
  require 'trollop'
4
4
  require 'mako/scaffold'
5
5
  require 'mako/build'
6
-
7
-
8
- # Add some config functionality onto the hashes
9
- class Hash
10
- def compiles_widget?
11
- !self[:type].nil? && ['compile_swf', 'compile_html'].include?(self[:type])
12
- end
13
-
14
- def contains_configs?
15
- !self[:type].nil? && self[:type] == 'config'
6
+ require 'yaml'
7
+
8
+ class Mako
9
+
10
+ def initialize
11
+ @default = {}
12
+ @default[:sdk] = nil
13
+ @default[:dev_kit] = File.expand_path(File.dirname(__FILE__)+"/../")+"/lib/mako/data/"
14
+ @default[:app_class] = 'src/Engine.as'
15
+ @default[:configs] = ['build.yaml']
16
+ @default[:target] = 'compiled_widget.swf'
17
+ @default[:output_path] = Dir.pwd+'/_output'
18
+ @default[:stop_on_fail] = true
19
+ @default[:type] = "html"
20
+ @default[:skip_optimize] = false
16
21
  end
17
22
 
18
- def is_package?
19
- !self[:type].nil? && self[:type] == 'package'
20
- end
21
-
22
- def is_copy_type?
23
- !self[:type].nil? && self[:type] == 'copy'
24
- end
25
- end
23
+ def self.finalize_settings (args, global_args)
24
+ args.merge! global_args
26
25
 
27
- class String
28
- def pretty
29
- self.downcase.gsub(/\W/,'-').squeeze('-').chomp('-')
26
+ # user's environment settings
27
+ settings = {}
28
+ settings[:sdk] = ENV["MAKO_FLEX_SDK"] unless ENV["MAKO_FLEX_SDK"].nil?
29
+ settings[:dev_kit] = File.expand_path(File.dirname(__FILE__)+"/../")+"/lib/mako/data/"
30
+ settings
30
31
  end
31
- end
32
-
33
- # inti defaults
34
- default = {}
35
- default[:sdk] = nil
36
- default[:dev_kit] = nil
37
- default[:app_class] = 'src/Engine.as'
38
- default[:configs] = ['build.yaml']
39
- default[:target] = 'compiled_widget.swf'
40
- default[:output_path] = Dir.pwd+'/_output'
41
- default[:stop_on_fail] = true
42
-
43
- SUB_COMMANDS = %w(scaffold build)
44
- global_args = Trollop::options do
45
- banner <<-EOS
46
- Mako is a compiler for Materia that can create a development widget skeleton for building new widgets, or can take a developed widget and compile it into an installable .wigt file for Materia.
47
-
48
- Usage:
49
- mako scaffold <widget> [options]+ Creates a scaffold of a development widget.
50
- mako build <widget> [options]+ Builds a widget for instillation into Materia.
51
-
52
-
53
- Options:
54
- EOS
55
-
56
- opt :output_path, "Path to place all compiled", :type => :string
57
- opt :watch, "Watch for changes and rebuild updated files", :type => :boolean, :default => false
58
- opt :sdk, "Path to the Flex SDK", :type => :string
59
- opt :configs, "Path to the build yaml to load", :type => :strings
60
- opt :target, "Output swf file name", :type => :string
61
- opt :skip_optimize, "Skip optimization"
62
- opt :stop_on_fail, "Stop execution if compile fails", :type => :boolean
63
- opt :skip_package, "Don't build packages?", :type => :boolean, :default => false
64
- stop_on SUB_COMMANDS
65
- end
66
-
67
- cmd = ARGV.shift # get the subcommand
68
-
69
- args = case cmd
70
- when "scaffold"
71
- Trollop::options do
72
- banner <<-EOS
73
- Creates a scaffold of a development widget. This can either be an html or flash widget
74
-
75
- Usage:
76
- mako scaffold <widget> [options] Creates a scaffold of a development widget.
77
32
 
33
+ def process_cmd
34
+ help = YAML.load_file(File.expand_path('../../lib/mako/data/strings.yaml', __FILE__))
78
35
 
79
- Options:
80
- EOS
81
-
82
- opt :type, "The type of scaffold that is to be built. Defaults to html", :type => :string, :default => 'html'
83
- opt :dev_kit, "Path to dev kit", :type => :string
36
+ global_args = Trollop::options do
37
+ banner help['mako']
38
+ stop_on %w(scaffold build develop test) # Subcommands
84
39
  end
85
- # Options and banner for building a widget
86
- when "build"
87
- Trollop::options do
88
- banner <<-EOS
89
- Compiles a widget into a .wigt file in the output directory.
90
-
91
- Usage:
92
- mako scaffold <widget> [options] Creates a scaffold of a development widget.
93
40
 
94
-
95
- Options:
96
- EOS
41
+ cmd = ARGV.shift # get the subcommand
42
+
43
+ case cmd
44
+ when "scaffold"
45
+ args = Trollop::options do
46
+ banner help['scaffold']
47
+ opt :type, "The type of scaffold that is to be built. Defaults to html", :type => :string, :default => 'html'
48
+ opt :dev_kit, "Path to dev kit", :type => :string
49
+ end
50
+
51
+ Trollop::die "Missing widget name: mako scaffold \"Widget Name\"".red if ARGV[0].nil?
52
+ settings = Mako.finalize_settings args, global_args
53
+ @default[:output_path] = Dir.pwd
54
+ scaffold = Scaffold.new settings, @default, args
55
+ scaffold.create ARGV[0]
56
+
57
+ when "build" # BUILD A WIDGET PACKAGE
58
+ args = Trollop::options do
59
+ banner help['build']
60
+ opt :output_path, "Path to place output", :short => '-o', :type => :string
61
+ opt :sdk, "Path to the Flex SDK", :short => '-k', :type => :string
62
+ opt :skip_optimize, "Skip optimization", :short => '-s'
63
+ opt :skip_package, "Don't build packages?", :short => '-p', :type => :boolean, :default => false
64
+ end
65
+
66
+ settings = Mako.finalize_settings args, global_args
67
+ build = Build.new settings, @default, args
68
+ configs = build.prioritize :configs, args, @default
69
+ build.compile configs
70
+
71
+ when "develop" # BUILD FOR MATERIA PLATFORM DEVELOPMENT
72
+ args = Trollop::options do
73
+ banner help['develop']
74
+ opt :sdk, "Path to the Flex SDK", :short => '-k', :type => :string
75
+ end
76
+ Trollop::die "Missing Materia Platform sanbox dir: mako develop /dir/to/static/develop".red if ARGV[0].nil?
77
+ args[:output_path] = ARGV[0]
78
+ args[:skip_package] = true
79
+ args[:skip_optimize] = true
80
+
81
+ settings = Mako.finalize_settings args, global_args
82
+ build = Build.new settings, @defaults, args
83
+ configs = build.prioritize :configs, args, @default
84
+ build.compile configs
85
+
86
+ when "test" # Test
87
+ args = Trollop::options do
88
+ banner help['test']
89
+ end
90
+ require File.expand_path(File.dirname(__FILE__)+"/../")+"/lib/mako/test/test_scaffold.rb"
91
+
92
+ when !cmd.nil? # Unkown
93
+ Trollop::die "unknown subcommand #{cmd.inspect}".red
94
+ else # If there is no sub command at all
95
+ puts 'Mako Version: 1.0.0'.green
96
+ puts help['mako']
97
97
  end
98
- # If the sub command isn't recognized
99
- when !cmd.nil?
100
- Trollop::die "unknown subcommand #{cmd.inspect}".red
101
- # If there is no sub command at all
102
- else
103
- Trollop::die "mako needs at least one sub command".red
98
+ end
104
99
  end
105
100
 
106
- args.merge! global_args
107
-
108
- # user's environment settings
109
- settings = {}
110
- settings[:sdk] = ENV["MAKO_FLEX_SDK"] unless ENV["MAKO_FLEX_SDK"].nil?
111
- settings[:dev_kit] = File.expand_path(File.dirname(__FILE__)+"/../")+"/lib/mako/data/"
112
-
113
-
114
- case cmd
115
- when "scaffold"
116
- # Scaffold
117
- if ARGV[0].nil?
118
- Trollop::die "Widget name must be defined: mako scaffold \"Widget Name\"".red
119
- end
120
-
121
- default[:output_path] = Dir.pwd
122
-
123
- scaffold = Scaffold.new(settings, default, args)
124
-
125
- scaffold.create ARGV[0]
126
-
127
- when "build"
128
-
129
- build = Build.new(settings, default, args)
130
- configs = build.prioritize(:configs, args, default)
131
-
132
- build.compile configs
133
- end
101
+ Mako.new.process_cmd()
data/lib/mako/build.rb CHANGED
@@ -4,6 +4,30 @@ require 'colorize'
4
4
  require 'fileutils'
5
5
  require 'zip/zip'
6
6
 
7
+ class String
8
+ def pretty
9
+ self.downcase.gsub(/\W/,'-').squeeze('-').chomp('-')
10
+ end
11
+ end
12
+
13
+ # Add some config functionality onto the hashes
14
+ class Hash
15
+ def compiles_widget?
16
+ !self[:type].nil? && ['compile_swf', 'compile_html'].include?(self[:type])
17
+ end
18
+
19
+ def contains_configs?
20
+ !self[:type].nil? && self[:type] == 'config'
21
+ end
22
+
23
+ def is_package?
24
+ !self[:type].nil? && self[:type] == 'package'
25
+ end
26
+
27
+ def is_copy_type?
28
+ !self[:type].nil? && self[:type] == 'copy'
29
+ end
30
+ end
7
31
 
8
32
  class Build < Path
9
33
 
@@ -14,33 +38,43 @@ class Build < Path
14
38
  end
15
39
 
16
40
  #process_configs output, prioritize(:configs, args, default), default, settings, args
17
- def compile configs, current_path=Dir.pwd
18
- output = prepare_output_path @args, @default
41
+ def compile configs, current_path=Dir.pwd, output = nil
42
+ output = output.nil? ? prepare_output_path(@args, @default) : output
19
43
  configs.each do |config|
20
-
21
- dir = File.dirname absolute_path(config, current_path)
44
+ source = File.dirname absolute_path(config, current_path)
22
45
  cfg = load_symbolized_yaml absolute_path(config, current_path)
23
46
 
47
+ if cfg == false
48
+ abort
49
+ end
24
50
 
51
+ # build.yaml describes a single creator or engine that needs to be compiled?
25
52
  if cfg.compiles_widget?
26
53
  if cfg[:type] == 'compile_swf'
27
- compile_swc output, dir, cfg
54
+ compile_swc output, source, cfg
28
55
  end
29
56
  if cfg[:type] == 'compile_html'
30
- compile_html output, dir, cfg
57
+ compile_html output, source, cfg
31
58
  end
59
+
60
+ # build.yaml describes a single creator or engine that doesnt need compiling
32
61
  elsif cfg.is_copy_type?
33
- compile_copy output, dir, cfg
62
+ copy_to_output output, source, cfg
63
+
64
+ # build.yaml describes a list of configs to run compile on
34
65
  elsif cfg.contains_configs?
35
66
  # for configs that only contain other configs but arent packages
36
- compile(output, cfg[:configs], dir)
67
+ compile output, cfg[:configs], source
68
+
69
+ # build.yaml describes a widget package (creator and engine)
37
70
  elsif cfg.is_package?
38
- # for package configs
39
- if @args[:skip_package] != true
40
- package(dir, output, cfg)
71
+ if @args[:skip_package]
72
+ compile_package source, output, cfg
41
73
  else
42
- compile [cfg[:engine], cfg[:creator]], dir
43
- optimize_staged_files(output) unless args[:skip_optimize]
74
+ staging_area = Dir.mktmpdir '-mako'
75
+ compile_package source, staging_area, cfg
76
+ zip_package staging_area, output, cfg
77
+ FileUtils.rm_r tmp_dir, :force => true
44
78
  end
45
79
  else
46
80
  puts "#{config} unknown config type".red
@@ -60,6 +94,7 @@ class Build < Path
60
94
  if contents
61
95
  return string_keys_to_symbols contents
62
96
  end
97
+ puts "Yaml file not valid #{yaml}".red
63
98
  false
64
99
  end
65
100
 
@@ -123,7 +158,7 @@ class Build < Path
123
158
  # copy and compile any html, js, coffeescript, saas, css, or images given the settings
124
159
  def compile_html output_dir, base_dir, config
125
160
 
126
- compile_copy output_dir, base_dir, config
161
+ copy_to_output output_dir, base_dir, config
127
162
 
128
163
  coffee = Dir[output_dir+'/**/*.coffee']
129
164
  if coffee.any?
@@ -155,7 +190,7 @@ class Build < Path
155
190
  remove_html_dev_helpers output_dir
156
191
  end
157
192
 
158
- def compile_copy output, base_dir, config
193
+ def copy_to_output output, base_dir, config
159
194
 
160
195
  base_dir << '/' unless base_dir.end_with? '/'
161
196
  output_dir = output.dup
@@ -254,64 +289,61 @@ class Build < Path
254
289
  end
255
290
  end
256
291
 
292
+ def build_staging_area source, output_dir
293
+ FileUtils.rm_r output_dir, :force=>true
257
294
 
258
- def package source, output_dir, cfg
259
-
260
- # setup all the directories
261
- output_dir = output_dir.dup # output_dir is frozen typically and I don't know ruby enough to understand why
262
- output_dir << '/' unless output_dir.end_with? '/'
263
- source << '/' unless source.end_with? '/'
264
- name = load_yaml(source+'install.yaml')['general']['name'].pretty
265
- stage = Dir::pwd+'/wigt'
266
- FileUtils.rm_r stage, :force=>true
267
-
268
- Dir::mkdir stage
269
- Dir::mkdir stage+'/swf'
270
- Dir::mkdir stage+'/img'
271
- Dir::mkdir stage+'/img/screen-shots'
272
- Dir::mkdir stage+'/_score-modules'
273
- Dir::mkdir stage+'/_assets'
295
+ Dir::mkdir output_dir
296
+ Dir::mkdir output_dir+'/swf'
297
+ Dir::mkdir output_dir+'/img'
298
+ Dir::mkdir output_dir+'/img/screen-shots'
299
+ Dir::mkdir output_dir+'/_score-modules'
300
+ Dir::mkdir output_dir+'/_assets'
274
301
 
275
302
  # copy everything to where it needs to be
276
- FileUtils.cp_r Dir[source+'swf/*'], stage+'/swf'
277
- FileUtils.cp_r Dir[source+'img/*'], stage+'/img'
278
- FileUtils.cp_r Dir[source+'_icons/*'], stage+'/img'
279
- FileUtils.cp_r Dir[source+'_screen-shots/*'], stage+'/img/screen-shots'
280
- FileUtils.cp_r Dir[source+'_assets/*'], stage+'/_assets'
281
- FileUtils.cp source+'install.yaml', stage+'/install.yaml'
282
- FileUtils.cp source+'demo.yaml', stage+'/demo.yaml'
303
+ FileUtils.cp_r Dir[source+'swf/*'], output_dir+'/swf'
304
+ FileUtils.cp_r Dir[source+'img/*'], output_dir+'/img'
305
+ FileUtils.cp_r Dir[source+'_icons/*'], output_dir+'/img'
306
+ FileUtils.cp_r Dir[source+'_screen-shots/*'], output_dir+'/img/screen-shots'
307
+ FileUtils.cp_r Dir[source+'_assets/*'], output_dir+'/_assets'
308
+ FileUtils.cp source+'install.yaml', output_dir+'/install.yaml'
309
+ FileUtils.cp source+'demo.yaml', output_dir+'/demo.yaml'
283
310
 
284
311
  if File::exists? source+'_score/score_module.php'
285
- FileUtils.cp source+'_score/score_module.php', stage+'/_score-modules/score_module.php'
286
- FileUtils.cp source+'_score/test_score_module.php', stage+'/_score-modules/test_score_module.php'
312
+ FileUtils.cp source+'_score/score_module.php', output_dir+'/_score-modules/score_module.php'
313
+ FileUtils.cp source+'_score/test_score_module.php', output_dir+'/_score-modules/test_score_module.php'
287
314
  end
288
315
 
289
- # run makobuild on each part of this package
290
- # this will typically be once per engine/creator of this package
291
- if File::exists? source+'build.yaml'
292
- command = "mako --configs #{source}build.yaml --output-path #{stage}/ --skip-package"
293
- command << " --skip-optimize" if @args[:skip_optimize]
294
- command << " build"
295
- unless system command
296
- FileUtils.rm_r stage, :force=>true
297
- abort "Package Failure".red
298
- end
299
- end
316
+ output_dir
317
+ end
318
+
319
+ def compile_package source, output_dir, cfg
320
+ source << '/' unless source.end_with? '/'
321
+
322
+ stage = build_staging_area source, output_dir
300
323
 
301
- optimize_staged_files(stage) unless @args[:skip_optimize]
324
+ compile [cfg[:engine], cfg[:creator]], Dir.pwd, stage
325
+ optimize_staged_files(output_dir) unless @args[:skip_optimize]
326
+ end
327
+
328
+
329
+ def zip_package source, output_dir, cfg
330
+ # setup all the directories
331
+ output_dir = output_dir.dup # output_dir is frozen typically and I don't know ruby enough to understand why
332
+ output_dir << '/' unless output_dir.end_with? '/'
333
+ source << '/' unless source.end_with? '/'
334
+ name = load_yaml(source+'install.yaml')['general']['name'].pretty
302
335
 
303
336
  # zip it
304
337
  zip_file = "#{output_dir}#{name}.wigt"
305
338
  FileUtils.rm zip_file, :force=>true
306
339
  Zip::ZipFile.open(zip_file, Zip::ZipFile::CREATE) do |zip|
307
- Dir[stage+'/**/**'].each do |file|
308
- zip.add file.sub(stage+'/', ''), file
340
+ Dir[source+'**/**'].each do |file|
341
+ zip.add file.sub(source, ''), file
309
342
  end
310
343
  end
311
344
 
312
345
  # done, cleanup
313
346
  puts "[Package Finished] #{name} #{zip_file}".green
314
- FileUtils.rm_r stage, :force=>true
315
347
  end
316
348
 
317
349
  def optimize_staged_files path
File without changes
File without changes