sciolyff 0.11.0 → 0.12.0
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 +4 -4
- data/README.md +2 -2
- data/bin/sciolyff +1 -1
- data/lib/sciolyff/interpreter/event.rb +11 -3
- data/lib/sciolyff/interpreter/tournament.rb +5 -1
- data/lib/sciolyff/validator/tournament.rb +1 -1
- data/sciolyff.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74380d58f61826da4bbad588cc070e9481eacd0a9ef6d616f49dfd5317e0adc5
|
4
|
+
data.tar.gz: cfe690c2ae95fac42b83c91579b5ab8eddde9743d56965b1d2286aacb03255e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5892e8769e1f9d2b344a942781f0d10f3f9c84588db6d3418f3dc63d6a2454ac1e1bfe7ffb7ed078855f448d47fd1ec31187e1a594820162bf3bb4d57f850188
|
7
|
+
data.tar.gz: bd57a2f55c107ed9ffdb181ea4b4f303f03563c607f13a70010294d9c7836c725680a231fe395fc7e365f501379e87e10ab0582c0a9c0cfc1e75f8014cf381a6
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ official releases, build from source:
|
|
31
31
|
```
|
32
32
|
git clone https://github.com/unosmium/sciolyff.git && cd sciolyff
|
33
33
|
gem build sciolyff.gemspec
|
34
|
-
gem install ./sciolyff-0.
|
34
|
+
gem install ./sciolyff-0.12.0.gem
|
35
35
|
```
|
36
36
|
|
37
37
|
## Usage
|
@@ -89,5 +89,5 @@ A fuller example can be found here in the code for the Unosmium Results website,
|
|
89
89
|
found
|
90
90
|
[here](https://github.com/unosmium/unosmium.org/blob/master/source/results/template.html.erb).
|
91
91
|
There is also of course the
|
92
|
-
[documentation](https://www.rubydoc.info/gems/sciolyff/0.
|
92
|
+
[documentation](https://www.rubydoc.info/gems/sciolyff/0.12.0), a bit sparse
|
93
93
|
currently.
|
data/bin/sciolyff
CHANGED
@@ -44,7 +44,7 @@ module SciolyFF
|
|
44
44
|
if trial?
|
45
45
|
placings.size
|
46
46
|
elsif tournament.per_event_n?
|
47
|
-
[
|
47
|
+
[per_event_maximum_place, tournament.maximum_place].min
|
48
48
|
else
|
49
49
|
tournament.maximum_place
|
50
50
|
end
|
@@ -56,10 +56,18 @@ module SciolyFF
|
|
56
56
|
|
57
57
|
private
|
58
58
|
|
59
|
+
def per_event_maximum_place
|
60
|
+
return competing_teams_count if tournament.per_event_n == 'participation'
|
61
|
+
|
62
|
+
placings.map(&:place).compact.max + 1
|
63
|
+
end
|
64
|
+
|
59
65
|
def competing_teams_count
|
60
|
-
return placings.count
|
66
|
+
return placings.count(&:participated?) if trial?
|
61
67
|
|
62
|
-
placings.count
|
68
|
+
placings.count do |p|
|
69
|
+
p.participated? && !(p.team.exhibition? || p.exempt?)
|
70
|
+
end
|
63
71
|
end
|
64
72
|
end
|
65
73
|
end
|
data/sciolyff.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.license = 'MIT'
|
10
10
|
s.name = 'sciolyff'
|
11
11
|
s.summary = 'A file format for Science Olympiad tournament results.'
|
12
|
-
s.version = '0.
|
12
|
+
s.version = '0.12.0'
|
13
13
|
s.executables << 'sciolyff'
|
14
14
|
s.add_runtime_dependency 'erubi', '~> 1.9'
|
15
15
|
s.add_runtime_dependency 'optimist', '~> 3.0'
|
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.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Em Zhan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubi
|