xrono 1.0.0
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/.gitignore +19 -0
- data/.rspec +1 -0
- data/.travis.yml +20 -0
- data/Gemfile +30 -0
- data/Gemfile.lock +336 -0
- data/LICENSE +21 -0
- data/README.md +64 -0
- data/RELEASE_NOTES.md +83 -0
- data/Rakefile +15 -0
- data/XRONO.md +64 -0
- data/app/assets/images/chosen-sprite.png +0 -0
- data/app/assets/images/grid.png +0 -0
- data/app/assets/images/isotope_logo.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo_122x40.png +0 -0
- data/app/assets/images/logo_97x40.png +0 -0
- data/app/assets/images/main_bg.jpg +0 -0
- data/app/assets/images/nav_bg.jpg +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/images/top_bg.jpg +0 -0
- data/app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_0_fbf9ee_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_65_ffffff_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_75_cccccc_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_75_dadada_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_75_e6e6e6_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/ui-bg_flat_95_fef1ec_40x100.png +0 -0
- data/app/assets/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/app/assets/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/app/assets/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/app/assets/images/ui-icons_217bc0_256x240.png +0 -0
- data/app/assets/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/ui-icons_469bdd_256x240.png +0 -0
- data/app/assets/images/ui-icons_6da8d5_256x240.png +0 -0
- data/app/assets/images/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/app/assets/images/ui-icons_f9bd01_256x240.png +0 -0
- data/app/assets/javascripts/add_taxonomy.js.erb +307 -0
- data/app/assets/javascripts/admin_invoices.js +15 -0
- data/app/assets/javascripts/api/v1/clients.js.coffee +3 -0
- data/app/assets/javascripts/api/v1/tokens.js.coffee +3 -0
- data/app/assets/javascripts/application.js.erb +25 -0
- data/app/assets/javascripts/bootstrap-dropdown.js +92 -0
- data/app/assets/javascripts/bootstrap-tabs.js +80 -0
- data/app/assets/javascripts/bootstrap.js.coffee +4 -0
- data/app/assets/javascripts/calendar.js +25 -0
- data/app/assets/javascripts/chosen.jquery.js +898 -0
- data/app/assets/javascripts/client_login/clients.js.coffee +3 -0
- data/app/assets/javascripts/client_login/reports.js.coffee +3 -0
- data/app/assets/javascripts/comments.js +16 -0
- data/app/assets/javascripts/css_browser_selector.js +8 -0
- data/app/assets/javascripts/dashboard.js +3 -0
- data/app/assets/javascripts/data_vaults.js.coffee +3 -0
- data/app/assets/javascripts/file_attachments.js +9 -0
- data/app/assets/javascripts/jquery-tagselector.js +50 -0
- data/app/assets/javascripts/jquery-ui-1.8.16.custom.min.js +791 -0
- data/app/assets/javascripts/jquery.jeditable.js +543 -0
- data/app/assets/javascripts/jquery_ujs.js +336 -0
- data/app/assets/javascripts/schedule_modal.js +25 -0
- data/app/assets/javascripts/specify_project.js +21 -0
- data/app/assets/javascripts/ticket_board.js +104 -0
- data/app/assets/stylesheets/_jquery-ui-1.8.16.custom.css +568 -0
- data/app/assets/stylesheets/application.css +7 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.css.scss +41 -0
- data/app/assets/stylesheets/chosen.css +367 -0
- data/app/assets/stylesheets/client_login/clients.css.scss +3 -0
- data/app/assets/stylesheets/client_login/reports.css.scss +3 -0
- data/app/assets/stylesheets/data_vaults.css.scss +3 -0
- data/app/assets/stylesheets/jquery-tagselector.css +49 -0
- data/app/assets/stylesheets/responsive.scss +650 -0
- data/app/assets/stylesheets/screen.scss +303 -0
- data/app/controllers/admin/base_controller.rb +18 -0
- data/app/controllers/admin/invoices_controller.rb +42 -0
- data/app/controllers/admin/payroll_controller.rb +29 -0
- data/app/controllers/admin/site_settings_controller.rb +19 -0
- data/app/controllers/admin/unentered_time_report_controller.rb +26 -0
- data/app/controllers/admin/users_controller.rb +86 -0
- data/app/controllers/admin/weekly_time_report_controller.rb +11 -0
- data/app/controllers/api/base_controller.rb +14 -0
- data/app/controllers/api/v1/base_controller.rb +2 -0
- data/app/controllers/api/v1/clients_controller.rb +10 -0
- data/app/controllers/api/v1/credentials_controller.rb +10 -0
- data/app/controllers/api/v1/projects_controller.rb +27 -0
- data/app/controllers/api/v1/tickets_controller.rb +46 -0
- data/app/controllers/api/v1/tokens_controller.rb +30 -0
- data/app/controllers/api/v1/work_units_controller.rb +23 -0
- data/app/controllers/client_login/base_controller.rb +3 -0
- data/app/controllers/client_login/clients_controller.rb +35 -0
- data/app/controllers/client_login/contacts_controller.rb +53 -0
- data/app/controllers/client_login/projects_controller.rb +24 -0
- data/app/controllers/client_login/reports_controller.rb +23 -0
- data/app/controllers/client_login/tickets_controller.rb +41 -0
- data/app/controllers/client_login/work_units_controller.rb +11 -0
- data/app/controllers/clients_controller.rb +103 -0
- data/app/controllers/comments_controller.rb +75 -0
- data/app/controllers/contacts_controller.rb +54 -0
- data/app/controllers/dashboard/base_controller.rb +79 -0
- data/app/controllers/data_vaults_controller.rb +12 -0
- data/app/controllers/doorkeeper/application_controller.rb +33 -0
- data/app/controllers/file_attachments_controller.rb +60 -0
- data/app/controllers/projects_controller.rb +62 -0
- data/app/controllers/tickets_controller.rb +48 -0
- data/app/controllers/users_controller.rb +57 -0
- data/app/controllers/work_units_controller.rb +114 -0
- data/app/controllers/xrono/application_controller.rb +65 -0
- data/app/helpers/admin/unentered_time_report_helper.rb +9 -0
- data/app/helpers/admin_base_helper.rb +14 -0
- data/app/helpers/clients_helper.rb +5 -0
- data/app/helpers/dashboard_helper.rb +9 -0
- data/app/helpers/gravatar_helper.rb +5 -0
- data/app/helpers/refurl_helper.rb +9 -0
- data/app/helpers/xrono/application_helper.rb +54 -0
- data/app/mailers/notifier.rb +18 -0
- data/app/models/chart_data.rb +20 -0
- data/app/models/client.rb +98 -0
- data/app/models/comment.rb +8 -0
- data/app/models/contact.rb +10 -0
- data/app/models/data_vault.rb +6 -0
- data/app/models/file_attachment.rb +8 -0
- data/app/models/project.rb +76 -0
- data/app/models/role.rb +3 -0
- data/app/models/roles_user.rb +4 -0
- data/app/models/site_settings.rb +4 -0
- data/app/models/ticket.rb +85 -0
- data/app/models/user.rb +147 -0
- data/app/models/weekly_time_report.rb +26 -0
- data/app/models/work_unit.rb +99 -0
- data/app/models/work_unit/finders.rb +67 -0
- data/app/views/admin/_nav.html.haml +1 -0
- data/app/views/admin/base/index.html.haml +3 -0
- data/app/views/admin/base/reports.html.haml +3 -0
- data/app/views/admin/invoices/index.html.haml +19 -0
- data/app/views/admin/invoices/show.html.haml +57 -0
- data/app/views/admin/payroll/index.html.haml +18 -0
- data/app/views/admin/payroll/show.html.haml +56 -0
- data/app/views/admin/site_settings/edit.html.haml +32 -0
- data/app/views/admin/unentered_time_report/_week_navigation.html.haml +6 -0
- data/app/views/admin/unentered_time_report/show.html.haml +16 -0
- data/app/views/admin/users/_form.html.haml +48 -0
- data/app/views/admin/users/_locked_users.html.haml +31 -0
- data/app/views/admin/users/_users_table.html.haml +25 -0
- data/app/views/admin/users/edit.html.haml +1 -0
- data/app/views/admin/users/index.html.haml +14 -0
- data/app/views/admin/users/locked_clients.html.haml +13 -0
- data/app/views/admin/users/locked_users.html.haml +13 -0
- data/app/views/admin/users/new.html.haml +1 -0
- data/app/views/admin/users/projects.html.haml +25 -0
- data/app/views/admin/users/unlocked_clients.html.haml +13 -0
- data/app/views/admin/weekly_time_report/_week_pagination.html.haml +11 -0
- data/app/views/admin/weekly_time_report/show.html.haml +41 -0
- data/app/views/client_login/_work_unit_index.haml +16 -0
- data/app/views/client_login/base/index.html.haml +18 -0
- data/app/views/client_login/clients/show.html.haml +32 -0
- data/app/views/client_login/contacts/_form.html.haml +34 -0
- data/app/views/client_login/contacts/edit.html.haml +4 -0
- data/app/views/client_login/contacts/index.html.haml +30 -0
- data/app/views/client_login/contacts/new.html.haml +5 -0
- data/app/views/client_login/contacts/show.html.haml +26 -0
- data/app/views/client_login/projects/_tickets.html.haml +31 -0
- data/app/views/client_login/projects/show.html.haml +8 -0
- data/app/views/client_login/reports/index.html.haml +4 -0
- data/app/views/client_login/reports/work_units.html.haml +96 -0
- data/app/views/client_login/tickets/_form.html.haml +33 -0
- data/app/views/client_login/tickets/new.html.haml +1 -0
- data/app/views/client_login/tickets/show.html.haml +23 -0
- data/app/views/client_login/work_units/show.html.haml +18 -0
- data/app/views/clients/_breadcrumbs.html.haml +2 -0
- data/app/views/clients/_clients_table.html.haml +24 -0
- data/app/views/clients/_form.html.haml +34 -0
- data/app/views/clients/_projects.html.haml +31 -0
- data/app/views/clients/edit.html.haml +1 -0
- data/app/views/clients/inactive_clients.html.haml +9 -0
- data/app/views/clients/index.html.haml +8 -0
- data/app/views/clients/new.html.haml +1 -0
- data/app/views/clients/show.html.haml +34 -0
- data/app/views/clients/suspended_clients.html.haml +8 -0
- data/app/views/comments/_comment.html.haml +46 -0
- data/app/views/comments/_comment_form.haml +29 -0
- data/app/views/comments/_comments.html.haml +3 -0
- data/app/views/contacts/_form.html.haml +34 -0
- data/app/views/contacts/edit.html.haml +1 -0
- data/app/views/contacts/index.html.haml +23 -0
- data/app/views/contacts/new.html.haml +1 -0
- data/app/views/contacts/show.html.haml +26 -0
- data/app/views/dashboard/base/_two_week_time_report.html.haml +13 -0
- data/app/views/dashboard/base/_week_pagination.html.haml +10 -0
- data/app/views/dashboard/base/calendar.html.haml +1 -0
- data/app/views/dashboard/base/calendar.js.erb +3 -0
- data/app/views/dashboard/base/index.html.haml +18 -0
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/mailer/unlock_instructions.html.haml +5 -0
- data/app/views/devise/passwords/edit.html.haml +17 -0
- data/app/views/devise/passwords/new.html.haml +12 -0
- data/app/views/devise/registrations/edit.html.haml +36 -0
- data/app/views/devise/registrations/new.html.haml +32 -0
- data/app/views/devise/sessions/new.html.haml +22 -0
- data/app/views/devise/shared/_links.haml +15 -0
- data/app/views/devise/unlocks/new.html.haml +9 -0
- data/app/views/file_attachments/_file_attachment.html.haml +10 -0
- data/app/views/file_attachments/_file_attachment_combined.html.haml +30 -0
- data/app/views/file_attachments/_file_attachments.html.haml +5 -0
- data/app/views/file_attachments/new.html.haml +17 -0
- data/app/views/layouts/application.html.haml +32 -0
- data/app/views/layouts/doorkeeper.html.haml +31 -0
- data/app/views/notifier/daily.text.erb +8 -0
- data/app/views/notifier/work_unit_notification.text.erb +17 -0
- data/app/views/projects/_breadcrumbs.html.haml +5 -0
- data/app/views/projects/_form.html.haml +94 -0
- data/app/views/projects/_pie_chart_metrics.html.haml +4 -0
- data/app/views/projects/_specify.html.haml +11 -0
- data/app/views/projects/_ticket_table.html.haml +36 -0
- data/app/views/projects/edit.html.haml +2 -0
- data/app/views/projects/new.html.haml +2 -0
- data/app/views/projects/show.html.haml +57 -0
- data/app/views/shared/_calendar.html.haml +86 -0
- data/app/views/shared/_data_vault.html.haml +16 -0
- data/app/views/shared/_files_and_comments.html.haml +21 -0
- data/app/views/shared/_flashes.html.haml +10 -0
- data/app/views/shared/_javascripts.html.haml +8 -0
- data/app/views/shared/_menu.html.haml +14 -0
- data/app/views/shared/_user_roles.html.haml +7 -0
- data/app/views/shared/_work_unit_index.html.haml +24 -0
- data/app/views/tickets/_add_ticket.html.haml +27 -0
- data/app/views/tickets/_breadcrumbs.html.haml +8 -0
- data/app/views/tickets/_form.html.haml +40 -0
- data/app/views/tickets/_ticket_detail.html.haml +18 -0
- data/app/views/tickets/edit.html.haml +2 -0
- data/app/views/tickets/modal_new.html.haml +28 -0
- data/app/views/tickets/new.html.haml +1 -0
- data/app/views/tickets/show.html.haml +28 -0
- data/app/views/tickets/ticket_detail.html.haml +18 -0
- data/app/views/users/_change_password_form.haml +13 -0
- data/app/views/users/_user_head.html.haml +7 -0
- data/app/views/users/edit.haml +34 -0
- data/app/views/users/historical_time.html.haml +5 -0
- data/app/views/users/index.html.haml +18 -0
- data/app/views/users/show.html.haml +13 -0
- data/app/views/work_units/_add_work_unit.html.haml +81 -0
- data/app/views/work_units/_breadcrumbs.html.haml +11 -0
- data/app/views/work_units/_dashboard_line.html.haml +6 -0
- data/app/views/work_units/_edit_work_unit.haml +44 -0
- data/app/views/work_units/_shared_form.haml +40 -0
- data/app/views/work_units/edit.html.haml +2 -0
- data/app/views/work_units/index.html.haml +7 -0
- data/app/views/work_units/new.html.haml +6 -0
- data/app/views/work_units/show.html.haml +25 -0
- data/app/workers/daily_notifier_worker.rb +7 -0
- data/app/workers/work_unit_notifier_worker.rb +7 -0
- data/config.ru +7 -0
- data/config/admin_navigation.rb +71 -0
- data/config/admin_reports_navigation.rb +6 -0
- data/config/boot.rb +6 -0
- data/config/client_navigation.rb +64 -0
- data/config/cucumber.yml +8 -0
- data/config/initializers/00_requirements.rb +2 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/devise.rb +144 -0
- data/config/initializers/doorkeeper.rb +32 -0
- data/config/initializers/doorkeeper_monkeypatch.rb +66 -0
- data/config/initializers/github_concern.rb +4 -0
- data/config/initializers/haml.rb +13 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/load_controller_mixins.rb +1 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/paper_clip.rb +1 -0
- data/config/initializers/simple_navigation.rb +1 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +39 -0
- data/config/locales/doorkeeper.en.yml +23 -0
- data/config/locales/en.yml +201 -0
- data/config/locales/faker.en.yml +48 -0
- data/config/navigation.rb +78 -0
- data/config/rackspace_cloudfiles.yml +14 -0
- data/config/routes.rb +113 -0
- data/config/secondary_navigation.rb +65 -0
- data/config/trinidad.yml +4 -0
- data/config/warble.rb +144 -0
- data/db/migrate/20100825165612_create_clients.rb +14 -0
- data/db/migrate/20100825185313_create_projects.rb +14 -0
- data/db/migrate/20100825223943_create_tickets.rb +16 -0
- data/db/migrate/20100902174920_create_work_units.rb +14 -0
- data/db/migrate/20100902190129_add_missing_fields_to_work_units.rb +13 -0
- data/db/migrate/20100904173839_add_guid_to_clients_projects_tickets_and_work_orders.rb +13 -0
- data/db/migrate/20100922181642_create_comments.rb +19 -0
- data/db/migrate/20100927180254_devise_create_users.rb +32 -0
- data/db/migrate/20100927184505_add_details_to_users.rb +13 -0
- data/db/migrate/20100927191329_add_user_to_work_units.rb +9 -0
- data/db/migrate/20100928163356_create_roles.rb +22 -0
- data/db/migrate/20100928203745_create_addresses.rb +19 -0
- data/db/migrate/20100928204544_create_contacts.rb +17 -0
- data/db/migrate/20101007175626_add_lockable_to_users.rb +11 -0
- data/db/migrate/20101020162216_add_paid_at_to_work_units_table.rb +9 -0
- data/db/migrate/20101020162516_add_check_number_to_work_units_table.rb +9 -0
- data/db/migrate/20101020215135_add_paid_field_to_work_units_table.rb +9 -0
- data/db/migrate/20101020215226_add_invoiced_field_to_work_units_table.rb +9 -0
- data/db/migrate/20101020215457_remove_paid_at_from_work_units_table.rb +9 -0
- data/db/migrate/20101020215624_remove_check_number_from_work_units_table.rb +9 -0
- data/db/migrate/20101025161443_add_invoiced_at_to_work_units_table.rb +9 -0
- data/db/migrate/20101026151900_add_initials_to_clients.rb +9 -0
- data/db/migrate/20101029145059_create_file_attachments.rb +18 -0
- data/db/migrate/20101030142615_add_guid_to_users.rb +9 -0
- data/db/migrate/20101102145137_add_paid_at_to_work_units.rb +9 -0
- data/db/migrate/20101112151337_add_active_to_comments.rb +9 -0
- data/db/migrate/20101119172727_add_recieves_email_to_contact.rb +10 -0
- data/db/migrate/20101122225423_projects_users.rb +11 -0
- data/db/migrate/20101129214537_remove_projects_users_table.rb +11 -0
- data/db/migrate/20101130225328_contact_receives_email.rb +9 -0
- data/db/migrate/20101202203051_add_address_to_contacts.rb +19 -0
- data/db/migrate/20101202214746_remove_address_table.rb +17 -0
- data/db/migrate/20101216214304_add_hours_type_to_work_unit.rb +9 -0
- data/db/migrate/20101217152455_add_effective_hours_to_work_units.rb +9 -0
- data/db/migrate/20101228154820_add_overtime_multiplier_to_clients_table.rb +9 -0
- data/db/migrate/20101228154951_add_overtime_multiplier_to_projects_table.rb +9 -0
- data/db/migrate/20101228155122_create_site_settings_table.rb +11 -0
- data/db/migrate/20110107190927_add_site_logo_columns_to_site_settings.rb +15 -0
- data/db/migrate/20110111155513_add_total_yearly_pto_per_user_to_site_settings.rb +9 -0
- data/db/migrate/20110111220015_add_not_valid_to_file_attachment.rb +9 -0
- data/db/migrate/20110125153818_add_fullwidth_to_users.rb +9 -0
- data/db/migrate/20110222162404_add_daily_target_hours_to_users.rb +9 -0
- data/db/migrate/20110310021732_add_client_to_site_settings.rb +9 -0
- data/db/migrate/20110630194044_add_expanded_calendar_to_user.rb +9 -0
- data/db/migrate/20110922175742_add_state_to_tickets.rb +9 -0
- data/db/migrate/20111212193345_add_estimated_hours_to_tickets.rb +5 -0
- data/db/migrate/20111216152557_add_client_boolean_to_user.rb +5 -0
- data/db/migrate/20111220193307_add_repo_and_branch_to_projects_and_ticket.rb +6 -0
- data/db/migrate/20111220193619_create_git_pushes.rb +9 -0
- data/db/migrate/20111220193620_create_git_commits.rb +10 -0
- data/db/migrate/20111220193621_add_user_id_to_git_push.rb +5 -0
- data/db/migrate/20111220193622_create_github_concernable_git_pushes.rb +11 -0
- data/db/migrate/20111227140859_add_token_to_user.rb +7 -0
- data/db/migrate/20120102185406_add_completed_boolean_to_ticket.rb +5 -0
- data/db/migrate/20120104132121_add_completed_to_project.rb +5 -0
- data/db/migrate/20120124184915_modify_project_for_new_git_integration.rb +11 -0
- data/db/migrate/20120125145833_add_rates_to_project.rb +6 -0
- data/db/migrate/20120126151009_create_data_vaults.rb +11 -0
- data/db/migrate/20120126151341_create_versions.rb +18 -0
- data/db/migrate/20120126154403_rename_column_data_to_encrypted_data.rb +8 -0
- data/db/migrate/20120221193022_add_index_to_user_id_on_work_units.rb +5 -0
- data/db/migrate/20120221195345_acts_as_taggable_on_migration.rb +30 -0
- data/db/migrate/20120320212313_remove_timestamps_from_roles_users_table.rb +11 -0
- data/db/migrate/20120710034831_create_doorkeeper_tables.rb +42 -0
- data/db/migrate/20121021122002_add_missing_indices.rb +21 -0
- data/doc/website/favicon.ico +0 -0
- data/doc/website/images/clock_box.png +0 -0
- data/doc/website/images/demo.png +0 -0
- data/doc/website/images/download.png +0 -0
- data/doc/website/images/fork_me.png +0 -0
- data/doc/website/images/lightbox-blank.gif +0 -0
- data/doc/website/images/lightbox-btn-close.gif +0 -0
- data/doc/website/images/lightbox-btn-next.gif +0 -0
- data/doc/website/images/lightbox-btn-prev.gif +0 -0
- data/doc/website/images/lightbox-ico-loading.gif +0 -0
- data/doc/website/images/main_bg.png +0 -0
- data/doc/website/images/nav_bg.png +0 -0
- data/doc/website/images/screen_1.png +0 -0
- data/doc/website/images/screen_2.png +0 -0
- data/doc/website/images/screen_3.png +0 -0
- data/doc/website/images/screen_4.png +0 -0
- data/doc/website/images/screen_5.png +0 -0
- data/doc/website/images/screen_6.png +0 -0
- data/doc/website/images/support.png +0 -0
- data/doc/website/images/thumb_1.png +0 -0
- data/doc/website/images/thumb_2.png +0 -0
- data/doc/website/images/thumb_3.png +0 -0
- data/doc/website/images/thumb_4.png +0 -0
- data/doc/website/images/thumb_5.png +0 -0
- data/doc/website/images/thumb_6.png +0 -0
- data/doc/website/images/xrono_logo.png +0 -0
- data/doc/website/index.html +274 -0
- data/doc/website/javascripts/application.js +18 -0
- data/doc/website/javascripts/greyscalebasic_regular.typeface.js +1 -0
- data/doc/website/javascripts/jquery.lightbox-0.5.min.js +42 -0
- data/doc/website/javascripts/jquery.min.js +32 -0
- data/doc/website/javascripts/jquery.tweet.js +181 -0
- data/doc/website/javascripts/typeface.js +873 -0
- data/doc/website/javascripts/verdana_regular.typeface.js +1 -0
- data/doc/website/stylesheets/jquery.lightbox.css +104 -0
- data/doc/website/stylesheets/jquery.tweet.css +38 -0
- data/doc/website/stylesheets/reset-fonts-grids.css +32 -0
- data/doc/website/stylesheets/screen.css +228 -0
- data/doc/xrono_dash.png +0 -0
- data/doc/xrono_ticket.png +0 -0
- data/features/admin/invoices.feature +37 -0
- data/features/admin/manage_users.feature +17 -0
- data/features/admin/payroll.feature +64 -0
- data/features/admin/roles.feature +9 -0
- data/features/admin/site_settings.feature +19 -0
- data/features/admin/unentered_time_report.feature +38 -0
- data/features/admin/weekly_time_report.feature +14 -0
- data/features/api/v1/clients_controller.feature +58 -0
- data/features/authorization-admin.feature +34 -0
- data/features/authorization-non-admin.feature +38 -0
- data/features/client_login.feature +15 -0
- data/features/collaborative_work_units.feature +112 -0
- data/features/daily_emails.feature +11 -0
- data/features/dashboard.feature +74 -0
- data/features/manage_clients.feature +116 -0
- data/features/manage_comments.feature +30 -0
- data/features/manage_contacts.feature +56 -0
- data/features/manage_file_attachments.feature +51 -0
- data/features/manage_projects.feature +92 -0
- data/features/manage_self.feature +48 -0
- data/features/manage_tickets.feature +74 -0
- data/features/manage_users.feature +76 -0
- data/features/manage_work_units.feature +115 -0
- data/features/mockups/images/asset-tracker-client-show.png +0 -0
- data/features/mockups/images/asset-tracker.png +0 -0
- data/features/mockups/images/ixi - asset tracker v3 homepage - no time entered modal.png +0 -0
- data/features/mockups/images/ixi - asset tracker v3 homepage - schedule on modal.png +0 -0
- data/features/mockups/images/ixi - asset tracker v3 homepage.png +0 -0
- data/features/mockups/ixi - asset tracker v3 homepage - no time entered modal.bmml +194 -0
- data/features/mockups/ixi - asset tracker v3 homepage - schedule on modal.bmml +208 -0
- data/features/mockups/ixi - asset tracker v3 homepage.bmml +172 -0
- data/features/project_assignment.feature +69 -0
- data/features/search_work_units.feature +38 -0
- data/features/step_definitions/calendar_expansion_steps.rb +7 -0
- data/features/step_definitions/client_login_steps.rb +8 -0
- data/features/step_definitions/client_steps.rb +29 -0
- data/features/step_definitions/comment_steps.rb +4 -0
- data/features/step_definitions/contact_steps.rb +22 -0
- data/features/step_definitions/debug_steps.rb +5 -0
- data/features/step_definitions/devise_steps.rb +26 -0
- data/features/step_definitions/email_steps.rb +74 -0
- data/features/step_definitions/file_attachment_steps.rb +8 -0
- data/features/step_definitions/modified_web_steps.rb +25 -0
- data/features/step_definitions/pickle_steps.rb +101 -0
- data/features/step_definitions/project_steps.rb +32 -0
- data/features/step_definitions/search_steps.rb +3 -0
- data/features/step_definitions/ticket_board_steps.rb +39 -0
- data/features/step_definitions/ticket_detail_steps.rb +9 -0
- data/features/step_definitions/ticket_steps.rb +12 -0
- data/features/step_definitions/unentered_time_report_steps.rb +3 -0
- data/features/step_definitions/user_steps.rb +43 -0
- data/features/step_definitions/web_steps.rb +274 -0
- data/features/step_definitions/weekly_time_report_steps.rb +7 -0
- data/features/step_definitions/work_unit_index_steps.rb +8 -0
- data/features/step_definitions/work_unit_steps.rb +39 -0
- data/features/support/email.rb +21 -0
- data/features/support/env.rb +80 -0
- data/features/support/paths.rb +96 -0
- data/features/support/pickle.rb +26 -0
- data/features/support/selectors.rb +51 -0
- data/features/support/xrono.rb +19 -0
- data/features/work_unit_notifier.feature +11 -0
- data/lib/controller_mixins.rb +5 -0
- data/lib/controller_mixins/authorization.rb +15 -0
- data/lib/controller_mixins/contacts.rb +37 -0
- data/lib/controller_mixins/generic.rb +15 -0
- data/lib/controller_mixins/tickets.rb +35 -0
- data/lib/controller_mixins/work_units.rb +13 -0
- data/lib/date_ext.rb +16 -0
- data/lib/guid_referenced.rb +19 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/tasks/acts_as_commentable_tasks.rake +4 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/git_repo_tasks.rake +47 -0
- data/lib/tasks/notifications.rake +8 -0
- data/lib/tasks/paperclip_tasks.rake +79 -0
- data/lib/xrono.rb +1 -0
- data/lib/xrono/engine.rb +45 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/favicon.psd +0 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/public/stylesheets/ie.css +53 -0
- data/public/stylesheets/print.css +57 -0
- data/public/stylesheets/screen.css +182 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/spec/blueprints.rb +86 -0
- data/spec/controllers/api/v1/clients_controller_spec.rb +41 -0
- data/spec/controllers/api/v1/projects_controller_spec.rb +54 -0
- data/spec/controllers/api/v1/tickets_controller_spec.rb +122 -0
- data/spec/controllers/api/v1/tokens_controller_spec.rb +52 -0
- data/spec/controllers/client_login/clients_controller_spec.rb +5 -0
- data/spec/controllers/client_login/reports_controller_spec.rb +5 -0
- data/spec/controllers/data_vaults_controller_spec.rb +5 -0
- data/spec/internal/app/controllers/application_controller.rb +5 -0
- data/spec/internal/config/admin_navigation.rb +71 -0
- data/spec/internal/config/database.yml +14 -0
- data/spec/internal/config/database.yml.example +20 -0
- data/spec/internal/config/database.yml.mysql +20 -0
- data/spec/internal/config/database.yml.mysql.jruby +20 -0
- data/spec/internal/config/database.yml.postgres +20 -0
- data/spec/internal/config/database.yml.postgres.jruby +20 -0
- data/spec/internal/config/navigation.rb +80 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/config/secondary_navigation.rb +65 -0
- data/spec/internal/db/schema.rb +296 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/internal/public/system/attachment_files/2/original/tmp.txt +1 -0
- data/spec/internal/public/system/attachment_files/3/original/tmp.txt +1 -0
- data/spec/lib/date_ext_spec.rb +40 -0
- data/spec/mailers/notifier_spec.rb +9 -0
- data/spec/models/client_spec.rb +167 -0
- data/spec/models/contact_spec.rb +29 -0
- data/spec/models/data_vault_spec.rb +5 -0
- data/spec/models/project_spec.rb +115 -0
- data/spec/models/ticket_spec.rb +223 -0
- data/spec/models/user_spec.rb +258 -0
- data/spec/models/work_unit_spec.rb +467 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/support/xrono/macros.rb +15 -0
- data/vendor/plugins/.gitkeep +0 -0
- data/xrono.gemspec +50 -0
- metadata +1209 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
SimpleNavigation::Configuration.run do |navigation|
|
|
2
|
+
navigation.items do |primary|
|
|
3
|
+
primary.item :unentered_time_report, t(:unentered_time_report), admin_unentered_time_report_index_path, :highlights_on => /unentered_time_report/
|
|
4
|
+
primary.item :weekly_time_report, t(:weekly_time_report), admin_weekly_time_report_index_path, :highlights_on => /weekly_time_report/
|
|
5
|
+
end
|
|
6
|
+
end
|
data/config/boot.rb
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Configures your navigation
|
|
3
|
+
SimpleNavigation::Configuration.run do |navigation|
|
|
4
|
+
# Specify a custom renderer if needed.
|
|
5
|
+
# The default renderer is SimpleNavigation::Renderer::List which renders HTML lists.
|
|
6
|
+
# The renderer can also be specified as option in the render_navigation call.
|
|
7
|
+
# navigation.renderer = Your::Custom::Renderer
|
|
8
|
+
|
|
9
|
+
# Specify the class that will be applied to active navigation items. Defaults to 'selected'
|
|
10
|
+
# navigation.selected_class = 'your_selected_class'
|
|
11
|
+
|
|
12
|
+
# Specify the class that will be applied to the current leaf of
|
|
13
|
+
# active navigation items. Defaults to 'simple-navigation-active-leaf'
|
|
14
|
+
# navigation.active_leaf_class = 'your_active_leaf_class'
|
|
15
|
+
|
|
16
|
+
# Item keys are normally added to list items as id.
|
|
17
|
+
# This setting turns that off
|
|
18
|
+
# navigation.autogenerate_item_ids = false
|
|
19
|
+
|
|
20
|
+
# You can override the default logic that is used to autogenerate the item ids.
|
|
21
|
+
# To do this, define a Proc which takes the key of the current item as argument.
|
|
22
|
+
# The example below would add a prefix to each key.
|
|
23
|
+
# navigation.id_generator = Proc.new {|key| "my-prefix-#{key}"}
|
|
24
|
+
|
|
25
|
+
# If you need to add custom html around item names, you can define a proc that will be called with the name you pass in to the navigation.
|
|
26
|
+
# The example below shows how to wrap items spans.
|
|
27
|
+
# navigation.name_generator = Proc.new {|name| "<span>#{name}</span>"}
|
|
28
|
+
|
|
29
|
+
# The auto highlight feature is turned on by default.
|
|
30
|
+
# This turns it off globally (for the whole plugin)
|
|
31
|
+
# navigation.auto_highlight = false
|
|
32
|
+
|
|
33
|
+
# Define the primary navigation
|
|
34
|
+
navigation.items do |primary|
|
|
35
|
+
# Add an item to the primary navigation. The following params apply:
|
|
36
|
+
# key - a symbol which uniquely defines your navigation item in the scope of the primary_navigation
|
|
37
|
+
# name - will be displayed in the rendered navigation. This can also be a call to your I18n-framework.
|
|
38
|
+
# url - the address that the generated item links to. You can also use url_helpers (named routes, restful routes helper, url_for etc.)
|
|
39
|
+
# options - can be used to specify attributes that will be included in the rendered navigation item (e.g. id, class etc.)
|
|
40
|
+
# some special options that can be set:
|
|
41
|
+
# :if - Specifies a proc to call to determine if the item should
|
|
42
|
+
# be rendered (e.g. <tt>:if => Proc.new { current_user.admin? }</tt>). The
|
|
43
|
+
# proc should evaluate to a true or false value and is evaluated in the context of the view.
|
|
44
|
+
# :unless - Specifies a proc to call to determine if the item should not
|
|
45
|
+
# be rendered (e.g. <tt>:unless => Proc.new { current_user.admin? }</tt>). The
|
|
46
|
+
# proc should evaluate to a true or false value and is evaluated in the context of the view.
|
|
47
|
+
# :method - Specifies the http-method for the generated link - default is :get.
|
|
48
|
+
# :highlights_on - if autohighlighting is turned off and/or you want to explicitly specify
|
|
49
|
+
# when the item should be highlighted, you can set a regexp which is matched
|
|
50
|
+
# against the current URI. You may also use a proc, or the symbol <tt>:subpath</tt>.
|
|
51
|
+
#
|
|
52
|
+
primary.item :home, t(:home), client_login_root_path
|
|
53
|
+
|
|
54
|
+
primary.dom_class = 'nav'
|
|
55
|
+
|
|
56
|
+
# you can also specify a css id or class to attach to this particular level
|
|
57
|
+
# works for all levels of the menu
|
|
58
|
+
# primary.dom_id = 'menu-id'
|
|
59
|
+
# primary.dom_class = 'menu-class'
|
|
60
|
+
|
|
61
|
+
# You can turn off auto highlighting for a specific level
|
|
62
|
+
# primary.auto_highlight = false
|
|
63
|
+
end
|
|
64
|
+
end
|
data/config/cucumber.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%
|
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
|
4
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
|
|
5
|
+
%>
|
|
6
|
+
default: <%= std_opts %> features
|
|
7
|
+
wip: --tags @wip:3 --wip features
|
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
|
@@ -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,144 @@
|
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
|
2
|
+
# four configuration values can also be set straight in your models.
|
|
3
|
+
Devise.setup do |config|
|
|
4
|
+
# ==> Mailer Configuration
|
|
5
|
+
# Configure the e-mail address which will be shown in DeviseMailer.
|
|
6
|
+
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
|
7
|
+
|
|
8
|
+
# Configure the class responsible to send e-mails.
|
|
9
|
+
# config.mailer = "Devise::Mailer"
|
|
10
|
+
|
|
11
|
+
# ==> ORM configuration
|
|
12
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
|
13
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
|
14
|
+
# available as additional gems.
|
|
15
|
+
require 'devise/orm/active_record'
|
|
16
|
+
|
|
17
|
+
# ==> Configuration for any authentication mechanism
|
|
18
|
+
# Configure which keys are used when authenticating an user. By default is
|
|
19
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
|
20
|
+
# authenticating an user, both parameters are required. Remember that those
|
|
21
|
+
# parameters are used only when authenticating and not when retrieving from
|
|
22
|
+
# session. If you need permissions, you should implement that in a before filter.
|
|
23
|
+
# config.authentication_keys = [ :email ]
|
|
24
|
+
|
|
25
|
+
# Tell if authentication through request.params is enabled. True by default.
|
|
26
|
+
# config.params_authenticatable = true
|
|
27
|
+
|
|
28
|
+
# Tell if authentication through HTTP Basic Auth is enabled. True by default.
|
|
29
|
+
#config.http_authenticatable = true
|
|
30
|
+
|
|
31
|
+
# Set this to true to use Basic Auth for AJAX requests. True by default.
|
|
32
|
+
# config.http_authenticatable_on_xhr = true
|
|
33
|
+
|
|
34
|
+
# The realm used in Http Basic Authentication
|
|
35
|
+
# config.http_authentication_realm = "Application"
|
|
36
|
+
|
|
37
|
+
# ==> Configuration for :database_authenticatable
|
|
38
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
|
39
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
|
40
|
+
config.stretches = 10
|
|
41
|
+
|
|
42
|
+
# Define which will be the encryption algorithm. Devise also supports encryptors
|
|
43
|
+
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
|
44
|
+
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
|
45
|
+
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
|
46
|
+
config.encryptor = :bcrypt
|
|
47
|
+
|
|
48
|
+
# Setup a pepper to generate the encrypted password.
|
|
49
|
+
config.pepper = "c0c235cf4f46113cee4a5f23a6335ede09ec4588d2a8b0783fb837a4b22c7607dac6ab662a6434b5bb0dc8a7a107a9554efd066d97df7fb7afd9be88bfe59410"
|
|
50
|
+
|
|
51
|
+
# ==> Configuration for :confirmable
|
|
52
|
+
# The time you want to give your user to confirm his account. During this time
|
|
53
|
+
# he will be able to access your application without confirming. Default is nil.
|
|
54
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
|
55
|
+
# You can use this to let your user access some features of your application
|
|
56
|
+
# without confirming the account, but blocking it after a certain period
|
|
57
|
+
# (ie 2 days).
|
|
58
|
+
# config.confirm_within = 2.days
|
|
59
|
+
|
|
60
|
+
# ==> Configuration for :rememberable
|
|
61
|
+
# The time the user will be remembered without asking for credentials again.
|
|
62
|
+
# config.remember_for = 2.weeks
|
|
63
|
+
|
|
64
|
+
# If true, a valid remember token can be re-used between multiple browsers.
|
|
65
|
+
# config.remember_across_browsers = true
|
|
66
|
+
|
|
67
|
+
# If true, extends the user's remember period when remembered via cookie.
|
|
68
|
+
# config.extend_remember_period = false
|
|
69
|
+
|
|
70
|
+
# ==> Configuration for :validatable
|
|
71
|
+
# Range for password length
|
|
72
|
+
# config.password_length = 6..20
|
|
73
|
+
|
|
74
|
+
# Regex to use to validate the email address
|
|
75
|
+
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
|
76
|
+
|
|
77
|
+
# ==> Configuration for :timeoutable
|
|
78
|
+
# The time you want to timeout the user session without activity. After this
|
|
79
|
+
# time the user will be asked for credentials again.
|
|
80
|
+
# config.timeout_in = 10.minutes
|
|
81
|
+
|
|
82
|
+
# ==> Configuration for :lockable
|
|
83
|
+
# Defines which strategy will be used to lock an account.
|
|
84
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
|
85
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
|
86
|
+
# config.lock_strategy = :failed_attempts
|
|
87
|
+
config.lock_strategy = :none
|
|
88
|
+
|
|
89
|
+
# Defines which strategy will be used to unlock an account.
|
|
90
|
+
# :email = Sends an unlock link to the user email
|
|
91
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
|
92
|
+
# :both = Enables both strategies
|
|
93
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
|
94
|
+
# config.unlock_strategy = :both
|
|
95
|
+
config.unlock_strategy = :none
|
|
96
|
+
|
|
97
|
+
# Number of authentication tries before locking an account if lock_strategy
|
|
98
|
+
# is failed attempts.
|
|
99
|
+
# config.maximum_attempts = 20
|
|
100
|
+
|
|
101
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
|
102
|
+
# config.unlock_in = 1.hour
|
|
103
|
+
|
|
104
|
+
# ==> Configuration for :token_authenticatable
|
|
105
|
+
# Defines name of the authentication token params key
|
|
106
|
+
config.token_authentication_key = :auth_token
|
|
107
|
+
|
|
108
|
+
# ==> Scopes configuration
|
|
109
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
|
110
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
|
111
|
+
# are using only default views.
|
|
112
|
+
# config.scoped_views = true
|
|
113
|
+
|
|
114
|
+
# Configure the default scope given to Warden. By default it's the first
|
|
115
|
+
# devise role declared in your routes.
|
|
116
|
+
# config.default_scope = :user
|
|
117
|
+
|
|
118
|
+
# Configure sign_out behavior.
|
|
119
|
+
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
|
120
|
+
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
|
121
|
+
# config.sign_out_all_scopes = false
|
|
122
|
+
|
|
123
|
+
# ==> Navigation configuration
|
|
124
|
+
# Lists the formats that should be treated as navigational. Formats like
|
|
125
|
+
# :html, should redirect to the sign in page when the user does not have
|
|
126
|
+
# access, but formats like :xml or :json, should return 401.
|
|
127
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
|
128
|
+
# should add them to the navigational formats lists. Default is [:html]
|
|
129
|
+
# config.navigational_formats = [:html, :iphone]
|
|
130
|
+
|
|
131
|
+
# ==> Warden configuration
|
|
132
|
+
# If you want to use other strategies, that are not (yet) supported by Devise,
|
|
133
|
+
# you can configure them inside the config.warden block. The example below
|
|
134
|
+
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
|
135
|
+
#
|
|
136
|
+
# config.warden do |manager|
|
|
137
|
+
# manager.oauth(:twitter) do |twitter|
|
|
138
|
+
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
|
139
|
+
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
|
140
|
+
# twitter.options :site => 'http://twitter.com'
|
|
141
|
+
# end
|
|
142
|
+
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
|
143
|
+
# end
|
|
144
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Doorkeeper.configure do
|
|
2
|
+
# This block will be called to check whether the
|
|
3
|
+
# resource owner is authenticated or not
|
|
4
|
+
resource_owner_authenticator do |routes|
|
|
5
|
+
current_user || redirect_to(routes.new_user_session_url) # returns nil if current_user is not logged in
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# If you want to restrict the access to the web interface for
|
|
9
|
+
# adding oauth authorized applications you need to declare the
|
|
10
|
+
# block below
|
|
11
|
+
admin_authenticator do |routes|
|
|
12
|
+
current_user && current_user.admin? || redirect_to(routes.new_user_session_url)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Access token expiration time (default 2 hours).
|
|
16
|
+
# If you want to disable expiration, set this to nil.
|
|
17
|
+
# access_token_expires_in 2.hours
|
|
18
|
+
|
|
19
|
+
# Issue access tokens with refresh token (disabled by default)
|
|
20
|
+
# use_refresh_token
|
|
21
|
+
|
|
22
|
+
# Define access token scopes for your provider
|
|
23
|
+
# For more information go to https://github.com/applicake/doorkeeper/wiki/Using-Scopes
|
|
24
|
+
default_scopes :public
|
|
25
|
+
# optional_scopes :write, :update
|
|
26
|
+
|
|
27
|
+
# Change the way client credentials are retrieved from the request object.
|
|
28
|
+
# By default it retrieves first from `HTTP_AUTHORIZATION` header and
|
|
29
|
+
# fallsback to `:client_id` and `:client_secret` from `params` object
|
|
30
|
+
# Check out the wiki for mor information on customization
|
|
31
|
+
# client_credentials :from_basic, :from_params
|
|
32
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
class Doorkeeper::TokensController < Doorkeeper::ApplicationController
|
|
2
|
+
skip_before_filter :initialize_site_settings
|
|
3
|
+
skip_before_filter :redirect_clients
|
|
4
|
+
skip_before_filter :authenticate_user!
|
|
5
|
+
|
|
6
|
+
def create
|
|
7
|
+
response.headers.merge!({
|
|
8
|
+
'Pragma' => 'no-cache',
|
|
9
|
+
'Cache-Control' => 'no-store',
|
|
10
|
+
})
|
|
11
|
+
if token.authorize
|
|
12
|
+
render :json => token.authorization
|
|
13
|
+
else
|
|
14
|
+
render :json => token.error_response, :status => token.error_response.status
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def client
|
|
21
|
+
@client ||= Doorkeeper::OAuth::Client.authenticate(credentials)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def credentials
|
|
25
|
+
methods = Doorkeeper.configuration.client_credentials_methods
|
|
26
|
+
@credentials ||= Doorkeeper::OAuth::Client::Credentials.from_request(request, *methods)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def token
|
|
30
|
+
case params[:grant_type]
|
|
31
|
+
when 'password'
|
|
32
|
+
owner = resource_owner_from_credentials
|
|
33
|
+
@token ||= Doorkeeper::OAuth::PasswordAccessTokenRequest.new(client, owner, params)
|
|
34
|
+
when 'client_credentials'
|
|
35
|
+
@token ||= Doorkeeper::OAuth::ClientCredentialsRequest.new(Doorkeeper.configuration, client, params)
|
|
36
|
+
else
|
|
37
|
+
@token ||= Doorkeeper::OAuth::AccessTokenRequest.new(client, params)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def authenticate_resource_owner!
|
|
42
|
+
current_resource_owner
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def current_resource_owner
|
|
46
|
+
instance_exec(main_app, &Doorkeeper.configuration.authenticate_resource_owner)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def resource_owner_from_credentials
|
|
50
|
+
instance_exec(main_app, &Doorkeeper.configuration.resource_owner_from_credentials)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def authenticate_admin!
|
|
54
|
+
if block = Doorkeeper.configuration.authenticate_admin
|
|
55
|
+
instance_exec(main_app, &block)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def method_missing(method, *args, &block)
|
|
60
|
+
if method =~ /_(url|path)$/
|
|
61
|
+
raise "Your path has not been found. Didn't you mean to call routes.#{method} in doorkeeper configuration blocks?"
|
|
62
|
+
else
|
|
63
|
+
super
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'controller_mixins'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Paperclip.options[:log] = false if Rails.env.test? || Rails.env.cucumber?
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SimpleNavigation.config.selected_class = 'active selected'
|
|
@@ -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
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
en:
|
|
2
|
+
errors:
|
|
3
|
+
messages:
|
|
4
|
+
not_found: "not found"
|
|
5
|
+
already_confirmed: "was already confirmed"
|
|
6
|
+
not_locked: "was not locked"
|
|
7
|
+
|
|
8
|
+
devise:
|
|
9
|
+
failure:
|
|
10
|
+
unauthenticated: 'You need to sign in or sign up before continuing.'
|
|
11
|
+
unconfirmed: 'You have to confirm your account before continuing.'
|
|
12
|
+
locked: 'Your account is locked.'
|
|
13
|
+
invalid: 'Invalid email or password.'
|
|
14
|
+
invalid_token: 'Invalid authentication token.'
|
|
15
|
+
timeout: 'Your session expired, please sign in again to continue.'
|
|
16
|
+
inactive: 'Your account was not activated yet.'
|
|
17
|
+
sessions:
|
|
18
|
+
signed_in: 'Signed in successfully.'
|
|
19
|
+
signed_out: 'Signed out successfully.'
|
|
20
|
+
passwords:
|
|
21
|
+
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
|
|
22
|
+
updated: 'Your password was changed successfully. You are now signed in.'
|
|
23
|
+
confirmations:
|
|
24
|
+
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
|
|
25
|
+
confirmed: 'Your account was successfully confirmed. You are now signed in.'
|
|
26
|
+
registrations:
|
|
27
|
+
signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.'
|
|
28
|
+
updated: 'You updated your account successfully.'
|
|
29
|
+
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
|
|
30
|
+
unlocks:
|
|
31
|
+
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
|
|
32
|
+
unlocked: 'Your account was successfully unlocked. You are now signed in.'
|
|
33
|
+
mailer:
|
|
34
|
+
confirmation_instructions:
|
|
35
|
+
subject: 'Confirmation instructions'
|
|
36
|
+
reset_password_instructions:
|
|
37
|
+
subject: 'Reset password instructions'
|
|
38
|
+
unlock_instructions:
|
|
39
|
+
subject: 'Unlock Instructions'
|