heart 0.0.1.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +21 -0
- data/README.rdoc +3 -0
- data/Rakefile +40 -0
- data/app/assets/images/heart/add.png +0 -0
- data/app/assets/images/heart/bluestar.png +0 -0
- data/app/assets/images/heart/bricks.png +0 -0
- data/app/assets/images/heart/bricks_off.png +0 -0
- data/app/assets/images/heart/chart_bar.png +0 -0
- data/app/assets/images/heart/chart_bar_off.png +0 -0
- data/app/assets/images/heart/chart_curve.png +0 -0
- data/app/assets/images/heart/chart_curve_off.png +0 -0
- data/app/assets/images/heart/chart_line.png +0 -0
- data/app/assets/images/heart/chart_line_off.png +0 -0
- data/app/assets/images/heart/chart_pie.png +0 -0
- data/app/assets/images/heart/chart_pie_off.png +0 -0
- data/app/assets/images/heart/collapse.png +0 -0
- data/app/assets/images/heart/dashboard.png +0 -0
- data/app/assets/images/heart/delete.png +0 -0
- data/app/assets/images/heart/disk.png +0 -0
- data/app/assets/images/heart/expand.png +0 -0
- data/app/assets/images/heart/jp.png +0 -0
- data/app/assets/images/heart/page_white_excel.png +0 -0
- data/app/assets/images/heart/paintcan.png +0 -0
- data/app/assets/images/heart/paintcan_off.png +0 -0
- data/app/assets/images/heart/pencil.png +0 -0
- data/app/assets/images/heart/picture.png +0 -0
- data/app/assets/images/heart/table.png +0 -0
- data/app/assets/images/heart/tag.png +0 -0
- data/app/assets/images/heart/tooltip/columnBg.png +0 -0
- data/app/assets/images/heart/tooltip/columnTop.gif +0 -0
- data/app/assets/images/heart/tooltip/tipBtm.png +0 -0
- data/app/assets/images/heart/tooltip/tipBtm280.png +0 -0
- data/app/assets/images/heart/tooltip/tipBtm280b.png +0 -0
- data/app/assets/images/heart/tooltip/tipMid.png +0 -0
- data/app/assets/images/heart/tooltip/tipMid280.png +0 -0
- data/app/assets/images/heart/tooltip/tipMid280b.png +0 -0
- data/app/assets/images/heart/tooltip/tipMid280g.png +0 -0
- data/app/assets/images/heart/tooltip/tipMid280w.png +0 -0
- data/app/assets/images/heart/tooltip/tipTop.png +0 -0
- data/app/assets/images/heart/tooltip/tipTop280.png +0 -0
- data/app/assets/images/heart/tooltip/tipTop280b.png +0 -0
- data/app/assets/images/heart/us.png +0 -0
- data/app/assets/images/heart/zoom.png +0 -0
- data/app/assets/images/heart/zoom_off.png +0 -0
- data/app/assets/javascripts/heart/application.js +201 -0
- data/app/assets/javascripts/heart/flot/jquery.colorhelpers.min.js +1 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.annotate.js +136 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.crosshair.min.js +1 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.fillbetween.js +183 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.growing.js +140 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.js +2651 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.navigate.js +336 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.pie.js +751 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.resize.js +60 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.selection.min.js +1 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.stack.min.js +1 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.symbols.js +85 -0
- data/app/assets/javascripts/heart/flot/jquery.flot.threshold.min.js +1 -0
- data/app/assets/javascripts/heart/heart.js +664 -0
- data/app/assets/javascripts/heart/jquery-1-5-2.js +16 -0
- data/app/assets/javascripts/heart/jquery-ui-1.8.7.custom.min.js +781 -0
- data/app/assets/javascripts/heart/jquery.betterTooltip.js +108 -0
- data/app/assets/javascripts/heart/json2.js +480 -0
- data/app/assets/stylesheets/heart/application.css +13 -0
- data/app/assets/stylesheets/heart/bluetrip/css/ie.css +29 -0
- data/app/assets/stylesheets/heart/bluetrip/css/print.css +46 -0
- data/app/assets/stylesheets/heart/bluetrip/css/screen.css +321 -0
- data/app/assets/stylesheets/heart/bluetrip/images/grid.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/grid.psd +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/cross.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/doc.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/email.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/external.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/feed.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/im.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/information.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/key.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/pdf.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/tick.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/visited.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/icons/xls.png +0 -0
- data/app/assets/stylesheets/heart/bluetrip/images/test-small.jpg +0 -0
- data/app/assets/stylesheets/heart/buttons.css +821 -0
- data/app/assets/stylesheets/heart/heart.css.erb +480 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_flat_55_999999_40x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_glass_45_0078ae_1x400.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_glass_55_f8da4e_1x400.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_glass_75_79c9ec_1x400.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_0078ae_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_056b93_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_e0fdff_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_f5e175_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_f7a50d_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/images/ui-icons_fcd113_256x240.png +0 -0
- data/app/assets/stylesheets/heart/start/jquery-ui-1.8.7.custom.css +572 -0
- data/app/controllers/heart/annotations_controller.rb +22 -0
- data/app/controllers/heart/application_controller.rb +21 -0
- data/app/controllers/heart/dashboards_controller.rb +85 -0
- data/app/controllers/heart/images_controller.rb +19 -0
- data/app/controllers/heart/metrics_controller.rb +35 -0
- data/app/helpers/heart/application_helper.rb +13 -0
- data/app/helpers/heart/dashboards_helper.rb +106 -0
- data/app/models/heart/annotation.rb +19 -0
- data/app/models/heart/application.rb +5 -0
- data/app/models/heart/dashboard.rb +6 -0
- data/app/models/heart/image.rb +5 -0
- data/app/models/heart/isometric.rb +8 -0
- data/app/models/heart/metric.rb +138 -0
- data/app/views/heart/annotations/create.js.haml +1 -0
- data/app/views/heart/annotations/description.js.haml +2 -0
- data/app/views/heart/dashboards/_annotation.haml +13 -0
- data/app/views/heart/dashboards/_dashblock.haml +17 -0
- data/app/views/heart/dashboards/_dashboard_form.html.haml +89 -0
- data/app/views/heart/dashboards/_graph_options.html.haml +24 -0
- data/app/views/heart/dashboards/_heart_form.html.haml +100 -0
- data/app/views/heart/dashboards/default.html.haml +32 -0
- data/app/views/heart/dashboards/edit.html.haml +14 -0
- data/app/views/heart/dashboards/flotit.js.haml +6 -0
- data/app/views/heart/dashboards/index.html.haml +19 -0
- data/app/views/heart/dashboards/new.html.haml +3 -0
- data/app/views/heart/dashboards/show.html.haml +65 -0
- data/app/views/heart/metrics/cache.html.haml +3 -0
- data/app/views/heart/metrics/fetch.html.haml +2 -0
- data/app/views/heart/metrics/index.html.haml +12 -0
- data/app/views/heart/metrics/show.html.haml +25 -0
- data/app/views/layouts/heart_engine.html.haml +88 -0
- data/config/cucumber.yml +8 -0
- data/config/locales/en.yml +63 -0
- data/config/locales/ja.yml +63 -0
- data/config/routes.rb +25 -0
- data/db/migrate/20130902050854_create_heart_metrics.rb +16 -0
- data/db/migrate/20130902051427_create_heart_isometrics.rb +9 -0
- data/db/migrate/20130902080256_create_heart_dashboards.rb +13 -0
- data/db/migrate/20130902080823_create_heart_annotations.rb +10 -0
- data/db/migrate/20130902081206_create_heart_images.rb +11 -0
- data/lib/heart/engine.rb +22 -0
- data/lib/heart/version.rb +3 -0
- data/lib/heart.rb +4 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/heart_tasks.rake +85 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +21 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130902083555_create_heart_metrics.heart.rb +17 -0
- data/test/dummy/db/migrate/20130902083556_create_heart_isometrics.heart.rb +10 -0
- data/test/dummy/db/migrate/20130902083557_create_heart_dashboards.heart.rb +14 -0
- data/test/dummy/db/migrate/20130902083558_create_heart_annotations.heart.rb +11 -0
- data/test/dummy/db/migrate/20130902083559_create_heart_images.heart.rb +12 -0
- data/test/dummy/db/migrate/20130902083560_create_heart_configurations.heart.rb +12 -0
- data/test/dummy/db/migrate/20130902084029_add_posts_new_to_metrics.rb +10 -0
- data/test/dummy/db/schema.rb +76 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/features/dashboards/overview.feature +39 -0
- data/test/dummy/features/language_switching.feature +12 -0
- data/test/dummy/features/link_to_this.feature +6 -0
- data/test/dummy/features/metrics/exporting.feature +13 -0
- data/test/dummy/features/metrics/fetching.feature +0 -0
- data/test/dummy/features/metrics/graphing.feature +13 -0
- data/test/dummy/features/metrics/summing.feature +0 -0
- data/test/dummy/features/step_definitions/dashboard_steps.rb +76 -0
- data/test/dummy/features/step_definitions/exporting_steps.rb +24 -0
- data/test/dummy/features/step_definitions/generic_steps.rb.example +101 -0
- data/test/dummy/features/step_definitions/graphing_steps.rb +37 -0
- data/test/dummy/features/step_definitions/language_switching_steps.rb +26 -0
- data/test/dummy/features/step_definitions/link_to_steps.rb +12 -0
- data/test/dummy/features/support/env.rb +64 -0
- data/test/dummy/features/support/factories.rb +16 -0
- data/test/dummy/features/support/hooks.rb +3 -0
- data/test/dummy/features/support/world_extensions.rb +1 -0
- data/test/dummy/log/development.log +549 -0
- data/test/dummy/log/test.log +19866 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/B7A/D60/sprockets%2F12305388866122331aea456101382236 +0 -0
- data/test/dummy/tmp/cache/assets/BE3/050/sprockets%2F0421426926cdd29806245aa078142462 +0 -0
- data/test/dummy/tmp/cache/assets/C3E/2A0/sprockets%2Fe37f35746618667d995a3587734e1f14 +0 -0
- data/test/dummy/tmp/cache/assets/C4F/0C0/sprockets%2Fb0695bc459d01217161ae9028368b856 +0 -0
- data/test/dummy/tmp/cache/assets/C57/200/sprockets%2F2e442476c863f14144881e259b1b597a +0 -0
- data/test/dummy/tmp/cache/assets/C61/A80/sprockets%2F7f20dd76170d803754a3085694f669e6 +0 -0
- data/test/dummy/tmp/cache/assets/C6B/710/sprockets%2F61a084f53ca308b115c54491f5b38120 +0 -0
- data/test/dummy/tmp/cache/assets/C76/680/sprockets%2Fb72c325230e403c89a229efd94013438 +0 -0
- data/test/dummy/tmp/cache/assets/C7D/AD0/sprockets%2Fa702e8b86f4697101583ea24307b7a53 +0 -0
- data/test/dummy/tmp/cache/assets/C81/4B0/sprockets%2F115a9d464b8720982880ad4926aaf505 +0 -0
- data/test/dummy/tmp/cache/assets/C83/670/sprockets%2F125f9496da25b06ace8951e752253273 +0 -0
- data/test/dummy/tmp/cache/assets/C86/DC0/sprockets%2F26269d2349fba3c41619fe3e88363044 +0 -0
- data/test/dummy/tmp/cache/assets/CA6/170/sprockets%2F6e0bb6a54c8f40c3419b183772c73331 +0 -0
- data/test/dummy/tmp/cache/assets/CAF/B10/sprockets%2F68ee8201881a1c1d3d987490e5015ed0 +0 -0
- data/test/dummy/tmp/cache/assets/CB6/080/sprockets%2F735f5d59ce0703357780bf4a574490ca +0 -0
- data/test/dummy/tmp/cache/assets/CB6/490/sprockets%2Fc4b6a866f5d3627d2a186e2095e60717 +0 -0
- data/test/dummy/tmp/cache/assets/CB9/9E0/sprockets%2F7a20a269f11f7331c8a56908c68f18d9 +0 -0
- data/test/dummy/tmp/cache/assets/CBB/950/sprockets%2F575827e14ba8d9920284eae267874ca1 +0 -0
- data/test/dummy/tmp/cache/assets/CBE/3A0/sprockets%2F73bdae55823e56e6f3796265941b36d1 +0 -0
- data/test/dummy/tmp/cache/assets/CC2/A70/sprockets%2F99163775fcea80cf5530f8808188e40b +0 -0
- data/test/dummy/tmp/cache/assets/CCB/970/sprockets%2F472690f680dd7d91690ebf603f7685e8 +0 -0
- data/test/dummy/tmp/cache/assets/CCB/CA0/sprockets%2F9b705933be3255cfd4938a9c99146e69 +0 -0
- data/test/dummy/tmp/cache/assets/CCF/FE0/sprockets%2Fea0015147c89d0181ba9460464bbf08c +0 -0
- data/test/dummy/tmp/cache/assets/CD1/1C0/sprockets%2F675a331d19ae21eaa532b27aa7606955 +0 -0
- data/test/dummy/tmp/cache/assets/CD1/320/sprockets%2Fb09e869800e3e0a0d7805d4c1c7113d1 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/1C0/sprockets%2F9a8012934e9d2f70a66c43310e3e44ab +0 -0
- data/test/dummy/tmp/cache/assets/CD7/270/sprockets%2F3bc51cb676bca1416770598d28109fa0 +0 -0
- data/test/dummy/tmp/cache/assets/CE0/E50/sprockets%2F9814922a41a67b828e462b31accb38f8 +0 -0
- data/test/dummy/tmp/cache/assets/CE3/A70/sprockets%2F87a37405e84d5a30dd672cf6148ec119 +0 -0
- data/test/dummy/tmp/cache/assets/CE4/050/sprockets%2F21d0ae6e0a782753af4ed2492e959671 +0 -0
- data/test/dummy/tmp/cache/assets/CE4/D80/sprockets%2Fa98448b0f9e10bf393a552d26664d7a3 +0 -0
- data/test/dummy/tmp/cache/assets/CE7/F80/sprockets%2F7715072387d4d8e6193c2ffda13a375f +0 -0
- data/test/dummy/tmp/cache/assets/CE8/890/sprockets%2F394187006c387afef0429558db43bf4e +0 -0
- data/test/dummy/tmp/cache/assets/CE8/CE0/sprockets%2F5c698abb053124d9a5421666bf75c8f8 +0 -0
- data/test/dummy/tmp/cache/assets/CF1/7B0/sprockets%2Fa447299b5fa19244e6a281825f9e77dc +0 -0
- data/test/dummy/tmp/cache/assets/CF1/CD0/sprockets%2Fd06db0e7d91462ed5ea64694583797e2 +0 -0
- data/test/dummy/tmp/cache/assets/CF2/070/sprockets%2Fca7b20d93194b5827d9d57837578b6db +0 -0
- data/test/dummy/tmp/cache/assets/CF2/C20/sprockets%2F7b5779909f4f5440c9d0874af23d63db +0 -0
- data/test/dummy/tmp/cache/assets/CF4/B20/sprockets%2F604291e761acf24ffb2998f369b176e8 +0 -0
- data/test/dummy/tmp/cache/assets/CF6/220/sprockets%2F06bd95eb7a76f96eb2d8c54782607745 +0 -0
- data/test/dummy/tmp/cache/assets/CFD/E70/sprockets%2F6cb7d8f69c8c4e1f246868d46f017639 +0 -0
- data/test/dummy/tmp/cache/assets/D00/5C0/sprockets%2F9abbd043d031592a556306748dbaeb26 +0 -0
- data/test/dummy/tmp/cache/assets/D02/000/sprockets%2F842565584accd26c5572aa1d15b3bb35 +0 -0
- data/test/dummy/tmp/cache/assets/D02/7C0/sprockets%2Fa4900a35834e0ab16a2ae17b6887a66d +0 -0
- data/test/dummy/tmp/cache/assets/D04/920/sprockets%2F5830c0ccdb2a54d7848283d21f44e2a4 +0 -0
- data/test/dummy/tmp/cache/assets/D05/FC0/sprockets%2Fd06631201fe7c8760eea1e3ffd351191 +0 -0
- data/test/dummy/tmp/cache/assets/D06/8C0/sprockets%2Faae533655b6c51d0b999ce29015c4c03 +0 -0
- data/test/dummy/tmp/cache/assets/D0B/350/sprockets%2F58255cc783163fa49e6caa32e01af293 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/560/sprockets%2Ffb853b302b8b8338911fd212f3e9d65a +0 -0
- data/test/dummy/tmp/cache/assets/D0F/340/sprockets%2F81d96cf056d0ab1856c588f181b21fe0 +0 -0
- data/test/dummy/tmp/cache/assets/D18/460/sprockets%2Fb0145de92306b4c1bedc53aa0030e522 +0 -0
- data/test/dummy/tmp/cache/assets/D19/710/sprockets%2F90db64737e5b2ef37757b1cc2e52909d +0 -0
- data/test/dummy/tmp/cache/assets/D1C/270/sprockets%2F1475adbe1d4ec03f947d379865d477b3 +0 -0
- data/test/dummy/tmp/cache/assets/D27/770/sprockets%2Fa10a1cef30d33ecec13933b36280c548 +0 -0
- data/test/dummy/tmp/cache/assets/D27/7B0/sprockets%2F6401357b67027ace91aae0cbcf5e4021 +0 -0
- data/test/dummy/tmp/cache/assets/D2B/700/sprockets%2Fe90d34a411e79a9d1b510ae04c80e04e +0 -0
- data/test/dummy/tmp/cache/assets/D34/100/sprockets%2F504aeb3e34faa21a7c9fa726264934d3 +0 -0
- data/test/dummy/tmp/cache/assets/D35/560/sprockets%2Fa79fc4b2a2293acaa002547e93d9704e +0 -0
- data/test/dummy/tmp/cache/assets/D35/F80/sprockets%2Ffb91b5a46525f11e9f6658a0daa005d4 +0 -0
- data/test/dummy/tmp/cache/assets/D38/A70/sprockets%2F56d65a0db0739f5f1a215bde93528f0a +0 -0
- data/test/dummy/tmp/cache/assets/D3A/A50/sprockets%2F1edbcb279564b5c4a85c13aa6940b279 +0 -0
- data/test/dummy/tmp/cache/assets/D3B/A10/sprockets%2F2cecd599ad2374ea47112715ae70ea49 +0 -0
- data/test/dummy/tmp/cache/assets/D3B/CF0/sprockets%2F4cac58b5d3abf581ca5857583017d3e1 +0 -0
- data/test/dummy/tmp/cache/assets/D3B/EF0/sprockets%2F996d2466d00c1bacc4351f87e2d5e62a +0 -0
- data/test/dummy/tmp/cache/assets/D3E/410/sprockets%2F4d2270e9821b7d9658df04c4adbdf214 +0 -0
- data/test/dummy/tmp/cache/assets/D43/FC0/sprockets%2F7f972ba9de00917d116bfc1c7126e8d6 +0 -0
- data/test/dummy/tmp/cache/assets/D4A/E50/sprockets%2Fa876a03aed98118f76cac6e916ff5423 +0 -0
- data/test/dummy/tmp/cache/assets/D4B/310/sprockets%2F3402fd809cbee959fdb8db9950a37342 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/E60/sprockets%2Fcd389726cc723176e5547ac75cc3fbc8 +0 -0
- data/test/dummy/tmp/cache/assets/D52/590/sprockets%2Fae4195e4fc883e26b828d9c7b525ff42 +0 -0
- data/test/dummy/tmp/cache/assets/D52/730/sprockets%2Fd92d03a100128cafe40eb231c3c77ba9 +0 -0
- data/test/dummy/tmp/cache/assets/D53/4E0/sprockets%2F6b5c3667b962d3740c9de6a5b9bfc948 +0 -0
- data/test/dummy/tmp/cache/assets/D59/B40/sprockets%2F29c73ae2b2a2dcf81b5210703eeed252 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/5F0/sprockets%2Fa03a93be0c8545371de91a5cab10fe52 +0 -0
- data/test/dummy/tmp/cache/assets/D5D/820/sprockets%2F60c2f35af5ce8dc4ab2a724043fd0373 +0 -0
- data/test/dummy/tmp/cache/assets/D5D/C10/sprockets%2Fa56376015a3d663ddeb1c90e3faa901b +0 -0
- data/test/dummy/tmp/cache/assets/D5E/030/sprockets%2Fb709d4ed36a3b17b21a42a66ae0098fb +0 -0
- data/test/dummy/tmp/cache/assets/D5F/6D0/sprockets%2Ff1f0426663c9048eceaa032dc3f05b5c +0 -0
- data/test/dummy/tmp/cache/assets/D64/540/sprockets%2F8b24e4230a33d44ed39d3d4ca015f7ff +0 -0
- data/test/dummy/tmp/cache/assets/D66/7D0/sprockets%2F6d2be390800b01686b6aeb7bba686c7b +0 -0
- data/test/dummy/tmp/cache/assets/D68/7F0/sprockets%2F35b0c94f2372250feee3c76a8bad07d4 +0 -0
- data/test/dummy/tmp/cache/assets/D69/F50/sprockets%2F0fe620b4cef107c5b770d70c5bbe6839 +0 -0
- data/test/dummy/tmp/cache/assets/D6A/630/sprockets%2F0e159a9bce743e35c180d0eceac52487 +0 -0
- data/test/dummy/tmp/cache/assets/D6F/120/sprockets%2F09730b5eed71a1971eb1ed85f0cd8c28 +0 -0
- data/test/dummy/tmp/cache/assets/D73/5A0/sprockets%2F726af59d1d3774cebabf5011f2a9955f +0 -0
- data/test/dummy/tmp/cache/assets/D76/410/sprockets%2F3ba75e6fe03df5d227c7e7a54be98720 +0 -0
- data/test/dummy/tmp/cache/assets/D76/750/sprockets%2F4422ff4ebec16419ef79a9a9d3f530f0 +0 -0
- data/test/dummy/tmp/cache/assets/D78/460/sprockets%2Ff8b234b2bfb694b85d927c693aba7d54 +0 -0
- data/test/dummy/tmp/cache/assets/D79/4F0/sprockets%2F0323ebeae0a56602aa023c9bb268b3ab +0 -0
- data/test/dummy/tmp/cache/assets/D7B/AF0/sprockets%2Fe1e0818c824997cffe5e04f2bff31e26 +0 -0
- data/test/dummy/tmp/cache/assets/D94/590/sprockets%2F95f6b48a4415cb3ab8acc4e0da36750d +0 -0
- data/test/dummy/tmp/cache/assets/D99/890/sprockets%2F783e81abd4c0cf96b0642acde9b7202f +0 -0
- data/test/dummy/tmp/cache/assets/D9A/FB0/sprockets%2F4bd1e3c2f82a72a0d6f8935ed92aeb60 +0 -0
- data/test/dummy/tmp/cache/assets/D9E/A00/sprockets%2Fdb6bd6ed1be390eb760409309a6d79ad +0 -0
- data/test/dummy/tmp/cache/assets/D9F/6D0/sprockets%2F6da6b2d77e0c546c69a3bb1720f9b9cd +0 -0
- data/test/dummy/tmp/cache/assets/DA1/050/sprockets%2F082944b24f4e6533ce0ce9fa64fadf5b +0 -0
- data/test/dummy/tmp/cache/assets/DA5/3B0/sprockets%2Fc5e9c4c0d3563ae2b49bf7cd67f458b1 +0 -0
- data/test/dummy/tmp/cache/assets/DAA/300/sprockets%2Ff4ebcefbb66ce3f58d70987c6123523e +0 -0
- data/test/dummy/tmp/cache/assets/DB1/C10/sprockets%2Fddabb257ba3637433fc7729f79fe6c9e +0 -0
- data/test/dummy/tmp/cache/assets/DB1/C90/sprockets%2Fdf909d50d7a568a1bc9dd9e47baf4973 +0 -0
- data/test/dummy/tmp/cache/assets/DB9/800/sprockets%2Fbd0a2a66976fd5ef12be3ac3e22d100e +0 -0
- data/test/dummy/tmp/cache/assets/DC2/1D0/sprockets%2F548c5a2d07c2b3db2eea9a24e2e25c9c +0 -0
- data/test/dummy/tmp/cache/assets/DC3/C30/sprockets%2F45d3db961ffaa14a7acb04d139f3ae93 +0 -0
- data/test/dummy/tmp/cache/assets/DC8/180/sprockets%2F44add687b1c02f2afd55b3dc9d58a04f +0 -0
- data/test/dummy/tmp/cache/assets/DCB/0A0/sprockets%2Ffec15e165ae6e45fe4d36b903fccf103 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/6C0/sprockets%2F1dd6adb3594e3cf84ce35ea45114ead9 +0 -0
- data/test/dummy/tmp/cache/assets/DCD/350/sprockets%2F0a1ad87bab5ab47f377d5f87736acdd2 +0 -0
- data/test/dummy/tmp/cache/assets/DCD/ED0/sprockets%2Fe3e1abc488563aa8c2d44c9b8b5b2f6c +0 -0
- data/test/dummy/tmp/cache/assets/DD1/620/sprockets%2F3c34c92afb93cab6ab8f1640683ee8fd +0 -0
- data/test/dummy/tmp/cache/assets/DD2/2B0/sprockets%2Fcb959dcb42fe971fef3b07705a4de60b +0 -0
- data/test/dummy/tmp/cache/assets/DD4/DB0/sprockets%2Fd16e7fa5788cebf2c0335cfb5a94d5b5 +0 -0
- data/test/dummy/tmp/cache/assets/DDA/140/sprockets%2F9dab37c1f47e99ba86bf306fbed67c23 +0 -0
- data/test/dummy/tmp/cache/assets/DF0/C50/sprockets%2Fc3dee69afa21d4462d0fda717c2f5a1b +0 -0
- data/test/dummy/tmp/cache/assets/DF3/CE0/sprockets%2Fd413b4fcbf2a3afe3a2f96fb3b22349f +0 -0
- data/test/dummy/tmp/cache/assets/DF5/020/sprockets%2Ffdbfbdaa7be9bc2fa2824455b9f36200 +0 -0
- data/test/dummy/tmp/cache/assets/DFB/120/sprockets%2F56abeace37f20e8ed908bb19c26c73ca +0 -0
- data/test/dummy/tmp/cache/assets/DFE/9D0/sprockets%2Fdfd5d12ea923dd88dd2fb5c56c2a6a73 +0 -0
- data/test/dummy/tmp/cache/assets/E04/670/sprockets%2Fe9e9c736dab1268ea76aed2ba1cf51f9 +0 -0
- data/test/dummy/tmp/cache/assets/E11/620/sprockets%2Fb79efcee1bf9f7559d26cc36bcbd6481 +0 -0
- data/test/dummy/tmp/cache/assets/E15/B10/sprockets%2F8fded28e5dfea96f7f42212ee4de8d82 +0 -0
- data/test/dummy/tmp/cache/assets/E1E/A70/sprockets%2F4a6f52c1cf40efaf040aabe5eca74c86 +0 -0
- data/test/dummy/tmp/cache/assets/E2F/B60/sprockets%2F9e9f03eab43fa8aeeb4aa97f1dff2171 +0 -0
- data/test/dummy/tmp/cache/assets/E3E/D60/sprockets%2F51bfcacbab0f9acbbcd331e31e095c40 +0 -0
- data/test/dummy/tmp/cache/assets/E4E/FE0/sprockets%2Fee2cecebeb842cdbbcfc530d13d50546 +0 -0
- data/test/dummy/tmp/cache/assets/E50/170/sprockets%2Faa1cd6441f82b0f9bfa1baffe5ce3c81 +0 -0
- data/test/dummy/tmp/cache/assets/E54/7B0/sprockets%2F7eba769afbacdcd2b019e3ae52fdb093 +0 -0
- data/test/dummy/tmp/cache/assets/E6C/5E0/sprockets%2F48dce5eee43c4ec8f9daa25a7fb847be +0 -0
- data/test/dummy/tmp/cache/assets/E86/5D0/sprockets%2Fec1c00efc9e5ebfa6c0576eb1ddfd60d +0 -0
- data/test/dummy/tmp/cache/assets/E8A/510/sprockets%2F4dcf2d4f6fbfe6af61adafbed37240a8 +0 -0
- data/test/dummy/tmp/cache/assets/E91/E50/sprockets%2F6caf6f973c4dfd0a94ca97da0cbfb8da +0 -0
- data/test/dummy/tmp/cache/assets/F0C/2E0/sprockets%2Fbcad47aa7a1eda0cc0fdc3eac6cb99fd +0 -0
- data/test/fixtures/heart/annotations.yml +11 -0
- data/test/fixtures/heart/configurations.yml +11 -0
- data/test/fixtures/heart/dashboards.yml +11 -0
- data/test/fixtures/heart/images.yml +11 -0
- data/test/fixtures/heart/isometrics.yml +11 -0
- data/test/fixtures/heart/metrics.yml +11 -0
- data/test/functional/heart/annotations_controller_test.rb +9 -0
- data/test/functional/heart/dashboards_controller_test.rb +9 -0
- data/test/functional/heart/images_controller_test.rb +9 -0
- data/test/functional/heart/metrics_controller_test.rb +9 -0
- data/test/heart_test.rb +7 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/heart/annotation_test.rb +9 -0
- data/test/unit/heart/configuration_test.rb +9 -0
- data/test/unit/heart/dashboard_test.rb +9 -0
- data/test/unit/heart/image_test.rb +9 -0
- data/test/unit/heart/isometric_test.rb +9 -0
- data/test/unit/heart/metric_test.rb +9 -0
- data/test/unit/helpers/heart/annotations_helper_test.rb +6 -0
- data/test/unit/helpers/heart/dashboards_helper_test.rb +6 -0
- data/test/unit/helpers/heart/images_helper_test.rb +6 -0
- data/test/unit/helpers/heart/metrics_helper_test.rb +6 -0
- metadata +791 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
|
3
|
+
|
|
4
|
+
# The test environment is used exclusively to run your application's
|
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
|
8
|
+
config.cache_classes = true
|
|
9
|
+
|
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
|
11
|
+
config.serve_static_assets = true
|
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
|
13
|
+
|
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
|
15
|
+
config.whiny_nils = true
|
|
16
|
+
|
|
17
|
+
# Show full error reports and disable caching
|
|
18
|
+
config.consider_all_requests_local = true
|
|
19
|
+
config.action_controller.perform_caching = false
|
|
20
|
+
|
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
|
22
|
+
config.action_dispatch.show_exceptions = false
|
|
23
|
+
|
|
24
|
+
# Disable request forgery protection in test environment
|
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
|
26
|
+
|
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
|
29
|
+
# ActionMailer::Base.deliveries array.
|
|
30
|
+
config.action_mailer.delivery_method = :test
|
|
31
|
+
|
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
|
34
|
+
|
|
35
|
+
# Print deprecation notices to the stderr
|
|
36
|
+
config.active_support.deprecation = :stderr
|
|
37
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
+
|
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Add new inflection rules using the following format
|
|
4
|
+
# (all these examples are active by default):
|
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
|
8
|
+
# inflect.irregular 'person', 'people'
|
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
|
10
|
+
# end
|
|
11
|
+
#
|
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
|
14
|
+
# inflect.acronym 'RESTful'
|
|
15
|
+
# end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
|
7
|
+
Dummy::Application.config.secret_token = '79fbc76582059ba8fac3a6201200c4f274c4a28cadd23cac03962d91dcf94cd9c8d38821e6aadcca2ffd99f599414a6ef647e76fccc0eb7c0934e398aa4e694d'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
|
4
|
+
|
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
|
6
|
+
# which shouldn't be used to store highly confidential information
|
|
7
|
+
# (create the session table with "rails generate session_migration")
|
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
#
|
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
|
4
|
+
# is enabled by default.
|
|
5
|
+
|
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
|
8
|
+
wrap_parameters format: [:json]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Disable root element in JSON by default.
|
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
|
13
|
+
self.include_root_in_json = false
|
|
14
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902050854)
|
|
2
|
+
class CreateHeartMetrics < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_metrics do |t|
|
|
5
|
+
t.date :fulldate
|
|
6
|
+
t.integer :dayofweek
|
|
7
|
+
t.integer :dayofyear
|
|
8
|
+
t.integer :weekofyear
|
|
9
|
+
t.integer :monthofyear
|
|
10
|
+
t.integer :year
|
|
11
|
+
t.integer :movingaverage, :default => 0
|
|
12
|
+
|
|
13
|
+
t.timestamps
|
|
14
|
+
end
|
|
15
|
+
add_index :heart_metrics, :movingaverage, :unique => false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902051427)
|
|
2
|
+
class CreateHeartIsometrics < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_isometrics do |t|
|
|
5
|
+
t.date :fulldate
|
|
6
|
+
t.integer :movingaverage, :default => 0
|
|
7
|
+
t.timestamps
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902080256)
|
|
2
|
+
class CreateHeartDashboards < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_dashboards do |t|
|
|
5
|
+
t.string :title
|
|
6
|
+
t.text :dashboard
|
|
7
|
+
t.text :description
|
|
8
|
+
t.date :date_from
|
|
9
|
+
t.integer :status
|
|
10
|
+
t.string :supplement
|
|
11
|
+
t.timestamps
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902080823)
|
|
2
|
+
class CreateHeartAnnotations < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_annotations do |t|
|
|
5
|
+
t.date :fulldate
|
|
6
|
+
t.string :note
|
|
7
|
+
t.integer :dashboard_id
|
|
8
|
+
t.timestamps
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902081206)
|
|
2
|
+
class CreateHeartImages < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_images do |t|
|
|
5
|
+
t.integer :dashboard_id
|
|
6
|
+
t.string :purpose
|
|
7
|
+
t.text :dataurl, :limit => 4294967295
|
|
8
|
+
|
|
9
|
+
t.timestamps
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This migration comes from heart (originally 20130902081333)
|
|
2
|
+
class CreateHeartConfigurations < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :heart_configurations do |t|
|
|
5
|
+
t.string :auth
|
|
6
|
+
t.string :username
|
|
7
|
+
t.string :password
|
|
8
|
+
|
|
9
|
+
t.timestamps
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
class AddPostsNewToMetrics < ActiveRecord::Migration
|
|
2
|
+
if Rails.env.test?
|
|
3
|
+
def change
|
|
4
|
+
add_column :heart_metrics, :postsNew, :integer
|
|
5
|
+
add_column :heart_isometrics, :postsNew, :datetime
|
|
6
|
+
add_column :heart_metrics, :usersNew, :integer
|
|
7
|
+
add_column :heart_isometrics, :usersNew, :datetime
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(:version => 20130902084029) do
|
|
15
|
+
|
|
16
|
+
create_table "heart_annotations", :force => true do |t|
|
|
17
|
+
t.date "fulldate"
|
|
18
|
+
t.string "note"
|
|
19
|
+
t.integer "dashboard_id"
|
|
20
|
+
t.datetime "created_at", :null => false
|
|
21
|
+
t.datetime "updated_at", :null => false
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
create_table "heart_configurations", :force => true do |t|
|
|
25
|
+
t.string "auth"
|
|
26
|
+
t.string "username"
|
|
27
|
+
t.string "password"
|
|
28
|
+
t.datetime "created_at", :null => false
|
|
29
|
+
t.datetime "updated_at", :null => false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
create_table "heart_dashboards", :force => true do |t|
|
|
33
|
+
t.string "title"
|
|
34
|
+
t.text "dashboard"
|
|
35
|
+
t.text "description"
|
|
36
|
+
t.date "date_from"
|
|
37
|
+
t.integer "status"
|
|
38
|
+
t.string "supplement"
|
|
39
|
+
t.datetime "created_at", :null => false
|
|
40
|
+
t.datetime "updated_at", :null => false
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
create_table "heart_images", :force => true do |t|
|
|
44
|
+
t.integer "dashboard_id"
|
|
45
|
+
t.string "purpose"
|
|
46
|
+
t.text "dataurl", :limit => 2147483647
|
|
47
|
+
t.datetime "created_at", :null => false
|
|
48
|
+
t.datetime "updated_at", :null => false
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
create_table "heart_isometrics", :force => true do |t|
|
|
52
|
+
t.date "fulldate"
|
|
53
|
+
t.integer "movingaverage", :default => 0
|
|
54
|
+
t.datetime "created_at", :null => false
|
|
55
|
+
t.datetime "updated_at", :null => false
|
|
56
|
+
t.datetime "postsNew"
|
|
57
|
+
t.datetime "usersNew"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
create_table "heart_metrics", :force => true do |t|
|
|
61
|
+
t.date "fulldate"
|
|
62
|
+
t.integer "dayofweek"
|
|
63
|
+
t.integer "dayofyear"
|
|
64
|
+
t.integer "weekofyear"
|
|
65
|
+
t.integer "monthofyear"
|
|
66
|
+
t.integer "year"
|
|
67
|
+
t.integer "movingaverage", :default => 0
|
|
68
|
+
t.datetime "created_at", :null => false
|
|
69
|
+
t.datetime "updated_at", :null => false
|
|
70
|
+
t.integer "postsNew"
|
|
71
|
+
t.integer "usersNew"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
add_index "heart_metrics", ["movingaverage"], :name => "index_heart_metrics_on_movingaverage"
|
|
75
|
+
|
|
76
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@metrics @javascript
|
|
2
|
+
Feature: Custom dashboards
|
|
3
|
+
In order to quickly access important metrics
|
|
4
|
+
|
|
5
|
+
As a business decision maker
|
|
6
|
+
|
|
7
|
+
I want a bookmarkable URL that preloads all custom graphs I am interested in
|
|
8
|
+
and fills it with the latest metric data.
|
|
9
|
+
|
|
10
|
+
Scenario: Display existing dashboards on index page
|
|
11
|
+
Given there is an example dashboard
|
|
12
|
+
When I visit the dashboard index
|
|
13
|
+
Then I should see a link to the dashboard
|
|
14
|
+
|
|
15
|
+
Scenario: View custom dashboard graphs
|
|
16
|
+
Given there is an example dashboard
|
|
17
|
+
When I visit the example dashboard
|
|
18
|
+
Then I should see the dashboard sidebar
|
|
19
|
+
|
|
20
|
+
Scenario: Create a custom dashboard
|
|
21
|
+
When I visit the dashboard index
|
|
22
|
+
And choose the create dashboard option
|
|
23
|
+
Then I can create a custom dashboard
|
|
24
|
+
|
|
25
|
+
Scenario: Custom dashboards require at least one graph
|
|
26
|
+
When I am creating a custom dashboard
|
|
27
|
+
And I forget to add a graph
|
|
28
|
+
Then it does not allow me to save the dashboard
|
|
29
|
+
|
|
30
|
+
Scenario: Custom dashboards require a title
|
|
31
|
+
When I am creating a custom dashboard
|
|
32
|
+
And I have a blank title
|
|
33
|
+
Then it does not allow me to save the dashboard
|
|
34
|
+
|
|
35
|
+
Scenario: Editing a dashboard's title and graphs
|
|
36
|
+
Given there is an example dashboard
|
|
37
|
+
When I visit the example dashboard
|
|
38
|
+
And choose the edit dashboard option
|
|
39
|
+
Then I can edit the dashboard's title and graphs
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Feature: Users can switch the interfaces language
|
|
2
|
+
Scenario: A user wants to see the page in English
|
|
3
|
+
Given I am on the dashboard page
|
|
4
|
+
When I choose "English" from the language options
|
|
5
|
+
Then the page displays the interface in "English"
|
|
6
|
+
And reloading the dashboard page does not revert my language preference
|
|
7
|
+
|
|
8
|
+
Scenario: A user wants to see the page in Japanese
|
|
9
|
+
Given I am on the dashboard page
|
|
10
|
+
When I choose "Japanese" from the language options
|
|
11
|
+
Then the page displays the interface in "Japanese"
|
|
12
|
+
And reloading the dashboard page does not revert my language preference
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@export @javascript
|
|
2
|
+
Feature: Exporting Metric Data
|
|
3
|
+
Scenario: Exporting metric data as graph image
|
|
4
|
+
Given there is example metric data
|
|
5
|
+
When I graph the example metric data
|
|
6
|
+
And I export the graph as an image
|
|
7
|
+
Then I should get an image
|
|
8
|
+
|
|
9
|
+
Scenario: Exporting metric data as a tab separated file
|
|
10
|
+
Given there is example metric data
|
|
11
|
+
When I graph the example metric data
|
|
12
|
+
And I export the graph as a text file
|
|
13
|
+
Then I should get tab separated text
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@metrics @javascript
|
|
2
|
+
Feature: Graphing Metric Data
|
|
3
|
+
Scenario: Display metric data in a graph
|
|
4
|
+
Given there is example metric data
|
|
5
|
+
When I graph the example metric data
|
|
6
|
+
Then the legend should show the example metric data
|
|
7
|
+
And the graph should show the data
|
|
8
|
+
|
|
9
|
+
Scenario: Display a blank graph when data is missing
|
|
10
|
+
Given no example metric data exists
|
|
11
|
+
When I graph the example metric data
|
|
12
|
+
Then the legend should show the example metric data
|
|
13
|
+
And the graph should be blank
|
|
File without changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
def dashboard_title
|
|
2
|
+
"Dboard Example"
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
Given /^there is an example dashboard$/ do
|
|
6
|
+
FactoryGirl.create(:heart_dashboard, :title => dashboard_title)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
When /^I visit the dashboard index$/ do
|
|
10
|
+
visit(dashboards_path)
|
|
11
|
+
page.should_not have_content('Internal Server Error')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
Then /^I should see a link to the dashboard$/ do
|
|
15
|
+
page.should have_content(dashboard_title.downcase)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
When /^I visit the example dashboard$/ do
|
|
19
|
+
visit(dashboards_path)
|
|
20
|
+
page.should_not have_content('Internal Server Error')
|
|
21
|
+
find_link(dashboard_title).click
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
Then /^I should see the dashboard sidebar$/ do
|
|
25
|
+
page.should have_content("Posts Only")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
When /^choose the create dashboard option$/ do
|
|
29
|
+
find_link("new_dashboard_link").click
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
When /^choose the edit dashboard option$/ do
|
|
33
|
+
find_link("edit_dashboard_link").click
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def add_a_graph
|
|
37
|
+
check_metrics
|
|
38
|
+
click_button('Graph')
|
|
39
|
+
fill_in(:chart_title1, :with => "A Demo Chart")
|
|
40
|
+
find(:css, '#dash_graph1').click
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
Then /^I can create a custom dashboard$/ do
|
|
44
|
+
fill_in(:dashboard_title, :with => "Does it Work?")
|
|
45
|
+
add_a_graph
|
|
46
|
+
find(:css, '#check_save_dashboard').click
|
|
47
|
+
page.should have_content("Does it Work?".downcase)
|
|
48
|
+
page.should_not have_content("A Demo Chart")
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
When /^I am creating a custom dashboard$/ do
|
|
52
|
+
visit(new_dashboard_path)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
When /^I have a blank title$/ do
|
|
56
|
+
fill_in(:dashboard_title, :with => "")
|
|
57
|
+
add_a_graph
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
When /^I forget to add a graph$/ do
|
|
61
|
+
fill_in(:dashboard_title, :with => "Does it Work?")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
Then /^it does not allow me to save the dashboard$/ do
|
|
65
|
+
find(:css, '#check_save_dashboard').click
|
|
66
|
+
page.driver.browser.switch_to.alert.accept
|
|
67
|
+
page.should have_css('#check_save_dashboard')
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Then /^I can edit the dashboard's title and graphs$/ do
|
|
71
|
+
fill_in(:dashboard_title, :with => "Does it Work?")
|
|
72
|
+
add_a_graph
|
|
73
|
+
find(:css, '#check_save_dashboard').click
|
|
74
|
+
page.should have_content("Does it Work?".downcase)
|
|
75
|
+
page.should_not have_css('#check_save_dashboard')
|
|
76
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
When /^I export the graph as an image$/ do
|
|
2
|
+
click_link('heart_export_image')
|
|
3
|
+
page.should_not have_content('RecordNotFound')
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
Then /^I should get an image$/ do
|
|
7
|
+
page.driver.browser.switch_to.window page.driver.browser.window_handles.last do
|
|
8
|
+
assert_match(/.png/, current_url)
|
|
9
|
+
page.should_not have_content('RecordNotFound')
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
When /^I export the graph as a text file$/ do
|
|
14
|
+
check('tsv_export')
|
|
15
|
+
click_button('Graph')
|
|
16
|
+
page.should_not have_content('RecordNotFound')
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Then /^I should get tab separated text$/ do
|
|
20
|
+
page.driver.browser.switch_to.window page.driver.browser.window_handles.last do
|
|
21
|
+
page.should have_content(3.days.ago.strftime("%Y/%-m/%-d"))
|
|
22
|
+
page.should have_content("\t")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Commonly used webrat steps
|
|
2
|
+
# http://github.com/brynary/webrat
|
|
3
|
+
|
|
4
|
+
Given /^I am on (.+)$/ do |page_name|
|
|
5
|
+
visit path_to(page_name)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
When /^I go to (.+)$/ do |page_name|
|
|
9
|
+
visit path_to(page_name)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
When /^I press "([^\"]*)"$/ do |button|
|
|
13
|
+
click_button(button)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
When /^I follow "([^\"]*)"$/ do |link|
|
|
17
|
+
click_link(link)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
|
|
21
|
+
fill_in(field, :with => value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, field|
|
|
25
|
+
select(value, :from => field)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Use this step in conjunction with Rail's datetime_select helper. For example:
|
|
29
|
+
# When I select "December 25, 2008 10:00" as the date and time
|
|
30
|
+
When /^I select "([^\"]*)" as the date and time$/ do |time|
|
|
31
|
+
select_datetime(time)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Use this step when using multiple datetime_select helpers on a page or
|
|
35
|
+
# you want to specify which datetime to select. Given the following view:
|
|
36
|
+
# <%= f.label :preferred %><br />
|
|
37
|
+
# <%= f.datetime_select :preferred %>
|
|
38
|
+
# <%= f.label :alternative %><br />
|
|
39
|
+
# <%= f.datetime_select :alternative %>
|
|
40
|
+
# The following steps would fill out the form:
|
|
41
|
+
# When I select "November 23, 2004 11:20" as the "Preferred" data and time
|
|
42
|
+
# And I select "November 25, 2004 10:30" as the "Alternative" data and time
|
|
43
|
+
When /^I select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, datetime_label|
|
|
44
|
+
select_datetime(datetime, :from => datetime_label)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Use this step in conjunction with Rail's time_select helper. For example:
|
|
48
|
+
# When I select "2:20PM" as the time
|
|
49
|
+
# Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
|
|
50
|
+
# will convert the 2:20PM to 14:20 and then select it.
|
|
51
|
+
When /^I select "([^\"]*)" as the time$/ do |time|
|
|
52
|
+
select_time(time)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Use this step when using multiple time_select helpers on a page or you want to
|
|
56
|
+
# specify the name of the time on the form. For example:
|
|
57
|
+
# When I select "7:30AM" as the "Gym" time
|
|
58
|
+
When /^I select "([^\"]*)" as the "([^\"]*)" time$/ do |time, time_label|
|
|
59
|
+
select_time(time, :from => time_label)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Use this step in conjunction with Rail's date_select helper. For example:
|
|
63
|
+
# When I select "February 20, 1981" as the date
|
|
64
|
+
When /^I select "([^\"]*)" as the date$/ do |date|
|
|
65
|
+
select_date(date)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Use this step when using multiple date_select helpers on one page or
|
|
69
|
+
# you want to specify the name of the date on the form. For example:
|
|
70
|
+
# When I select "April 26, 1982" as the "Date of Birth" date
|
|
71
|
+
When /^I select "([^\"]*)" as the "([^\"]*)" date$/ do |date, date_label|
|
|
72
|
+
select_date(date, :from => date_label)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
When /^I check "([^\"]*)"$/ do |field|
|
|
76
|
+
check(field)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
When /^I uncheck "([^\"]*)"$/ do |field|
|
|
80
|
+
uncheck(field)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
When /^I choose "([^\"]*)"$/ do |field|
|
|
84
|
+
choose(field)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
When /^I attach the file at "([^\"]*)" to "([^\"]*)"$/ do |path, field|
|
|
88
|
+
attach_file(field, path)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
Then /^I should see "([^\"]*)"$/ do |text|
|
|
92
|
+
response.should contain(text)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
Then /^I should not see "([^\"]*)"$/ do |text|
|
|
96
|
+
response.should_not contain(text)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
Then /^the "([^\"]*)" checkbox should be checked$/ do |label|
|
|
100
|
+
field_labeled(label).should be_checked
|
|
101
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Given /^there is example metric data$/ do
|
|
2
|
+
(1..3).each do |number|
|
|
3
|
+
FactoryGirl.create(:metric, :fulldate => number.days.ago.to_date)
|
|
4
|
+
end
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
Given /^no example metric data exists$/ do
|
|
8
|
+
#no data
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
When /^I graph the example metric data$/ do
|
|
12
|
+
visit(default_dashboards_path)
|
|
13
|
+
fill_in('date_from', :with => 3.days.ago.strftime('%F'))
|
|
14
|
+
fill_in('date_to', :with => 1.day.ago.strftime('%F'))
|
|
15
|
+
check_metrics
|
|
16
|
+
click_button('Graph')
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Then /^the legend should show the example metric data$/ do
|
|
20
|
+
page.should have_css('td.legendLabel', :text => 'PostsNew')
|
|
21
|
+
page.should have_css('td.legendLabel', :text => 'UsersNew')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
Then /^the graph should show the data$/ do
|
|
25
|
+
#unsure how to test atm
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Then /^the graph should be blank$/ do
|
|
29
|
+
#unsure how to test atm
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def check_metrics
|
|
33
|
+
find(:css, '#namespace_title_Posts').click
|
|
34
|
+
check('measurement_postsNew')
|
|
35
|
+
find(:css, '#namespace_title_Users').click
|
|
36
|
+
check('measurement_usersNew')
|
|
37
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Given /^I am on the dashboard page$/ do
|
|
2
|
+
visit(heart_engine.default_dashboards_path)
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
When /^I choose "(.*?)" from the language options$/ do |arg1|
|
|
6
|
+
click_link("lang_#{lang(arg1)}")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
Then /^the page displays the interface in "(.*?)"$/ do |arg1|
|
|
10
|
+
@language = arg1
|
|
11
|
+
page.should have_content(I18n.t(:measurements, :locale => "#{lang(arg1)}_heart"))
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
Then /^reloading the dashboard page does not revert my language preference$/ do
|
|
15
|
+
visit(default_dashboards_path)
|
|
16
|
+
page.should have_content(I18n.t(:measurements, :locale => "#{lang(@language)}_heart"))
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def lang(option)
|
|
20
|
+
case option
|
|
21
|
+
when "English"
|
|
22
|
+
:en
|
|
23
|
+
when "Japanese"
|
|
24
|
+
:ja
|
|
25
|
+
end
|
|
26
|
+
end
|