irv 0.3.0 → 0.3.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 +4 -4
- data/.github/workflows/test.yaml +31 -0
- data/lib/irv/round.rb +1 -1
- data/lib/irv/version.rb +1 -1
- metadata +3 -3
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfd57ec8dac2bec1cd4013e868af058d3ed72756892bd27d3f6754d53a656d46
|
4
|
+
data.tar.gz: 9b28df1aa3ba19e1368f436ddcf8a9c5fcb2eeb039313c24b4b475f1f5685995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c22afbebe3eeff2e89a0b86251948539d763b2b40daff33a72bd2d77b7243216e527be5d673a43b29ff1f230c1862b089d2642e0de406928b52fcbbdb9a94bb7
|
7
|
+
data.tar.gz: d3bdd5286d392b9ac62c45658c4d071b9e7240c1c1e746ee9881ce38401908d1a2f33638b0ec46bc029c634059fcc6d8852caa5074ca34ecced843770e59eaa5
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: RSpec and RuboCop
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout code
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 3.3
|
21
|
+
|
22
|
+
- name: Install dependencies
|
23
|
+
run: |
|
24
|
+
gem install bundler
|
25
|
+
bundle install --jobs 4 --retry 3
|
26
|
+
|
27
|
+
- name: Run RSpec tests
|
28
|
+
run: bundle exec rspec
|
29
|
+
|
30
|
+
- name: Run RuboCop
|
31
|
+
run: bundle exec rubocop
|
data/lib/irv/round.rb
CHANGED
@@ -46,7 +46,7 @@ module Irv
|
|
46
46
|
tallied_votes = []
|
47
47
|
max_ranked_votes_count(votes).times do |n|
|
48
48
|
nth_ranked_votes = votes.map { |vote| vote[n] }
|
49
|
-
tallied_votes << @candidates.
|
49
|
+
tallied_votes << @candidates.to_h { |c| [c.to_s.to_sym, nth_ranked_votes.count(c)] }
|
50
50
|
end
|
51
51
|
tallied_votes
|
52
52
|
end
|
data/lib/irv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: irv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- highwide
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,10 +74,10 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".github/workflows/test.yaml"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
80
|
- ".rubocop.yml"
|
80
|
-
- ".travis.yml"
|
81
81
|
- CODE_OF_CONDUCT.md
|
82
82
|
- Gemfile
|
83
83
|
- Gemfile.lock
|