mumuki-domain 6.1.4 → 6.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/organization.rb +10 -0
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc25c9836058c10703a5f9a3479642ea20132c54
|
4
|
+
data.tar.gz: 5586e6c506b9d28f27a866542cf91bea5e5a4aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe65fff7b93368ebfe18e4db33f585a21cbd886bc68d720bb5d54fd909636a5f2c01ce1b914bc4becd61bef75b4ca0d1d59cd7125f82da600979abab01c0fc2
|
7
|
+
data.tar.gz: cb02d111698a9af4766a8bba94d9e3c0f3b42ffbebb7a6ae1fb59c56a0edcb729e7f2b17eedc635636af2bccd85f2c3aed72541c156d1d11581a0fe8ba3399ae
|
data/app/models/organization.rb
CHANGED
@@ -96,6 +96,16 @@ class Organization < ApplicationRecord
|
|
96
96
|
report_issue_enabled? || community_link.present? || forum_enabled?
|
97
97
|
end
|
98
98
|
|
99
|
+
def self.import_from_resource_h!(resource_h)
|
100
|
+
find_or_initialize_by(name: resource_h[:name]).tap { |it| it.import_from_resource_h! resource_h }
|
101
|
+
end
|
102
|
+
|
103
|
+
def import_from_resource_h!(resource_h)
|
104
|
+
attrs = Mumukit::Platform::Organization::Helpers.slice_platform_json resource_h
|
105
|
+
attrs[:book] = Book.locate_resource attrs[:book]
|
106
|
+
update! attrs
|
107
|
+
end
|
108
|
+
|
99
109
|
private
|
100
110
|
|
101
111
|
def ensure_consistent_public_login
|
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.1.
|
4
|
+
version: 6.1.5
|
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: 2018-11-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|