fanforce-plugin-factory 0.41.0 → 1.6.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. data/.gitignore +1 -0
  2. data/.ruby-version +1 -0
  3. data/.yardopts +5 -0
  4. data/.yardopts.rb +1 -0
  5. data/Gemfile +9 -0
  6. data/README.md +40 -75
  7. data/Rakefile +61 -4
  8. data/fanforce-plugin-factory.gemspec +21 -21
  9. data/lib/fanforce/plugin_factory.rb +16 -58
  10. data/lib/fanforce/plugin_factory/Rakefile +51 -0
  11. data/lib/fanforce/plugin_factory/Routes.rb +33 -0
  12. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/_bootstrap.scss +2 -0
  13. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/_common.scss +1 -0
  14. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/_directives.scss +7 -0
  15. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/_font-awesome.scss +1 -0
  16. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/_ui-select.scss +3 -0
  17. data/lib/fanforce/plugin_factory/{assets/lib/common → asset_framework/plugin_factory/bootstrap}/_bootstrap-overrides.scss +2 -0
  18. data/lib/fanforce/plugin_factory/{assets/lib/vendors/bootstrap/css → asset_framework/plugin_factory/bootstrap}/bootstrap.css +2 -2
  19. data/lib/fanforce/plugin_factory/{assets/lib/vendors/bootstrap/js → asset_framework/plugin_factory/bootstrap}/bootstrap.js +0 -0
  20. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/bootstrap.min.css +7 -0
  21. data/lib/fanforce/plugin_factory/{assets/lib/vendors/bootstrap/js → asset_framework/plugin_factory/bootstrap}/bootstrap.min.js +0 -0
  22. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/glyphicons-halflings-regular.eot +0 -0
  23. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/glyphicons-halflings-regular.svg +229 -0
  24. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  25. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/glyphicons-halflings-regular.woff +0 -0
  26. data/lib/fanforce/plugin_factory/{assets/lib → asset_framework/plugin_factory}/common/_mixins.scss +2 -1
  27. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives.coffee +1 -0
  28. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/error/_error.scss +6 -0
  29. data/lib/fanforce/plugin_factory/{assets/lib/common/module-error → asset_framework/plugin_factory/directives/error}/arrow-left.png +0 -0
  30. data/lib/fanforce/plugin_factory/{assets/lib/common/module-error → asset_framework/plugin_factory/directives/error}/icon-error.png +0 -0
  31. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/initiative-footer/_initiative-footer.coffee +16 -0
  32. data/lib/fanforce/plugin_factory/{assets/lib/common/_module-add-initiative-footer.scss → asset_framework/plugin_factory/directives/initiative-footer/_initiative-footer.scss} +4 -1
  33. data/lib/fanforce/plugin_factory/{assets/lib/common/_module-initiative-searcher.scss → asset_framework/plugin_factory/directives/initiative-searcher/_initiative-searcher.scss} +14 -13
  34. data/lib/fanforce/plugin_factory/{assets/lib/common/module-initiative-searcher → asset_framework/plugin_factory/directives/initiative-searcher}/icon-search.png +0 -0
  35. data/lib/fanforce/plugin_factory/{assets/lib/common/module-initiative-searcher → asset_framework/plugin_factory/directives/initiative-searcher}/spinner.gif +0 -0
  36. data/lib/fanforce/plugin_factory/{assets/lib/common/module-initiative-searcher → asset_framework/plugin_factory/directives/initiative-searcher}/sprite-arrows.png +0 -0
  37. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/loading/_loading.coffee +4 -0
  38. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/loading/_loading.scss +4 -0
  39. data/lib/fanforce/plugin_factory/{assets/js/add_source_popup.js → asset_framework/plugin_factory/directives/saving-to-server/_saving-to-server.coffee} +0 -0
  40. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/saving-to-server/_saving-to-server.scss +6 -0
  41. data/lib/fanforce/plugin_factory/{assets/lib/common/module-saving-initiative → asset_framework/plugin_factory/directives/saving-to-server}/spinner.gif +0 -0
  42. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/start-arrow/_start-arrow.coffee +8 -0
  43. data/lib/fanforce/plugin_factory/{assets/lib/common/_module-start-here.scss → asset_framework/plugin_factory/directives/start-arrow/_start-arrow.scss} +5 -4
  44. data/lib/fanforce/plugin_factory/{assets/lib/common/module-start-here → asset_framework/plugin_factory/directives/start-arrow}/arrow.png +0 -0
  45. data/lib/fanforce/plugin_factory/{assets/lib/common/_module-video-thumbnail.scss → asset_framework/plugin_factory/directives/video-thumbnail/_video-thumbnail.scss} +4 -4
  46. data/lib/fanforce/plugin_factory/{assets/lib/common/module-video-thumbnail → asset_framework/plugin_factory/directives/video-thumbnail}/icon-play.png +0 -0
  47. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/font-awesome.coffee +1 -0
  48. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/font → asset_framework/plugin_factory/font-awesome}/FontAwesome.otf +0 -0
  49. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/css → asset_framework/plugin_factory/font-awesome}/font-awesome.css +2 -2
  50. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/css → asset_framework/plugin_factory/font-awesome}/font-awesome.min.css +0 -0
  51. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/font → asset_framework/plugin_factory/font-awesome}/fontawesome-webfont.eot +0 -0
  52. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/font → asset_framework/plugin_factory/font-awesome}/fontawesome-webfont.svg +0 -0
  53. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/font → asset_framework/plugin_factory/font-awesome}/fontawesome-webfont.ttf +0 -0
  54. data/lib/fanforce/plugin_factory/{assets/lib/vendors/font-awesome/font → asset_framework/plugin_factory/font-awesome}/fontawesome-webfont.woff +0 -0
  55. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/lib.coffee +1 -0
  56. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/lib/ng-focus-blur.js +68 -0
  57. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/lib/ng-visible.js +7 -0
  58. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/ui-select.coffee +1 -0
  59. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/ui-select/select.css +171 -0
  60. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/ui-select/select.js +1281 -0
  61. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/ui-select/select_override.scss +1 -0
  62. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/ui-select/selectize.default.css +443 -0
  63. data/lib/fanforce/plugin_factory/cli.rb +5 -0
  64. data/lib/fanforce/plugin_factory/cli/lib/bitbucket.rb +77 -0
  65. data/lib/fanforce/plugin_factory/cli/lib/bundler.rb +21 -0
  66. data/lib/fanforce/plugin_factory/cli/lib/env.rb +96 -0
  67. data/lib/fanforce/plugin_factory/cli/lib/git.rb +59 -0
  68. data/lib/fanforce/plugin_factory/cli/lib/heroku.rb +94 -0
  69. data/lib/fanforce/plugin_factory/cli/lib/iron.rb +71 -0
  70. data/lib/fanforce/plugin_factory/cli/lib/pow.rb +46 -0
  71. data/lib/fanforce/plugin_factory/cli/lib/scaffolding.rb +74 -0
  72. data/lib/fanforce/plugin_factory/cli/lib/scaffolding_file.rb +510 -0
  73. data/lib/fanforce/plugin_factory/cli/lib/uranium.rb +77 -0
  74. data/lib/fanforce/plugin_factory/cli/lib/utils.rb +57 -0
  75. data/lib/fanforce/plugin_factory/cli/scripts/config.rb +9 -0
  76. data/lib/fanforce/plugin_factory/cli/scripts/create.rb +64 -0
  77. data/lib/fanforce/plugin_factory/cli/scripts/destroy.rb +61 -0
  78. data/lib/fanforce/plugin_factory/cli/scripts/diff.rb +156 -0
  79. data/lib/fanforce/plugin_factory/cli/scripts/push.rb +88 -0
  80. data/lib/fanforce/plugin_factory/cli/scripts/restart.rb +41 -0
  81. data/lib/fanforce/plugin_factory/cli/scripts/setup.rb +70 -0
  82. data/lib/fanforce/plugin_factory/cli/scripts/update.rb +132 -0
  83. data/lib/fanforce/plugin_factory/cli_directory_of_plugins.rb +51 -0
  84. data/lib/fanforce/plugin_factory/cli_single_plugin.rb +52 -0
  85. data/lib/fanforce/plugin_factory/controllers/base_controller.rb +15 -0
  86. data/lib/fanforce/plugin_factory/core_config.rb +94 -0
  87. data/lib/fanforce/plugin_factory/directive_views/initiative-footer.haml +8 -0
  88. data/lib/fanforce/plugin_factory/load.rb +7 -0
  89. data/lib/fanforce/plugin_factory/load_iron_worker.rb +2 -0
  90. data/lib/fanforce/plugin_factory/load_sprockets.rb +2 -0
  91. data/lib/fanforce/plugin_factory/plugin.rb +60 -0
  92. data/lib/fanforce/plugin_factory/scaffolding/._.gitignore.registry +1 -0
  93. data/lib/fanforce/plugin_factory/scaffolding/._Gemfile.registry +3 -0
  94. data/lib/fanforce/plugin_factory/scaffolding/._Rakefile.registry +3 -0
  95. data/lib/fanforce/plugin_factory/scaffolding/._config.json.registry +2 -0
  96. data/lib/fanforce/plugin_factory/scaffolding/._config.ru.registry +4 -0
  97. data/lib/fanforce/plugin_factory/scaffolding/._favicon.ico.registry +1 -0
  98. data/lib/fanforce/plugin_factory/scaffolding/._robots.txt.registry +3 -0
  99. data/lib/fanforce/plugin_factory/scaffolding/.gitignore +27 -0
  100. data/lib/fanforce/plugin_factory/scaffolding/Gemfile +9 -0
  101. data/lib/fanforce/plugin_factory/scaffolding/Rakefile +7 -0
  102. data/lib/fanforce/plugin_factory/scaffolding/Routes.rb +67 -0
  103. data/lib/fanforce/plugin_factory/scaffolding/assets/css/._fembedded.scss.registry +4 -0
  104. data/lib/fanforce/plugin_factory/scaffolding/assets/css/._promotional.scss.registry +4 -0
  105. data/lib/fanforce/plugin_factory/scaffolding/assets/css/._visitor.scss.registry +4 -0
  106. data/lib/fanforce/plugin_factory/scaffolding/assets/css/fembedded.scss +24 -0
  107. data/lib/fanforce/plugin_factory/scaffolding/assets/css/promotional.scss +33 -0
  108. data/lib/fanforce/plugin_factory/scaffolding/assets/css/visitor.scss +61 -0
  109. data/lib/fanforce/plugin_factory/scaffolding/assets/img/._icon-16.png.registry +1 -0
  110. data/lib/fanforce/plugin_factory/scaffolding/assets/img/._icon-32.png.registry +1 -0
  111. data/lib/fanforce/plugin_factory/scaffolding/assets/img/._icon-42.png.registry +1 -0
  112. data/lib/fanforce/plugin_factory/scaffolding/assets/img/._marketplace.png.registry +1 -0
  113. data/lib/fanforce/plugin_factory/{assets → scaffolding/assets}/img/icon-16.png +0 -0
  114. data/lib/fanforce/plugin_factory/{assets → scaffolding/assets}/img/icon-32.png +0 -0
  115. data/lib/fanforce/plugin_factory/{assets → scaffolding/assets}/img/icon-42.png +0 -0
  116. data/lib/fanforce/plugin_factory/scaffolding/assets/img/marketplace.png +0 -0
  117. data/lib/fanforce/plugin_factory/scaffolding/assets/img/promotional/._fanforce_bg.png.registry +1 -0
  118. data/lib/fanforce/plugin_factory/scaffolding/assets/img/promotional/._icon-42.png.registry +1 -0
  119. data/lib/fanforce/plugin_factory/scaffolding/assets/img/promotional/._icon-plus.png.registry +1 -0
  120. data/lib/fanforce/plugin_factory/{assets/lib → scaffolding/assets/img}/promotional/fanforce_bg.png +0 -0
  121. data/lib/fanforce/plugin_factory/{assets/lib → scaffolding/assets/img}/promotional/icon-42.png +0 -0
  122. data/lib/fanforce/plugin_factory/scaffolding/assets/img/promotional/icon-plus.png +0 -0
  123. data/lib/fanforce/plugin_factory/scaffolding/assets/js/._fembedded-app.coffee.registry +5 -0
  124. data/lib/fanforce/plugin_factory/scaffolding/assets/js/._fembedded.js.registry +3 -0
  125. data/lib/fanforce/plugin_factory/scaffolding/assets/js/._promotional.js.registry +3 -0
  126. data/lib/fanforce/plugin_factory/scaffolding/assets/js/fembedded-app.coffee +11 -0
  127. data/lib/fanforce/plugin_factory/scaffolding/assets/js/fembedded.js +12 -0
  128. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/._cookie.coffee.registry +3 -0
  129. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/._filters.coffee.registry +3 -0
  130. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/._utils.coffee.registry +3 -0
  131. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/cookie.coffee +24 -0
  132. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/filters.coffee +9 -0
  133. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/utils.coffee +40 -0
  134. data/lib/fanforce/plugin_factory/scaffolding/assets/js/promotional.js +4 -0
  135. data/lib/fanforce/plugin_factory/scaffolding/config.json +24 -0
  136. data/lib/fanforce/plugin_factory/scaffolding/config.ru +8 -0
  137. data/lib/fanforce/plugin_factory/{public → scaffolding}/favicon.ico +0 -0
  138. data/lib/fanforce/plugin_factory/scaffolding/layouts/._fembedded.haml.registry +4 -0
  139. data/lib/fanforce/plugin_factory/scaffolding/layouts/._promotional.haml.registry +2 -0
  140. data/lib/fanforce/plugin_factory/scaffolding/layouts/._visitor.haml.registry +6 -0
  141. data/lib/fanforce/plugin_factory/scaffolding/layouts/fembedded.haml +26 -0
  142. data/lib/fanforce/plugin_factory/{layouts → scaffolding/layouts}/promotional.haml +6 -6
  143. data/lib/fanforce/plugin_factory/{layouts/engage.haml → scaffolding/layouts/visitor.haml} +10 -7
  144. data/lib/fanforce/plugin_factory/scaffolding/robots.txt +7 -0
  145. data/lib/fanforce/plugin_factory/scaffolding/views/._index.haml.registry +3 -0
  146. data/lib/fanforce/plugin_factory/{views → scaffolding/views}/index.haml +13 -7
  147. data/lib/fanforce/plugin_factory/sinatra/_load.rb +87 -0
  148. data/lib/fanforce/plugin_factory/sinatra/error_handling.rb +48 -0
  149. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_behavior.rb +19 -0
  150. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_broadcaster.rb +7 -0
  151. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_connector.rb +11 -0
  152. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_identifier.rb +3 -0
  153. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_js_widget.rb +8 -0
  154. data/lib/fanforce/plugin_factory/sinatra/helper_routes/plugin.rb +50 -0
  155. data/lib/fanforce/plugin_factory/sinatra/helpers/assets.rb +23 -0
  156. data/lib/fanforce/plugin_factory/sinatra/helpers/css_frameworks.rb +70 -0
  157. data/lib/fanforce/plugin_factory/sinatra/helpers/fanforce.rb +18 -0
  158. data/lib/fanforce/plugin_factory/{config → sinatra}/helpers/json.rb +2 -2
  159. data/lib/fanforce/plugin_factory/sinatra/helpers/ractive.rb +45 -0
  160. data/lib/fanforce/plugin_factory/sprockets/compiler.rb +5 -11
  161. data/lib/fanforce/plugin_factory/sprockets/hacks.rb +2 -2
  162. data/lib/fanforce/plugin_factory/version.rb +2 -2
  163. metadata +201 -195
  164. data/.rbenv-gemsets +0 -1
  165. data/.rbenv-version +0 -1
  166. data/lib/fanforce/plugin_factory.rake +0 -72
  167. data/lib/fanforce/plugin_factory/_init_sinatra.rb +0 -54
  168. data/lib/fanforce/plugin_factory/assets/css/add_edit_initiative.scss +0 -1
  169. data/lib/fanforce/plugin_factory/assets/css/add_source.scss +0 -1
  170. data/lib/fanforce/plugin_factory/assets/css/convert_pending_initiative.scss +0 -1
  171. data/lib/fanforce/plugin_factory/assets/css/engage.scss +0 -1
  172. data/lib/fanforce/plugin_factory/assets/css/new_message.scss +0 -1
  173. data/lib/fanforce/plugin_factory/assets/css/promotional.scss +0 -1
  174. data/lib/fanforce/plugin_factory/assets/css/source_details.scss +0 -1
  175. data/lib/fanforce/plugin_factory/assets/js/add_edit_initiative.js +0 -1
  176. data/lib/fanforce/plugin_factory/assets/js/add_source.js +0 -1
  177. data/lib/fanforce/plugin_factory/assets/js/convert_pending_initiative.js +0 -1
  178. data/lib/fanforce/plugin_factory/assets/js/engage.js +0 -1
  179. data/lib/fanforce/plugin_factory/assets/js/new_message.js +0 -1
  180. data/lib/fanforce/plugin_factory/assets/js/promotional.js +0 -2
  181. data/lib/fanforce/plugin_factory/assets/js/source_details.js +0 -0
  182. data/lib/fanforce/plugin_factory/assets/lib/common/_module-error.scss +0 -11
  183. data/lib/fanforce/plugin_factory/assets/lib/common/_module-page-loading.scss +0 -1
  184. data/lib/fanforce/plugin_factory/assets/lib/common/_module-saving-initiative.scss +0 -6
  185. data/lib/fanforce/plugin_factory/assets/lib/common/_tags.scss +0 -1
  186. data/lib/fanforce/plugin_factory/assets/lib/common/_variables.scss +0 -27
  187. data/lib/fanforce/plugin_factory/assets/lib/common/broadcaster-divider-arrow.png +0 -0
  188. data/lib/fanforce/plugin_factory/assets/lib/common/icons/dropdown-arrow.png +0 -0
  189. data/lib/fanforce/plugin_factory/assets/lib/common/icons/initiative.png +0 -0
  190. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_add_edit_initiative.scss +0 -27
  191. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_add_source.scss +0 -18
  192. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_convert_pending_initiative.scss +0 -27
  193. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_engage.scss +0 -78
  194. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_new_message.scss +0 -24
  195. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_promotional.scss +0 -27
  196. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/_source_details.scss +0 -17
  197. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/add_edit_initiative.js +0 -6
  198. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/add_source.js +0 -6
  199. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/convert_pending_initiative.js +0 -6
  200. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/engage.js +0 -0
  201. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/new_message.js +0 -5
  202. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/promotional.js +0 -1
  203. data/lib/fanforce/plugin_factory/assets/lib/common/layouts/source_details.js +0 -5
  204. data/lib/fanforce/plugin_factory/assets/lib/promotional/icon-behavior.png +0 -0
  205. data/lib/fanforce/plugin_factory/assets/lib/promotional/icon-broadcaster.png +0 -0
  206. data/lib/fanforce/plugin_factory/assets/lib/promotional/icon-data-connector.png +0 -0
  207. data/lib/fanforce/plugin_factory/assets/lib/promotional/icon-data-processor.png +0 -0
  208. data/lib/fanforce/plugin_factory/assets/lib/promotional/icon-identifier.png +0 -0
  209. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap-datepicker/datepicker.css +0 -7
  210. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap-datepicker/datepicker.js +0 -454
  211. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap-timepicker/timepicker.css +0 -82
  212. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap-timepicker/timepicker.js +0 -803
  213. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap/css/bootstrap.min.css +0 -7
  214. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap/img/glyphicons-halflings-regular.eot +0 -0
  215. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap/img/glyphicons-halflings-regular.svg +0 -0
  216. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap/img/glyphicons-halflings-regular.ttf +0 -0
  217. data/lib/fanforce/plugin_factory/assets/lib/vendors/bootstrap/img/glyphicons-halflings-regular.woff +0 -0
  218. data/lib/fanforce/plugin_factory/assets/lib/vendors/chosen/_chosen_override.scss +0 -6
  219. data/lib/fanforce/plugin_factory/assets/lib/vendors/chosen/chosen-sprite.png +0 -0
  220. data/lib/fanforce/plugin_factory/assets/lib/vendors/chosen/chosen-sprite@2x.png +0 -0
  221. data/lib/fanforce/plugin_factory/assets/lib/vendors/chosen/chosen.jquery.js +0 -1166
  222. data/lib/fanforce/plugin_factory/assets/lib/vendors/chosen/chosen.scss +0 -434
  223. data/lib/fanforce/plugin_factory/assets/lib/vendors/jquery/jquery-1.10.2.js +0 -9789
  224. data/lib/fanforce/plugin_factory/assets/lib/vendors/jquery/jquery.inputHint.js +0 -154
  225. data/lib/fanforce/plugin_factory/assets/lib/vendors/jquery/jquery.tmpl.debug.js +0 -484
  226. data/lib/fanforce/plugin_factory/assets/lib/vendors/knockout/knockout.custom-handlers.coffee +0 -155
  227. data/lib/fanforce/plugin_factory/assets/lib/vendors/knockout/knockout.debug.js +0 -4469
  228. data/lib/fanforce/plugin_factory/assets/lib/vendors/knockout/knockout.min.js +0 -96
  229. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/_select2_override.scss +0 -47
  230. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2-spinner.gif +0 -0
  231. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2.png +0 -0
  232. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2.scss +0 -617
  233. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2_modified.js +0 -3225
  234. data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2x2.png +0 -0
  235. data/lib/fanforce/plugin_factory/assets/lib/vendors/underscore/underscore.debug.js +0 -999
  236. data/lib/fanforce/plugin_factory/config/_error_handling.rb +0 -27
  237. data/lib/fanforce/plugin_factory/config/core_config.rb +0 -92
  238. data/lib/fanforce/plugin_factory/config/helpers/assets.rb +0 -72
  239. data/lib/fanforce/plugin_factory/config/helpers/fanforce.rb +0 -19
  240. data/lib/fanforce/plugin_factory/layouts/add_edit_initiative.haml +0 -19
  241. data/lib/fanforce/plugin_factory/layouts/add_source.haml +0 -19
  242. data/lib/fanforce/plugin_factory/layouts/convert_pending_initiative.haml +0 -19
  243. data/lib/fanforce/plugin_factory/layouts/new_message.haml +0 -19
  244. data/lib/fanforce/plugin_factory/layouts/source_details.haml +0 -19
  245. data/lib/fanforce/plugin_factory/public/robots.txt +0 -2
  246. data/lib/fanforce/plugin_factory/routes.rb +0 -48
  247. data/lib/fanforce/plugin_factory/routes_behavior.rb +0 -34
  248. data/lib/fanforce/plugin_factory/routes_broadcaster.rb +0 -9
  249. data/lib/fanforce/plugin_factory/routes_data_connector.rb +0 -21
  250. data/lib/fanforce/plugin_factory/routes_identifier.rb +0 -3
  251. data/lib/fanforce/plugin_factory/views/add_initiative.haml +0 -1
  252. data/lib/fanforce/plugin_factory/views/add_source.haml +0 -1
  253. data/lib/fanforce/plugin_factory/views/close_popup.haml +0 -8
  254. data/lib/fanforce/plugin_factory/views/convert_pending_initiative.haml +0 -1
  255. data/lib/fanforce/plugin_factory/views/edit_initiative.haml +0 -1
  256. data/lib/fanforce/plugin_factory/views/engage.haml +0 -1
  257. data/lib/fanforce/plugin_factory/views/new_message.haml +0 -1
  258. data/lib/fanforce/plugin_factory/views/source_details.haml +0 -1
  259. data/lib/fanforce/plugin_factory/views/widget_tmpls.haml +0 -1
  260. data/lib/fanforce/plugin_factory_workers.rb +0 -2
@@ -0,0 +1,12 @@
1
+ // PluginFactoryScaffolding : PARTIAL
2
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3
+ //= require fembedded-app
4
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
+ //= require plugin_factory/ui-select
6
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
+ //= require plugin_factory/directives
8
+ //= require plugin_factory/lib
9
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10
+ //= require_tree ./lib
11
+ //= require_tree ./controllers
12
+ // END PARTIAL /////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,3 @@
1
+ fanforce-plugin-factory-1.6.0:4a06d7375c7bc27405e8dfa3e169cba1a9aa314a
2
+ fanforce-plugin-factory-1.6.0:71aedacc6a103c40403df6adca83dd4a891f204a
3
+ fanforce-plugin-factory-1.6.0:8eb981facec4de7be79809c9b3593fd57875afe4
@@ -0,0 +1,3 @@
1
+ fanforce-plugin-factory-1.6.0:89ec4c29cda80ef22367c43e07f30c6feb53c92b
2
+ fanforce-plugin-factory-1.6.0:aa4484417ba6f1b036316847cdff214ae3097f35
3
+ fanforce-plugin-factory-1.6.0:34736a5dfd53d8a2fd2d137590d1d2f5d052f827
@@ -0,0 +1,3 @@
1
+ fanforce-plugin-factory-1.6.0:407f7b3867aa3973e170fcf9bb547ba033dc948b
2
+ fanforce-plugin-factory-1.6.0:4006302899d8ec7d634005b27a8fa262aaa01705
3
+ fanforce-plugin-factory-1.6.0:5ad54c2270801007ceca9044305e0047aa0b9174
@@ -0,0 +1,24 @@
1
+ # PluginFactoryScaffolding : PARTIAL
2
+ ########################################################################################################################
3
+ window.Cookie = {}
4
+ ########################################################################################################################
5
+
6
+ Cookie.set = ((name, value, exdays=null)->
7
+ exdate = new Date()
8
+ exdate.setDate(exdate.getDate() + exdays)
9
+ value = "#{escape(value)}; path=/"
10
+ value += "; expires=#{exdate.toUTCString()}" if exdays
11
+ value += "; domain=.#{BASE_DOMAIN}" if BASE_DOMAIN and URL.parse(window.location.href).root_domain != '0.0'
12
+ document.cookie = "#{name}=#{value}"
13
+ )
14
+
15
+ Cookie.get = ((name)->
16
+ cookies = document.cookie.split(";")
17
+ for cookie in cookies
18
+ x = cookie.substr(0,cookie.indexOf("="))
19
+ y = cookie.substr(cookie.indexOf("=")+1)
20
+ x = x.replace(/^\s+|\s+$/g,"")
21
+ return unescape(y) if (x==name)
22
+ )
23
+
24
+ # END PARTIAL ##########################################################################################################
@@ -0,0 +1,9 @@
1
+ # PluginFactoryScaffolding : PARTIAL
2
+ ########################################################################################################################
3
+
4
+ App.filter 'fromNow', (-> (date) ->
5
+ return 'never' if !date
6
+ moment(date).fromNow()
7
+ )
8
+
9
+ # END PARTIAL ##########################################################################################################
@@ -0,0 +1,40 @@
1
+ # PluginFactoryScaffolding : PARTIAL
2
+ ########################################################################################################################
3
+ window.Utils = {}
4
+ ########################################################################################################################
5
+
6
+ Utils.$safeApply = ((fn) ->
7
+ phase = this.$root.$$phase;
8
+ if(phase == '$apply' || phase == '$digest')
9
+ fn() if(fn && (typeof(fn) == 'function'))
10
+ else
11
+ this.$apply(fn)
12
+ )
13
+ Utils.removeFromArray = ((value, array) ->
14
+ index = array.indexOf(value)
15
+ array.splice(index, 1)
16
+ )
17
+
18
+ Utils.parseUrl = ((url_string) ->
19
+ uriPartNames = ["source","scheme","authority","host","port","path","directory_path","file_name","query_string","hash"]
20
+ uriParts = new RegExp("^(?:([^:/?#.]+):)?(?://)?(([^:/?#]*)(?::(\\d*))?)?((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[\\?#]|$)))*/?)?([^?#/]*))?(?:\\?([^#]*))?(?:#(.*))?").exec(url_string)
21
+ uri = {};
22
+ for i in [0..uriPartNames.length]
23
+ uri[uriPartNames[i]] = (if uriParts[i] then uriParts[i] else '')
24
+ uri.port = if uri.port then parseInt(uri.port) else 80
25
+ domain_parts = (/^(.*?)\.?([^\.]*\.\w+)$/).exec(uri.host)
26
+ if domain_parts?
27
+ uri.sub_domain = domain_parts[1]
28
+ uri.root_domain = domain_parts[2]
29
+ else
30
+ uri.sub_domain = uri.root_domain = ''
31
+ if(uri.directory_path.length > 0)
32
+ uri.directory_path = uri.directory_path.replace(/\/?$/, "/")
33
+ return uri
34
+ )
35
+
36
+ Utils.parseQueryString = ((query_string) ->
37
+ $.deparam(query_string)
38
+ )
39
+
40
+ # END PARTIAL ##########################################################################################################
@@ -0,0 +1,4 @@
1
+ // PluginFactoryScaffolding : PARTIAL
2
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3
+
4
+ // END PARTIAL /////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,24 @@
1
+ {
2
+ "_id": null,
3
+ "name": null,
4
+ "description": null,
5
+ "callback_urls": {
6
+ "install": "http://{{PLUGIN_DOMAIN}}/install",
7
+ "uninstall": "http://{{PLUGIN_DOMAIN}}/uninstall"
8
+ },
9
+ "public_urls": {
10
+ "marketplace_img": "http://{{PLUGIN_DOMAIN}}/assets/marketplace.png",
11
+ "icon_16": "http://{{PLUGIN_DOMAIN}}/assets/icon-16.png",
12
+ "icon_32": "http://{{PLUGIN_DOMAIN}}/assets/icon-32.png",
13
+ "icon_42": "http://{{PLUGIN_DOMAIN}}/assets/icon-42.png"
14
+ },
15
+ "com_behaviors": [],
16
+ "com_broadcasters": [],
17
+ "com_connectors": [],
18
+ "com_js_finders": [],
19
+ "com_js_trackers": [],
20
+ "iron_workers": [],
21
+ "fanforce_version_dependency": "1.6",
22
+ "created_with_plugin_factory_version": null,
23
+ "awaiting_uranium_setup": true
24
+ }
@@ -0,0 +1,8 @@
1
+ # PluginFactoryScaffolding : PARTIAL
2
+ ########################################################################################################################
3
+ require 'bundler'; Bundler.setup
4
+ require 'fanforce/plugin_factory'
5
+
6
+ run Fanforce::Plugin
7
+
8
+ # END PARTIAL ##########################################################################################################
@@ -0,0 +1,4 @@
1
+ fanforce-plugin-factory-1.6.0:0af55ae841e12060b516293b45f0e792c2ed89b9
2
+ fanforce-plugin-factory-1.6.0:750b6bdf56a47d700a45cc8e1d3a711933603f0d
3
+ fanforce-plugin-factory-1.6.0:429f08694937012aa6731394fca2ff57e6600070
4
+ fanforce-plugin-factory-1.6.0:fbda63d2f1b25138acc371c7be5d2e70f05886bf
@@ -0,0 +1,2 @@
1
+ fanforce-plugin-factory-1.6.0:ad07029e9f29896e1661791055508f17339a6d35
2
+ fanforce-plugin-factory-1.6.0:51584a3ea897dce3224e0ed97d8e1e9e07e16b46
@@ -0,0 +1,6 @@
1
+ fanforce-plugin-factory-1.6.0:02405b7a50a0ed450d10c57b6d6ad034a247e9d1
2
+ fanforce-plugin-factory-1.6.0:b4b9aa096770b68ec2c9da62349443747d5afa88
3
+ fanforce-plugin-factory-1.6.0:34de59db0e183647f76f1a35ad2bef51ef043a98
4
+ fanforce-plugin-factory-1.6.0:e26e07d033f76de23a645ec185b856c332caa9b6
5
+ fanforce-plugin-factory-1.6.0:704a6dfc8e71d43ffec0fcbe859c7c2860595a2c
6
+ fanforce-plugin-factory-1.6.0:53e9e89632a66d4ad9ec8967ab7c0e68b5dfc2f4
@@ -0,0 +1,26 @@
1
+ -# PluginFactoryScaffolding : FILE
2
+ -#######################################################################################################################
3
+ !!! 5
4
+ %html.fembedded-layout(ng-app='fembedded')
5
+ %head
6
+ %title Fanforce Plugin
7
+ %meta(charset='UTF-8')/
8
+ %meta(http-equiv='X-UA-Compatible' content='IE=edge,chrome=1')/
9
+ %meta(name='viewport' content='width=device-width')/
10
+ %meta(http-equiv='Content-Type' content='text/html charset=iso-8859-1')/
11
+ %meta(http-equiv='Content-Language' content='en-us')/
12
+ :javascript
13
+ BASE_DOMAIN = #{Fanforce.base_domain.to_json}
14
+ API_DOMAIN = #{Fanforce.api_domain.to_json}
15
+ = javascript 'http://i.fanforce.dev/devforce.js'
16
+ = javascript 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js'
17
+ = javascript 'http://ajax.googleapis.com/ajax/libs/angularjs/1.3.4/angular.min.js'
18
+ = stylesheet 'fembedded'
19
+ = javascript 'fembedded'
20
+
21
+ %body(class=page_classes)
22
+ .page-loading(ng-hide='app_is_loaded')
23
+ %loading Page loading...
24
+ .page-loaded(ng-show='app_is_loaded')
25
+ .angular-view(ng-view)
26
+ .standard-view= yield
@@ -1,15 +1,15 @@
1
- <?xml version='1.0' encoding='utf-8' ?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- %html
1
+ -# PluginFactoryScaffolding : FILE
2
+ -#######################################################################################################################
3
+ !!! 5
4
+ %html.promotional-layout
4
5
  %head
5
6
  %title Fanforce
6
7
  %meta{'http-equiv'=>'Content-Type', content:'text/html; charset=iso-8859-1'}/
7
8
  %meta{'http-equiv'=>'Content-Language', content: 'en-us'}/
8
9
  = stylesheet '/promotional.css'
9
10
  :javascript
10
- BASE_DOMAIN = #{Fanforce.base_domain.to_json}
11
- API_DOMAIN = #{Fanforce.api_domain.to_json}
12
- ASSETS_DOMAIN = #{Fanforce.assets_domain.to_json}
11
+ BASE_DOMAIN = #{Fanforce.base_domain.to_json}
12
+ API_DOMAIN = #{Fanforce.api_domain.to_json}
13
13
 
14
14
  %body
15
15
  = yield
@@ -1,12 +1,14 @@
1
- <?xml version='1.0' encoding='utf-8' ?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- %html
1
+ -# PluginFactoryScaffolding : FILE
2
+ -#######################################################################################################################
3
+ !!! 5
4
+ %html.visitor-layout
4
5
  %head
5
6
  %title Fanforce
6
7
  %meta{'http-equiv'=>'Content-Type', content:'text/html; charset=iso-8859-1'}/
7
8
  %meta{'http-equiv'=>'Content-Language', content: 'en-us'}/
8
- = stylesheet '/engage.css'
9
- %body.layout-engage
9
+ = stylesheet '/visitor.css'
10
+ %script(src='//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js')
11
+ %body
10
12
  .lyt-root
11
13
  .lyt-header
12
14
  #hello
@@ -23,7 +25,8 @@
23
25
 
24
26
  = yield_content :after_fanforce_js
25
27
  :coffeescript
26
- FF.on('logout', ->
28
+ FF.css_framework = 'bootstrap3'
29
+ FF.on('visitor.logout', ->
27
30
  $('#hello').html('')
28
31
  )
29
32
  FF.organization (organization)->
@@ -35,4 +38,4 @@
35
38
  $('#logo').html('<div class="logo"><img src="' + organization.logo_url + '"></div>') if organization.logo_url
36
39
  FF.visitor (visitor)->
37
40
  return if !visitor.access_level
38
- $('#hello').html('<div class="hello"><div class="hello-wrapper"><span class="greeting">Hello, ' + visitor.first_name + '!</span><a href="javascript: FF.logout(); void(0)">Logout</a></div></div>')
41
+ $('#hello').html('<div class="hello"><div class="hello-wrapper"><span class="greeting">Hello, ' + visitor.first_name + '!</span><a href="javascript: FF.visitor.logout(); void(0)">Logout</a></div></div>')
@@ -0,0 +1,7 @@
1
+ # PluginFactoryScaffolding : PARTIAL
2
+ ########################################################################################################################
3
+
4
+ User-agent: *
5
+ Allow: /
6
+
7
+ # END PARTIAL ##########################################################################################################
@@ -0,0 +1,3 @@
1
+ fanforce-plugin-factory-1.6.0:48bf030f14a9dbd660503d182ecb91690a43066e
2
+ fanforce-plugin-factory-1.6.0:2c454a47b0f525bcff75cb76e7273ae9d22282e0
3
+ fanforce-plugin-factory-1.6.0:4cb444083045792c9c8f696db2d79df8ba0ce135
@@ -1,15 +1,19 @@
1
- .header-icons
2
- %img{src: image_path('/promotional/icon-42.png') }
3
- %img{src: image_path("/promotional/icon-#{FanforcePlugin.type.to_s.dasherize}.png") }
4
- %img{src: image_path('/icon-42.png') }
1
+ -# PluginFactoryScaffolding : FILE
2
+ -#######################################################################################################################
5
3
 
6
4
  .loading
7
5
  %h2 Loading Plugin Info...
8
6
 
9
7
  .loaded(style='display:none')
10
8
  %h1.plugin_name -------------
9
+
10
+ .header-icons
11
+ %img{src: image_path('/promotional/icon-42.png') }
12
+ %img{src: image_path('/promotional/icon-plus.png') }
13
+ %img{src: image_path('/icon-42.png') }
14
+
11
15
  .subtitle
12
- %strong A Fanforce #{FanforcePlugin.type.to_s.titleize}
16
+ %strong A Fanforce Plugin Integration
13
17
  %span developed by
14
18
  %strong.plugin_company_name --------
15
19
 
@@ -30,9 +34,11 @@
30
34
 
31
35
  - content_for :after_core_js do
32
36
  :coffeescript
33
- FF.get '/plugins/#{FanforcePlugin._id}', {}, (plugin) ->
34
- $('.plugin_company_name').text(plugin.company_name)
37
+ FF.get('/available_plugins/#{Plugin._id}').done((plugin)->
38
+ $('.plugin_company_name').text(plugin.company_name || 'Engineers Who Love Coffee')
35
39
  $('.plugin_company_description').text(plugin.company_description)
36
40
  $('.plugin_name').text(plugin.name)
37
41
  $('.loading').hide()
38
42
  $('.loaded').show()
43
+ $('.about-box').hide() if !plugin.company_description
44
+ )
@@ -0,0 +1,87 @@
1
+ Plugin = Fanforce::Plugin
2
+ PluginWorker = Fanforce::PluginWorker
3
+
4
+ ########################################################################################################################
5
+
6
+ class Fanforce::Plugin::Sinatra < Sinatra::Base
7
+ require 'sinatra/content_for'
8
+ require 'bugsnag'
9
+
10
+ require_relative 'error_handling'
11
+ require_relative 'helpers/assets'
12
+ require_relative 'helpers/ractive'
13
+ require_relative 'helpers/json'
14
+ require_relative 'helpers/fanforce'
15
+ require_relative 'helpers/css_frameworks'
16
+
17
+ use Rack::JSONR, :method_override => :all
18
+ use Bugsnag::Rack
19
+
20
+ helpers AssetHelpers
21
+ helpers FanforceHelpers
22
+ helpers JSONHelpers
23
+ helpers RactiveHelpers
24
+ helpers Sinatra::ContentFor
25
+
26
+ @@static_files = {}
27
+
28
+ def self.any(url,&block)
29
+ get(url, &block)
30
+ put(url, &block)
31
+ post(url, &block)
32
+ delete(url, &block)
33
+ end
34
+
35
+ def self.require_controllers
36
+ require "#{Fanforce::Plugin.config.factory_dir}/controllers/base_controller"
37
+ Dir["#{Fanforce::Plugin.config.base_dir}/controllers/*_controller.rb"].each {|file| require file }
38
+ end
39
+
40
+ def self.create_basic_routes_from(path)
41
+ path = ('views/' + path.to_s.gsub(/^views\/?/, '')).gsub(/\/$/, '')
42
+ Dir["#{Fanforce::Plugin.config.base_dir}/#{path}/*/*.haml"].each do |file|
43
+ create_basic_route($1) if file =~ /\/views\/(.+).haml/
44
+ end
45
+ end
46
+
47
+ def self.create_basic_routes_from_views
48
+ create_basic_routes_from(:views)
49
+ end
50
+
51
+ def self.create_basic_route(path)
52
+ get "/#{path}" do page(path) end
53
+ end
54
+
55
+ def self.static(url, *args, &block)
56
+ @@static_files[url] = {args: args, block: block}
57
+ get(url, &block)
58
+ end
59
+
60
+ def factory_directive(page)
61
+ factory_dir = Pathname.new(Fanforce::Plugin.config.factory_dir)
62
+ plugin_views_dir = Pathname.new(settings.views)
63
+ haml :"#{factory_dir.relative_path_from(plugin_views_dir).to_s}/directive_views/#{page}"
64
+ end
65
+
66
+ def page(page, options={})
67
+ plugin_views_dir = Pathname.new(settings.views)
68
+ page = :"#{options[:com_dir]}/#{page}" if File.exists?("#{plugin_views_dir}/#{options[:com_dir]}/#{page}.haml")
69
+
70
+ options[:layout] = options[:layout] ? :"../layouts/#{options[:layout]}" : false
71
+ locals = {page_classes: page.to_s.split('/')}
72
+ haml page.to_sym, options, locals
73
+ end
74
+
75
+ configure do
76
+ Fanforce::Plugin.config.load_bugsnag
77
+ Fanforce::Plugin.config.load_routes
78
+
79
+ set :root, Fanforce::Plugin.config.base_dir
80
+ set :haml, {escape_attrs: false}
81
+ set :static, true
82
+ set :protection, :except => [:frame_options, :json_csrf]
83
+ end
84
+
85
+ get '/' do "#{Fanforce::Plugin._id} is ready to go! All you need are a few routes." end
86
+ end
87
+
@@ -0,0 +1,48 @@
1
+ class Fanforce::Plugin::Sinatra
2
+ set :raise_errors, false
3
+ set :show_exceptions, false
4
+
5
+ error 400..600 do
6
+ e = env['sinatra.error'] or (next response if e.nil?)
7
+
8
+ if Object.const_defined?('Fanforce') and Fanforce.const_defined?('API') and e.is_a?(Fanforce::API::Error)
9
+ errors = e.errors
10
+ else
11
+ errors = [{message: 'There has been an internal server error. Our developers have been notified.'}]
12
+ end
13
+ message = errors[0][:message]
14
+
15
+ show_error_details = params[:show_error_details] || Fanforce::Plugin.config.show_error_details
16
+ admin_details = fetch_admin_details(e, errors)
17
+ Bugsnag.notify(e, admin_details.merge(plugin_id: Fanforce::Plugin.plugin_id)) if Fanforce::Plugin.is_bugsnag_enabled?
18
+
19
+ body = {errors: message}
20
+ body.merge!(admin_details.merge(backtrace: e.backtrace)).delete(:public_response) if show_error_details
21
+
22
+ status(e.respond_to?(:code ) ? e.code : 500)
23
+ if show_error_details == 'text'
24
+ response.headers['Content-Type'] = 'text/plain'
25
+ format_as_text(body)
26
+ else
27
+ json(body)
28
+ end
29
+ end
30
+
31
+ def format_as_text(body)
32
+ text = "--------------------------------------------------------------------------------------------------------\n"
33
+ text += "ERROR: #{body[:raw_message]}\n"
34
+ text += "CLASS: #{body[:error_class]}\n" if body[:error_class]
35
+ text += "\nCURL COMMAND: #{body[:curl_command]}\n" if body[:curl_command]
36
+ text += "\nBACKTRACE:\n#{body[:backtrace].join("\n")}\n" if body[:backtrace]
37
+ text += "--------------------------------------------------------------------------------------------------------\n"
38
+ end
39
+
40
+ def fetch_admin_details(e, errors=[], additional_options={})
41
+ admin_details = {error_class: e.class.name, public_response: errors}
42
+ admin_details[:curl_command] = e.curl_command if e.respond_to?(:curl_command)
43
+ admin_details[:raw_message] = e.message
44
+ admin_details.merge(additional_options)
45
+ end
46
+
47
+ end
48
+