fwt_push_notification_server 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/images/fw-logo.png +0 -0
  6. data/app/assets/javascripts/fwt_push_notification_server/application.js +13 -0
  7. data/app/assets/javascripts/fwt_push_notification_server/device_tokens.js +2 -0
  8. data/app/assets/stylesheets/fwt_push_notification_server/application.css.scss +192 -0
  9. data/app/assets/stylesheets/fwt_push_notification_server/device_tokens.css +4 -0
  10. data/app/assets/stylesheets/fwt_push_notification_server/jquery-ui-timepicker-addon.css +10 -0
  11. data/app/assets/stylesheets/fwt_push_notification_server/jquery-ui.css +474 -0
  12. data/app/assets/stylesheets/fwt_push_notification_server/jquery.ui.theme.css +248 -0
  13. data/app/controllers/fwt_push_notification_server/application_controller.rb +9 -0
  14. data/app/controllers/fwt_push_notification_server/device_tokens_controller.rb +51 -0
  15. data/app/helpers/fwt_push_notification_server/application_helper.rb +6 -0
  16. data/app/helpers/fwt_push_notification_server/device_tokens_helper.rb +6 -0
  17. data/app/models/fwt_push_notification_server/device_token.rb +9 -0
  18. data/app/models/fwt_push_notification_server/user.rb +7 -0
  19. data/app/views/fwt_push_notification_server/application/_empty_view.html.erb +1 -0
  20. data/app/views/fwt_push_notification_server/device_tokens/index.html.erb +35 -0
  21. data/app/views/layouts/fwt_push_notification_server/_messages.html.erb +6 -0
  22. data/app/views/layouts/fwt_push_notification_server/application.html.erb +30 -0
  23. data/config/initializers/devise.rb +27 -0
  24. data/config/locales/devise.en.yml +60 -0
  25. data/config/routes.rb +11 -0
  26. data/lib/fwt_push_notification_server/engine.rb +16 -0
  27. data/lib/fwt_push_notification_server/version.rb +3 -0
  28. data/lib/fwt_push_notification_server.rb +48 -0
  29. data/lib/generators/fwt_push_notification_server/install/install_generator.rb +49 -0
  30. data/lib/generators/fwt_push_notification_server/install/templates/create_fwt_push_notification_server_device_tokens.rb +14 -0
  31. data/lib/generators/fwt_push_notification_server/install/templates/devise_create_fwt_push_notification_server_users.rb +31 -0
  32. data/lib/generators/fwt_push_notification_server/install/templates/initializer.rb +20 -0
  33. data/lib/generators/fwt_push_notification_server/install/templates/seeds.rb +5 -0
  34. data/lib/tasks/fwt_push_notification_server_tasks.rake +4 -0
  35. data/test/controllers/fwt_push_notification_server/device_tokens_controller_test.rb +51 -0
  36. data/test/dummy/Rakefile +6 -0
  37. data/test/dummy/app/assets/javascripts/application.js +13 -0
  38. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  39. data/test/dummy/app/controllers/application_controller.rb +5 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/bin/bundle +3 -0
  42. data/test/dummy/bin/rails +4 -0
  43. data/test/dummy/bin/rake +4 -0
  44. data/test/dummy/config/application.rb +23 -0
  45. data/test/dummy/config/boot.rb +5 -0
  46. data/test/dummy/config/database.yml +25 -0
  47. data/test/dummy/config/environment.rb +5 -0
  48. data/test/dummy/config/environments/development.rb +29 -0
  49. data/test/dummy/config/environments/production.rb +80 -0
  50. data/test/dummy/config/environments/test.rb +36 -0
  51. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  52. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/test/dummy/config/initializers/fwt_push_notification_server.rb +19 -0
  54. data/test/dummy/config/initializers/inflections.rb +16 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +12 -0
  57. data/test/dummy/config/initializers/session_store.rb +3 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.yml +23 -0
  60. data/test/dummy/config/routes.rb +5 -0
  61. data/test/dummy/config.ru +4 -0
  62. data/test/dummy/db/development.sqlite3 +0 -0
  63. data/test/dummy/db/migrate/20130918095820_create_fwt_push_notification_server_device_tokens.rb +14 -0
  64. data/test/dummy/db/migrate/20130918095821_devise_create_fwt_push_notification_server_users.rb +31 -0
  65. data/test/dummy/db/schema.rb +43 -0
  66. data/test/dummy/db/seeds.rb +5 -0
  67. data/test/dummy/log/development.log +16238 -0
  68. data/test/dummy/log/test.log +10 -0
  69. data/test/dummy/public/404.html +58 -0
  70. data/test/dummy/public/422.html +58 -0
  71. data/test/dummy/public/500.html +57 -0
  72. data/test/dummy/public/favicon.ico +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sass/12c8e9505bddaa133e5fb349c2a5686f5ceccada/bootstrap.scssc +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_accordion.scssc +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_alerts.scssc +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_breadcrumbs.scssc +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_button-groups.scssc +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_buttons.scssc +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_carousel.scssc +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_close.scssc +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_code.scssc +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_component-animations.scssc +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_dropdowns.scssc +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_forms.scssc +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_grid.scssc +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_hero-unit.scssc +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_labels-badges.scssc +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_layouts.scssc +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_media.scssc +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_mixins.scssc +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_modals.scssc +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_navbar.scssc +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_navs.scssc +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_pager.scssc +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_pagination.scssc +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_popovers.scssc +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_progress-bars.scssc +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_reset.scssc +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_scaffolding.scssc +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_sprites.scssc +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_tables.scssc +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_thumbnails.scssc +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_tooltip.scssc +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_type.scssc +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_utilities.scssc +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_variables.scssc +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/_wells.scssc +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sass/7c851c8cce3147a485a2e36f9c2ea3624eca398d/bootstrap.scssc +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sass/dd375f805d06ad6efb1710787bd24bcab705b025/application.css.scssc +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/018e8124fa401e10da2a0f8d089b1467 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/04f93e7cd5f3c6bd6c26ea15acf03144 +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/1e51677f9d96bb542510a33f91cbd9b6 +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/23bb189d596dce443600523c2af2f418 +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/375c78da06e45aab2bc0723f291620f6 +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/3bebeefd5ffe6a58fb03bf1f37ac9163 +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/40525813aeb4df11bbc7934420765970 +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/4809faed3f3c49e4f0069d90c42db9fa +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/4837e9658be5fa714ededd423bec6394 +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/4930f39005ca20c14fe5b6ff5e3462c5 +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/4edaf8d607c191a1d04f54ceafa27f34 +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/525db6dca24b08bdb1073bd610b641fa +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/52fc34b303a5058c0f82e03f5e49be15 +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/53a6a8c806fb66ef100dcdec2c14667f +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/5d48cbe0eb7f4d2a888760672ebcd0b5 +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/5dbf4424a551546c8ca2ea3693f57aad +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/63e1b63a0601a563b63be1b6cb6f14e8 +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/7525085b7df71dd698c4ddd96818b178 +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/7c0cc261ea34e01a60b85decd619d572 +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/807b74c8c0f4286940e0f072e71dbf48 +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/86b51d868b31f8ec21eab714b70f25c8 +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/871bed79442dc4d0f7e860539e548c11 +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/873e96cc154ed7b8f89ae6ebd6330d76 +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/9266b6839c460333f8fabb33531b0aa5 +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/9619769a83bc4c96187fad84dd44f662 +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/984da49c74b19af286bd6da0be3b7f41 +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/b3329085a217fc47138d40e542cbab29 +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/b49ac435bde8ad5725858653ed8c96b0 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/c88406e714c83dc7a8eba7dfc687b9be +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/db1758582caea75d451566fa655186d1 +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sprockets/ee6e9c40abd892aaef0bbbf0bd11c5e0 +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sprockets/f0e74746290141cd77d8e42db2047501 +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sprockets/f301640fffe07f12598645f72b673e29 +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sprockets/f3f906a5c3f8d16aaa9833a07d5f87dc +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sprockets/f6db10193f0119f139b2d45d263ed768 +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sprockets/fa7addf7e35b3a6bfcff34dc107fad07 +0 -0
  152. data/test/fixtures/fwt_push_notification_server/device_tokens.yml +13 -0
  153. data/test/fixtures/fwt_push_notification_server/users.yml +11 -0
  154. data/test/fwt_push_notification_server_test.rb +9 -0
  155. data/test/helpers/fwt_push_notification_server/device_tokens_helper_test.rb +6 -0
  156. data/test/integration/navigation_test.rb +10 -0
  157. data/test/models/fwt_push_notification_server/device_token_test.rb +9 -0
  158. data/test/models/fwt_push_notification_server/user_test.rb +9 -0
  159. data/test/test_helper.rb +15 -0
  160. metadata +481 -0
@@ -0,0 +1,248 @@
1
+ /*!
2
+ * jQuery UI CSS Framework 1.9.2
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://docs.jquery.com/UI/Theming/API
10
+ *
11
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande%2CLucida%20Sans%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
12
+ */
13
+
14
+
15
+ /* Component containers
16
+ ----------------------------------*/
17
+ .ui-widget { font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-size: 1.1em; }
18
+ .ui-widget .ui-widget { font-size: 1em; }
19
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-size: 1em; }
20
+ .ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; }
21
+ .ui-widget-content a { color: #362b36; }
22
+ .ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
23
+ .ui-widget-header a { color: #222222; }
24
+
25
+ /* Interaction states
26
+ ----------------------------------*/
27
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
28
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
29
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
30
+ .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #0070a3; text-decoration: none; }
31
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
32
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
33
+
34
+ /* Interaction Cues
35
+ ----------------------------------*/
36
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
37
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
38
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
39
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
40
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
41
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
42
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
43
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
44
+ .ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
45
+
46
+ /* Icons
47
+ ----------------------------------*/
48
+
49
+ /* states and images */
50
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
51
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
52
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
53
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
54
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
55
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
56
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
57
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
58
+
59
+ /* positioning */
60
+ .ui-icon-carat-1-n { background-position: 0 0; }
61
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
62
+ .ui-icon-carat-1-e { background-position: -32px 0; }
63
+ .ui-icon-carat-1-se { background-position: -48px 0; }
64
+ .ui-icon-carat-1-s { background-position: -64px 0; }
65
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
66
+ .ui-icon-carat-1-w { background-position: -96px 0; }
67
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
68
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
69
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
70
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
71
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
72
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
73
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
74
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
75
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
76
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
77
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
78
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
79
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
80
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
81
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
82
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
83
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
84
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
85
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
86
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
87
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
88
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
89
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
90
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
91
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
92
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
93
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
94
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
95
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
96
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
97
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
98
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
99
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
100
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
101
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
102
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
103
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
104
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
105
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
106
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
107
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
108
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
109
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
110
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
111
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
112
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
113
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
114
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
115
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
116
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
117
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
118
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
119
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
120
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
121
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
122
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
123
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
124
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
125
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
126
+ .ui-icon-extlink { background-position: -32px -80px; }
127
+ .ui-icon-newwin { background-position: -48px -80px; }
128
+ .ui-icon-refresh { background-position: -64px -80px; }
129
+ .ui-icon-shuffle { background-position: -80px -80px; }
130
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
131
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
132
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
133
+ .ui-icon-folder-open { background-position: -16px -96px; }
134
+ .ui-icon-document { background-position: -32px -96px; }
135
+ .ui-icon-document-b { background-position: -48px -96px; }
136
+ .ui-icon-note { background-position: -64px -96px; }
137
+ .ui-icon-mail-closed { background-position: -80px -96px; }
138
+ .ui-icon-mail-open { background-position: -96px -96px; }
139
+ .ui-icon-suitcase { background-position: -112px -96px; }
140
+ .ui-icon-comment { background-position: -128px -96px; }
141
+ .ui-icon-person { background-position: -144px -96px; }
142
+ .ui-icon-print { background-position: -160px -96px; }
143
+ .ui-icon-trash { background-position: -176px -96px; }
144
+ .ui-icon-locked { background-position: -192px -96px; }
145
+ .ui-icon-unlocked { background-position: -208px -96px; }
146
+ .ui-icon-bookmark { background-position: -224px -96px; }
147
+ .ui-icon-tag { background-position: -240px -96px; }
148
+ .ui-icon-home { background-position: 0 -112px; }
149
+ .ui-icon-flag { background-position: -16px -112px; }
150
+ .ui-icon-calendar { background-position: -32px -112px; }
151
+ .ui-icon-cart { background-position: -48px -112px; }
152
+ .ui-icon-pencil { background-position: -64px -112px; }
153
+ .ui-icon-clock { background-position: -80px -112px; }
154
+ .ui-icon-disk { background-position: -96px -112px; }
155
+ .ui-icon-calculator { background-position: -112px -112px; }
156
+ .ui-icon-zoomin { background-position: -128px -112px; }
157
+ .ui-icon-zoomout { background-position: -144px -112px; }
158
+ .ui-icon-search { background-position: -160px -112px; }
159
+ .ui-icon-wrench { background-position: -176px -112px; }
160
+ .ui-icon-gear { background-position: -192px -112px; }
161
+ .ui-icon-heart { background-position: -208px -112px; }
162
+ .ui-icon-star { background-position: -224px -112px; }
163
+ .ui-icon-link { background-position: -240px -112px; }
164
+ .ui-icon-cancel { background-position: 0 -128px; }
165
+ .ui-icon-plus { background-position: -16px -128px; }
166
+ .ui-icon-plusthick { background-position: -32px -128px; }
167
+ .ui-icon-minus { background-position: -48px -128px; }
168
+ .ui-icon-minusthick { background-position: -64px -128px; }
169
+ .ui-icon-close { background-position: -80px -128px; }
170
+ .ui-icon-closethick { background-position: -96px -128px; }
171
+ .ui-icon-key { background-position: -112px -128px; }
172
+ .ui-icon-lightbulb { background-position: -128px -128px; }
173
+ .ui-icon-scissors { background-position: -144px -128px; }
174
+ .ui-icon-clipboard { background-position: -160px -128px; }
175
+ .ui-icon-copy { background-position: -176px -128px; }
176
+ .ui-icon-contact { background-position: -192px -128px; }
177
+ .ui-icon-image { background-position: -208px -128px; }
178
+ .ui-icon-video { background-position: -224px -128px; }
179
+ .ui-icon-script { background-position: -240px -128px; }
180
+ .ui-icon-alert { background-position: 0 -144px; }
181
+ .ui-icon-info { background-position: -16px -144px; }
182
+ .ui-icon-notice { background-position: -32px -144px; }
183
+ .ui-icon-help { background-position: -48px -144px; }
184
+ .ui-icon-check { background-position: -64px -144px; }
185
+ .ui-icon-bullet { background-position: -80px -144px; }
186
+ .ui-icon-radio-on { background-position: -96px -144px; }
187
+ .ui-icon-radio-off { background-position: -112px -144px; }
188
+ .ui-icon-pin-w { background-position: -128px -144px; }
189
+ .ui-icon-pin-s { background-position: -144px -144px; }
190
+ .ui-icon-play { background-position: 0 -160px; }
191
+ .ui-icon-pause { background-position: -16px -160px; }
192
+ .ui-icon-seek-next { background-position: -32px -160px; }
193
+ .ui-icon-seek-prev { background-position: -48px -160px; }
194
+ .ui-icon-seek-end { background-position: -64px -160px; }
195
+ .ui-icon-seek-start { background-position: -80px -160px; }
196
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
197
+ .ui-icon-seek-first { background-position: -80px -160px; }
198
+ .ui-icon-stop { background-position: -96px -160px; }
199
+ .ui-icon-eject { background-position: -112px -160px; }
200
+ .ui-icon-volume-off { background-position: -128px -160px; }
201
+ .ui-icon-volume-on { background-position: -144px -160px; }
202
+ .ui-icon-power { background-position: 0 -176px; }
203
+ .ui-icon-signal-diag { background-position: -16px -176px; }
204
+ .ui-icon-signal { background-position: -32px -176px; }
205
+ .ui-icon-battery-0 { background-position: -48px -176px; }
206
+ .ui-icon-battery-1 { background-position: -64px -176px; }
207
+ .ui-icon-battery-2 { background-position: -80px -176px; }
208
+ .ui-icon-battery-3 { background-position: -96px -176px; }
209
+ .ui-icon-circle-plus { background-position: 0 -192px; }
210
+ .ui-icon-circle-minus { background-position: -16px -192px; }
211
+ .ui-icon-circle-close { background-position: -32px -192px; }
212
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
213
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
214
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
215
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
216
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
217
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
218
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
219
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
220
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
221
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
222
+ .ui-icon-circle-check { background-position: -208px -192px; }
223
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
224
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
225
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
226
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
227
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
228
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
229
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
230
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
231
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
232
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
233
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
234
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
235
+
236
+
237
+ /* Misc visuals
238
+ ----------------------------------*/
239
+
240
+ /* Corner radius */
241
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; }
242
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; }
243
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
244
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
245
+
246
+ /* Overlays */
247
+ .ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .8;filter:Alpha(Opacity=80); }
248
+ .ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
@@ -0,0 +1,9 @@
1
+ module FwtPushNotificationServer
2
+
3
+ class ApplicationController < ActionController::Base
4
+
5
+ before_filter :authenticate_user!
6
+
7
+ end
8
+
9
+ end
@@ -0,0 +1,51 @@
1
+ require_dependency "fwt_push_notification_server/application_controller"
2
+ require 'digest'
3
+
4
+ module FwtPushNotificationServer
5
+
6
+ class DeviceTokensController < ApplicationController
7
+
8
+ skip_before_filter :authenticate_user!, :if => lambda {
9
+ if params[:token].blank? || params[:sig].blank?
10
+ false
11
+ else
12
+ token = params[:token]
13
+ device_name = params[:device_name]
14
+ device_id = params[:device_id]
15
+ config = FwtPushNotificationServer.config
16
+ key = config[:api_key]
17
+ params_string = "token=#{token}&device_name=#{device_name}&device_id=#{device_id}"
18
+ !!(Digest::HMAC.hexdigest(params_string, key, Digest::SHA256) == params[:sig])
19
+ end
20
+ }
21
+
22
+ # GET /device_tokens
23
+ def index
24
+ @device_tokens = DeviceToken.page.per(100)
25
+ end
26
+
27
+ # POST /device_tokens
28
+ def create
29
+ @device_token = DeviceToken.find_or_create_by_token(params[:token])
30
+ @device_token.update_attributes({
31
+ :device_id => params[:device_id] || "",
32
+ :device_name => params[:device_name] || ""
33
+ })
34
+ if @device_token.present?
35
+ @device_token.save
36
+ status = 0
37
+ else
38
+ status = -1
39
+ end
40
+ render :json => { :status => status }
41
+ end
42
+
43
+ private
44
+ # Only allow a trusted parameter "white list" through.
45
+ def device_token_params
46
+ params.permit(:token, :device_id, :device_name, :is_valid, :key, :sig)
47
+ end
48
+
49
+ end
50
+
51
+ end
@@ -0,0 +1,6 @@
1
+ module FwtPushNotificationServer
2
+
3
+ module ApplicationHelper
4
+ end
5
+
6
+ end
@@ -0,0 +1,6 @@
1
+ module FwtPushNotificationServer
2
+
3
+ module DeviceTokensHelper
4
+ end
5
+
6
+ end
@@ -0,0 +1,9 @@
1
+ module FwtPushNotificationServer
2
+
3
+ class DeviceToken < ActiveRecord::Base
4
+
5
+ validates_uniqueness_of :token
6
+
7
+ end
8
+
9
+ end
@@ -0,0 +1,7 @@
1
+ module FwtPushNotificationServer
2
+ class User < ActiveRecord::Base
3
+ # Include default devise modules. Others available are:
4
+ # :confirmable, :lockable, :timeoutable and :omniauthable
5
+ devise :database_authenticatable, :rememberable, :trackable, :validatable
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ <div class="well">There are no items to display at this time</div>
@@ -0,0 +1,35 @@
1
+ <h1>Device tokens</h1>
2
+ <h2><small>Total: <%= @device_tokens.count %></small></h2>
3
+
4
+ <% if @device_tokens.empty? %>
5
+
6
+ <%= render partial: 'empty_view' %>
7
+
8
+ <% else %>
9
+
10
+ <%= paginate @device_tokens %>
11
+
12
+ <table class='table table-striped'>
13
+ <thead>
14
+ <tr>
15
+ <th>Token</th>
16
+ <th>Device ID</th>
17
+ <th>Device Name</th>
18
+ <th width="200px">Date added</th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <% @device_tokens.each do |t| %>
23
+ <tr>
24
+ <td><%= t.token %> </td>
25
+ <td><%= t.device_id %></td>
26
+ <td><%= t.device_name %></td>
27
+ <td><%= t.updated_at.strftime("%d-%m-%Y %H:%M") %></td>
28
+ </tr>
29
+ <% end %>
30
+ </tbody>
31
+ </table>
32
+
33
+ <%= paginate @device_tokens %>
34
+
35
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <% flash.each do |name, msg| %>
2
+ <div class="alert alert-<%= name == :notice ? "success" : "error" %>">
3
+ <a class="close" data-dismiss="alert">&#215;</a>
4
+ <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
5
+ </div>
6
+ <% end %>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE htmlconfig<html>
2
+ <head>
3
+ <meta charset="utf-8"/>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
5
+ <title><%= content_for?(:title) ? yield(:title) : FwtPushNotificationServer.config[:title] %></title>
6
+ <meta name="description" content=""/>
7
+ <meta name="author" content=""/>
8
+ <%= stylesheet_link_tag "fwt_push_notification_server/application", :media => "all" %>
9
+ <%= javascript_include_tag "fwt_push_notification_server/application" %>
10
+ <%= csrf_meta_tags %>
11
+ <%= yield(:head) %>
12
+ </head>
13
+ <body>
14
+ <div id="wrap">
15
+ <div id="main" role="main">
16
+ <div class="container">
17
+ <div class="row">
18
+ <%= render 'layouts/fwt_push_notification_server/messages' %>
19
+ <%= yield %>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <div class="push"></div>
24
+ </div>
25
+ <footer>
26
+ <%= image_tag("fw-logo.png", :title => 'Future Workshops', :height => '60px') %>
27
+ <p class="muted credit">Copyright &copy; 2013 Future Workshops</p>
28
+ </footer>
29
+ </body>
30
+ </html>
@@ -0,0 +1,27 @@
1
+
2
+ Devise.setup do |config|
3
+
4
+ config.secret_key = '4ff950431d5a3daf1f05fe497407c7ce600946d516c2e389840364db6b72540cda4a215819761edbe2edf56d4e6e3863a6a6d274e8d7b6b4ac5fb69a3181f07f'
5
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
6
+
7
+ require 'devise/orm/active_record'
8
+
9
+ config.case_insensitive_keys = [ :email ]
10
+ config.strip_whitespace_keys = [ :email ]
11
+ config.skip_session_storage = [:http_auth]
12
+
13
+ config.stretches = Rails.env.test? ? 1 : 10
14
+ config.reconfirmable = true
15
+ config.password_length = 8..128
16
+ config.reset_password_within = 6.hours
17
+ config.sign_out_via = :delete
18
+ config.router_name = :fwt_push_notification_server
19
+
20
+ # config.to_prepare do
21
+ Devise::SessionsController.layout "fwt_push_notification_server/application"
22
+ # end
23
+
24
+ end
25
+
26
+
27
+