auctify 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/auctify/sale/auction.rb +2 -1
- data/app/services/auctify/bids_appender.rb +1 -2
- data/lib/auctify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1ff1f96493a447d685097bcd87d2f6b2798e6c2ae391591692ab840ae6ce2bc
|
4
|
+
data.tar.gz: '018847e67646b882ea6525767416a663dc19dd0ee1d87a0bdccb029215f8897f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a185ca59647cb9361d3d315d6a62355a85cad1b28bc7276b4195ccdae2f9bafa74c308b9be00083c7031237830217184e29338083745f8372e811423dd4a878
|
7
|
+
data.tar.gz: 959b40425783d4d5d9770ba2d4b5c415684d8264713d537d2f8f9f1488208eae302cb60204c88870af764c9d5ccd279175918580e2268ffe8ae7d805ce9b4806
|
@@ -216,7 +216,8 @@ module Auctify
|
|
216
216
|
bidding_result.current_minimal_bid
|
217
217
|
end
|
218
218
|
|
219
|
-
def minimal_bid_increase_amount_at(price)
|
219
|
+
def minimal_bid_increase_amount_at(price, respect_first_bid: true)
|
220
|
+
return 0 if respect_first_bid && price == opening_price # first bid can equal opening price
|
220
221
|
return Auctify.configuration.require_bids_to_be_rounded_to if bid_steps_ladder.blank?
|
221
222
|
|
222
223
|
_range, increase_step = bid_steps_ladder.detect { |range, step| range.cover?(price) }
|
@@ -96,7 +96,6 @@ module Auctify
|
|
96
96
|
|
97
97
|
def new_current_minimal_bid
|
98
98
|
return current_price if first_bid?
|
99
|
-
|
100
99
|
increase_price(current_price)
|
101
100
|
end
|
102
101
|
|
@@ -210,7 +209,7 @@ module Auctify
|
|
210
209
|
end
|
211
210
|
|
212
211
|
def increase_price(price)
|
213
|
-
price + auction.minimal_bid_increase_amount_at(price)
|
212
|
+
price + auction.minimal_bid_increase_amount_at(price, respect_first_bid: false)
|
214
213
|
end
|
215
214
|
|
216
215
|
def increase_price_to(overcome:, ceil:)
|
data/lib/auctify/version.rb
CHANGED