underworld 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/LICENSE +339 -0
  5. data/Rakefile +48 -0
  6. data/app/assets/fonts/DroidNaskh-Bold.ttf +0 -0
  7. data/app/assets/fonts/DroidNaskh-Regular.ttf +0 -0
  8. data/app/assets/fonts/OpenSans-Bold.ttf +0 -0
  9. data/app/assets/fonts/OpenSans-BoldItalic.ttf +0 -0
  10. data/app/assets/fonts/OpenSans-ExtraBold.ttf +0 -0
  11. data/app/assets/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  12. data/app/assets/fonts/OpenSans-Italic.ttf +0 -0
  13. data/app/assets/fonts/OpenSans-Light.ttf +0 -0
  14. data/app/assets/fonts/OpenSans-LightItalic.ttf +0 -0
  15. data/app/assets/fonts/OpenSans-Regular.ttf +0 -0
  16. data/app/assets/fonts/OpenSans-Semibold.ttf +0 -0
  17. data/app/assets/fonts/OpenSans-SemiboldItalic.ttf +0 -0
  18. data/app/assets/images/underworld/select2-spinner.gif +0 -0
  19. data/app/assets/images/underworld/select2.png +0 -0
  20. data/app/assets/images/underworld/select2x2.png +0 -0
  21. data/app/assets/javascripts/underworld/application.js +16 -0
  22. data/app/assets/javascripts/underworld/dashboard/application.js.erb +30 -0
  23. data/app/assets/javascripts/underworld/dashboard/functions.js.erb +50 -0
  24. data/app/assets/javascripts/underworld/dashboard/init.js.coffee +33 -0
  25. data/app/assets/javascripts/underworld/dashboard/lib/actions.js +7 -0
  26. data/app/assets/javascripts/underworld/dashboard/lib/amd.js.coffee.erb +0 -0
  27. data/app/assets/javascripts/underworld/dashboard/lib/flash_message.js +71 -0
  28. data/app/assets/javascripts/underworld/dashboard/lib/locale.js +14 -0
  29. data/app/assets/javascripts/underworld/dashboard/lib/misc.js +5 -0
  30. data/app/assets/javascripts/underworld/dashboard/lib/string.js +3 -0
  31. data/app/assets/javascripts/underworld/dashboard/lib/ujs_patches.js.coffee +28 -0
  32. data/app/assets/javascripts/underworld/dashboard/manifest.js +5 -0
  33. data/app/assets/javascripts/underworld/dashboard/variables.js.erb +6 -0
  34. data/app/assets/javascripts/underworld/groups.js +2 -0
  35. data/app/assets/javascripts/underworld/home.js +2 -0
  36. data/app/assets/javascripts/underworld/i18n.js +13 -0
  37. data/app/assets/javascripts/underworld/simple.js +20 -0
  38. data/app/assets/javascripts/underworld/users.js +2 -0
  39. data/app/assets/stylesheets/underworld/dashboard/loadindicator.scss +17 -0
  40. data/app/assets/stylesheets/underworld/dashboard/ltr/application.css +38 -0
  41. data/app/assets/stylesheets/underworld/dashboard/ltr/base.css.scss +0 -0
  42. data/app/assets/stylesheets/underworld/dashboard/rtl/application.css +11 -0
  43. data/app/assets/stylesheets/underworld/dashboard/rtl/base.css.scss +0 -0
  44. data/app/assets/stylesheets/underworld/dashboard/share.scss +62 -0
  45. data/app/assets/stylesheets/underworld/dashboard/variables.scss +9 -0
  46. data/app/assets/stylesheets/underworld/ltr/application.css +0 -0
  47. data/app/assets/stylesheets/underworld/rtl/application.css +0 -0
  48. data/app/assets/stylesheets/underworld/simple/ltr/application.css +2 -0
  49. data/app/assets/stylesheets/underworld/simple/rtl/application.css +2 -0
  50. data/app/assets/stylesheets/underworld/simple/rtl/rtl.scss +16 -0
  51. data/app/assets/stylesheets/underworld/simple/share.scss +11 -0
  52. data/app/controllers/underworld/api_controller.rb +133 -0
  53. data/app/controllers/underworld/application_controller.rb +16 -0
  54. data/app/controllers/underworld/assets_controller.rb +6 -0
  55. data/app/controllers/underworld/dashboard/application_controller.rb +43 -0
  56. data/app/controllers/underworld/dashboard/groups_controller.rb +85 -0
  57. data/app/controllers/underworld/dashboard/profile_controller.rb +49 -0
  58. data/app/controllers/underworld/dashboard/user_messages_controller.rb +27 -0
  59. data/app/controllers/underworld/dashboard/users_controller.rb +116 -0
  60. data/app/controllers/underworld/dashboard_controller.rb +16 -0
  61. data/app/controllers/underworld/omniauth/callbacks_controller.rb +24 -0
  62. data/app/helpers/underworld/application_helper.rb +4 -0
  63. data/app/helpers/underworld/dashboard_helper.rb +107 -0
  64. data/app/helpers/underworld/groups_helper.rb +4 -0
  65. data/app/helpers/underworld/home_helper.rb +4 -0
  66. data/app/helpers/underworld/users_helper.rb +8 -0
  67. data/app/models/application_record.rb +3 -0
  68. data/app/models/underworld/concerns/assignment.rb +16 -0
  69. data/app/models/underworld/concerns/user/auth_definitions.rb +87 -0
  70. data/app/models/underworld/concerns/user/gravatar.rb +11 -0
  71. data/app/models/underworld/concerns/user/mongoid_fields.rb +81 -0
  72. data/app/models/underworld/concerns/user/permission.rb +47 -0
  73. data/app/models/underworld/concerns/user/user_roles.rb +24 -0
  74. data/app/models/underworld/group.rb +57 -0
  75. data/app/models/underworld/permission.rb +43 -0
  76. data/app/models/underworld/user.rb +81 -0
  77. data/app/models/underworld/user_message.rb +6 -0
  78. data/app/policies/underworld/admin_only_policy.rb +66 -0
  79. data/app/policies/underworld/application_policy.rb +55 -0
  80. data/app/policies/underworld/group_policy.rb +8 -0
  81. data/app/policies/underworld/user_message_policy.rb +9 -0
  82. data/app/policies/underworld/user_policy.rb +9 -0
  83. data/app/views/angular/auth/groups/details.html +2 -0
  84. data/app/views/angular/auth/groups/index.html +2 -0
  85. data/app/views/angular/auth/groups/new.html +2 -0
  86. data/app/views/angular/auth/index.html +30 -0
  87. data/app/views/angular/auth/profile/edit.html +54 -0
  88. data/app/views/angular/auth/users/details.html +28 -0
  89. data/app/views/angular/auth/users/index.html +6 -0
  90. data/app/views/angular/auth/users/new.html +57 -0
  91. data/app/views/angular/conversations/details.html +19 -0
  92. data/app/views/angular/conversations/index.html +13 -0
  93. data/app/views/angular/conversations/new.html +39 -0
  94. data/app/views/angular/conversations/show.html +6 -0
  95. data/app/views/angular/conversations/show_details.html +15 -0
  96. data/app/views/angular/fields/boolean/boolean.html +4 -0
  97. data/app/views/angular/fields/control-combo/control-list.html +19 -0
  98. data/app/views/angular/fields/datetime/datetime.html +10 -0
  99. data/app/views/angular/fields/datetime/time.html +25 -0
  100. data/app/views/angular/fields/file/file.html.slim +0 -0
  101. data/app/views/angular/fields/float/float.html +4 -0
  102. data/app/views/angular/fields/image/image.html +1 -0
  103. data/app/views/angular/fields/integer/integer.html +4 -0
  104. data/app/views/angular/fields/relation/relation.html +44 -0
  105. data/app/views/angular/fields/string/string.html +22 -0
  106. data/app/views/angular/fields/tag/tag.html +1 -0
  107. data/app/views/angular/fields/text/text.html +4 -0
  108. data/app/views/angular/filter/index.html +15 -0
  109. data/app/views/angular/index.html +3 -0
  110. data/app/views/angular/locale/fa.po +25 -0
  111. data/app/views/angular/locale/templates.pot +24 -0
  112. data/app/views/angular/logs/index.html +6 -0
  113. data/app/views/angular/modules.html +0 -0
  114. data/app/views/angular/nav.html.erb +39 -0
  115. data/app/views/angular/underworld/views/generic_add_view.html.slim +5 -0
  116. data/app/views/devise/registrations/edit.html.erb +29 -0
  117. data/app/views/devise/registrations/new.html.erb +38 -0
  118. data/app/views/devise/sessions/new.html.erb +37 -0
  119. data/app/views/devise/shared/_links.erb +19 -0
  120. data/app/views/devise/shared/_omni_link.erb +33 -0
  121. data/app/views/kaminari/_first_page.html.slim +3 -0
  122. data/app/views/kaminari/_gap.html.slim +2 -0
  123. data/app/views/kaminari/_last_page.html.slim +3 -0
  124. data/app/views/kaminari/_next_page.html.slim +3 -0
  125. data/app/views/kaminari/_page.html.slim +3 -0
  126. data/app/views/kaminari/_paginator.html.slim +13 -0
  127. data/app/views/kaminari/_prev_page.html.slim +3 -0
  128. data/app/views/layouts/underworld/application.html.erb +79 -0
  129. data/app/views/layouts/underworld/dashboard.html.erb +52 -0
  130. data/app/views/layouts/underworld/simple.html.erb +27 -0
  131. data/app/views/underworld/api/v1/conversations/create.json.jbuilder +1 -0
  132. data/app/views/underworld/api/v1/conversations/destroy.json.jbuilder +1 -0
  133. data/app/views/underworld/api/v1/conversations/index.json.jbuilder +1 -0
  134. data/app/views/underworld/api/v1/conversations/reply.json.jbuilder +1 -0
  135. data/app/views/underworld/api/v1/conversations/show.json.jbuilder +14 -0
  136. data/app/views/underworld/api/v1/conversations/trash.json.jbuilder +1 -0
  137. data/app/views/underworld/api/v1/groups/create.json.jbuilder +4 -0
  138. data/app/views/underworld/api/v1/groups/destroy.html.erb +2 -0
  139. data/app/views/underworld/api/v1/groups/destroy.json.jbuilder +1 -0
  140. data/app/views/underworld/api/v1/groups/edit.html.erb +2 -0
  141. data/app/views/underworld/api/v1/groups/index.html.erb +2 -0
  142. data/app/views/underworld/api/v1/groups/index.json.jbuilder +6 -0
  143. data/app/views/underworld/api/v1/groups/new.html.erb +2 -0
  144. data/app/views/underworld/api/v1/groups/show.html.erb +2 -0
  145. data/app/views/underworld/api/v1/groups/show.json.jbuilder +5 -0
  146. data/app/views/underworld/api/v1/groups/update.json.jbuilder +4 -0
  147. data/app/views/underworld/api/v1/logs/index.json.jbuilder +1 -0
  148. data/app/views/underworld/api/v1/permissions/index.json.jbuilder +1 -0
  149. data/app/views/underworld/api/v1/permissions/user_permissions.json.jbuilder +1 -0
  150. data/app/views/underworld/api/v1/users/create.html.erb +2 -0
  151. data/app/views/underworld/api/v1/users/create.json.jbuilder +1 -0
  152. data/app/views/underworld/api/v1/users/destroy.json.jbuilder +1 -0
  153. data/app/views/underworld/api/v1/users/distroy.html.erb +2 -0
  154. data/app/views/underworld/api/v1/users/edit.html.erb +2 -0
  155. data/app/views/underworld/api/v1/users/index.html.erb +2 -0
  156. data/app/views/underworld/api/v1/users/index.json.jbuilder +4 -0
  157. data/app/views/underworld/api/v1/users/show.html.erb +2 -0
  158. data/app/views/underworld/api/v1/users/show.json.jbuilder +2 -0
  159. data/app/views/underworld/api/v1/users/update.json.jbuilder +1 -0
  160. data/app/views/underworld/dashboard/groups/_form.html.slim +68 -0
  161. data/app/views/underworld/dashboard/groups/create.js.erb +3 -0
  162. data/app/views/underworld/dashboard/groups/edit.html.slim +3 -0
  163. data/app/views/underworld/dashboard/groups/errors.js.erb +3 -0
  164. data/app/views/underworld/dashboard/groups/index.html.slim +47 -0
  165. data/app/views/underworld/dashboard/groups/new.html.slim +2 -0
  166. data/app/views/underworld/dashboard/groups/update.js.erb +3 -0
  167. data/app/views/underworld/dashboard/index.html.erb +0 -0
  168. data/app/views/underworld/dashboard/login_required_page.html.erb +5 -0
  169. data/app/views/underworld/dashboard/not_found.html.slim +9 -0
  170. data/app/views/underworld/dashboard/not_found.js.erb +1 -0
  171. data/app/views/underworld/dashboard/profile/_form.html.erb +33 -0
  172. data/app/views/underworld/dashboard/profile/_profile_form.html.erb +33 -0
  173. data/app/views/underworld/dashboard/profile/create.js.erb +3 -0
  174. data/app/views/underworld/dashboard/profile/edit.html.erb +2 -0
  175. data/app/views/underworld/dashboard/profile/edit_password.html.erb +2 -0
  176. data/app/views/underworld/dashboard/profile/errors.js.erb +3 -0
  177. data/app/views/underworld/dashboard/resource/_form.html.slim +33 -0
  178. data/app/views/underworld/dashboard/resource/_input.html.slim +3 -0
  179. data/app/views/underworld/dashboard/resource/create.js.erb +3 -0
  180. data/app/views/underworld/dashboard/resource/destroy.js.erb +2 -0
  181. data/app/views/underworld/dashboard/resource/edit.html.slim +3 -0
  182. data/app/views/underworld/dashboard/resource/index.html.slim +60 -0
  183. data/app/views/underworld/dashboard/resource/new.html.slim +2 -0
  184. data/app/views/underworld/dashboard/resource/show.html.slim +22 -0
  185. data/app/views/underworld/dashboard/resource/update.js.erb +3 -0
  186. data/app/views/underworld/dashboard/shared/_content_header.html.slim +15 -0
  187. data/app/views/underworld/dashboard/shared/_control_sidebar.html.slim +50 -0
  188. data/app/views/underworld/dashboard/shared/_footer.html.slim +7 -0
  189. data/app/views/underworld/dashboard/shared/_header.html.erb +98 -0
  190. data/app/views/underworld/dashboard/shared/_sidebar.html.erb +69 -0
  191. data/app/views/underworld/dashboard/shared/_toolbar.html.slim +0 -0
  192. data/app/views/underworld/dashboard/shared/errors.js.erb +3 -0
  193. data/app/views/underworld/dashboard/user_messages/_form.html.slim +0 -0
  194. data/app/views/underworld/dashboard/user_messages/create.js.erb +0 -0
  195. data/app/views/underworld/dashboard/user_messages/destroy.js.erb +0 -0
  196. data/app/views/underworld/dashboard/user_messages/new.html.slim +72 -0
  197. data/app/views/underworld/dashboard/users/_form.html.slim +73 -0
  198. data/app/views/underworld/dashboard/users/_password_form.html.slim +37 -0
  199. data/app/views/underworld/dashboard/users/create.js.erb +3 -0
  200. data/app/views/underworld/dashboard/users/destroy.js.erb +2 -0
  201. data/app/views/underworld/dashboard/users/edit.html.slim +3 -0
  202. data/app/views/underworld/dashboard/users/edit_password.html.slim +1 -0
  203. data/app/views/underworld/dashboard/users/errors.js.erb +3 -0
  204. data/app/views/underworld/dashboard/users/index.html.slim +66 -0
  205. data/app/views/underworld/dashboard/users/new.html.slim +2 -0
  206. data/app/views/underworld/dashboard/users/show.html.slim +6 -0
  207. data/app/views/underworld/dashboard/users/update.js.erb +3 -0
  208. data/app/views/underworld/dashboard/users/update_password.js.erb +3 -0
  209. data/app/views/underworld/relations/_belongs_to.json.jbuilder +11 -0
  210. data/config/initializers/devise.rb +24 -0
  211. data/config/locales/devise.en.yml +59 -0
  212. data/config/locales/devise.fa.yml +58 -0
  213. data/config/locales/underworld.en.yml +96 -0
  214. data/config/locales/underworld.fa.yml +108 -0
  215. data/config/routes.rb +43 -0
  216. data/config/spring.rb +1 -0
  217. data/db/migrate/20131013091000_devise_create_underworld_users.rb +65 -0
  218. data/db/migrate/20131020124701_create_underworld_groups.rb +15 -0
  219. data/db/migrate/20131021170923_create_underworld_permissions.rb +15 -0
  220. data/db/migrate/20131123120422_add_permissions_groups_table.rb +16 -0
  221. data/db/migrate/20140613120923_add_users_groups_table.rb +13 -0
  222. data/db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb +11 -0
  223. data/db/migrate/20160310105736_create_underworld_user_messages.rb +25 -0
  224. data/db/seeds.rb +49 -0
  225. data/lib/generators/underworld/install_generator.rb +108 -0
  226. data/lib/generators/underworld/resource_generator.rb +70 -0
  227. data/lib/generators/underworld/resources_generator.rb +20 -0
  228. data/lib/generators/underworld/templates/README +21 -0
  229. data/lib/generators/underworld/templates/SPECS +13 -0
  230. data/lib/generators/underworld/templates/api/controller.rb.erb +60 -0
  231. data/lib/generators/underworld/templates/api_controller.rb +2 -0
  232. data/lib/generators/underworld/templates/dashboard/controller.rb.erb +2 -0
  233. data/lib/generators/underworld/templates/dashboard_controller.rb +18 -0
  234. data/lib/generators/underworld/templates/devise.rb +251 -0
  235. data/lib/generators/underworld/templates/features/api.feature +92 -0
  236. data/lib/generators/underworld/templates/features/api.step.rb +7 -0
  237. data/lib/generators/underworld/templates/features/step_definitions/email_steps.rb +206 -0
  238. data/lib/generators/underworld/templates/features/support/email_spec.rb +1 -0
  239. data/lib/generators/underworld/templates/features/support/env.rb +79 -0
  240. data/lib/generators/underworld/templates/javascripts/application.js +19 -0
  241. data/lib/generators/underworld/templates/policy/application_policy.rb +2 -0
  242. data/lib/generators/underworld/templates/policy/policy.rb.erb +2 -0
  243. data/lib/generators/underworld/templates/seeds.rb +1 -0
  244. data/lib/generators/underworld/templates/spec/factories/groups.rb +5 -0
  245. data/lib/generators/underworld/templates/spec/factories/users.rb +10 -0
  246. data/lib/generators/underworld/templates/spec/spec_helper.rb +69 -0
  247. data/lib/generators/underworld/templates/spec/support/devise.rb +3 -0
  248. data/lib/generators/underworld/templates/stylesheets/dashboard/ltr/application.css +3 -0
  249. data/lib/generators/underworld/templates/stylesheets/dashboard/rtl/application.css +3 -0
  250. data/lib/generators/underworld/templates/stylesheets/ltr/application.css +3 -0
  251. data/lib/generators/underworld/templates/stylesheets/rtl/application.css +3 -0
  252. data/lib/generators/underworld/templates/underworld.rb +12 -0
  253. data/lib/generators/underworld/templates/views/create.json.jbuilder.erb +3 -0
  254. data/lib/generators/underworld/templates/views/destroy.json.jbuilder.erb +1 -0
  255. data/lib/generators/underworld/templates/views/index.json.jbuilder.erb +13 -0
  256. data/lib/generators/underworld/templates/views/show.json.jbuilder.erb +6 -0
  257. data/lib/generators/underworld/templates/views/update.json.jbuilder.erb +6 -0
  258. data/lib/generators/underworld/views_generator.rb +57 -0
  259. data/lib/tasks/docs.rake +6 -0
  260. data/lib/tasks/sync.rake +9 -0
  261. data/lib/tasks/underworld_tasks.rake +38 -0
  262. data/lib/underworld.rb +35 -0
  263. data/lib/underworld/action_dispatch.rb +3 -0
  264. data/lib/underworld/api.rb +42 -0
  265. data/lib/underworld/api/groups_api.rb +41 -0
  266. data/lib/underworld/api/permissions_api.rb +24 -0
  267. data/lib/underworld/api/root.rb +15 -0
  268. data/lib/underworld/api/users_api.rb +20 -0
  269. data/lib/underworld/concerns.rb +7 -0
  270. data/lib/underworld/concerns/authorizable.rb +81 -0
  271. data/lib/underworld/configuration.rb +97 -0
  272. data/lib/underworld/dashboard.rb +11 -0
  273. data/lib/underworld/dashboard/dsl.rb +41 -0
  274. data/lib/underworld/dashboard/dsl/base.rb +133 -0
  275. data/lib/underworld/dashboard/dsl/create.rb +116 -0
  276. data/lib/underworld/dashboard/dsl/form_fields_properties.rb +62 -0
  277. data/lib/underworld/dashboard/dsl/index.rb +45 -0
  278. data/lib/underworld/dashboard/dsl/show.rb +6 -0
  279. data/lib/underworld/dashboard/dsl/update.rb +6 -0
  280. data/lib/underworld/dashboard/helpers/box_helpers.rb +129 -0
  281. data/lib/underworld/dashboard/models.rb +2 -0
  282. data/lib/underworld/dashboard/models/sidebar.rb +139 -0
  283. data/lib/underworld/dashboard/sections.rb +2 -0
  284. data/lib/underworld/dashboard/sections/resource.rb +229 -0
  285. data/lib/underworld/dashboard/sections/resource_create.rb +263 -0
  286. data/lib/underworld/dashboard/sections/resource_destroy.rb +27 -0
  287. data/lib/underworld/dashboard/sections/resource_show.rb +96 -0
  288. data/lib/underworld/dashboard/sections/resources_index.rb +113 -0
  289. data/lib/underworld/dashboard/sections/sidebar.rb +41 -0
  290. data/lib/underworld/discovery.rb +8 -0
  291. data/lib/underworld/discovery/permissions.rb +49 -0
  292. data/lib/underworld/engine.rb +53 -0
  293. data/lib/underworld/exceptions.rb +7 -0
  294. data/lib/underworld/extension.rb +18 -0
  295. data/lib/underworld/extension/base.rb +29 -0
  296. data/lib/underworld/fake_assets.rb +5 -0
  297. data/lib/underworld/i18n.rb +101 -0
  298. data/lib/underworld/initialize.rb +0 -0
  299. data/lib/underworld/liquid.rb +7 -0
  300. data/lib/underworld/liquid/block.rb +14 -0
  301. data/lib/underworld/liquid/render_tag.rb +50 -0
  302. data/lib/underworld/liquid/tag.rb +51 -0
  303. data/lib/underworld/middlewares.rb +1 -0
  304. data/lib/underworld/middlewares/locale.rb +29 -0
  305. data/lib/underworld/omniauth.rb +8 -0
  306. data/lib/underworld/omniauth/callbacks.rb +39 -0
  307. data/lib/underworld/orm.rb +30 -0
  308. data/lib/underworld/routes.rb +117 -0
  309. data/lib/underworld/version.rb +3 -0
  310. data/test/controllers/underworld/dashboard/resource_test.rb +118 -0
  311. data/test/dummy/README.rdoc +28 -0
  312. data/test/dummy/Rakefile +6 -0
  313. data/test/dummy/app/assets/javascripts/application.js +13 -0
  314. data/test/dummy/app/assets/javascripts/dashboard/application.js +19 -0
  315. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  316. data/test/dummy/app/assets/stylesheets/dashboard/ltr/application.css +3 -0
  317. data/test/dummy/app/assets/stylesheets/dashboard/rtl/application.css +3 -0
  318. data/test/dummy/app/assets/stylesheets/ltr/application.css +3 -0
  319. data/test/dummy/app/assets/stylesheets/rtl/application.css +3 -0
  320. data/test/dummy/app/controllers/api_controller.rb +2 -0
  321. data/test/dummy/app/controllers/application_controller.rb +6 -0
  322. data/test/dummy/app/controllers/dashboard/application_controller.rb +18 -0
  323. data/test/dummy/app/helpers/application_helper.rb +2 -0
  324. data/test/dummy/app/policies/application_policy.rb +2 -0
  325. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  326. data/test/dummy/bin/bundle +3 -0
  327. data/test/dummy/bin/rails +4 -0
  328. data/test/dummy/bin/rake +4 -0
  329. data/test/dummy/config.ru +4 -0
  330. data/test/dummy/config/application.rb +23 -0
  331. data/test/dummy/config/boot.rb +5 -0
  332. data/test/dummy/config/database.yml +25 -0
  333. data/test/dummy/config/environment.rb +5 -0
  334. data/test/dummy/config/environments/development.rb +29 -0
  335. data/test/dummy/config/environments/production.rb +80 -0
  336. data/test/dummy/config/environments/test.rb +38 -0
  337. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  338. data/test/dummy/config/initializers/devise.rb +251 -0
  339. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  340. data/test/dummy/config/initializers/formstatic.rb +76 -0
  341. data/test/dummy/config/initializers/formtastic.rb +110 -0
  342. data/test/dummy/config/initializers/inflections.rb +16 -0
  343. data/test/dummy/config/initializers/kaminari_config.rb +10 -0
  344. data/test/dummy/config/initializers/mime_types.rb +5 -0
  345. data/test/dummy/config/initializers/secret_token.rb +12 -0
  346. data/test/dummy/config/initializers/session_store.rb +3 -0
  347. data/test/dummy/config/initializers/underworld.rb +11 -0
  348. data/test/dummy/config/initializers/underworld_assets.rb +1 -0
  349. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  350. data/test/dummy/config/locales/en.yml +23 -0
  351. data/test/dummy/config/routes.rb +13 -0
  352. data/test/dummy/lib/templates/slim/scaffold/_form.html.slim +8 -0
  353. data/test/dummy/public/404.html +58 -0
  354. data/test/dummy/public/422.html +58 -0
  355. data/test/dummy/public/500.html +57 -0
  356. data/test/dummy/public/favicon.ico +0 -0
  357. data/test/fabricators/underworld/groups.rb +27 -0
  358. data/test/fabricators/underworld/permissions.rb +14 -0
  359. data/test/fabricators/underworld/users.rb +17 -0
  360. data/test/generators/install_generator_test.rb +84 -0
  361. data/test/integration/underworld/authentication_test.rb +36 -0
  362. data/test/integration/underworld/dashboard_test.rb +64 -0
  363. data/test/test_helper.rb +72 -0
  364. metadata +1045 -0
  365. metadata.gz.sig +0 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1179bf4b595e544a87685698b947e3245b921067
4
+ data.tar.gz: e59c7dfc53b58dfeddc551b16d929c60d07d7c55
5
+ SHA512:
6
+ metadata.gz: d04d8a83dceb471b9943a44c0c8a4e0dd72274d4a7cd443c45dd56f8a512a2efc88b201e370a4d3d411d25595f893133f905c733fb6dd3e92a15fdf20ec61f37
7
+ data.tar.gz: 35f032c8a0255d8bd09c76ba8bd544458436863a42529522f061c0b6fc57ae632571e5fa1ead1de3d6fafac2f7f3e6c856c4183ec71af0ae5d425f56c972cc63
Binary file
Binary file
data/LICENSE ADDED
@@ -0,0 +1,339 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ A ruby on rails engine which provides a very basic web application to use with other ruby on rails applications
294
+ Copyright (C) 2016 Codamic Technologies
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
@@ -0,0 +1,48 @@
1
+ import 'docs/guides/Rakefile'
2
+
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
+ end
8
+
9
+ Bundler.setup(ENV['RAILS_ENV'] || :default)
10
+
11
+ APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
12
+
13
+ #load 'rails/tasks/engine.rake'
14
+ load 'rails/tasks/engine.rake'
15
+ load 'rails/tasks/statistics.rake'
16
+
17
+ Bundler::GemHelper.install_tasks
18
+
19
+ desc "Generate and deploy all docs"
20
+ task docs: ['guides:generate', 'guides:deploy'] do
21
+ pwd = Dir.pwd
22
+
23
+ system('bundle exec yardoc')
24
+
25
+ system("cp -r #{pwd}/docs/ruby /tmp/ruby")
26
+ Dir.chdir '/tmp/ruby' do
27
+ system('git init')
28
+ system('git remote add origin git@github.com:Codamic/underworld_apidoc.git')
29
+ system('git checkout -b gh-pages')
30
+ system('echo "api.underworld.io" > CNAME')
31
+ system('git add .')
32
+ system('git commit -a -m "new release"')
33
+ system('git push origin gh-pages -f')
34
+ end
35
+
36
+ system("rm -rf /tmp/ruby ")
37
+ end
38
+
39
+ require 'rake/testtask'
40
+
41
+ Rake::TestTask.new(:test) do |t|
42
+ t.libs << 'lib'
43
+ t.libs << 'test'
44
+ t.pattern = 'test/**/*_test.rb'
45
+ t.verbose = false
46
+ end
47
+
48
+ task default: :test
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_self
16
+ //= require_directory .
@@ -0,0 +1,30 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require underworld/dashboard/variables
14
+ //= require jquery
15
+ //= require jquery.turbolinks
16
+ //= require jquery_ujs
17
+ //= require turbolinks
18
+
19
+ // Misc ---------------------------
20
+ //= require sugar
21
+
22
+ // JQuery Libraries ---------------
23
+ //= require admin_lte/admin_lte
24
+ //= require nprogress
25
+ //= require nprogress-turbolinks
26
+ // <% if Underworld::Engine.enabled?(:amd) && defined?(AMD) %>
27
+ //= require amd/amd
28
+ //<% end %>
29
+ //= require_tree ./lib/
30
+ //= require underworld/dashboard/init