diff --git a/.gitignore b/.gitignore index c1030982..2b3bb733 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /config/action_mailer.yml /config/code_ocean.yml /config/database.yml +/config/mnemosyne.yml /config/secrets.yml /config/sendmail.yml /config/smtp.yml diff --git a/.travis.yml b/.travis.yml index e526021a..c17424e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ before_script: - cp config/database.yml.travis config/database.yml - cp config/secrets.yml.travis config/secrets.yml - cp config/docker.yml.erb.travis config/docker.yml.erb + - cp config/mnemosyne.yml.travis config/mnemosyne.yml - psql --command='CREATE DATABASE travis_ci_test;' --username=postgres - bundle exec rake db:schema:load RAILS_ENV=test diff --git a/Gemfile b/Gemfile index 29c2ab7d..11c91e55 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,7 @@ gem 'nokogiri' gem 'd3-rails', '~>4.0' gem 'rest-client' gem 'rubyzip' +gem 'mnemosyne-ruby', '~> 1.0' gem 'whenever', require: false group :development, :staging do diff --git a/Gemfile.lock b/Gemfile.lock index 262c7687..0c196110 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,6 +41,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) + amq-protocol (2.3.0) arel (6.0.4) ast (2.4.0) autotest-rails (4.2.1) @@ -57,6 +58,8 @@ GEM bootstrap_pagedown (1.1.0) rails (>= 3.2) builder (3.2.3) + bunny (2.11.0) + amq-protocol (~> 2.3.0) byebug (10.0.0) capistrano (3.10.1) airbrussh (>= 1.0.0) @@ -173,6 +176,9 @@ GEM mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.11.3) + mnemosyne-ruby (1.5.1) + activesupport (>= 4) + bunny multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) @@ -410,6 +416,7 @@ DEPENDENCIES jquery-rails jquery-turbolinks kramdown + mnemosyne-ruby (~> 1.0) newrelic_rpm nokogiri nyan-cat-formatter diff --git a/config/mnemosyne.yml.example b/config/mnemosyne.yml.example new file mode 100644 index 00000000..c9aceeed --- /dev/null +++ b/config/mnemosyne.yml.example @@ -0,0 +1,29 @@ +# Mnemosyne AMQP sink +common: &common + # AMQP server endpoint + server: amqp://localhost + enabled: false + + # Platform identifier to group applications + platform: codeocean + + # AMQP exchange name, must be a topic exchange + # exchange: mnemosyne + + # Application name, defaults to rails application name + application: app + + # Hostname reported with traces, default to machine hostname + # hostname: + +development: + <<: *common + +test: + enabled: false + +staging: + <<: *common + +production: + <<: *common \ No newline at end of file diff --git a/config/mnemosyne.yml.travis b/config/mnemosyne.yml.travis new file mode 100644 index 00000000..c9aceeed --- /dev/null +++ b/config/mnemosyne.yml.travis @@ -0,0 +1,29 @@ +# Mnemosyne AMQP sink +common: &common + # AMQP server endpoint + server: amqp://localhost + enabled: false + + # Platform identifier to group applications + platform: codeocean + + # AMQP exchange name, must be a topic exchange + # exchange: mnemosyne + + # Application name, defaults to rails application name + application: app + + # Hostname reported with traces, default to machine hostname + # hostname: + +development: + <<: *common + +test: + enabled: false + +staging: + <<: *common + +production: + <<: *common \ No newline at end of file diff --git a/provision.sh b/provision.sh index a6128d1d..43d72c90 100644 --- a/provision.sh +++ b/provision.sh @@ -109,7 +109,7 @@ sudo apt-get -qq -y install nginx-extras passenger cd /vagrant # config -for f in action_mailer.yml database.yml secrets.yml sendmail.yml smtp.yml code_ocean.yml +for f in action_mailer.yml database.yml secrets.yml sendmail.yml smtp.yml code_ocean.yml docker.yml.erb mnemosyne.yml do if [ ! -f config/$f ] then