diff --git a/.travis.yml b/.travis.yml index f7ce2899edf..b7ca97ec265 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ branches: - master rvm: - - "2.5.7" + - "2.4.1" install: - docker-compose -f ./.travis/docker-compose-travis.yml build test-forum diff --git a/.travis/docker-compose-travis.yml b/.travis/docker-compose-travis.yml index 2edcc46591f..0e823c7d598 100644 --- a/.travis/docker-compose-travis.yml +++ b/.travis/docker-compose-travis.yml @@ -9,7 +9,8 @@ services: image: mongo:3.2.21 container_name: "mongo.edx" forum-base: - image: edxops/forum:ruby257 # TODO: switch back to latest after configuration release + image: edxops/forum:latest + container_name: forum_testing volumes: - ..:/edx/app/forum/cs_comments_service diff --git a/Gemfile b/Gemfile index 3058cfdf029..728fc1457f7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby "2.5.7" +ruby "2.4.1" gem 'pry' gem 'pry-nav' @@ -16,19 +16,19 @@ gem 'sinatra-param', '~> 1.4' gem 'yajl-ruby', '~> 1.3.1' -gem 'activemodel' -gem 'protected_attributes_continued' +gem 'activemodel', '~> 4.2.8' -gem 'mongoid' -gem 'bson' +gem 'mongoid', '~> 5.0.0' +gem 'bson', '~> 3.1' gem 'bson_ext' +gem 'protected_attributes' gem 'delayed_job' gem 'delayed_job_mongoid' gem "enumerize" -gem 'mongoid-tree', :git => 'https://github.com/edx/mongoid-tree' -gem 'rs_voteable_mongo', '~> 1.3' +gem 'mongoid-tree', :git => 'https://github.com/macdiesel/mongoid-tree' +gem 'rs_voteable_mongo', :git => 'https://github.com/navneet35371/voteable_mongo.git' gem 'mongoid_magic_counter_cache' # Before updating will_paginate version, we need to make sure that property 'total_entries' diff --git a/Gemfile.lock b/Gemfile.lock index b145ab96d98..5290fbdf97d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,16 @@ GIT - remote: https://github.com/edx/mongoid-tree - revision: c7407871e32d472b98c3f31bc30a44118e4e6dfc + remote: https://github.com/macdiesel/mongoid-tree + revision: b381dd56f1b3b061df8f4b4181d5440dea1602d1 specs: - mongoid-tree (2.1.1) - mongoid (>= 4.0, < 8) + mongoid-tree (2.0.0) + mongoid (>= 4.0, <= 5.0) + +GIT + remote: https://github.com/navneet35371/voteable_mongo.git + revision: 55fcfe76705ab5da1c9e5670594331b33954c545 + specs: + rs_voteable_mongo (1.0.2) + mongoid (>= 3.0, <= 5.0) GIT remote: https://github.com/rack/rack-contrib.git @@ -16,18 +23,17 @@ GIT GEM remote: https://rubygems.org/ specs: - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) + activemodel (4.2.8) + activesupport (= 4.2.8) builder (~> 3.1) - activesupport (6.0.2.1) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) + activesupport (4.2.8) + i18n (~> 0.7) minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - zeitwerk (~> 2.2) addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) - bson (4.7.0) + bson (3.2.6) bson_ext (1.5.1) builder (3.2.3) codecov (0.1.10) @@ -35,15 +41,14 @@ GEM simplecov url coderay (1.1.1) - concurrent-ruby (1.1.5) crack (0.4.3) safe_yaml (~> 1.0.0) dalli (2.7.6) - delayed_job (4.1.8) - activesupport (>= 3.0, < 6.1) - delayed_job_mongoid (2.3.1) + delayed_job (4.1.3) + activesupport (>= 3.0, < 5.2) + delayed_job_mongoid (2.3.0) delayed_job (>= 3.0, < 5) - mongoid (>= 3.0, < 8) + mongoid (>= 3.0, < 7) mongoid-compatibility (>= 0.4.0) diff-lcs (1.3) docile (1.1.5) @@ -86,8 +91,7 @@ GEM hashie (3.5.5) http-cookie (1.0.3) domain_name (~> 0.5) - i18n (0.9.5) - concurrent-ruby (~> 1.0) + i18n (0.8.4) json (2.1.0) kgio (2.11.0) listen (3.1.5) @@ -100,12 +104,12 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.3.0) - minitest (5.14.0) - mongo (2.5.3) - bson (>= 4.3.0, < 5.0.0) - mongoid (7.0.5) - activemodel (>= 5.1, < 6.1) - mongo (>= 2.5.1, < 3.0.0) + minitest (5.10.2) + mongo (2.1.2) + bson (~> 3.0) + mongoid (5.0.0) + activemodel (~> 4.0) + mongo (~> 2.1) origin (~> 2.1) tzinfo (>= 0.3.37) mongoid-compatibility (0.4.1) @@ -127,8 +131,8 @@ GEM nenv (~> 0.1) shellany (~> 0.0) origin (2.3.1) - protected_attributes_continued (1.5.0) - activemodel (>= 5.0) + protected_attributes (1.1.4) + activemodel (>= 4.0.1, < 5.0) pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -152,8 +156,6 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rs_voteable_mongo (1.3.0) - mongoid (~> 7.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -190,7 +192,7 @@ GEM thor (0.19.4) thread_safe (0.3.6) tilt (2.0.7) - tzinfo (1.2.6) + tzinfo (1.2.3) thread_safe (~> 0.1) unf (0.1.4) unf_ext @@ -208,14 +210,13 @@ GEM mongoid will_paginate (~> 3.0) yajl-ruby (1.3.1) - zeitwerk (2.2.2) PLATFORMS ruby DEPENDENCIES - activemodel - bson + activemodel (~> 4.2.8) + bson (~> 3.1) bson_ext bundler codecov @@ -230,13 +231,13 @@ DEPENDENCIES guard guard-unicorn i18n - mongoid + mongoid (~> 5.0.0) mongoid-tree! mongoid_cleaner (~> 1.2.0) mongoid_magic_counter_cache newrelic_rpm nokogiri (~> 1.8.1) - protected_attributes_continued + protected_attributes pry pry-nav rack-contrib! @@ -245,7 +246,7 @@ DEPENDENCIES rake rdiscount rest-client - rs_voteable_mongo (~> 1.3) + rs_voteable_mongo! rspec (~> 3.6.0) rspec-collection_matchers rspec-its @@ -257,7 +258,7 @@ DEPENDENCIES yajl-ruby (~> 1.3.1) RUBY VERSION - ruby 2.5.7p206 + ruby 2.4.1p111 BUNDLED WITH - 1.16.6 + 1.16.1 diff --git a/models/user.rb b/models/user.rb index f94ad3419b2..6b7872c1110 100644 --- a/models/user.rb +++ b/models/user.rb @@ -8,7 +8,6 @@ class User field :_id, type: String, default: -> { external_id } field :external_id, type: String field :username, type: String - field :email, type: String field :default_sort_key, type: String, default: "date" embeds_many :read_states