mumuki-domain 6.0.3 → 6.0.4
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: ed9e82dd56783101526c2b4dcd7366d5a4ab2a9f
|
4
|
+
data.tar.gz: a1a3a1838c41c06aa54502563cf87be6a2713f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ffaf2b407569be9c41a7535b9b9d66903d20c4a5c8e51a151d5438db7c3f74935942de081df520706872cb9b83cfd169f234d6abf3fe8dbdaa5beeaae3b6613
|
7
|
+
data.tar.gz: 69295d1103a34b7914f0cdd3d7538f7b1b6594b667f510f83c36dcc71e4badefa475c9bba083e8b2322834c5d4508535e760a1567d06ff33526f9f64cba28142
|
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.0.
|
4
|
+
version: 6.0.4
|
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
|