bitsy-bitcoin 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/bitsy/payment_depot.rb +5 -2
- data/lib/bitsy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae839272df138e8b2a06f1ee17ba96ac70ae0277
|
4
|
+
data.tar.gz: 5a0e68082b5678a8288a4329f84f7ca95d6f96e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9746d72237a91a65f5888ca44f21a59f1236c1f055a887235e5d5cf2142c5bc85b27113294febeee33163988480abc5dbe6abd913c897bbb46015272aebe775f
|
7
|
+
data.tar.gz: 276feed8c11085c46527fa3998b3f3462d3f4bbd06aab2dfb877f0456e3435a635f649ddd27c7e22c23206227a75e2fa43c07d19b37ec98d82c502b9fc9ea561
|
@@ -8,14 +8,17 @@ module Bitsy
|
|
8
8
|
alias_attribute :balance, :balance_cache
|
9
9
|
after_initialize :set_uuid
|
10
10
|
scope :with_balance, -> { where('balance_cache > 0.0') }
|
11
|
-
scope :
|
11
|
+
scope :checked_at_is_past_or_nil, -> do
|
12
|
+
checked_at = arel_table[:checked_at]
|
13
|
+
where(checked_at.lt(Time.now).or(checked_at.eq(nil)))
|
14
|
+
end
|
12
15
|
scope :received_at_least_minimum, -> do
|
13
16
|
min_payment = arel_table[:min_payment]
|
14
17
|
total_received_amount_cache = arel_table[:total_received_amount_cache]
|
15
18
|
where(min_payment.lteq(total_received_amount_cache))
|
16
19
|
end
|
17
20
|
scope :for_manual_checking, -> do
|
18
|
-
|
21
|
+
checked_at_is_past_or_nil.received_at_least_minimum
|
19
22
|
end
|
20
23
|
validates(
|
21
24
|
:initial_tax_rate,
|
data/lib/bitsy/version.rb
CHANGED