neuron-client 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,11 +14,12 @@ module Neuron
|
|
14
14
|
entries = {}
|
15
15
|
ad_links.each do |ad_id, link|
|
16
16
|
next unless ad = find_ad(ad_id)
|
17
|
-
|
17
|
+
pressure = ad.active? ? ad.pressure : nil
|
18
|
+
next if pressure.nil?
|
18
19
|
weight = link['weight'].to_f
|
19
20
|
priority = link['priority'].to_f
|
20
21
|
entries[priority] ||= []
|
21
|
-
entries[priority] << [ad_id, weighted_pressure(weight,
|
22
|
+
entries[priority] << [ad_id, weighted_pressure(weight, pressure)]
|
22
23
|
end
|
23
24
|
entries.sort_by do |priority, entry|
|
24
25
|
priority
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neuron-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- RMM Online
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-05-
|
18
|
+
date: 2012-05-15 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rest-client
|