mumuki-domain 6.6.2 → 6.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13303557ded90240baebcf7316275278a8dd93d9d9c8ed2d781ce1743ad192ec
4
- data.tar.gz: 94602656bf406a46dfaf539d4cb882765e1b9e14c0240bdc7ee3922f54f3b9be
3
+ metadata.gz: 28c43b8e126a27ea8992e7947c0fb24cb3a5afb5a5fa48a1ea93e43d06978ff7
4
+ data.tar.gz: f119ada3c07e1fb57806e4734ef45387b56f151042f3d011250fb7c1d6e4578a
5
5
  SHA512:
6
- metadata.gz: ad0d581d23ddb2d34184ea8800c022005d3925bbfd3b23288ed4cebfacf2998855a02b4cef90d49c6b79e22f5d2ad768fa1a3672c26a613f78a9fa7d2d6e988a
7
- data.tar.gz: 63ce3bcff247621d1f625507c725c32938d3cdbee3b17344696341f295fa24594dd16eebc2f71269b38711b44b654f46ee333ac3c7d0f9fbbc33f194058e80c9
6
+ metadata.gz: 59f09fd69a686d1947e2edd3e9c68cc304453d36aa10e9416d4b4c5dfa99141fa71534a88c10eec8a34fd500ad154ef68d048723f68ccd1979f9ca8e3478e016
7
+ data.tar.gz: 2ecb4c190fa5d6aaef4204abdac571e8e56497f5a50646bed2624dae54263ce95620673967db065a2a268658e74a4350441efebd792bc4d81260e9264229cd91
data/README.md CHANGED
@@ -17,6 +17,7 @@
17
17
  triable
18
18
  feedback
19
19
  queriable
20
+ multifile
20
21
  stateful_console
21
22
  test_extension
22
23
  test_template
@@ -3,7 +3,7 @@ module WithDiscussionCreation::Subscription
3
3
 
4
4
  included do
5
5
  has_many :subscriptions
6
- has_many :watched_discussions, through: :subscriptions, source: :discussion
6
+ has_many :watched_discussions, -> { order(created_at: :desc) }, through: :subscriptions, source: :discussion
7
7
  organic_on :watched_discussions
8
8
  end
9
9
 
@@ -16,7 +16,7 @@ module WithDiscussionCreation::Subscription
16
16
  end
17
17
 
18
18
  def subscribe_to!(discussion)
19
- watched_discussions << discussion
19
+ watched_discussions << discussion unless subscribed_to? discussion
20
20
  end
21
21
 
22
22
  def unsubscribe_to!(discussion)
@@ -84,6 +84,7 @@ class Discussion < ApplicationRecord
84
84
  def submit_message!(message, user)
85
85
  message.merge!(sender: user.uid)
86
86
  messages.create(message)
87
+ user.subscribe_to! self
87
88
  unread_subscriptions(user)
88
89
  end
89
90
 
@@ -67,7 +67,7 @@ class Language < ApplicationRecord
67
67
  def to_resource_h
68
68
  as_json(only: %i(comment_type devicon editor_css_urls editor_html_urls editor_js_urls
69
69
  extension feedback highlight_mode layout_css_urls layout_html_urls
70
- layout_js_urls name output_content_type prompt queriable runner_url
70
+ layout_js_urls multifile name output_content_type prompt queriable runner_url
71
71
  stateful_console test_extension test_template triable visible_success_output)).symbolize_keys
72
72
  end
73
73
 
@@ -0,0 +1,5 @@
1
+ class AddMultifileToLanguages < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :languages, :multifile, :boolean, default: false
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '6.6.2'
3
+ VERSION = '6.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.2
4
+ version: 6.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-09 00:00:00.000000000 Z
11
+ date: 2019-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -537,6 +537,7 @@ files:
537
537
  - db/migrate/20190312152901_add_content_fk.rb
538
538
  - db/migrate/20190326152631_add_settings_to_content.rb
539
539
  - db/migrate/20190404181724_add_organization_to_discussion.rb
540
+ - db/migrate/20190506180102_add_multifile_to_languages.rb
540
541
  - lib/mumuki/domain.rb
541
542
  - lib/mumuki/domain/engine.rb
542
543
  - lib/mumuki/domain/evaluation.rb