diff --git a/.ruby-version b/.ruby-version index 5859406..005119b 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.3 +2.4.1 diff --git a/Gemfile b/Gemfile index dd7ae6d..79de862 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rails', '~> 4.2.0' +gem 'rails', '~> 4.2.9' gem 'unicorn' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 5aa4986..66bafb5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,60 +1,61 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) + actionmailer (4.2.9) + actionpack (= 4.2.9) + actionview (= 4.2.9) + activejob (= 4.2.9) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.5.1) - actionview (= 4.2.5.1) - activesupport (= 4.2.5.1) + actionpack (4.2.9) + actionview (= 4.2.9) + activesupport (= 4.2.9) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.5.1) - activesupport (= 4.2.5.1) + actionview (4.2.9) + activesupport (= 4.2.9) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.5.1) - activesupport (= 4.2.5.1) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (4.2.9) + activesupport (= 4.2.9) globalid (>= 0.3.0) - activemodel (4.2.5.1) - activesupport (= 4.2.5.1) + activemodel (4.2.9) + activesupport (= 4.2.9) builder (~> 3.1) - activerecord (4.2.5.1) - activemodel (= 4.2.5.1) - activesupport (= 4.2.5.1) + activerecord (4.2.9) + activemodel (= 4.2.9) + activesupport (= 4.2.9) arel (~> 6.0) - activesupport (4.2.5.1) + activesupport (4.2.9) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) - arel (6.0.3) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) + arel (6.0.4) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - bcrypt (3.1.10) - builder (3.2.2) - capistrano (2.15.7) + bcrypt (3.1.11) + builder (3.2.3) + capistrano (2.15.9) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) - casino (4.0.3) + casino (4.1.2) addressable (~> 2.3) faraday (~> 0.8) grape (~> 0.8) grape-entity (~> 0.4) + kaminari (~> 0.16) rails (>= 4.1.0, < 4.3.0) rotp (~> 2.0) rqrcode_png (~> 0.1) @@ -71,7 +72,7 @@ GEM casino (>= 3.0.0, < 5.0.0) net-ldap (~> 0.3) chronic (0.10.2) - chunky_png (1.3.5) + chunky_png (1.3.8) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.0.1) @@ -80,99 +81,105 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) + coffee-script-source (1.12.2) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) equalizer (0.0.11) erubis (2.7.0) - execjs (2.6.0) - faraday (0.9.2) + execjs (2.7.0) + faraday (0.12.2) multipart-post (>= 1.2, < 3) - foreman (0.78.0) + foreman (0.84.0) thor (~> 0.19.1) - globalid (0.3.6) - activesupport (>= 4.1.0) - grape (0.14.0) + globalid (0.4.0) + activesupport (>= 4.2.0) + grape (0.19.2) activesupport builder hashie (>= 2.1.0) multi_json (>= 1.3.2) multi_xml (>= 0.5.2) + mustermann-grape (~> 1.0.0) rack (>= 1.3.0) rack-accept - rack-mount virtus (>= 1.0.0) - grape-entity (0.5.0) + grape-entity (0.6.0) activesupport multi_json (>= 1.3.2) - hashie (3.4.3) + hashie (3.5.6) highline (1.7.8) hike (1.2.3) - http_accept_language (2.0.5) - i18n (0.7.0) + http_accept_language (2.1.1) + i18n (0.8.6) ice_nine (0.11.2) - json (1.8.3) - kgio (2.10.0) - libv8 (3.16.14.13) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.11.0) + libv8 (3.16.14.19) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.99) - mini_portile2 (2.0.0) - minitest (5.8.4) - multi_json (1.11.2) - multi_xml (0.5.5) + mail (2.6.6) + mime-types (>= 1.16, < 4) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.2.0) + minitest (5.10.3) + multi_json (1.12.1) + multi_xml (0.6.0) multipart-post (2.0.0) - mysql2 (0.4.2) - net-ldap (0.13.0) + mustermann (1.0.0) + mustermann-grape (1.0.0) + mustermann (~> 1.0.0) + mysql2 (0.4.8) + net-ldap (0.16.0) net-scp (1.2.1) net-ssh (>= 2.6.5) net-sftp (2.1.2) net-ssh (>= 2.6.5) - net-ssh (3.0.2) - net-ssh-gateway (1.2.0) - net-ssh (>= 2.6.5) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - pg (0.18.4) + net-ssh (4.1.0) + net-ssh-gateway (2.0.0) + net-ssh (>= 4.0.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) + pg (0.21.0) phpass-ruby (0.1.2) - rack (1.6.4) + public_suffix (2.0.5) + rack (1.6.8) rack-accept (0.4.5) rack (>= 0.4) - rack-mount (0.8.3) - rack (>= 1.0.0) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.5.1) - actionmailer (= 4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) - activemodel (= 4.2.5.1) - activerecord (= 4.2.5.1) - activesupport (= 4.2.5.1) + rails (4.2.9) + actionmailer (= 4.2.9) + actionpack (= 4.2.9) + actionview (= 4.2.9) + activejob (= 4.2.9) + activemodel (= 4.2.9) + activerecord (= 4.2.9) + activesupport (= 4.2.9) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.5.1) + railties (= 4.2.9) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) + rails-dom-testing (1.0.8) activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.5.1) - actionpack (= 4.2.5.1) - activesupport (= 4.2.5.1) + railties (4.2.9) + actionpack (= 4.2.9) + activesupport (= 4.2.9) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - raindrops (0.15.0) - rake (10.5.0) + raindrops (0.18.0) + rake (12.0.0) ref (2.0.0) - rotp (2.1.1) - rqrcode (0.9.0) + rotp (2.1.2) + rqrcode (0.10.1) chunky_png (~> 1.0) rqrcode_png (0.1.5) chunky_png @@ -192,31 +199,31 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.11) - terminal-table (1.5.2) - therubyracer (0.12.2) - libv8 (~> 3.16.14.0) + sqlite3 (1.3.13) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + therubyracer (0.12.3) + libv8 (~> 3.16.14.15) ref - thor (0.19.1) - thread_safe (0.3.5) + thor (0.19.4) + thread_safe (0.3.6) tilt (1.4.1) - tzinfo (1.2.2) + tzinfo (1.2.3) thread_safe (~> 0.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - unicorn (5.0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + unicode-display_width (1.3.0) + unicorn (5.3.0) kgio (~> 2.6) - rack raindrops (~> 0.7) unix-crypt (1.3.0) - useragent (0.16.3) + useragent (0.16.8) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - whenever (0.9.4) + whenever (0.9.7) chronic (>= 0.6.3) PLATFORMS @@ -232,7 +239,7 @@ DEPENDENCIES http_accept_language (~> 2.0) mysql2 pg - rails (~> 4.2.0) + rails (~> 4.2.9) sass-rails (~> 4.0.3) sqlite3 therubyracer @@ -241,4 +248,4 @@ DEPENDENCIES whenever BUNDLED WITH - 1.10.6 + 1.15.3 diff --git a/app/assets/stylesheets/casino_and_overrides.scss b/app/assets/stylesheets/casino_and_overrides.scss index 5638151..fdd069f 100644 --- a/app/assets/stylesheets/casino_and_overrides.scss +++ b/app/assets/stylesheets/casino_and_overrides.scss @@ -3,6 +3,7 @@ // $buttonColor: #0074ad; // $buttonSecondaryColor: #c2c2c2; +// $linkColor: #0074ad; // $logo: "logo.png"; // $logoRetina: "logo@2x.png"; // $logoWidth: 146px; diff --git a/config/routes.rb b/config/routes.rb index 38f149a..d203ed1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ CASinoApp::Application.routes.draw do + mount CASino::Engine => '/', :as => 'casino' mount CASino::Engine => '/', :as => 'CASino' # The priority is based upon order of creation: diff --git a/db/migrate/20170722204555_create_login_attempts.casino.rb b/db/migrate/20170722204555_create_login_attempts.casino.rb new file mode 100644 index 0000000..274fdd3 --- /dev/null +++ b/db/migrate/20170722204555_create_login_attempts.casino.rb @@ -0,0 +1,15 @@ +# This migration comes from casino (originally 20160502074450) +class CreateLoginAttempts < ActiveRecord::Migration + def change + create_table :casino_login_attempts do |t| + t.integer :user_id, null: true + t.string :username, null: false + t.boolean :successful, default: false + + t.string :user_ip + t.text :user_agent + + t.timestamps + end + end +end diff --git a/db/migrate/20170722204556_remove_username_from_login_attempts.casino.rb b/db/migrate/20170722204556_remove_username_from_login_attempts.casino.rb new file mode 100644 index 0000000..c8df735 --- /dev/null +++ b/db/migrate/20170722204556_remove_username_from_login_attempts.casino.rb @@ -0,0 +1,12 @@ +# This migration comes from casino (originally 20160524121117) +class RemoveUsernameFromLoginAttempts < ActiveRecord::Migration + def up + remove_column :casino_login_attempts, :username + change_column_null :casino_login_attempts, :user_id, false + end + + def down + add_column :casino_login_attempts, :username, :string + change_column_null :casino_login_attempts, :user_id, true + end +end diff --git a/db/schema.rb b/db/schema.rb index ddb9e01..86b57d9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,9 +11,9 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160201044838) do +ActiveRecord::Schema.define(version: 20170722204556) do - create_table "casino_auth_token_tickets", force: true do |t| + create_table "casino_auth_token_tickets", force: :cascade do |t| t.string "ticket", null: false t.datetime "created_at" t.datetime "updated_at" @@ -21,7 +21,16 @@ add_index "casino_auth_token_tickets", ["ticket"], name: "index_casino_auth_token_tickets_on_ticket", unique: true - create_table "casino_login_tickets", force: true do |t| + create_table "casino_login_attempts", force: :cascade do |t| + t.integer "user_id", null: false + t.boolean "successful", default: false + t.string "user_ip" + t.text "user_agent" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "casino_login_tickets", force: :cascade do |t| t.string "ticket", null: false t.datetime "created_at" t.datetime "updated_at" @@ -29,7 +38,7 @@ add_index "casino_login_tickets", ["ticket"], name: "index_casino_login_tickets_on_ticket", unique: true - create_table "casino_proxy_granting_tickets", force: true do |t| + create_table "casino_proxy_granting_tickets", force: :cascade do |t| t.string "ticket", null: false t.string "iou", null: false t.integer "granter_id", null: false @@ -44,7 +53,7 @@ add_index "casino_proxy_granting_tickets", ["iou"], name: "index_casino_proxy_granting_tickets_on_iou", unique: true add_index "casino_proxy_granting_tickets", ["ticket"], name: "index_casino_proxy_granting_tickets_on_ticket", unique: true - create_table "casino_proxy_tickets", force: true do |t| + create_table "casino_proxy_tickets", force: :cascade do |t| t.string "ticket", null: false t.text "service", null: false t.boolean "consumed", default: false, null: false @@ -56,7 +65,7 @@ add_index "casino_proxy_tickets", ["proxy_granting_ticket_id"], name: "casino_proxy_tickets_on_pgt_id" add_index "casino_proxy_tickets", ["ticket"], name: "index_casino_proxy_tickets_on_ticket", unique: true - create_table "casino_service_rules", force: true do |t| + create_table "casino_service_rules", force: :cascade do |t| t.boolean "enabled", default: true, null: false t.integer "order", default: 10, null: false t.string "name", null: false @@ -68,7 +77,7 @@ add_index "casino_service_rules", ["url"], name: "index_casino_service_rules_on_url", unique: true - create_table "casino_service_tickets", force: true do |t| + create_table "casino_service_tickets", force: :cascade do |t| t.string "ticket", null: false t.text "service", null: false t.integer "ticket_granting_ticket_id" @@ -81,7 +90,7 @@ add_index "casino_service_tickets", ["ticket"], name: "index_casino_service_tickets_on_ticket", unique: true add_index "casino_service_tickets", ["ticket_granting_ticket_id"], name: "casino_service_tickets_on_tgt_id" - create_table "casino_ticket_granting_tickets", force: true do |t| + create_table "casino_ticket_granting_tickets", force: :cascade do |t| t.string "ticket", null: false t.text "user_agent" t.integer "user_id", null: false @@ -94,7 +103,7 @@ add_index "casino_ticket_granting_tickets", ["ticket"], name: "index_casino_ticket_granting_tickets_on_ticket", unique: true - create_table "casino_two_factor_authenticators", force: true do |t| + create_table "casino_two_factor_authenticators", force: :cascade do |t| t.integer "user_id", null: false t.string "secret", null: false t.boolean "active", default: false, null: false @@ -104,7 +113,7 @@ add_index "casino_two_factor_authenticators", ["user_id"], name: "index_casino_two_factor_authenticators_on_user_id" - create_table "casino_users", force: true do |t| + create_table "casino_users", force: :cascade do |t| t.string "authenticator", null: false t.string "username", null: false t.text "extra_attributes"