diff --git a/Gemfile b/Gemfile index 6d1c709..7d29877 100644 --- a/Gemfile +++ b/Gemfile @@ -2,57 +2,44 @@ ruby '>= 2.2.2' -# -# RAILS -# +# --------------------------------------------------------------------------------------------- +# RAILS gem 'rails', '4.2.7' - -# additional gems for rails 4 gem 'railties' -gem 'responders', '~> 2.0' # allows use of respond_with and respond_to in controllers -# add these gems to help with the transition: -gem 'protected_attributes' -gem 'rails-observers' -gem 'actionpack-page_caching' -gem 'actionpack-action_caching' +# GEMS ADDED TO HELP HANDLE RAILS MIGRATION FROM 3.x to 4.2 +# THESE GEMS HELP SUPPORT DEPRACATED FUNCTIONALITY AND WILL LOSE SUPPORT IN FUTURE VERSIONS +# WE SHOULD CONSIDER BRINGING THE CODE UP TO DATE INSTEAD +gem 'protected_attributes' # Provides attr_accessor functions +gem 'responders', '~> 2.0' # Allows use of respond_with and respond_to in controllers -gem 'uglifier' +# --------------------------------------------------------------------------------------------- +# DATABASE/SERVER +gem 'mysql2', '~> 0.3.18' -# Gems used only for assets and not required in production environments by default. -# Use SCSS for stylesheets -gem 'sass-rails' - - -# Use SCSS for stylesheets -gem 'less-rails' -gem 'twitter-bootstrap-rails', '2.2.8' +# --------------------------------------------------------------------------------------------- +# JS <-> RUBY BRIDGE +gem 'libv8' gem 'therubyracer', '>=0.11.4', platforms: :ruby -gem 'libv8' - -# To use debugger -gem 'ledermann-rails-settings' +# --------------------------------------------------------------------------------------------- +# JSON DSL - USED BY API gem 'jbuilder' -#to notify admin of errors -gem 'exception_notification' -#to allow cloning of objects +# --------------------------------------------------------------------------------------------- +# CLONE ACTIVERECORD MODELS AND ASSOCIATIONS gem 'amoeba' -group :development, :test do - gem "byebug" -end +# --------------------------------------------------------------------------------------------- +# SLUGS/PERMALINKS +gem 'friendly_id' -group :development do - gem "better_errors" - gem "binding_of_caller" - gem 'web-console', '~>2.0' -end +# --------------------------------------------------------------------------------------------- +# SUPER ADMIN SECTION +gem 'activeadmin', github: 'activeadmin' -# -# USERS -# +# --------------------------------------------------------------------------------------------- +# USERS # devise for user authentication gem 'devise' gem 'devise_invitable' @@ -61,63 +48,76 @@ #rolify for roles gem 'rolify' # Gems for repository integration -gem 'email_validator' -gem 'validate_url' - -# -# DATABASE/SERVER -# -gem 'mysql2', '~> 0.3.18' - -#cancan for usergroups gem 'cancancan' -# -# VIEWS -# -gem 'jquery-rails' -gem 'tinymce-rails' -gem 'friendly_id' -gem 'contact_us', '>= 1.2.0' -gem 'recaptcha' -gem 'turbolinks' -#implementation of forms -gem 'activeadmin', github: 'activeadmin' +# --------------------------------------------------------------------------------------------- +# SETTINGS FOR TEMPLATES AND PLANS (FONTS, COLUMN LAYOUTS, ETC) +gem 'ledermann-rails-settings' -# -# EXPORTING PLANS -# +# --------------------------------------------------------------------------------------------- +# VIEWS +gem 'jquery-rails' +gem 'twitter-bootstrap-rails', '2.2.8' +gem 'tinymce-rails' # WYSIWYG EDITOR +gem 'contact_us', '>= 1.2.0' # COULD BE EASILY REPLACED WITH OUR OWN CODE +gem 'recaptcha' +#implementation of forms + +# --------------------------------------------------------------------------------------------- +# EXPORTING gem 'thin' gem 'wicked_pdf' gem 'htmltoword' gem 'feedjira' -# WORD DOC EXPORTING -gem 'caracal' +gem 'caracal' # WORD DOC EXPORTING gem 'caracal-rails' -# +# --------------------------------------------------------------------------------------------- # INTERNATIONALIZATION -# gem "i18n-js", ">= 3.0.0.rc11" #damodar added TODO: explain +# --------------------------------------------------------------------------------------------- +# API +gem 'swagger-docs' -# -# TESTING -# +# --------------------------------------------------------------------------------------------- +# CODE DOCUMENTATION +gem 'yard' +gem 'redcarpet' + + +# --------------------------------------------------------------------------------------------- +# ENVIRONMENT SPECIFIC DEPENDENCIES + +group :development, :test do + gem "byebug" + + gem 'sass-rails' + gem 'less-rails' # WE SHOULD PROBABLY USE SASS OR LESS NOT BOTH +end + group :test do gem 'minitest-rails-capybara' gem 'minitest-reporters' gem 'rack-test' end -# -# API -# -gem 'swagger-docs' +group :development do + gem "better_errors" + gem "binding_of_caller" + gem 'web-console', '~>2.0' +end -# -# CODE DOCUMENTATION -# -gem 'yard' -gem 'redcarpet' +group :production do + gem 'uglifier' # JS minifier +end +# --------------------------------------------------------------------------------------------- +# GEMS THAT ARE NO LONGER IN USE +# gem 'rails-observers' # UNUSED OBSERVERS FOR ACTIVERECORD ... PHASED OUT IN RAILS 5.0 +# gem 'actionpack-page_caching' # UNUSED BUT LOOKS PROMISING FOR STATIC PAGES +# gem 'actionpack-action_caching' # UNUSED BUT LOOKS PROMISING FOR FAIRLY STATIC PAGES BEHIND AUTH +# gem 'exception_notification' # UNUSED BUT COULD BE USEFUL FOR ERROR MSG BEING SENT TO ADMINS FROM PROD SYS +# gem 'email_validator' # UNUSED ACTIVERECORD VALIDATOR +# gem 'validate_url' # UNUSED ACTIVERECORD VALIDATOR +# gem 'turbolinks' # IS NOW A CORE PART OF RAILS >= 4.0 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index b0f7bd4..78a29ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,6 @@ rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-action_caching (1.1.1) - actionpack (>= 4.0.0, < 5.0) - actionpack-page_caching (1.0.2) - actionpack (>= 4.0.0, < 5) actionview (4.2.7) activesupport (= 4.2.7) builder (~> 3.1) @@ -79,7 +75,7 @@ builder (3.2.2) byebug (9.0.5) cancancan (1.15.0) - capybara (2.7.1) + capybara (2.8.0) addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -116,13 +112,8 @@ devise_invitable (1.7.0) actionmailer (>= 4.0.0) devise (>= 4.0.0) - email_validator (1.6.0) - activemodel erubis (2.7.0) eventmachine (1.2.0.1) - exception_notification (4.2.1) - actionmailer (>= 4.0, < 6) - activesupport (>= 4.0, < 6) execjs (2.7.0) faraday (0.9.2) multipart-post (>= 1.2, < 3) @@ -246,8 +237,6 @@ rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - rails-observers (0.1.2) - activemodel (~> 4.0) railties (4.2.7) actionpack (= 4.2.7) activesupport (= 4.2.7) @@ -264,7 +253,7 @@ json redcarpet (3.3.4) ref (2.0.0) - responders (2.2.0) + responders (2.3.0) railties (>= 4.2.0, < 5.1) rolify (5.1.0) ruby-progressbar (1.8.1) @@ -299,9 +288,6 @@ tilt (2.0.5) tinymce-rails (4.4.1) railties (>= 3.1.1) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.0) twitter-bootstrap-rails (2.2.8) actionpack (>= 3.1) execjs @@ -311,9 +297,6 @@ thread_safe (~> 0.1) uglifier (3.0.1) execjs (>= 0.3.0, < 3) - validate_url (1.0.2) - activemodel (>= 3.0.0) - addressable warden (1.2.6) rack (>= 1.0) web-console (2.3.0) @@ -330,8 +313,6 @@ ruby DEPENDENCIES - actionpack-action_caching - actionpack-page_caching activeadmin! amoeba better_errors @@ -343,8 +324,6 @@ contact_us (>= 1.2.0) devise devise_invitable - email_validator - exception_notification feedjira friendly_id htmltoword @@ -362,7 +341,6 @@ protected_attributes rack-test rails (= 4.2.7) - rails-observers railties recaptcha redcarpet @@ -373,10 +351,8 @@ therubyracer (>= 0.11.4) thin tinymce-rails - turbolinks twitter-bootstrap-rails (= 2.2.8) uglifier - validate_url web-console (~> 2.0) wicked_pdf yard diff --git a/db/schema.rb b/db/schema.rb index 2939cab..9aae42a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -18,8 +18,8 @@ t.integer "plan_id", limit: 4 t.integer "user_id", limit: 4 t.integer "question_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "answers_options", id: false, force: :cascade do |t| @@ -33,8 +33,8 @@ t.integer "user_id", limit: 4 t.integer "question_id", limit: 4 t.text "text", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "archived" t.integer "plan_id", limit: 4 t.integer "archived_by", limit: 4 @@ -46,8 +46,8 @@ t.boolean "published" t.integer "user_id", limit: 4 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "locale", limit: 255 t.boolean "is_default" end @@ -61,8 +61,8 @@ t.integer "plan_id", limit: 4 t.integer "user_id", limit: 4 t.string "format", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "file_types", force: :cascade do |t| @@ -70,8 +70,8 @@ t.string "icon_name", limit: 255 t.integer "icon_size", limit: 4 t.string "icon_location", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "file_uploads", force: :cascade do |t| @@ -82,12 +82,12 @@ t.boolean "published" t.string "location", limit: 255 t.integer "file_type_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "friendly_id_slugs", force: :cascade do |t| - t.string "slug", limit: 191, null: false + t.string "slug", limit: 255, null: false t.integer "sluggable_id", limit: 4, null: false t.string "sluggable_type", limit: 40 t.datetime "created_at" @@ -100,8 +100,8 @@ create_table "guidance_groups", force: :cascade do |t| t.string "name", limit: 255 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "optional_subset" t.boolean "published" end @@ -116,8 +116,8 @@ create_table "guidances", force: :cascade do |t| t.text "text", limit: 65535 t.integer "guidance_group_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "question_id", limit: 4 t.boolean "published" end @@ -133,8 +133,8 @@ t.integer "organisation_id", limit: 4 t.integer "option_id", limit: 4 t.text "text", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "options", force: :cascade do |t| @@ -142,8 +142,8 @@ t.string "text", limit: 255 t.integer "number", limit: 4 t.boolean "is_default" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "org_token_permissions", force: :cascade do |t| @@ -156,8 +156,8 @@ create_table "organisation_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "organisations", force: :cascade do |t| @@ -169,8 +169,8 @@ t.string "domain", limit: 255 t.string "wayfless_entity", limit: 255 t.integer "stylesheet_file_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "parent_id", limit: 4 t.boolean "is_other" t.string "sort_name", limit: 255 @@ -185,9 +185,9 @@ t.text "description", limit: 65535 t.integer "number", limit: 4 t.integer "dmptemplate_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.string "slug", limit: 191 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "slug", limit: 255 end add_index "phases", ["dmptemplate_id"], name: "index_phases_on_dmptemplate_id", using: :btree @@ -197,8 +197,8 @@ t.integer "user_id", limit: 4 t.integer "section_id", limit: 4 t.integer "plan_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "release_time" end @@ -206,8 +206,8 @@ t.boolean "locked" t.integer "project_id", limit: 4 t.integer "version_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "project_groups", force: :cascade do |t| @@ -215,8 +215,8 @@ t.boolean "project_editor" t.integer "user_id", limit: 4 t.integer "project_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "project_administrator" end @@ -230,9 +230,9 @@ create_table "projects", force: :cascade do |t| t.string "title", limit: 255 t.integer "dmptemplate_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.string "slug", limit: 191 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "slug", limit: 255 t.integer "organisation_id", limit: 4 t.string "grant_number", limit: 255 t.string "identifier", limit: 255 @@ -248,8 +248,8 @@ create_table "question_formats", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "questions", force: :cascade do |t| @@ -261,8 +261,8 @@ t.integer "dependency_id", limit: 4 t.text "dependency_text", limit: 65535 t.integer "section_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "question_format_id", limit: 4 t.boolean "option_comment_display", default: true end @@ -286,9 +286,9 @@ end create_table "roles", force: :cascade do |t| - t.string "name", limit: 191 - t.datetime "created_at" - t.datetime "updated_at" + t.string "name", limit: 255 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "role_in_plans" t.integer "resource_id", limit: 4 t.string "resource_type", limit: 255 @@ -303,42 +303,42 @@ t.integer "number", limit: 4 t.integer "version_id", limit: 4 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "published" end create_table "settings", force: :cascade do |t| - t.string "var", limit: 191, null: false + t.string "var", limit: 255, null: false t.text "value", limit: 65535 t.integer "target_id", limit: 4, null: false - t.string "target_type", limit: 191, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.string "target_type", limit: 255, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "settings", ["target_type", "target_id", "var"], name: "index_settings_on_target_type_and_target_id_and_var", unique: true, using: :btree create_table "splash_logs", force: :cascade do |t| t.string "destination", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "suggested_answers", force: :cascade do |t| t.integer "question_id", limit: 4 t.integer "organisation_id", limit: 4 t.text "text", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "is_example" end create_table "themes", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "locale", limit: 255 end @@ -358,43 +358,43 @@ t.integer "user_id", limit: 4 t.integer "organisation_id", limit: 4 t.integer "user_role_type_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "user_role_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "user_statuses", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "user_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "users", force: :cascade do |t| t.string "firstname", limit: 255 t.string "surname", limit: 255 - t.string "email", limit: 191, default: "", null: false + t.string "email", limit: 255, default: "", null: false t.string "orcid_id", limit: 255 t.string "shibboleth_id", limit: 255 t.integer "user_type_id", limit: 4 t.integer "user_status_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "encrypted_password", limit: 255, default: "" - t.string "reset_password_token", limit: 191 + t.string "reset_password_token", limit: 255 t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", limit: 4, default: 0 @@ -402,15 +402,14 @@ t.datetime "last_sign_in_at" t.string "current_sign_in_ip", limit: 255 t.string "last_sign_in_ip", limit: 255 - t.string "confirmation_token", limit: 191 + t.string "confirmation_token", limit: 255 t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "invitation_token", limit: 191 + t.string "invitation_token", limit: 255 t.datetime "invitation_created_at" t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.string "other_organisation", limit: 255 - t.boolean "dmponline3" t.boolean "accept_terms" t.integer "organisation_id", limit: 4 t.string "api_token", limit: 255 @@ -437,8 +436,8 @@ t.boolean "published" t.integer "number", limit: 4 t.integer "phase_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "versions", ["phase_id"], name: "index_versions_on_phase_id", using: :btree