rankmatic 0.1.0 → 0.1.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/README.md +39 -4
- data/bin/rake +17 -0
- data/lib/rankmatic/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc407cf4dba82d98b02f0d61858cc0fb6a9c3c68
|
|
4
|
+
data.tar.gz: 9c9b50077c85562be6b62c6ce9423b9a77747dd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f1d8bd7ae7862e8d35f3ad620424a7e7c2c5652e98e71c1e9f9b8670c91fdf27cd94d68e4da8839374f3bd6d07b97900136bea97f06a4a01245380216dc8d8c
|
|
7
|
+
data.tar.gz: 977b7340fbe9770d290555c95286ca4d7bdbe0f0078bf66d1c9dda6fac27ab8bef373840d41aa30eb68dc5e3dfce6190c5e8976b532d524d34d62214f246c31f
|
data/README.md
CHANGED
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
# Rankmatic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Problem scenario
|
|
4
|
+
|
|
5
|
+
You are running a contest with judged submissions.
|
|
6
|
+
Each submission is evaluated by three judges.
|
|
7
|
+
Judges evaluate submissions using a rubric with several factors.
|
|
8
|
+
You need to average the judges scores and then rank the list of submissions by their average scores.
|
|
9
|
+
You are also too lazy to deal with it.
|
|
10
|
+
|
|
11
|
+
*Rankmatic* to the rescue!!
|
|
12
|
+
|
|
13
|
+
Given `example.csv`:
|
|
14
|
+
```csv
|
|
15
|
+
email,funny,friendly,cool
|
|
16
|
+
foo@example.com,3,2,1
|
|
17
|
+
foo@example.com,1,2,1
|
|
18
|
+
foo@example.com,3,2,1
|
|
19
|
+
bar@example.com,10,20,30
|
|
20
|
+
bar@example.com,22,20,40
|
|
21
|
+
bar@example.com,30,40,90
|
|
22
|
+
baz@example.com,7,8,9
|
|
23
|
+
baz@example.com,1,2,3
|
|
24
|
+
baz@example.com,4,5,6
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Run the following command
|
|
28
|
+
|
|
29
|
+
```shell
|
|
30
|
+
$ rank --group_by=email --csv_path=./example.csv
|
|
31
|
+
|
|
32
|
+
bar@example.com
|
|
33
|
+
baz@example.com
|
|
34
|
+
foo@example.com
|
|
35
|
+
```
|
|
4
36
|
|
|
5
|
-
|
|
37
|
+
You can also rank by just one column:
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
$ rank --group_by=email --rank_by=friendly --csv_path=./example.csv
|
|
41
|
+
```
|
|
6
42
|
|
|
7
43
|
## Installation
|
|
8
44
|
|
|
@@ -26,7 +62,7 @@ TODO: Write usage instructions here
|
|
|
26
62
|
|
|
27
63
|
## Development
|
|
28
64
|
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `
|
|
65
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
66
|
|
|
31
67
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
68
|
|
|
@@ -38,4 +74,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
|
38
74
|
## License
|
|
39
75
|
|
|
40
76
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
41
|
-
|
data/bin/rake
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
#
|
|
4
|
+
# This file was generated by Bundler.
|
|
5
|
+
#
|
|
6
|
+
# The application 'rake' is installed as part of a gem, and
|
|
7
|
+
# this file is here to facilitate running it.
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
require "pathname"
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
|
+
Pathname.new(__FILE__).realpath)
|
|
13
|
+
|
|
14
|
+
require "rubygems"
|
|
15
|
+
require "bundler/setup"
|
|
16
|
+
|
|
17
|
+
load Gem.bin_path("rake", "rake")
|
data/lib/rankmatic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rankmatic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Elliott
|
|
@@ -97,6 +97,7 @@ files:
|
|
|
97
97
|
- README.md
|
|
98
98
|
- Rakefile
|
|
99
99
|
- bin/console
|
|
100
|
+
- bin/rake
|
|
100
101
|
- bin/rspec
|
|
101
102
|
- bin/setup
|
|
102
103
|
- exe/rankmatic
|