sciolyff 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32773284dba3d9f67b630bd64bc1e42c60ca301a49da032c51a055101a8a96c5
4
- data.tar.gz: dee4202db369a0d6968ffdd32b98be3a6e42edb49558a8a05855a1ea77c3d653
3
+ metadata.gz: 1c1819dc4e693f02b62f0faf985459ce6835a084cd9bafa549b604b628cada7f
4
+ data.tar.gz: 38568c82e07ab4bd15953d19cf81b54f36013582a8536b89b89bb97b3f92077d
5
5
  SHA512:
6
- metadata.gz: acab98c9051a82ed655f14551e185f4e69cc3f22c08af64ab2361d00759216b812a96f0eb247aa5add92ad3367d705c339dfbb2be67e44b6d4df588901611d69
7
- data.tar.gz: ddcb26d4a7ab3a9f668ab1a95923183697857bb44e64942a63314b3336d57fd01c6275a2081e765ae0de66953527a15d5b6bc1637d62db5bfa06898da2a835eb
6
+ metadata.gz: bfea2890d6a6b85b0ade97438c53b61f5f936042b0f6b8fa5bcc2da45ba6b71f81be993820aaddbc18399fd9be14d928186160396d3fcf954a032f5794d171ec
7
+ data.tar.gz: 9f753a41c3ff214fd593a38a6ffd4d257c01eb5954bb124bdaf76e47a399808b275a64fe0fa6f5f25db074525787995e9766f24b7c43c2a45491a3bd30218525
data/bin/sciolyff CHANGED
@@ -6,7 +6,7 @@ require 'yaml'
6
6
  require 'sciolyff'
7
7
 
8
8
  opts = Optimist.options do
9
- version 'sciolyff 0.7.0'
9
+ version 'sciolyff 0.7.1'
10
10
  banner <<~STRING
11
11
  Checks if a given file is in the Scioly File Format
12
12
 
@@ -45,6 +45,10 @@ module SciolyFF
45
45
  participated? && !place && !unknown?
46
46
  end
47
47
 
48
+ def dropped_as_part_of_worst_placings?
49
+ team.worst_placings_to_be_dropped.include?(self)
50
+ end
51
+
48
52
  def points
49
53
  return 0 unless considered_for_team_points?
50
54
 
@@ -67,7 +71,7 @@ module SciolyFF
67
71
 
68
72
  def considered_for_team_points?
69
73
  initially_considered_for_team_points? &&
70
- !team.worst_placings_to_be_dropped.include?(self)
74
+ !dropped_as_part_of_worst_placings?
71
75
  end
72
76
 
73
77
  def initially_considered_for_team_points?
@@ -69,7 +69,7 @@ module SciolyFF
69
69
 
70
70
  placings
71
71
  .select(&:initially_considered_for_team_points?)
72
- .sort(&:points)
72
+ .sort_by(&:isolated_points)
73
73
  .reverse
74
74
  .take(@tournament.worst_placings_dropped)
75
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sciolyff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Em Zhan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-12 00:00:00.000000000 Z
11
+ date: 2019-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest