plesk_kit 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/plesk_kit/subscription.rb +5 -4
- data/lib/plesk_kit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWZhZjg4MjU1ODI2NThjMzcwZGU4ZDZjMDNlYTRiYTRmNDIxM2JmMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWE1YzkzODFkNThlNzE2MDdjYWE3YWIzMWQxM2Q1NmQ5N2RkMzFkMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTlhOTEwZjQ5YWM5NzFjODg3Y2MzZWJmYzJkNWRkNzUzMTZmM2M2ZGQ2ZTRm
|
10
|
+
YTFiNjhkZDNkMzY5NDZlM2FjYWM3Njk0NWM1MDc3OGM3YzdmNDRjNTExODE2
|
11
|
+
NjlhODYxOWI2Y2I4ZmE0N2M0Y2Q1YjJhY2I2YTMwODFlNzYxMzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmVlNmRmYzliNjQyOTllMmQ1YzA4MTM1MWRhYjVkNzZkYzQ5ODEyNDczOGFm
|
14
|
+
MTFlMzQ0Yjc3NzkwOWU2MTMxZDgwZDU5NTlhN2EyZDA1YTljNDI4MWFkZWMw
|
15
|
+
NjVlMDZmYTlhY2YwOWRiNmQ4MTFhYzc2YmVjMmVhZWZhZmZjZTY=
|
@@ -49,14 +49,15 @@ module PleskKit
|
|
49
49
|
def downgradable?(new_plan)
|
50
50
|
account = (customer_account_id.present? ? customer_account : (reseller_account_id.present? ? reseller_account : raise(msg="no accounts?")))
|
51
51
|
mbox_limit = new_plan.mailboxes
|
52
|
-
space_limit = new_plan.storage #
|
52
|
+
space_limit = new_plan.storage #this value is already bytes
|
53
53
|
|
54
54
|
plesk_subscription_identifier = PleskKit::Communicator.get_subscription_id(self)
|
55
55
|
usage = PleskKit::Communicator.get_subscription_usage(self,plesk_subscription_identifier, account.server)
|
56
|
-
|
57
|
-
|
56
|
+
puts usage[0].to_i,usage[1].to_i
|
57
|
+
if usage[0].to_i < space_limit.to_i && usage[1].to_i < mbox_limit.to_i
|
58
|
+
true
|
58
59
|
else
|
59
|
-
|
60
|
+
false
|
60
61
|
end
|
61
62
|
end
|
62
63
|
|
data/lib/plesk_kit/version.rb
CHANGED