ish_models 3.1.0.14 → 3.1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wco/leadset.rb +2 -2
- data/lib/wco_hosting/appliance.rb +2 -3
- data/lib/wco_hosting/appliance_tmpl.rb +1 -1
- data/lib/wco_hosting/serverhost.rb +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 878db6bcfd78a87582b23a3edf1fae48aba69227e3147867bb72dc27cf6e4fee
|
4
|
+
data.tar.gz: 6dd6d2b220b3c5ee8898cbe0801ccadc4f76a1a4247e5086fd825bb1d7988cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1cdd9e7fa1872d4af5df0aefe4af23edd0f8a00a6e6acbf6feccd0298f4a61d1b3a522a31f8de134c0174adfc62b5625b06cf7aba2635a89d7788a05431d557
|
7
|
+
data.tar.gz: 6a6d9e6467c0eb65a982bda906e83cfd628577a7f24fe6d04bebb5a3349bbf77eae1abf38e4b44e69dc911e93dd9ef19516cf191b5eb82ec504b79b0ba43137d
|
data/lib/wco/leadset.rb
CHANGED
@@ -13,8 +13,8 @@ class Wco::Leadset
|
|
13
13
|
index({ email: 1 }, { name: 'email' })
|
14
14
|
validates :email, presence: true, uniqueness: true
|
15
15
|
|
16
|
-
has_many :profiles,
|
17
|
-
has_many :appliances,
|
16
|
+
has_many :profiles, class_name: 'Wco::Profile', inverse_of: :leadset
|
17
|
+
has_many :appliances, class_name: 'WcoHosting::Appliance', inverse_of: :leadset
|
18
18
|
|
19
19
|
has_many :serverhosts, class_name: 'WcoHosting::Serverhost', inverse_of: :leadset
|
20
20
|
def next_serverhost
|
@@ -27,13 +27,12 @@ class WcoHosting::Appliance
|
|
27
27
|
"#{subdomain}.#{domain}"
|
28
28
|
end
|
29
29
|
|
30
|
-
belongs_to :appliance_tmpl, class_name: '
|
30
|
+
belongs_to :appliance_tmpl, class_name: 'WcoHosting::ApplianceTmpl'
|
31
31
|
def tmpl
|
32
32
|
appliance_tmpl
|
33
33
|
end
|
34
34
|
|
35
|
-
belongs_to :serverhost,
|
36
|
-
belongs_to :wco_leadset, class_name: 'Wco::Leadset', inverse_of: :appliances
|
35
|
+
belongs_to :serverhost, class_name: 'WcoHosting::Serverhost'
|
37
36
|
|
38
37
|
# field :ip
|
39
38
|
field :port
|
@@ -47,7 +47,7 @@ class WcoHosting::ApplianceTmpl
|
|
47
47
|
KIND_JENKINS, KIND_MATOMO, KIND_MOODLE, KIND_PRESTASHOP, KIND_SMT,
|
48
48
|
KIND_WORDPRESS ]
|
49
49
|
|
50
|
-
has_many :appliances, class_name: '
|
50
|
+
has_many :appliances, class_name: 'WcoHosting::Appliance'
|
51
51
|
|
52
52
|
def self.latest_of kind
|
53
53
|
where({ kind: kind }).order_by({ version: :desc }).first
|
@@ -7,13 +7,10 @@ class WcoHosting::Serverhost
|
|
7
7
|
# include Mongoid::Autoinc
|
8
8
|
store_in collection: 'wco_serverhosts'
|
9
9
|
|
10
|
-
field
|
11
|
-
|
12
|
-
validates :name, uniqueness: { scope: :wco_leadset }, presence: true
|
10
|
+
field :name, type: :string
|
11
|
+
validates :name, uniqueness: { scope: :leadset }, presence: true
|
13
12
|
|
14
|
-
|
15
|
-
# has_and_belongs_to_many :leadsets, class_name: 'Wco::Leadset', inverse_of: :serverhosts
|
16
|
-
belongs_to :wco_leadset, class_name: 'Wco::Leadset'
|
13
|
+
belongs_to :leadset, class_name: 'Wco::Leadset'
|
17
14
|
|
18
15
|
field :next_port, type: :integer, default: 8000
|
19
16
|
|
@@ -136,5 +133,9 @@ class WcoHosting::Serverhost
|
|
136
133
|
puts 'ok #create_volume'
|
137
134
|
end
|
138
135
|
|
136
|
+
def self.list
|
137
|
+
[[nil,nil]] + all.map { |s| [s.name, s.id] }
|
138
|
+
# all.map { |s| [s.name, s.id] }
|
139
|
+
end
|
139
140
|
|
140
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mac_a2141
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|