platform 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (480) hide show
  1. data/.gitignore +21 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +14 -0
  4. data/Gemfile.lock +191 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.rdoc +5 -0
  7. data/Rakefile +37 -0
  8. data/app/assets/images/platform/.gitkeep +0 -0
  9. data/app/assets/images/platform/accept.png +0 -0
  10. data/app/assets/images/platform/action_tab_bkgd.gif +0 -0
  11. data/app/assets/images/platform/action_tab_white_bkgd.gif +0 -0
  12. data/app/assets/images/platform/add.png +0 -0
  13. data/app/assets/images/platform/apps/app_icon.gif +0 -0
  14. data/app/assets/images/platform/apps/app_logo.gif +0 -0
  15. data/app/assets/images/platform/arrow_down.gif +0 -0
  16. data/app/assets/images/platform/arrow_down.png +0 -0
  17. data/app/assets/images/platform/arrow_down_grey.png +0 -0
  18. data/app/assets/images/platform/arrow_right.gif +0 -0
  19. data/app/assets/images/platform/arrow_up.png +0 -0
  20. data/app/assets/images/platform/arrow_up_grey.png +0 -0
  21. data/app/assets/images/platform/bullet_go.png +0 -0
  22. data/app/assets/images/platform/buttons.png +0 -0
  23. data/app/assets/images/platform/cancel.png +0 -0
  24. data/app/assets/images/platform/clipboard_icon.gif +0 -0
  25. data/app/assets/images/platform/close.gif +0 -0
  26. data/app/assets/images/platform/cross.png +0 -0
  27. data/app/assets/images/platform/default_app_icon.gif +0 -0
  28. data/app/assets/images/platform/default_app_logo.gif +0 -0
  29. data/app/assets/images/platform/delete.png +0 -0
  30. data/app/assets/images/platform/disk.png +0 -0
  31. data/app/assets/images/platform/exclamation.png +0 -0
  32. data/app/assets/images/platform/eye.png +0 -0
  33. data/app/assets/images/platform/eye_not.png +0 -0
  34. data/app/assets/images/platform/field_sprite.gif +0 -0
  35. data/app/assets/images/platform/find.png +0 -0
  36. data/app/assets/images/platform/globe.gif +0 -0
  37. data/app/assets/images/platform/help.png +0 -0
  38. data/app/assets/images/platform/help/app_reg.png +0 -0
  39. data/app/assets/images/platform/help/app_reg_ext.png +0 -0
  40. data/app/assets/images/platform/help/app_reg_web.png +0 -0
  41. data/app/assets/images/platform/help/auth_desktop.png +0 -0
  42. data/app/assets/images/platform/help/auth_iframe.png +0 -0
  43. data/app/assets/images/platform/help/auth_iphone.png +0 -0
  44. data/app/assets/images/platform/help/auth_web.png +0 -0
  45. data/app/assets/images/platform/help/authorize.png +0 -0
  46. data/app/assets/images/platform/help/ext.png +0 -0
  47. data/app/assets/images/platform/help/login.png +0 -0
  48. data/app/assets/images/platform/help/login_desktop.png +0 -0
  49. data/app/assets/images/platform/help/login_iphone.png +0 -0
  50. data/app/assets/images/platform/help/login_web.png +0 -0
  51. data/app/assets/images/platform/help2.png +0 -0
  52. data/app/assets/images/platform/information.png +0 -0
  53. data/app/assets/images/platform/keyboard.png +0 -0
  54. data/app/assets/images/platform/language_selector_arrow.gif +0 -0
  55. data/app/assets/images/platform/left_quote.png +0 -0
  56. data/app/assets/images/platform/lightning.png +0 -0
  57. data/app/assets/images/platform/loading.gif +0 -0
  58. data/app/assets/images/platform/loading2.gif +0 -0
  59. data/app/assets/images/platform/loading3.gif +0 -0
  60. data/app/assets/images/platform/loading_animation.gif +0 -0
  61. data/app/assets/images/platform/loading_large.gif +0 -0
  62. data/app/assets/images/platform/lock.png +0 -0
  63. data/app/assets/images/platform/lock_add.png +0 -0
  64. data/app/assets/images/platform/lock_delete.png +0 -0
  65. data/app/assets/images/platform/lock_open.png +0 -0
  66. data/app/assets/images/platform/medals/bronze.png +0 -0
  67. data/app/assets/images/platform/medals/gold.png +0 -0
  68. data/app/assets/images/platform/medals/runner.png +0 -0
  69. data/app/assets/images/platform/medals/silver.png +0 -0
  70. data/app/assets/images/platform/minus_node.png +0 -0
  71. data/app/assets/images/platform/oauth/perm_tile.gif +0 -0
  72. data/app/assets/images/platform/oauth/right_grey.png +0 -0
  73. data/app/assets/images/platform/pencil.png +0 -0
  74. data/app/assets/images/platform/photo_silhouette.gif +0 -0
  75. data/app/assets/images/platform/pixel.gif +0 -0
  76. data/app/assets/images/platform/platform.png +0 -0
  77. data/app/assets/images/platform/platform2.png +0 -0
  78. data/app/assets/images/platform/platform3.png +0 -0
  79. data/app/assets/images/platform/platform4.png +0 -0
  80. data/app/assets/images/platform/platform5.png +0 -0
  81. data/app/assets/images/platform/plus.png +0 -0
  82. data/app/assets/images/platform/plus_node.png +0 -0
  83. data/app/assets/images/platform/random.png +0 -0
  84. data/app/assets/images/platform/random2.png +0 -0
  85. data/app/assets/images/platform/rating_star0.png +0 -0
  86. data/app/assets/images/platform/rating_star05.png +0 -0
  87. data/app/assets/images/platform/rating_star1.png +0 -0
  88. data/app/assets/images/platform/rating_stars.gif +0 -0
  89. data/app/assets/images/platform/rating_stars.psd +0 -0
  90. data/app/assets/images/platform/reply.png +0 -0
  91. data/app/assets/images/platform/right_quote.png +0 -0
  92. data/app/assets/images/platform/rotating_world.gif +0 -0
  93. data/app/assets/images/platform/script.png +0 -0
  94. data/app/assets/images/platform/script_edit.png +0 -0
  95. data/app/assets/images/platform/script_gear.png +0 -0
  96. data/app/assets/images/platform/site_sprite.gif +0 -0
  97. data/app/assets/images/platform/spinner.gif +0 -0
  98. data/app/assets/images/platform/star.png +0 -0
  99. data/app/assets/images/platform/table_edit.png +0 -0
  100. data/app/assets/images/platform/table_gear.png +0 -0
  101. data/app/assets/images/platform/table_multiple.png +0 -0
  102. data/app/assets/images/platform/thumb_down.png +0 -0
  103. data/app/assets/images/platform/thumb_up.png +0 -0
  104. data/app/assets/images/platform/top_left_stem.png +0 -0
  105. data/app/assets/images/platform/top_right_stem.png +0 -0
  106. data/app/assets/images/platform/translate_icn.gif +0 -0
  107. data/app/assets/images/platform/treeview/diffDoc.gif +0 -0
  108. data/app/assets/images/platform/treeview/diffFolder.gif +0 -0
  109. data/app/assets/images/platform/treeview/ftv2blank.gif +0 -0
  110. data/app/assets/images/platform/treeview/ftv2doc.gif +0 -0
  111. data/app/assets/images/platform/treeview/ftv2folderclosed.gif +0 -0
  112. data/app/assets/images/platform/treeview/ftv2folderopen.gif +0 -0
  113. data/app/assets/images/platform/treeview/ftv2lastnode.gif +0 -0
  114. data/app/assets/images/platform/treeview/ftv2link.gif +0 -0
  115. data/app/assets/images/platform/treeview/ftv2mlastnode.gif +0 -0
  116. data/app/assets/images/platform/treeview/ftv2mnode.gif +0 -0
  117. data/app/assets/images/platform/treeview/ftv2node.gif +0 -0
  118. data/app/assets/images/platform/treeview/ftv2plastnode.gif +0 -0
  119. data/app/assets/images/platform/treeview/ftv2pnode.gif +0 -0
  120. data/app/assets/images/platform/treeview/ftv2vertline.gif +0 -0
  121. data/app/assets/images/platform/wizard.png +0 -0
  122. data/app/assets/images/platform/world_link.png +0 -0
  123. data/app/assets/javascripts/platform/api_explorer.js +628 -0
  124. data/app/assets/javascripts/platform/application.js +9 -0
  125. data/app/assets/javascripts/platform/ftiens4.js +1197 -0
  126. data/app/assets/javascripts/platform/jsdk.js +539 -0
  127. data/app/assets/javascripts/platform/platform.js +447 -0
  128. data/app/assets/javascripts/platform/shortcut.js +223 -0
  129. data/app/assets/javascripts/platform/ua.js +147 -0
  130. data/app/assets/stylesheets/platform/api_explorer.css.scss +140 -0
  131. data/app/assets/stylesheets/platform/application.css.scss +6 -0
  132. data/app/assets/stylesheets/platform/components.css.scss +208 -0
  133. data/app/assets/stylesheets/platform/layout.css.scss +119 -0
  134. data/app/assets/stylesheets/platform/oauth.css +51 -0
  135. data/app/assets/stylesheets/platform/platform.css.scss +311 -0
  136. data/app/controllers/platform/admin/apps_controller.rb +99 -0
  137. data/app/controllers/platform/admin/base_controller.rb +60 -0
  138. data/app/controllers/platform/admin/categories_controller.rb +132 -0
  139. data/app/controllers/platform/admin/clientsdk_controller.rb +30 -0
  140. data/app/controllers/platform/admin/developers_controller.rb +30 -0
  141. data/app/controllers/platform/admin/exceptions_controller.rb +30 -0
  142. data/app/controllers/platform/admin/forum_controller.rb +34 -0
  143. data/app/controllers/platform/admin/metrics_controller.rb +42 -0
  144. data/app/controllers/platform/api/apps_controller.rb +40 -0
  145. data/app/controllers/platform/api/base_controller.rb +541 -0
  146. data/app/controllers/platform/apps_controller.rb +142 -0
  147. data/app/controllers/platform/base_controller.rb +127 -0
  148. data/app/controllers/platform/developer/api_explorer_controller.rb +56 -0
  149. data/app/controllers/platform/developer/apps_controller.rb +161 -0
  150. data/app/controllers/platform/developer/base_controller.rb +51 -0
  151. data/app/controllers/platform/developer/blog_controller.rb +29 -0
  152. data/app/controllers/platform/developer/dashboard_controller.rb +63 -0
  153. data/app/controllers/platform/developer/forum_controller.rb +85 -0
  154. data/app/controllers/platform/developer/help_controller.rb +113 -0
  155. data/app/controllers/platform/developer/info_controller.rb +41 -0
  156. data/app/controllers/platform/developer/registration_controller.rb +39 -0
  157. data/app/controllers/platform/developer/resources_controller.rb +30 -0
  158. data/app/controllers/platform/forum_controller.rb +74 -0
  159. data/app/controllers/platform/oauth_controller.rb +421 -0
  160. data/app/controllers/platform/ratings_controller.rb +61 -0
  161. data/app/helpers/platform/admin/categories_helper.rb +54 -0
  162. data/app/helpers/platform/apps_helper.rb +26 -0
  163. data/app/helpers/platform/developer/dashboard_helper.rb +42 -0
  164. data/app/helpers/platform/developer/help_helper.rb +45 -0
  165. data/app/helpers/platform_helper.rb +26 -0
  166. data/app/models/platform/application.rb +394 -0
  167. data/app/models/platform/application_category.rb +34 -0
  168. data/app/models/platform/application_developer.rb +30 -0
  169. data/app/models/platform/application_filter.rb +30 -0
  170. data/app/models/platform/application_log.rb +32 -0
  171. data/app/models/platform/application_log_filter.rb +34 -0
  172. data/app/models/platform/application_metric.rb +58 -0
  173. data/app/models/platform/application_metric_filter.rb +34 -0
  174. data/app/models/platform/application_permission.rb +30 -0
  175. data/app/models/platform/application_permission_filter.rb +30 -0
  176. data/app/models/platform/application_usage_metric.rb +58 -0
  177. data/app/models/platform/application_usage_metric_filter.rb +34 -0
  178. data/app/models/platform/application_user.rb +45 -0
  179. data/app/models/platform/application_user_filter.rb +34 -0
  180. data/app/models/platform/base_filter.rb +46 -0
  181. data/app/models/platform/category.rb +64 -0
  182. data/app/models/platform/daily_application_metric.rb +31 -0
  183. data/app/models/platform/developer.rb +45 -0
  184. data/app/models/platform/developer_filter.rb +26 -0
  185. data/app/models/platform/forum_message.rb +35 -0
  186. data/app/models/platform/forum_message_filter.rb +26 -0
  187. data/app/models/platform/forum_topic.rb +38 -0
  188. data/app/models/platform/forum_topic_filter.rb +26 -0
  189. data/app/models/platform/logged_exception.rb +290 -0
  190. data/app/models/platform/logged_exception_filter.rb +58 -0
  191. data/app/models/platform/media/image.rb +26 -0
  192. data/app/models/platform/media/media.rb +58 -0
  193. data/app/models/platform/monthly_application_metric.rb +31 -0
  194. data/app/models/platform/oauth/access_token.rb +57 -0
  195. data/app/models/platform/oauth/client_token.rb +38 -0
  196. data/app/models/platform/oauth/oauth_model_methods.rb +41 -0
  197. data/app/models/platform/oauth/oauth_token.rb +57 -0
  198. data/app/models/platform/oauth/oauth_token_filter.rb +34 -0
  199. data/app/models/platform/oauth/refresh_token.rb +47 -0
  200. data/app/models/platform/oauth/request_token.rb +50 -0
  201. data/app/models/platform/permission.rb +27 -0
  202. data/app/models/platform/rating.rb +43 -0
  203. data/app/models/platform/rating_filter.rb +30 -0
  204. data/app/models/platform/rollup_log.rb +27 -0
  205. data/app/models/platform/rollup_log_filter.rb +30 -0
  206. data/app/models/platform/total_application_metric.rb +40 -0
  207. data/app/models/platform/weekly_application_metric.rb +31 -0
  208. data/app/views/platform/admin/apps/_categories.html.erb +17 -0
  209. data/app/views/platform/admin/apps/_categories_scripts.html.erb +17 -0
  210. data/app/views/platform/admin/apps/_tabs.html.erb +25 -0
  211. data/app/views/platform/admin/apps/index.html.erb +32 -0
  212. data/app/views/platform/admin/apps/permissions.html.erb +7 -0
  213. data/app/views/platform/admin/apps/ratings.html.erb +7 -0
  214. data/app/views/platform/admin/apps/tokens.html.erb +18 -0
  215. data/app/views/platform/admin/apps/users.html.erb +7 -0
  216. data/app/views/platform/admin/apps/view.html.erb +170 -0
  217. data/app/views/platform/admin/categories/_tabs.html.erb +22 -0
  218. data/app/views/platform/admin/categories/category_assigner.html.erb +9 -0
  219. data/app/views/platform/admin/categories/category_assigner_tree.html.erb +81 -0
  220. data/app/views/platform/admin/categories/index.html.erb +106 -0
  221. data/app/views/platform/admin/categories/items.html.erb +153 -0
  222. data/app/views/platform/admin/categories/lb_update_application_category.html.erb +54 -0
  223. data/app/views/platform/admin/categories/lb_update_category.html.erb +64 -0
  224. data/app/views/platform/admin/categories/tree.html.erb +64 -0
  225. data/app/views/platform/admin/clientsdk/index.html.erb +89 -0
  226. data/app/views/platform/admin/common/_footer.html.erb +1 -0
  227. data/app/views/platform/admin/common/_header.html.erb +32 -0
  228. data/app/views/platform/admin/common/_lightbox_buttons.html.erb +5 -0
  229. data/app/views/platform/admin/common/_paginator.html.erb +20 -0
  230. data/app/views/platform/admin/developers/_tabs.html.erb +22 -0
  231. data/app/views/platform/admin/developers/index.html.erb +7 -0
  232. data/app/views/platform/admin/exceptions/_tabs.html.erb +22 -0
  233. data/app/views/platform/admin/exceptions/index.html.erb +7 -0
  234. data/app/views/platform/admin/forum/_tabs.html.erb +22 -0
  235. data/app/views/platform/admin/forum/index.html.erb +7 -0
  236. data/app/views/platform/admin/forum/messages.html.erb +7 -0
  237. data/app/views/platform/admin/metrics/_tabs.html.erb +25 -0
  238. data/app/views/platform/admin/metrics/application_log.html.erb +7 -0
  239. data/app/views/platform/admin/metrics/index.html.erb +9 -0
  240. data/app/views/platform/admin/metrics/rollup_log.html.erb +7 -0
  241. data/app/views/platform/admin/metrics/usage.html.erb +7 -0
  242. data/app/views/platform/apps/_actions_module.html.erb +3 -0
  243. data/app/views/platform/apps/_app_footer.html.erb +8 -0
  244. data/app/views/platform/apps/_app_header.html.erb +25 -0
  245. data/app/views/platform/apps/_apps_module.html.erb +42 -0
  246. data/app/views/platform/apps/_authorize_form.html.erb +11 -0
  247. data/app/views/platform/apps/_categories_module.html.erb +11 -0
  248. data/app/views/platform/apps/_featured_apps_module.html.erb +40 -0
  249. data/app/views/platform/apps/_left.html.erb +20 -0
  250. data/app/views/platform/apps/_monthly_users_module.html.erb +8 -0
  251. data/app/views/platform/apps/_paginator.html.erb +13 -0
  252. data/app/views/platform/apps/_rank_module.html.erb +18 -0
  253. data/app/views/platform/apps/_search_apps_module.html.erb +35 -0
  254. data/app/views/platform/apps/canvas_app.html.erb +15 -0
  255. data/app/views/platform/apps/index.html.erb +86 -0
  256. data/app/views/platform/apps/view.html.erb +71 -0
  257. data/app/views/platform/apps/xd.html.erb +11 -0
  258. data/app/views/platform/common/_footer.html.erb +1 -0
  259. data/app/views/platform/common/_header.html.erb +4 -0
  260. data/app/views/platform/common/_paginator.html.erb +32 -0
  261. data/app/views/platform/common/_scripts.html.erb +7 -0
  262. data/app/views/platform/common/_user_login.html.erb +11 -0
  263. data/app/views/platform/developer/api_explorer/history.html.erb +31 -0
  264. data/app/views/platform/developer/api_explorer/index.html.erb +134 -0
  265. data/app/views/platform/developer/api_explorer/oauth_lander.html.erb +4 -0
  266. data/app/views/platform/developer/api_explorer/options.html.erb +44 -0
  267. data/app/views/platform/developer/apps/_form.html.erb +340 -0
  268. data/app/views/platform/developer/apps/create_version.html.erb +19 -0
  269. data/app/views/platform/developer/apps/edit.html.erb +21 -0
  270. data/app/views/platform/developer/apps/index.html.erb +375 -0
  271. data/app/views/platform/developer/apps/new.html.erb +20 -0
  272. data/app/views/platform/developer/blog/index.html.erb +7 -0
  273. data/app/views/platform/developer/common/_footer.html.erb +1 -0
  274. data/app/views/platform/developer/common/_header.html.erb +34 -0
  275. data/app/views/platform/developer/dashboard/_apps_info.html.erb +84 -0
  276. data/app/views/platform/developer/dashboard/_discussions.html.erb +68 -0
  277. data/app/views/platform/developer/dashboard/_header.html.erb +12 -0
  278. data/app/views/platform/developer/dashboard/_reviews.html.erb +53 -0
  279. data/app/views/platform/developer/dashboard/_statistics.html.erb +105 -0
  280. data/app/views/platform/developer/dashboard/index.html.erb +85 -0
  281. data/app/views/platform/developer/dashboard/settings.html.erb +23 -0
  282. data/app/views/platform/developer/forum/_message.html.erb +17 -0
  283. data/app/views/platform/developer/forum/_messages.html.erb +14 -0
  284. data/app/views/platform/developer/forum/_new_message.html.erb +28 -0
  285. data/app/views/platform/developer/forum/_new_topic.html.erb +39 -0
  286. data/app/views/platform/developer/forum/index.html.erb +89 -0
  287. data/app/views/platform/developer/forum/topic.html.erb +28 -0
  288. data/app/views/platform/developer/help/_footer.html.erb +4 -0
  289. data/app/views/platform/developer/help/_header.html.erb +95 -0
  290. data/app/views/platform/developer/help/_navigation.html.erb +99 -0
  291. data/app/views/platform/developer/help/api.html.erb +120 -0
  292. data/app/views/platform/developer/help/credits.html.erb +77 -0
  293. data/app/views/platform/developer/help/index.html.erb +19 -0
  294. data/app/views/platform/developer/help/license.html.erb +586 -0
  295. data/app/views/platform/developer/help/oauth_app_login.html.erb +177 -0
  296. data/app/views/platform/developer/help/oauth_client_side.html.erb +264 -0
  297. data/app/views/platform/developer/help/oauth_desktop.html.erb +191 -0
  298. data/app/views/platform/developer/help/oauth_extensions.html.erb +342 -0
  299. data/app/views/platform/developer/help/oauth_intro.html.erb +371 -0
  300. data/app/views/platform/developer/help/oauth_mobile.html.erb +292 -0
  301. data/app/views/platform/developer/help/oauth_server_side.html.erb +603 -0
  302. data/app/views/platform/developer/help/oauth_trusted_client.html.erb +202 -0
  303. data/app/views/platform/developer/help/reference.html.erb +42 -0
  304. data/app/views/platform/developer/help/sdk_ios.html.erb +31 -0
  305. data/app/views/platform/developer/help/sdk_js.html.erb +202 -0
  306. data/app/views/platform/developer/info/_basic_info.html.erb +74 -0
  307. data/app/views/platform/developer/info/_header.html.erb +12 -0
  308. data/app/views/platform/developer/info/index.html.erb +23 -0
  309. data/app/views/platform/developer/registration/index.html.erb +134 -0
  310. data/app/views/platform/developer/resources/index.html.erb +23 -0
  311. data/app/views/platform/forum/_message.html.erb +17 -0
  312. data/app/views/platform/forum/_messages.html.erb +14 -0
  313. data/app/views/platform/forum/_new_message.html.erb +26 -0
  314. data/app/views/platform/forum/_new_topic.html.erb +38 -0
  315. data/app/views/platform/forum/_topic.html.erb +18 -0
  316. data/app/views/platform/forum/_topics.html.erb +74 -0
  317. data/app/views/platform/login/index.html.erb +31 -0
  318. data/app/views/platform/login/register.html.erb +55 -0
  319. data/app/views/platform/oauth/_authorization_box.html.erb +75 -0
  320. data/app/views/platform/oauth/_authorization_popup.html.erb +38 -0
  321. data/app/views/platform/oauth/_authorize_form.html.erb +11 -0
  322. data/app/views/platform/oauth/auth_failed.html.erb +0 -0
  323. data/app/views/platform/oauth/auth_success.html.erb +0 -0
  324. data/app/views/platform/oauth/authorize_desktop.html.erb +76 -0
  325. data/app/views/platform/oauth/authorize_failure_iframe.html.erb +1 -0
  326. data/app/views/platform/oauth/authorize_failure_mobile.html.erb +24 -0
  327. data/app/views/platform/oauth/authorize_failure_popup.html.erb +24 -0
  328. data/app/views/platform/oauth/authorize_failure_web.html.erb +1 -0
  329. data/app/views/platform/oauth/authorize_iframe.html.erb +16 -0
  330. data/app/views/platform/oauth/authorize_mobile.html.erb +1 -0
  331. data/app/views/platform/oauth/authorize_popup.html.erb +1 -0
  332. data/app/views/platform/oauth/authorize_success_iframe.html.erb +1 -0
  333. data/app/views/platform/oauth/authorize_success_mobile.html.erb +24 -0
  334. data/app/views/platform/oauth/authorize_success_popup.html.erb +24 -0
  335. data/app/views/platform/oauth/authorize_success_web.html.erb +1 -0
  336. data/app/views/platform/oauth/authorize_web.html.erb +3 -0
  337. data/app/views/platform/oauth/xd.html.erb +13 -0
  338. data/app/views/platform/ratings/_list.html.erb +30 -0
  339. data/app/views/platform/ratings/_new.html.erb +70 -0
  340. data/app/views/platform/ratings/_rating.html.erb +17 -0
  341. data/config/platform/config.yml +133 -0
  342. data/config/platform/data/default_applications.yml +39 -0
  343. data/config/platform/data/default_categories.yml +56 -0
  344. data/config/platform/data/default_permissions.yml +0 -0
  345. data/config/platform/site/features.yml +66 -0
  346. data/config/routes.rb +59 -0
  347. data/db/migrate/20110602232141_create_platform_tables.rb +262 -0
  348. data/docs/Classes.graffle +7315 -0
  349. data/docs/Classes.pdf +0 -0
  350. data/lib/generators/platform/platform_generator.rb +56 -0
  351. data/lib/generators/platform/templates/db/create_platform_tables.rb +262 -0
  352. data/lib/generators/platform/templates/layouts/platform.html.erb +49 -0
  353. data/lib/generators/platform/templates/layouts/platform_admin.html.erb +60 -0
  354. data/lib/platform.rb +6 -0
  355. data/lib/platform/api/already_jsoned_string.rb +9 -0
  356. data/lib/platform/api/proxy.rb +45 -0
  357. data/lib/platform/api/proxy/base.rb +62 -0
  358. data/lib/platform/cache.rb +78 -0
  359. data/lib/platform/config.rb +666 -0
  360. data/lib/platform/engine.rb +5 -0
  361. data/lib/platform/exception.rb +27 -0
  362. data/lib/platform/extensions/action_controller_extension.rb +65 -0
  363. data/lib/platform/extensions/action_view_extension.rb +168 -0
  364. data/lib/platform/extensions/object_extension.rb +51 -0
  365. data/lib/platform/helper.rb +33 -0
  366. data/lib/platform/logger.rb +62 -0
  367. data/lib/platform/railtie.rb +52 -0
  368. data/lib/platform/random_password_generator.rb +76 -0
  369. data/lib/platform/simple_string_permissions.rb +40 -0
  370. data/lib/platform/version.rb +3 -0
  371. data/lib/tasks/platform.rake +119 -0
  372. data/platform.gemspec +45 -0
  373. data/script/rails +6 -0
  374. data/spec/config/config_spec.rb +10 -0
  375. data/spec/dummy_app.rb +52 -0
  376. data/spec/models/application_spec.rb +53 -0
  377. data/spec/models/developer_spec.rb +23 -0
  378. data/spec/spec_helper.rb +29 -0
  379. data/test/dummy/Rakefile +7 -0
  380. data/test/dummy/app/assets/javascripts/application.js +7 -0
  381. data/test/dummy/app/assets/stylesheets/admin.css +200 -0
  382. data/test/dummy/app/assets/stylesheets/application.css +47 -0
  383. data/test/dummy/app/assets/stylesheets/components.css.scss +211 -0
  384. data/test/dummy/app/assets/stylesheets/layout.css.scss +143 -0
  385. data/test/dummy/app/controllers/admin/admins_controller.rb +7 -0
  386. data/test/dummy/app/controllers/admin/base_controller.rb +12 -0
  387. data/test/dummy/app/controllers/admin/bookmarks_controller.rb +7 -0
  388. data/test/dummy/app/controllers/admin/users_controller.rb +19 -0
  389. data/test/dummy/app/controllers/api/base_controller.rb +5 -0
  390. data/test/dummy/app/controllers/api/bookmarks_controller.rb +35 -0
  391. data/test/dummy/app/controllers/api/users_controller.rb +19 -0
  392. data/test/dummy/app/controllers/application_controller.rb +31 -0
  393. data/test/dummy/app/controllers/home_controller.rb +7 -0
  394. data/test/dummy/app/controllers/login_controller.rb +65 -0
  395. data/test/dummy/app/helpers/application_helper.rb +9 -0
  396. data/test/dummy/app/helpers/home_helper.rb +2 -0
  397. data/test/dummy/app/mailers/.gitkeep +0 -0
  398. data/test/dummy/app/models/.gitkeep +0 -0
  399. data/test/dummy/app/models/admin.rb +4 -0
  400. data/test/dummy/app/models/admin_filter.rb +7 -0
  401. data/test/dummy/app/models/bookmark.rb +7 -0
  402. data/test/dummy/app/models/user.rb +34 -0
  403. data/test/dummy/app/views/admin/admins/index.html.erb +7 -0
  404. data/test/dummy/app/views/admin/bookmarks/index.html.erb +5 -0
  405. data/test/dummy/app/views/admin/users/index.html.erb +10 -0
  406. data/test/dummy/app/views/demo/index.rhtml +108 -0
  407. data/test/dummy/app/views/demo/tokens.rhtml +35 -0
  408. data/test/dummy/app/views/home/index.html.erb +43 -0
  409. data/test/dummy/app/views/layouts/_footer.html.erb +16 -0
  410. data/test/dummy/app/views/layouts/_header.html.erb +22 -0
  411. data/test/dummy/app/views/layouts/admin.html.erb +97 -0
  412. data/test/dummy/app/views/layouts/application.html.erb +25 -0
  413. data/test/dummy/app/views/layouts/minimal.html.erb +37 -0
  414. data/test/dummy/app/views/layouts/popup.html.erb +43 -0
  415. data/test/dummy/app/views/login/index.html.erb +34 -0
  416. data/test/dummy/app/views/login/register.html.erb +51 -0
  417. data/test/dummy/config.ru +4 -0
  418. data/test/dummy/config/application.rb +51 -0
  419. data/test/dummy/config/boot.rb +10 -0
  420. data/test/dummy/config/database.yml +25 -0
  421. data/test/dummy/config/environment.rb +5 -0
  422. data/test/dummy/config/environments/development.rb +30 -0
  423. data/test/dummy/config/environments/production.rb +60 -0
  424. data/test/dummy/config/environments/test.rb +42 -0
  425. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  426. data/test/dummy/config/initializers/inflections.rb +10 -0
  427. data/test/dummy/config/initializers/mime_types.rb +5 -0
  428. data/test/dummy/config/initializers/secret_token.rb +7 -0
  429. data/test/dummy/config/initializers/session_store.rb +8 -0
  430. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  431. data/test/dummy/config/locales/en.yml +5 -0
  432. data/test/dummy/config/platform/api/0/bookmark.yml +18 -0
  433. data/test/dummy/config/platform/api/0/user.yml +17 -0
  434. data/test/dummy/config/platform/api/1/bookmark.yml +58 -0
  435. data/test/dummy/config/platform/api/1/user.yml +36 -0
  436. data/test/dummy/config/platform/config.yml +135 -0
  437. data/test/dummy/config/platform/data/default_applications.yml +39 -0
  438. data/test/dummy/config/platform/data/default_categories.yml +56 -0
  439. data/test/dummy/config/platform/data/default_permissions.yml +0 -0
  440. data/test/dummy/config/platform/site/features.yml +66 -0
  441. data/test/dummy/config/platform/site/sample_apps.yml +100 -0
  442. data/test/dummy/config/routes.rb +30 -0
  443. data/test/dummy/config/tr8n/config.yml +247 -0
  444. data/test/dummy/config/tr8n/data/ip_locations.csv +93460 -0
  445. data/test/dummy/config/tr8n/rules/default_date_rules.yml +20 -0
  446. data/test/dummy/config/tr8n/rules/default_gender_list_rules.yml +82 -0
  447. data/test/dummy/config/tr8n/rules/default_gender_rules.yml +20 -0
  448. data/test/dummy/config/tr8n/rules/default_language_cases.yml +272 -0
  449. data/test/dummy/config/tr8n/rules/default_list_rules.yml +19 -0
  450. data/test/dummy/config/tr8n/rules/default_numeric_rules.yml +42 -0
  451. data/test/dummy/config/tr8n/rules/default_value_rules.yml +18 -0
  452. data/test/dummy/config/tr8n/site/default_glossary.yml +18 -0
  453. data/test/dummy/config/tr8n/site/default_languages.yml +1591 -0
  454. data/test/dummy/config/tr8n/site/features.yml +111 -0
  455. data/test/dummy/config/tr8n/site/shortcuts.yml +55 -0
  456. data/test/dummy/config/tr8n/site/sitemap.json +42 -0
  457. data/test/dummy/config/tr8n/tokens/data.yml +19 -0
  458. data/test/dummy/config/tr8n/tokens/decorations.yml +19 -0
  459. data/test/dummy/config/will_filter/config.yml +99 -0
  460. data/test/dummy/db/migrate/20101207014543_create_users.rb +23 -0
  461. data/test/dummy/db/migrate/20110113223509_create_admins.rb +15 -0
  462. data/test/dummy/db/migrate/20110930041143_create_will_filter_filters.rb +15 -0
  463. data/test/dummy/db/migrate/20110930041150_create_tr8n_tables.rb +350 -0
  464. data/test/dummy/db/migrate/20111004075531_create_platform_tables.rb +262 -0
  465. data/test/dummy/db/migrate/20111012055603_create_bookmarks.rb +10 -0
  466. data/test/dummy/db/schema.rb +683 -0
  467. data/test/dummy/lib/assets/.gitkeep +0 -0
  468. data/test/dummy/lib/platform/api/bookmark_proxy_0.rb +12 -0
  469. data/test/dummy/lib/platform/api/bookmark_proxy_1.rb +12 -0
  470. data/test/dummy/lib/platform/api/user_proxy_0.rb +12 -0
  471. data/test/dummy/lib/platform/api/user_proxy_1.rb +12 -0
  472. data/test/dummy/log/.gitkeep +0 -0
  473. data/test/dummy/public/404.html +26 -0
  474. data/test/dummy/public/422.html +26 -0
  475. data/test/dummy/public/500.html +26 -0
  476. data/test/dummy/public/favicon.ico +0 -0
  477. data/test/dummy/script/rails +6 -0
  478. data/test/dummy/test/fixtures/documents.yml +11 -0
  479. data/test/dummy/test/unit/document_test.rb +7 -0
  480. metadata +886 -0
@@ -0,0 +1,120 @@
1
+ <%= render :partial => "header" %>
2
+
3
+ <div class="documentation_section_title">
4
+ <%= @api[:title] || @api[:path] %>
5
+ </div>
6
+
7
+ <div class="documentation_section">
8
+ <p>
9
+ <%= tr(@api[:description], "API description") %>
10
+ </p>
11
+
12
+ <% if @api[:sample] %>
13
+ <h2><%=tr("Usage")%></h2>
14
+ <p>
15
+ <% if @api[:method] == 'POST' %>
16
+ <p><%=tr("Requires POST.")%></p>
17
+ <% end %>
18
+
19
+ <%= link_to(@api[:sample], @api[:sample]) %>
20
+ </p>
21
+ <% end %>
22
+
23
+ <% if @api[:params] %>
24
+ <%
25
+ api_params = @api[:params]
26
+ unless @api[:params].is_a?(Hash)
27
+ api_params = {}
28
+ root = @api[:parent]
29
+ selected_keys = []
30
+
31
+ if @api[:params].is_a?(String)
32
+ if @api[:params] == "*"
33
+ selected_keys = root[:fields].keys
34
+ else
35
+ selected_keys = root[:param_groups][@api[:params]]
36
+ end
37
+ elsif @api[:params].is_a?(Array)
38
+ selected_keys = @api[:params]
39
+ end
40
+
41
+ if selected_keys.is_a?(Array)
42
+ selected_keys.each do |field_key|
43
+ api_params[field_key] = root[:fields][field_key].clone
44
+ api_params[field_key][:required] = false
45
+ end
46
+ else
47
+ api_params = selected_keys
48
+ end
49
+ end
50
+ %>
51
+ <h2><%=tr("Parameters") %></h2>
52
+ <p>
53
+ <table class="documentation_table">
54
+ <tr>
55
+ <th style="width:150px;"><%=tr("Name") %></th>
56
+ <th style="width:150px;"><%=tr("Type") %></th>
57
+ <th><%=tr("Description") %></th>
58
+ <th><%=tr("Required") %></th>
59
+ </tr>
60
+ <% api_params.keys.sort.each do |key| %>
61
+ <tr>
62
+ <td><%=key%></td>
63
+ <td><%=documentation_field_type_tag(api_params[key])%></td>
64
+ <td><%=tr(api_params[key][:description], "API field description")%></td>
65
+ <td><%=api_params[key][:required]%></td>
66
+ </tr>
67
+ <% end %>
68
+ </table>
69
+ </p>
70
+ <% end %>
71
+
72
+ <% if @api[:fields] %>
73
+ <%
74
+ api_fields = @api[:fields]
75
+ unless @api[:fields].is_a?(Hash)
76
+ api_fields = {}
77
+ root = @api[:parent]
78
+ selected_keys = []
79
+
80
+ if @api[:fields].is_a?(String)
81
+ if @api[:fields] == "*"
82
+ selected_keys = root[:fields].keys
83
+ else
84
+ selected_keys = root[:field_groups][@api[:fields]]
85
+ end
86
+ elsif @api[:fields].is_a?(Array)
87
+ selected_keys = @api[:fields]
88
+ end
89
+
90
+ if selected_keys.is_a?(Array)
91
+ selected_keys.each do |field_key|
92
+ api_fields[field_key] = root[:fields][field_key].clone
93
+ end
94
+ else
95
+ api_fields = selected_keys
96
+ end
97
+ end
98
+ %>
99
+ <h2><%=tr("Returned Fields") %></h2>
100
+ <p>
101
+ <table class="documentation_table">
102
+ <tr>
103
+ <th style="width:150px;"><%=tr("Name") %></th>
104
+ <th style="width:150px;"><%=tr("Type") %></th>
105
+ <th><%=tr("Description") %></th>
106
+ </tr>
107
+ <% api_fields.keys.sort.each do |key| %>
108
+ <tr>
109
+ <td><%=key%> <%=platform_documentation_field_decorators_tag(api_fields[key]) %></td>
110
+ <td><%=documentation_field_type_tag(api_fields[key])%></td>
111
+ <td><%=tr(api_fields[key][:description], "API field description")%></td>
112
+ </tr>
113
+ <% end %>
114
+ </table>
115
+ <div class="documentaiton_note" style="padding-top:10px;">Note: Blank fields will not be returned to save bandwidth.</div>
116
+ </p>
117
+ <% end %>
118
+ </div>
119
+
120
+ <%= render :partial => "footer" %>
@@ -0,0 +1,77 @@
1
+ <style>
2
+ .content_hd,
3
+ .content_bd,
4
+ .content_ft {overflow:hidden;zoom:1;padding:25px}
5
+
6
+ .credits td {
7
+ vertical-align: top;
8
+ }
9
+ </style>
10
+ <div style="text-align:center; margin:15px;">
11
+ <%=image_tag("platform/platform5.png", :style => "height:100px;")%>
12
+ </div>
13
+
14
+ <h2 class="underscore content_hd">
15
+ Platform Engine Team
16
+ </h2>
17
+
18
+ <div class="content_bd">
19
+ <table cellpadding="5px;" style="width:100%" class="credits">
20
+ <tr>
21
+ <td style="width:15%">
22
+ <%=image_tag("http://www.gravatar.com/avatar/6fd9c059806e2ba9b299424b39403efb?s=100")%>
23
+ </td>
24
+ <td>
25
+ <strong>Michael Berkovich</strong><br>
26
+ Lead Engineer and Designer<br>
27
+ <%=link_to("https://github.com/berk", "https://github.com/berk")%>
28
+ </td>
29
+
30
+ <td style="width:15%">
31
+ <%=image_tag("http://www.gravatar.com/avatar/79b5fcb41c46358ae0a54499c102077d?s=100")%>
32
+ </td>
33
+ <td>
34
+ <strong>Scott Steadman</strong><br>
35
+ Engineer<br>
36
+ <%=link_to("https://github.com/ss", "https://github.com/ss")%>
37
+ </td>
38
+
39
+ </tr>
40
+ <tr>
41
+ <td>
42
+ <%=image_tag("http://www.gravatar.com/avatar/3882f637b974cf22a75f5c8ba634f257?s=100")%>
43
+ </td>
44
+ <td>
45
+ <strong>Ian McDaniel</strong><br>
46
+ User Interface Designer<br>
47
+ <%=link_to("https://github.com/ianmcdaniel", "https://github.com/ianmcdaniel")%>
48
+ </td>
49
+
50
+ <td style="width:15%">
51
+ <%=image_tag("http://www.gravatar.com/avatar/2922861d825b49140f36592c9e96f310?s=100")%>
52
+ </td>
53
+ <td>
54
+ <strong>Justin Balthrop</strong><br>
55
+ Project Advisor<br>
56
+ <%=link_to("https://github.com/ninjudd", "https://github.com/ninjudd")%>
57
+ </td>
58
+
59
+ </tr>
60
+ </table>
61
+
62
+ </div>
63
+
64
+ <h2 class="underscore content_hd">
65
+ Third Party Plugins and Scripts
66
+ </h2>
67
+
68
+ <div class="content_bd">
69
+ <strong>Akira Matsuda</strong><br>
70
+ kaminari gem<br>
71
+ <%=link_to("https://github.com/amatsuda/kaminari", "https://github.com/amatsuda/kaminari")%>
72
+ <br><br>
73
+
74
+ <strong>Binny V A</strong><br>
75
+ Script for Handling Keyboard Shortcuts in JavaScript<br>
76
+ <%=link_to("http://www.openjs.com/scripts/events/keyboard_shortcuts", "http://www.openjs.com/scripts/events/keyboard_shortcuts")%>
77
+ </div>
@@ -0,0 +1,19 @@
1
+ <%= render :partial => "header" %>
2
+
3
+ <div class="documentation_section_title">
4
+ <%= tr("Welcome to {site_title} API Documentation", "", :site_title => Platform::Config.site_title ) %>
5
+ </div>
6
+
7
+ <div class="documentation_section">
8
+ <p>
9
+ <%=tr("Thank you for becoming a {site_title} developer.", "", :site_title => Platform::Config.site_title )%>
10
+ <%=tr("We're happy to provide you with a set of developer tools that will enable you to register, develop and monitor your application on {site_title}.", "", :site_title => Tr8n::Config.site_title)%>
11
+ </p>
12
+
13
+ <p>
14
+ <%=tr("To learn more, use the menu on the left to expore the API.")%>
15
+ </p>
16
+
17
+ </div>
18
+
19
+ <%= render :partial => "footer" %>
@@ -0,0 +1,586 @@
1
+ <%= tr8n_with_options_tag(:default_locale => 'en-US', :admin => true) do %>
2
+
3
+ <style>
4
+ h3 {
5
+ width:100%;
6
+ }
7
+ h4 {
8
+ font-weight:bold;
9
+ font-size:16px;
10
+ padding-left:0px;
11
+ padding-top:10px;
12
+ }
13
+ </style>
14
+
15
+ <h2 class="underscore content_hd">
16
+ GNU GENERAL PUBLIC LICENSE
17
+ <div style="padding-top:10px; color:grey; font-size: 14px;">
18
+ <p>Version 3, 29 June 2007</p>
19
+ <p>Copyright © 2007 Free Software Foundation, Inc.
20
+ &lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;</p>
21
+ <p>Everyone is permitted to copy and distribute verbatim copies
22
+ of this license document, but changing it is not allowed.</p>
23
+ </div>
24
+ </h2>
25
+
26
+ <div class="content_bd">
27
+
28
+ <h3><a name="terms"></a>TERMS AND CONDITIONS</h3>
29
+
30
+ <h4><a name="section0"></a>0. Definitions.</h4>
31
+
32
+ <p>“This License” refers to version 3 of the GNU General Public License.</p>
33
+
34
+ <p>“Copyright” also means copyright-like laws that apply to other kinds of
35
+ works, such as semiconductor masks.</p>
36
+
37
+ <p>“The Program” refers to any copyrightable work licensed under this
38
+ License. Each licensee is addressed as “you”. “Licensees” and
39
+ “recipients” may be individuals or organizations.</p>
40
+
41
+ <p>To “modify” a work means to copy from or adapt all or part of the work
42
+ in a fashion requiring copyright permission, other than the making of an
43
+ exact copy. The resulting work is called a “modified version” of the
44
+ earlier work or a work “based on” the earlier work.</p>
45
+
46
+ <p>A “covered work” means either the unmodified Program or a work based
47
+ on the Program.</p>
48
+
49
+ <p>To “propagate” a work means to do anything with it that, without
50
+ permission, would make you directly or secondarily liable for
51
+ infringement under applicable copyright law, except executing it on a
52
+ computer or modifying a private copy. Propagation includes copying,
53
+ distribution (with or without modification), making available to the
54
+ public, and in some countries other activities as well.</p>
55
+
56
+ <p>To “convey” a work means any kind of propagation that enables other
57
+ parties to make or receive copies. Mere interaction with a user through
58
+ a computer network, with no transfer of a copy, is not conveying.</p>
59
+
60
+ <p>An interactive user interface displays “Appropriate Legal Notices”
61
+ to the extent that it includes a convenient and prominently visible
62
+ feature that (1) displays an appropriate copyright notice, and (2)
63
+ tells the user that there is no warranty for the work (except to the
64
+ extent that warranties are provided), that licensees may convey the
65
+ work under this License, and how to view a copy of this License. If
66
+ the interface presents a list of user commands or options, such as a
67
+ menu, a prominent item in the list meets this criterion.</p>
68
+
69
+ <h4><a name="section1"></a>1. Source Code.</h4>
70
+
71
+ <p>The “source code” for a work means the preferred form of the work
72
+ for making modifications to it. “Object code” means any non-source
73
+ form of a work.</p>
74
+
75
+ <p>A “Standard Interface” means an interface that either is an official
76
+ standard defined by a recognized standards body, or, in the case of
77
+ interfaces specified for a particular programming language, one that
78
+ is widely used among developers working in that language.</p>
79
+
80
+ <p>The “System Libraries” of an executable work include anything, other
81
+ than the work as a whole, that (a) is included in the normal form of
82
+ packaging a Major Component, but which is not part of that Major
83
+ Component, and (b) serves only to enable use of the work with that
84
+ Major Component, or to implement a Standard Interface for which an
85
+ implementation is available to the public in source code form. A
86
+ “Major Component”, in this context, means a major essential component
87
+ (kernel, window system, and so on) of the specific operating system
88
+ (if any) on which the executable work runs, or a compiler used to
89
+ produce the work, or an object code interpreter used to run it.</p>
90
+
91
+ <p>The “Corresponding Source” for a work in object code form means all
92
+ the source code needed to generate, install, and (for an executable
93
+ work) run the object code and to modify the work, including scripts to
94
+ control those activities. However, it does not include the work's
95
+ System Libraries, or general-purpose tools or generally available free
96
+ programs which are used unmodified in performing those activities but
97
+ which are not part of the work. For example, Corresponding Source
98
+ includes interface definition files associated with source files for
99
+ the work, and the source code for shared libraries and dynamically
100
+ linked subprograms that the work is specifically designed to require,
101
+ such as by intimate data communication or control flow between those
102
+ subprograms and other parts of the work.</p>
103
+
104
+ <p>The Corresponding Source need not include anything that users
105
+ can regenerate automatically from other parts of the Corresponding
106
+ Source.</p>
107
+
108
+ <p>The Corresponding Source for a work in source code form is that
109
+ same work.</p>
110
+
111
+ <h4><a name="section2"></a>2. Basic Permissions.</h4>
112
+
113
+ <p>All rights granted under this License are granted for the term of
114
+ copyright on the Program, and are irrevocable provided the stated
115
+ conditions are met. This License explicitly affirms your unlimited
116
+ permission to run the unmodified Program. The output from running a
117
+ covered work is covered by this License only if the output, given its
118
+ content, constitutes a covered work. This License acknowledges your
119
+ rights of fair use or other equivalent, as provided by copyright law.</p>
120
+
121
+ <p>You may make, run and propagate covered works that you do not
122
+ convey, without conditions so long as your license otherwise remains
123
+ in force. You may convey covered works to others for the sole purpose
124
+ of having them make modifications exclusively for you, or provide you
125
+ with facilities for running those works, provided that you comply with
126
+ the terms of this License in conveying all material for which you do
127
+ not control copyright. Those thus making or running the covered works
128
+ for you must do so exclusively on your behalf, under your direction
129
+ and control, on terms that prohibit them from making any copies of
130
+ your copyrighted material outside their relationship with you.</p>
131
+
132
+ <p>Conveying under any other circumstances is permitted solely under
133
+ the conditions stated below. Sublicensing is not allowed; section 10
134
+ makes it unnecessary.</p>
135
+
136
+ <h4><a name="section3"></a>3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h4>
137
+
138
+ <p>No covered work shall be deemed part of an effective technological
139
+ measure under any applicable law fulfilling obligations under article
140
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
141
+ similar laws prohibiting or restricting circumvention of such
142
+ measures.</p>
143
+
144
+ <p>When you convey a covered work, you waive any legal power to forbid
145
+ circumvention of technological measures to the extent such circumvention
146
+ is effected by exercising rights under this License with respect to
147
+ the covered work, and you disclaim any intention to limit operation or
148
+ modification of the work as a means of enforcing, against the work's
149
+ users, your or third parties' legal rights to forbid circumvention of
150
+ technological measures.</p>
151
+
152
+ <h4><a name="section4"></a>4. Conveying Verbatim Copies.</h4>
153
+
154
+ <p>You may convey verbatim copies of the Program's source code as you
155
+ receive it, in any medium, provided that you conspicuously and
156
+ appropriately publish on each copy an appropriate copyright notice;
157
+ keep intact all notices stating that this License and any
158
+ non-permissive terms added in accord with section 7 apply to the code;
159
+ keep intact all notices of the absence of any warranty; and give all
160
+ recipients a copy of this License along with the Program.</p>
161
+
162
+ <p>You may charge any price or no price for each copy that you convey,
163
+ and you may offer support or warranty protection for a fee.</p>
164
+
165
+ <h4><a name="section5"></a>5. Conveying Modified Source Versions.</h4>
166
+
167
+ <p>You may convey a work based on the Program, or the modifications to
168
+ produce it from the Program, in the form of source code under the
169
+ terms of section 4, provided that you also meet all of these conditions:</p>
170
+
171
+ <ul>
172
+ <li>a) The work must carry prominent notices stating that you modified
173
+ it, and giving a relevant date.</li>
174
+
175
+ <li>b) The work must carry prominent notices stating that it is
176
+ released under this License and any conditions added under section
177
+ 7. This requirement modifies the requirement in section 4 to
178
+ “keep intact all notices”.</li>
179
+
180
+ <li>c) You must license the entire work, as a whole, under this
181
+ License to anyone who comes into possession of a copy. This
182
+ License will therefore apply, along with any applicable section 7
183
+ additional terms, to the whole of the work, and all its parts,
184
+ regardless of how they are packaged. This License gives no
185
+ permission to license the work in any other way, but it does not
186
+ invalidate such permission if you have separately received it.</li>
187
+
188
+ <li>d) If the work has interactive user interfaces, each must display
189
+ Appropriate Legal Notices; however, if the Program has interactive
190
+ interfaces that do not display Appropriate Legal Notices, your
191
+ work need not make them do so.</li>
192
+ </ul>
193
+
194
+ <p>A compilation of a covered work with other separate and independent
195
+ works, which are not by their nature extensions of the covered work,
196
+ and which are not combined with it such as to form a larger program,
197
+ in or on a volume of a storage or distribution medium, is called an
198
+ “aggregate” if the compilation and its resulting copyright are not
199
+ used to limit the access or legal rights of the compilation's users
200
+ beyond what the individual works permit. Inclusion of a covered work
201
+ in an aggregate does not cause this License to apply to the other
202
+ parts of the aggregate.</p>
203
+
204
+ <h4><a name="section6"></a>6. Conveying Non-Source Forms.</h4>
205
+
206
+ <p>You may convey a covered work in object code form under the terms
207
+ of sections 4 and 5, provided that you also convey the
208
+ machine-readable Corresponding Source under the terms of this License,
209
+ in one of these ways:</p>
210
+
211
+ <ul>
212
+ <li>a) Convey the object code in, or embodied in, a physical product
213
+ (including a physical distribution medium), accompanied by the
214
+ Corresponding Source fixed on a durable physical medium
215
+ customarily used for software interchange.</li>
216
+
217
+ <li>b) Convey the object code in, or embodied in, a physical product
218
+ (including a physical distribution medium), accompanied by a
219
+ written offer, valid for at least three years and valid for as
220
+ long as you offer spare parts or customer support for that product
221
+ model, to give anyone who possesses the object code either (1) a
222
+ copy of the Corresponding Source for all the software in the
223
+ product that is covered by this License, on a durable physical
224
+ medium customarily used for software interchange, for a price no
225
+ more than your reasonable cost of physically performing this
226
+ conveying of source, or (2) access to copy the
227
+ Corresponding Source from a network server at no charge.</li>
228
+
229
+ <li>c) Convey individual copies of the object code with a copy of the
230
+ written offer to provide the Corresponding Source. This
231
+ alternative is allowed only occasionally and noncommercially, and
232
+ only if you received the object code with such an offer, in accord
233
+ with subsection 6b.</li>
234
+
235
+ <li>d) Convey the object code by offering access from a designated
236
+ place (gratis or for a charge), and offer equivalent access to the
237
+ Corresponding Source in the same way through the same place at no
238
+ further charge. You need not require recipients to copy the
239
+ Corresponding Source along with the object code. If the place to
240
+ copy the object code is a network server, the Corresponding Source
241
+ may be on a different server (operated by you or a third party)
242
+ that supports equivalent copying facilities, provided you maintain
243
+ clear directions next to the object code saying where to find the
244
+ Corresponding Source. Regardless of what server hosts the
245
+ Corresponding Source, you remain obligated to ensure that it is
246
+ available for as long as needed to satisfy these requirements.</li>
247
+
248
+ <li>e) Convey the object code using peer-to-peer transmission, provided
249
+ you inform other peers where the object code and Corresponding
250
+ Source of the work are being offered to the general public at no
251
+ charge under subsection 6d.</li>
252
+ </ul>
253
+
254
+ <p>A separable portion of the object code, whose source code is excluded
255
+ from the Corresponding Source as a System Library, need not be
256
+ included in conveying the object code work.</p>
257
+
258
+ <p>A “User Product” is either (1) a “consumer product”, which means any
259
+ tangible personal property which is normally used for personal, family,
260
+ or household purposes, or (2) anything designed or sold for incorporation
261
+ into a dwelling. In determining whether a product is a consumer product,
262
+ doubtful cases shall be resolved in favor of coverage. For a particular
263
+ product received by a particular user, “normally used” refers to a
264
+ typical or common use of that class of product, regardless of the status
265
+ of the particular user or of the way in which the particular user
266
+ actually uses, or expects or is expected to use, the product. A product
267
+ is a consumer product regardless of whether the product has substantial
268
+ commercial, industrial or non-consumer uses, unless such uses represent
269
+ the only significant mode of use of the product.</p>
270
+
271
+ <p>“Installation Information” for a User Product means any methods,
272
+ procedures, authorization keys, or other information required to install
273
+ and execute modified versions of a covered work in that User Product from
274
+ a modified version of its Corresponding Source. The information must
275
+ suffice to ensure that the continued functioning of the modified object
276
+ code is in no case prevented or interfered with solely because
277
+ modification has been made.</p>
278
+
279
+ <p>If you convey an object code work under this section in, or with, or
280
+ specifically for use in, a User Product, and the conveying occurs as
281
+ part of a transaction in which the right of possession and use of the
282
+ User Product is transferred to the recipient in perpetuity or for a
283
+ fixed term (regardless of how the transaction is characterized), the
284
+ Corresponding Source conveyed under this section must be accompanied
285
+ by the Installation Information. But this requirement does not apply
286
+ if neither you nor any third party retains the ability to install
287
+ modified object code on the User Product (for example, the work has
288
+ been installed in ROM).</p>
289
+
290
+ <p>The requirement to provide Installation Information does not include a
291
+ requirement to continue to provide support service, warranty, or updates
292
+ for a work that has been modified or installed by the recipient, or for
293
+ the User Product in which it has been modified or installed. Access to a
294
+ network may be denied when the modification itself materially and
295
+ adversely affects the operation of the network or violates the rules and
296
+ protocols for communication across the network.</p>
297
+
298
+ <p>Corresponding Source conveyed, and Installation Information provided,
299
+ in accord with this section must be in a format that is publicly
300
+ documented (and with an implementation available to the public in
301
+ source code form), and must require no special password or key for
302
+ unpacking, reading or copying.</p>
303
+
304
+ <h4><a name="section7"></a>7. Additional Terms.</h4>
305
+
306
+ <p>“Additional permissions” are terms that supplement the terms of this
307
+ License by making exceptions from one or more of its conditions.
308
+ Additional permissions that are applicable to the entire Program shall
309
+ be treated as though they were included in this License, to the extent
310
+ that they are valid under applicable law. If additional permissions
311
+ apply only to part of the Program, that part may be used separately
312
+ under those permissions, but the entire Program remains governed by
313
+ this License without regard to the additional permissions.</p>
314
+
315
+ <p>When you convey a copy of a covered work, you may at your option
316
+ remove any additional permissions from that copy, or from any part of
317
+ it. (Additional permissions may be written to require their own
318
+ removal in certain cases when you modify the work.) You may place
319
+ additional permissions on material, added by you to a covered work,
320
+ for which you have or can give appropriate copyright permission.</p>
321
+
322
+ <p>Notwithstanding any other provision of this License, for material you
323
+ add to a covered work, you may (if authorized by the copyright holders of
324
+ that material) supplement the terms of this License with terms:</p>
325
+
326
+ <ul>
327
+ <li>a) Disclaiming warranty or limiting liability differently from the
328
+ terms of sections 15 and 16 of this License; or</li>
329
+
330
+ <li>b) Requiring preservation of specified reasonable legal notices or
331
+ author attributions in that material or in the Appropriate Legal
332
+ Notices displayed by works containing it; or</li>
333
+
334
+ <li>c) Prohibiting misrepresentation of the origin of that material, or
335
+ requiring that modified versions of such material be marked in
336
+ reasonable ways as different from the original version; or</li>
337
+
338
+ <li>d) Limiting the use for publicity purposes of names of licensors or
339
+ authors of the material; or</li>
340
+
341
+ <li>e) Declining to grant rights under trademark law for use of some
342
+ trade names, trademarks, or service marks; or</li>
343
+
344
+ <li>f) Requiring indemnification of licensors and authors of that
345
+ material by anyone who conveys the material (or modified versions of
346
+ it) with contractual assumptions of liability to the recipient, for
347
+ any liability that these contractual assumptions directly impose on
348
+ those licensors and authors.</li>
349
+ </ul>
350
+
351
+ <p>All other non-permissive additional terms are considered “further
352
+ restrictions” within the meaning of section 10. If the Program as you
353
+ received it, or any part of it, contains a notice stating that it is
354
+ governed by this License along with a term that is a further
355
+ restriction, you may remove that term. If a license document contains
356
+ a further restriction but permits relicensing or conveying under this
357
+ License, you may add to a covered work material governed by the terms
358
+ of that license document, provided that the further restriction does
359
+ not survive such relicensing or conveying.</p>
360
+
361
+ <p>If you add terms to a covered work in accord with this section, you
362
+ must place, in the relevant source files, a statement of the
363
+ additional terms that apply to those files, or a notice indicating
364
+ where to find the applicable terms.</p>
365
+
366
+ <p>Additional terms, permissive or non-permissive, may be stated in the
367
+ form of a separately written license, or stated as exceptions;
368
+ the above requirements apply either way.</p>
369
+
370
+ <h4><a name="section8"></a>8. Termination.</h4>
371
+
372
+ <p>You may not propagate or modify a covered work except as expressly
373
+ provided under this License. Any attempt otherwise to propagate or
374
+ modify it is void, and will automatically terminate your rights under
375
+ this License (including any patent licenses granted under the third
376
+ paragraph of section 11).</p>
377
+
378
+ <p>However, if you cease all violation of this License, then your
379
+ license from a particular copyright holder is reinstated (a)
380
+ provisionally, unless and until the copyright holder explicitly and
381
+ finally terminates your license, and (b) permanently, if the copyright
382
+ holder fails to notify you of the violation by some reasonable means
383
+ prior to 60 days after the cessation.</p>
384
+
385
+ <p>Moreover, your license from a particular copyright holder is
386
+ reinstated permanently if the copyright holder notifies you of the
387
+ violation by some reasonable means, this is the first time you have
388
+ received notice of violation of this License (for any work) from that
389
+ copyright holder, and you cure the violation prior to 30 days after
390
+ your receipt of the notice.</p>
391
+
392
+ <p>Termination of your rights under this section does not terminate the
393
+ licenses of parties who have received copies or rights from you under
394
+ this License. If your rights have been terminated and not permanently
395
+ reinstated, you do not qualify to receive new licenses for the same
396
+ material under section 10.</p>
397
+
398
+ <h4><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h4>
399
+
400
+ <p>You are not required to accept this License in order to receive or
401
+ run a copy of the Program. Ancillary propagation of a covered work
402
+ occurring solely as a consequence of using peer-to-peer transmission
403
+ to receive a copy likewise does not require acceptance. However,
404
+ nothing other than this License grants you permission to propagate or
405
+ modify any covered work. These actions infringe copyright if you do
406
+ not accept this License. Therefore, by modifying or propagating a
407
+ covered work, you indicate your acceptance of this License to do so.</p>
408
+
409
+ <h4><a name="section10"></a>10. Automatic Licensing of Downstream Recipients.</h4>
410
+
411
+ <p>Each time you convey a covered work, the recipient automatically
412
+ receives a license from the original licensors, to run, modify and
413
+ propagate that work, subject to this License. You are not responsible
414
+ for enforcing compliance by third parties with this License.</p>
415
+
416
+ <p>An “entity transaction” is a transaction transferring control of an
417
+ organization, or substantially all assets of one, or subdividing an
418
+ organization, or merging organizations. If propagation of a covered
419
+ work results from an entity transaction, each party to that
420
+ transaction who receives a copy of the work also receives whatever
421
+ licenses to the work the party's predecessor in interest had or could
422
+ give under the previous paragraph, plus a right to possession of the
423
+ Corresponding Source of the work from the predecessor in interest, if
424
+ the predecessor has it or can get it with reasonable efforts.</p>
425
+
426
+ <p>You may not impose any further restrictions on the exercise of the
427
+ rights granted or affirmed under this License. For example, you may
428
+ not impose a license fee, royalty, or other charge for exercise of
429
+ rights granted under this License, and you may not initiate litigation
430
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
431
+ any patent claim is infringed by making, using, selling, offering for
432
+ sale, or importing the Program or any portion of it.</p>
433
+
434
+ <h4><a name="section11"></a>11. Patents.</h4>
435
+
436
+ <p>A “contributor” is a copyright holder who authorizes use under this
437
+ License of the Program or a work on which the Program is based. The
438
+ work thus licensed is called the contributor's “contributor version”.</p>
439
+
440
+ <p>A contributor's “essential patent claims” are all patent claims
441
+ owned or controlled by the contributor, whether already acquired or
442
+ hereafter acquired, that would be infringed by some manner, permitted
443
+ by this License, of making, using, or selling its contributor version,
444
+ but do not include claims that would be infringed only as a
445
+ consequence of further modification of the contributor version. For
446
+ purposes of this definition, “control” includes the right to grant
447
+ patent sublicenses in a manner consistent with the requirements of
448
+ this License.</p>
449
+
450
+ <p>Each contributor grants you a non-exclusive, worldwide, royalty-free
451
+ patent license under the contributor's essential patent claims, to
452
+ make, use, sell, offer for sale, import and otherwise run, modify and
453
+ propagate the contents of its contributor version.</p>
454
+
455
+ <p>In the following three paragraphs, a “patent license” is any express
456
+ agreement or commitment, however denominated, not to enforce a patent
457
+ (such as an express permission to practice a patent or covenant not to
458
+ sue for patent infringement). To “grant” such a patent license to a
459
+ party means to make such an agreement or commitment not to enforce a
460
+ patent against the party.</p>
461
+
462
+ <p>If you convey a covered work, knowingly relying on a patent license,
463
+ and the Corresponding Source of the work is not available for anyone
464
+ to copy, free of charge and under the terms of this License, through a
465
+ publicly available network server or other readily accessible means,
466
+ then you must either (1) cause the Corresponding Source to be so
467
+ available, or (2) arrange to deprive yourself of the benefit of the
468
+ patent license for this particular work, or (3) arrange, in a manner
469
+ consistent with the requirements of this License, to extend the patent
470
+ license to downstream recipients. “Knowingly relying” means you have
471
+ actual knowledge that, but for the patent license, your conveying the
472
+ covered work in a country, or your recipient's use of the covered work
473
+ in a country, would infringe one or more identifiable patents in that
474
+ country that you have reason to believe are valid.</p>
475
+
476
+ <p>If, pursuant to or in connection with a single transaction or
477
+ arrangement, you convey, or propagate by procuring conveyance of, a
478
+ covered work, and grant a patent license to some of the parties
479
+ receiving the covered work authorizing them to use, propagate, modify
480
+ or convey a specific copy of the covered work, then the patent license
481
+ you grant is automatically extended to all recipients of the covered
482
+ work and works based on it.</p>
483
+
484
+ <p>A patent license is “discriminatory” if it does not include within
485
+ the scope of its coverage, prohibits the exercise of, or is
486
+ conditioned on the non-exercise of one or more of the rights that are
487
+ specifically granted under this License. You may not convey a covered
488
+ work if you are a party to an arrangement with a third party that is
489
+ in the business of distributing software, under which you make payment
490
+ to the third party based on the extent of your activity of conveying
491
+ the work, and under which the third party grants, to any of the
492
+ parties who would receive the covered work from you, a discriminatory
493
+ patent license (a) in connection with copies of the covered work
494
+ conveyed by you (or copies made from those copies), or (b) primarily
495
+ for and in connection with specific products or compilations that
496
+ contain the covered work, unless you entered into that arrangement,
497
+ or that patent license was granted, prior to 28 March 2007.</p>
498
+
499
+ <p>Nothing in this License shall be construed as excluding or limiting
500
+ any implied license or other defenses to infringement that may
501
+ otherwise be available to you under applicable patent law.</p>
502
+
503
+ <h4><a name="section12"></a>12. No Surrender of Others' Freedom.</h4>
504
+
505
+ <p>If conditions are imposed on you (whether by court order, agreement or
506
+ otherwise) that contradict the conditions of this License, they do not
507
+ excuse you from the conditions of this License. If you cannot convey a
508
+ covered work so as to satisfy simultaneously your obligations under this
509
+ License and any other pertinent obligations, then as a consequence you may
510
+ not convey it at all. For example, if you agree to terms that obligate you
511
+ to collect a royalty for further conveying from those to whom you convey
512
+ the Program, the only way you could satisfy both those terms and this
513
+ License would be to refrain entirely from conveying the Program.</p>
514
+
515
+ <h4><a name="section13"></a>13. Use with the GNU Affero General Public License.</h4>
516
+
517
+ <p>Notwithstanding any other provision of this License, you have
518
+ permission to link or combine any covered work with a work licensed
519
+ under version 3 of the GNU Affero General Public License into a single
520
+ combined work, and to convey the resulting work. The terms of this
521
+ License will continue to apply to the part which is the covered work,
522
+ but the special requirements of the GNU Affero General Public License,
523
+ section 13, concerning interaction through a network will apply to the
524
+ combination as such.</p>
525
+
526
+ <h4><a name="section14"></a>14. Revised Versions of this License.</h4>
527
+
528
+ <p>The Free Software Foundation may publish revised and/or new versions of
529
+ the GNU General Public License from time to time. Such new versions will
530
+ be similar in spirit to the present version, but may differ in detail to
531
+ address new problems or concerns.</p>
532
+
533
+ <p>Each version is given a distinguishing version number. If the
534
+ Program specifies that a certain numbered version of the GNU General
535
+ Public License “or any later version” applies to it, you have the
536
+ option of following the terms and conditions either of that numbered
537
+ version or of any later version published by the Free Software
538
+ Foundation. If the Program does not specify a version number of the
539
+ GNU General Public License, you may choose any version ever published
540
+ by the Free Software Foundation.</p>
541
+
542
+ <p>If the Program specifies that a proxy can decide which future
543
+ versions of the GNU General Public License can be used, that proxy's
544
+ public statement of acceptance of a version permanently authorizes you
545
+ to choose that version for the Program.</p>
546
+
547
+ <p>Later license versions may give you additional or different
548
+ permissions. However, no additional obligations are imposed on any
549
+ author or copyright holder as a result of your choosing to follow a
550
+ later version.</p>
551
+
552
+ <h4><a name="section15"></a>15. Disclaimer of Warranty.</h4>
553
+
554
+ <p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
555
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
556
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
557
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
558
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
559
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
560
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
561
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
562
+
563
+ <h4><a name="section16"></a>16. Limitation of Liability.</h4>
564
+
565
+ <p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
566
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
567
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
568
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
569
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
570
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
571
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
572
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
573
+ SUCH DAMAGES.</p>
574
+
575
+ <h4><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h4>
576
+
577
+ <p>If the disclaimer of warranty and limitation of liability provided
578
+ above cannot be given local legal effect according to their terms,
579
+ reviewing courts shall apply local law that most closely approximates
580
+ an absolute waiver of all civil liability in connection with the
581
+ Program, unless a warranty or assumption of liability accompanies a
582
+ copy of the Program in return for a fee.</p>
583
+
584
+ </div>
585
+
586
+ <% end %>