r_odds 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +2 -2
- data/lib/r_odds/infer_odd_format.rb +1 -1
- data/lib/r_odds/odd_standardizers/fractional.rb +2 -1
- data/lib/r_odds/version.rb +1 -1
- data/r_odds.gemspec +2 -2
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 692678515e8d91144bd8addc0ad0fec7768decda5bdc2d467a2dfd8980c613a1
|
4
|
+
data.tar.gz: 3c48be31d731c242d06ab34497f96074372407612dfc6bc9fadb687b3e2311a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f584f062a05c7c9de24b67933313eb14a2a628b88d193603829e4395e9194305176420df5276591b81b344903c6d4d4b9181cb92a936793258dd7ad75d4d8d6a
|
7
|
+
data.tar.gz: 655b686da540ab207d69358bda0bc982ce92e8f336412adfeacf50ca093da87971e90e50abda2b07b594ee9eebd9db56b463ac17fb1580626b886d0725e3b368
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
r_odds (0.1.
|
4
|
+
r_odds (0.1.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
coderay (~> 1.1.0)
|
14
14
|
method_source (~> 0.8.1)
|
15
15
|
slop (~> 3.4)
|
16
|
-
rake (
|
16
|
+
rake (13.0.1)
|
17
17
|
rspec (3.7.0)
|
18
18
|
rspec-core (~> 3.7.0)
|
19
19
|
rspec-expectations (~> 3.7.0)
|
@@ -36,8 +36,8 @@ DEPENDENCIES
|
|
36
36
|
bundler (~> 1.16)
|
37
37
|
pry (~> 0.10.3)
|
38
38
|
r_odds!
|
39
|
-
rake (
|
39
|
+
rake (>= 12.3.3)
|
40
40
|
rspec (~> 3.7)
|
41
41
|
|
42
42
|
BUNDLED WITH
|
43
|
-
1.
|
43
|
+
1.17.2
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ require 'r_odds'
|
|
15
15
|
```
|
16
16
|
|
17
17
|
## How to use the gem
|
18
|
-
Use the `:convert` method to convert between any of the following formats: `:american`, `:decimal`, `:fractional` or `:
|
18
|
+
Use the `:convert` method to convert between any of the following formats: `:american`, `:decimal`, `:fractional` or `:implied_probability`
|
19
19
|
|
20
20
|
```ruby
|
21
21
|
ROdds.convert('+150', to: :decimal)
|
@@ -32,7 +32,7 @@ You can also specify the format you're passing in for ambiguous formats like `'1
|
|
32
32
|
ROdds.convert('1/4', to: :decimal)
|
33
33
|
#=> 1.25
|
34
34
|
|
35
|
-
ROdds.convert('1/4', from: :
|
35
|
+
ROdds.convert('1/4', from: :implied_probability, to: :american)
|
36
36
|
#=> +300
|
37
37
|
```
|
38
38
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module ROdds
|
2
2
|
module OddStandardizer
|
3
3
|
class Fractional
|
4
|
-
NUMERATOR_AND_DENOMINATOR =
|
4
|
+
NUMERATOR_AND_DENOMINATOR =
|
5
|
+
/(?<numerator>\d+\.?\d*)(\D*)(?<denominator>\d+\.?\d*)/
|
5
6
|
|
6
7
|
def self.call(params)
|
7
8
|
new(params).call
|
data/lib/r_odds/version.rb
CHANGED
data/r_odds.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["George Wambold"]
|
10
10
|
spec.email = ["georgewambold@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
12
|
+
spec.summary = %q{Simple odds conversions -- Written in Ruby!}
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.16"
|
34
|
-
spec.add_development_dependency "rake", "
|
34
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.7"
|
36
36
|
spec.add_development_dependency "pry", "~> 0.10.3"
|
37
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r_odds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- George Wambold
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.10.3
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email:
|
71
71
|
- georgewambold@gmail.com
|
72
72
|
executables: []
|
@@ -108,11 +108,11 @@ files:
|
|
108
108
|
- lib/r_odds/standardizer.rb
|
109
109
|
- lib/r_odds/version.rb
|
110
110
|
- r_odds.gemspec
|
111
|
-
homepage:
|
111
|
+
homepage:
|
112
112
|
licenses:
|
113
113
|
- MIT
|
114
114
|
metadata: {}
|
115
|
-
post_install_message:
|
115
|
+
post_install_message:
|
116
116
|
rdoc_options: []
|
117
117
|
require_paths:
|
118
118
|
- lib
|
@@ -127,9 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
|
-
|
131
|
-
|
132
|
-
signing_key:
|
130
|
+
rubygems_version: 3.1.2
|
131
|
+
signing_key:
|
133
132
|
specification_version: 4
|
134
|
-
summary:
|
133
|
+
summary: Simple odds conversions -- Written in Ruby!
|
135
134
|
test_files: []
|