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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53818d7ef85b17d1a16ec1edb3dbe28a19a7e270
4
- data.tar.gz: 469e4c1c376b51e046ba9f63d996cfe5dfa471dd
3
+ metadata.gz: ae839272df138e8b2a06f1ee17ba96ac70ae0277
4
+ data.tar.gz: 5a0e68082b5678a8288a4329f84f7ca95d6f96e6
5
5
  SHA512:
6
- metadata.gz: bc27016c49ba72f66ddb091f97f2bc36dd002d2824be86cc4b990ff3b40420e3c45bc3df6619f3a4acaaa4b40d272935bd36a6ab6862c7c1fd0b424044aae548
7
- data.tar.gz: b217e9704c65a7bcd1d9037bdbce8644b5f2f2b883b1c0d61bd192645b6c3733345c467067c6998f58344a77f48f2729bf50f58fffa531dcba2c0134692e8a29
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 :checked_at_is_past, -> { where(arel_table[:checked_at].lt(Time.now)) }
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
- checked_at_is_past.received_at_least_minimum
21
+ checked_at_is_past_or_nil.received_at_least_minimum
19
22
  end
20
23
  validates(
21
24
  :initial_tax_rate,
@@ -1,3 +1,3 @@
1
1
  module Bitsy
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitsy-bitcoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag