Skip to content

Commit

Permalink
Nominate release candidate
Browse files Browse the repository at this point in the history
* origin/master:
  Remove superfluous newlines
  Fix scope syntax
  Revert "Updating bundler on Travis"
  Install newrelic_rpm to < 4.0
  Load app.rb from Rakefile to fix reindex.
  Fix typo in reindex task
  Pin the ES container to the current version we support.
  tests failures, travis cache could be the culprit
  moving docker compose file to .travis dir
  Make the ruby linking error go away.
  Run tests using the es and mongo containers with docker-compose.
  use 16.04 latest docker image for forums
  Add a default response size and a response size limit.
  Add method tracing inside user.
  Inline respec expected values.
  Fix respec tests.
  Remove sort order.
  MA-2139: Mark thread as read on thread and comment creation/update/actions
  Specify an owner
  Add an OEP-2 compliant openedx.yaml file
  Add the ability to request a thread without its responses.
  MA-2678: replace use of 'updated_at' for 'read' state
  Try plucking instead of mapping.
  Don't need to require NR method tracer; we're not tracing any methods.
  Back to what it was.  Faster that way. -_-
  Clean up usages of Mongoid to generate cleaner code / queries.
  Add tracing to #to_hash for Comment/CommentThread.
  Revert "Merge pull request openedx#196 from edx/platform/upgrade-to-ruby23"
  Use proper relations instead of forcefully loading relations by hand.
  Wait 10s after starting ElasticSearch.
  Wait 10s for ES to come online.
  Try waiting 10s for ES to come online.
  Switch to 2.3.0 since that's what rbenv currently supports.
  Upgrade to Ruby 2.3.1
  Switch to using MongoDB 3.0 in tests.
  Add message for rack config load.
  Fix new relic traces.
  Revert "Replaced Tire with elasticsearch-model"
  Updated the Mongoid configuration options
  Update new relic agent and fix.
  Reduced merges, do them in place, and reduce allocations.
  Handle comment context in cases of missing parent thread.
  Upgrade nokogiri to address security issues in libxml2 sparklemotion/nokogiri#1473
  MA-2419: created endpoint to mark thread as read for user
  Replaced Tire with elasticsearch-model
  return thread's last_activity_at in response object for thread endpoints
  jia/MA-1815 retrieve count for child comments
  Update newrelic plugin.
  MA-1930 add thread count in GET
  updating nokogiri
  Updated Commentable API spec
  Partially Cleaned Comment Thread API tests
  Refactored rake tasks
  Removed broken rake tasks
  Updated Query spec
  Updated i18n spec
  Updated Abuse API spec
  Updated Comment API spec
  Added factory_girl
  Organized rake tasks into separate files
  Added binstubs
  Updated spec_helper
  removing version data
  removed in error
  merge conflict
  fixing merge conflict
  update xml lib on top of mongo changes
  Cleaned Content model
  Cleaned Comment model
  Cleaned CommentThread model
  Re-organized Elasticsearch and DatabaseCleaner rspec configuration
  Running MongoDB and Elasticsearch as daemons
  Added rspec rake task
  Added Codecov coverage tracking
  Updated README
  Ignoring JetBrains artifacts
  Replaced .rvmrc with .ruby-version and .ruby-gemset
  Add Clinton Blackburn as an author
  Caching bundler dependencies
  Updating bundler on Travis
  generated new Gemfile.lock using the version of bundler that is preferred by edx dev-ops
  Upgrade Mongoid to 5.x release
  jia/MA-1748 update read states for users
  MA-1742; return read status on GET thread for user_id provided
  MA-1190;Thread PUT -  update thread read status
  Increased timeout back to 20s. Added relevant docstring
  MA-1189 ThreadGET - added recursive bool field to optionally include response comments
  MA-1359 returned resp_total for existing question and new thread
  changed timeout to 6 seconds
  Added last_activity_at index
  • Loading branch information
stanford-online-robot committed Sep 21, 2017
2 parents e86a470 + 7129df5 commit 3cb1ba9
Show file tree
Hide file tree
Showing 67 changed files with 2,174 additions and 1,817 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ doc/
config/benchmark.yml
benchmark_log

# bundler binstubs
bin/

log/
#redcar
.redcar/
/nbproject
.idea/
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cs_comments_service
2 changes: 0 additions & 2 deletions .rvmrc

This file was deleted.

24 changes: 11 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
sudo: required
services:
- docker

language: ruby

rvm:
- "1.9.3"
services:
- elasticsearch
before_install:
- gem update bundler # Ensure we use the latest version of bundler. Travis' default version of outdated.
- wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.11.deb && sudo dpkg --force-confnew -i elasticsearch-0.90.11.deb && sudo service elasticsearch restart
# Install mongo 2.6.4 according to http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
# TODO: This won't be necessary when travis switches to 2.6 by default - see https://github.com/travis-ci/travis-ci/issues/2246
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
- sudo apt-get update -q
- sudo apt-get install -y mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
- mongo --version
script: bundle exec rspec

install:
- docker-compose -f ./.travis/docker-compose-travis.yml up -d

script:
- docker exec forum_testing /edx/app/forum/cs_comments_service/.travis/run_tests.sh
17 changes: 17 additions & 0 deletions .travis/docker-compose-travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is only currently used by Travis for testing
version: "2"

services:
elasticsearch:
image: edxops/elasticsearch:0.9.13
container_name: "es.edx"
mongo:
image: mongo:3.0.12
container_name: "mongo.edx"
forum:
image: edxops/forums:latest

container_name: forum_testing
volumes:
- ..:/edx/app/forum/cs_comments_service
command: tail -f /dev/null
9 changes: 9 additions & 0 deletions .travis/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -xe
. /edx/app/forum/forum_env
export MONGOHQ_URL="mongodb://mongo.edx:27017/cs_comments_service_test"

cd /edx/app/forum/cs_comments_service

bundle install

bundle exec rspec
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Alan Boudreault <[email protected]>
Matjaz Gregoric <[email protected]>
Ben McMorran <[email protected]>
Bill DeRusha <[email protected]>
Brian Beggs <[email protected]>
Clinton Blackburn <[email protected]>
42 changes: 20 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,22 @@ gem 'sinatra'
gem 'yajl-ruby'


gem 'ampex'

gem 'mongo'
gem 'moped', "1.5.1"
gem 'mongoid', "3.0.15"
gem 'mongoid', '~> 5.0.0'
gem 'bson', '~>3.1'
gem 'bson_ext'
gem 'protected_attributes'

gem 'delayed_job'
gem 'delayed_job_mongoid', :git => 'https://github.com/dementrock/delayed_job_mongoid.git'

gem "enumerize", "~>0.8.0"
gem 'mongoid-tree', :git => 'https://github.com/dementrock/mongoid-tree.git'
gem 'voteable_mongo', :git => 'https://github.com/dementrock/voteable_mongo.git'
gem 'mongoid_magic_counter_cache', :git => 'https://github.com/dementrock/mongoid-magic-counter-cache.git'
gem 'delayed_job_mongoid'

gem 'kaminari', :require => 'kaminari/sinatra', :git => 'https://github.com/dementrock/kaminari.git'
gem "enumerize"
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'

gem 'faker'
gem 'will_paginate_mongoid'
gem 'will_paginate_mongoid', "~>2.0"
gem 'rdiscount'
gem 'nokogiri'
gem 'nokogiri', "~>1.6.8"

gem 'tire', "0.6.2"
gem 'tire-contrib'
Expand All @@ -44,17 +39,20 @@ gem 'dalli'
gem 'rest-client'

group :test do
gem 'rspec'
gem 'rack-test', :require => "rack/test"
gem 'codecov', :require => false
gem 'mongoid_cleaner', '~> 1.2.0'
gem 'factory_girl', '~> 4.0'
gem 'faker', '~> 1.6'
gem 'guard'
gem 'guard-unicorn'
gem 'simplecov', :require => false
gem 'database_cleaner'
gem 'rack-test', :require => 'rack/test'
gem 'rspec', '~> 2.11.0'
end

gem 'newrelic_rpm'
gem 'newrelic_moped'
# FIXME Remove version restriction once ruby upgraded to 2.x
gem 'newrelic_rpm', '~> 3.16.0'
gem 'unicorn'
gem "rack-timeout", "0.1.0beta3"
gem "rack-timeout"
gem "i18n"
gem "rack-contrib", :git => 'https://github.com/rack/rack-contrib.git', :ref => '6ff3ca2b2d988911ca52a2712f6a7da5e064aa27'

Loading

0 comments on commit 3cb1ba9

Please sign in to comment.