rounder 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.travis.yml +13 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +131 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/rounder.rb +2 -0
- data/lib/rounder/core.rb +63 -0
- data/lib/rounder/version.rb +4 -0
- data/rounder.gemspec +28 -0
- metadata +108 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 006a2a788e8b37b198eae0d38d0a0d02e4f27e9ea5dbf1b14804d3cca87bbf54
|
4
|
+
data.tar.gz: 15cbcd31bdb2588420cb3bc5665174cd665db90f8e40ad55f19eb00814a6cb3e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6a4ce4c8ea3b8e6af224aa81ee4c75eceb425cc5793f557087f88f72047b5442181e5a740099ee9b010e799e10a49093b2f3bdcdaeafffe25d89259cd729412b
|
7
|
+
data.tar.gz: 1e91010df8669b64ee9c1b855383c8a3c63b788edf6302cc06905a8eaa618540ed09ec4fae3161b1777ed487fa68503f8c1e17be8c533ce5e43f0e8bf9818035
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
sudo: false
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.4.2
|
5
|
+
before_install: gem install bundler -v 1.16.0.pre.2
|
6
|
+
deploy:
|
7
|
+
provider: rubygems
|
8
|
+
api_key:
|
9
|
+
secure: f8aRhdUEU6Tmz3cq8v8s3bjr9UuFDOlEo5YZ/4qhOK/zglOFTdEJQZA58jNp+F1jz7qXZ+JZev1D8qB8avDW0qbpjrMHLiK0A68CtFg2q7QzJ18dC38zJVXOroqSKgeK6lC8cgcpCFZHPcuDIfCaIJ1Z4LiPQ937c+LpdMUAxV6zliaJXy12CHbjeYDvDXN/994Y80W/qxznGWElpNnv+Xca3u3XmMCcPG9svzRNbt97QlskiBVp943pieb5XMs9IK50vnKG2SaGlJdgBLNeLIMYuUH3ejfjX+fXFM4FjwJdkOWbs4RVkflw1Yyh+9ikIqu6LDaSxRuMKmCZ3vFC91ZeIa4uh/H4zhadZtinHkBCRJcdCdxH/zpbqSbPmFiqoMCpUov9f/BXSj2ZDe9QPLrl6VybBS5IPLLy15d3x/4fV1woAgsVGmyENazgZchk2QTVE8uSHsOe7wxB6iBIMFNLtlBIdDlw9dJ9VBXMbeW/rsD5haKmENMOmPvolys0W7XYSBi8D1VU5JKin6q5V+nKlKevZ9tDP+9ppEI/wpM15KQ42VOvxS7JK8DEJSvmoXp1zIKlj33yXnaqlz1JPBnMBD4wo70A19fOiSPzQo+JN28cnCAw5Irm/Y5pXZe3YfqBQpTDYXOevmN56LBVLa18WUg0j1KgCL54mqwBANo=
|
10
|
+
gem: rounder
|
11
|
+
on:
|
12
|
+
tags: true
|
13
|
+
repo: yuriyalekseyev/rounder
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at dev.yuriy.a@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
We love contributions from everyone.
|
4
|
+
By participating in this project,
|
5
|
+
you agree to abide by the [Code of Conduct].
|
6
|
+
|
7
|
+
[code of conduct]: https://github.com/yuriyalekseyev/round_to/blob/master/CODE_OF_CONDUCT.md
|
8
|
+
|
9
|
+
## Contributing Code
|
10
|
+
|
11
|
+
1. [Fork] a repo.
|
12
|
+
|
13
|
+
[fork]: https://github.com/yuriyalekseyev/round_to/fork
|
14
|
+
|
15
|
+
2. Install dependencies.
|
16
|
+
|
17
|
+
bundle install
|
18
|
+
|
19
|
+
3. Create your feature branch.
|
20
|
+
|
21
|
+
git checkout -b my-new-feature
|
22
|
+
|
23
|
+
4. Make sure the tests pass:
|
24
|
+
|
25
|
+
rspec
|
26
|
+
|
27
|
+
There is also a command to load up a REPL for playing around.
|
28
|
+
|
29
|
+
bin/console
|
30
|
+
|
31
|
+
5. Make your change, with new passing tests.
|
32
|
+
Write a [good commit message].
|
33
|
+
|
34
|
+
[good commit message]: https://github.com/erlang/otp/wiki/Writing-good-commit-messages
|
35
|
+
|
36
|
+
git commit -am 'Add some feature'
|
37
|
+
|
38
|
+
6. Push to your fork.
|
39
|
+
|
40
|
+
git push origin my-new-feature
|
41
|
+
|
42
|
+
7. Create a new [Pull Request].
|
43
|
+
|
44
|
+
[pull request]: https://github.com/yuriyalekseyev/round_to/pulls
|
45
|
+
|
46
|
+
Others will give constructive feedback.
|
47
|
+
|
48
|
+
This is a time for discussion and improvements,
|
49
|
+
and making the necessary changes will be required before we can
|
50
|
+
merge the contribution.
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rounder (1.0.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.3)
|
10
|
+
rake (10.5.0)
|
11
|
+
rspec (3.6.0)
|
12
|
+
rspec-core (~> 3.6.0)
|
13
|
+
rspec-expectations (~> 3.6.0)
|
14
|
+
rspec-mocks (~> 3.6.0)
|
15
|
+
rspec-core (3.6.0)
|
16
|
+
rspec-support (~> 3.6.0)
|
17
|
+
rspec-expectations (3.6.0)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.6.0)
|
20
|
+
rspec-mocks (3.6.0)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.6.0)
|
23
|
+
rspec-support (3.6.0)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
bundler (~> 1.15, >= 1.15.4)
|
30
|
+
rake (~> 10.0)
|
31
|
+
rounder!
|
32
|
+
rspec (~> 3.0)
|
33
|
+
|
34
|
+
BUNDLED WITH
|
35
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Yuriy Alekseyev
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# Rounder
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rounder.svg)](https://badge.fury.io/rb/rounder)
|
4
|
+
[![Build Status](https://travis-ci.org/yuriyalekseyev/rounder.svg?branch=master)](https://travis-ci.org/yuriyalekseyev/rounder)
|
5
|
+
|
6
|
+
Rounds any numeric value to any nearest multiple of the chosen step.
|
7
|
+
|
8
|
+
Returns value of the same type as the input argument.
|
9
|
+
|
10
|
+
For example:
|
11
|
+
```ruby
|
12
|
+
require 'rounder'
|
13
|
+
|
14
|
+
17.round_to(10) # => 20
|
15
|
+
17.round_to(10.0) # => 20.0
|
16
|
+
|
17
|
+
9.47.floor_to(2.5) # => 7.5
|
18
|
+
|
19
|
+
101.ceil_to(25) # => 125
|
20
|
+
```
|
21
|
+
|
22
|
+
## Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'rounder'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
bundle
|
33
|
+
|
34
|
+
Or install the gem:
|
35
|
+
|
36
|
+
gem install rounder
|
37
|
+
|
38
|
+
## Usage
|
39
|
+
|
40
|
+
Require the gem:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
require 'rounder'
|
44
|
+
```
|
45
|
+
|
46
|
+
There are three methods added to all Numeric objects: `#round_to`, `#floor_to`, and `#ceil_to`.
|
47
|
+
|
48
|
+
`#round_to` rounds to the nearest multiple of the chosen step.
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
54.round_to(100) # => 100
|
52
|
+
1.4.round_to(3) # => 0
|
53
|
+
1.5.round_to(3) # => 3
|
54
|
+
1.6.round_to(3) # => 3
|
55
|
+
-8.round_to(3) # => -9
|
56
|
+
```
|
57
|
+
|
58
|
+
`#floor_to` rounds down to a multiple of the chosen step.
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
299.floor_to(100) # => 200
|
62
|
+
1.81.floor_to(0.5) # => 1.5
|
63
|
+
60.floor_to(15) # => 60
|
64
|
+
-8.floor_to(3) # => -9
|
65
|
+
```
|
66
|
+
|
67
|
+
`#ceil_to` rounds up to a multiple of the chosen step.
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
201.ceil_to(100) # => 300
|
71
|
+
1.71.ceil_to(0.5) # => 2.0
|
72
|
+
60.ceil_to(15) # => 60
|
73
|
+
-8.ceil_to(3) # => -6
|
74
|
+
```
|
75
|
+
|
76
|
+
Returned value type depends on the argument type.
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
21.round_to(10) # => 20
|
80
|
+
21.round_to(10.0) # => 20.0
|
81
|
+
21.0.round_to(10) # => 20
|
82
|
+
21.0.round_to(10.0) # => 20.0
|
83
|
+
```
|
84
|
+
|
85
|
+
If you provide zero as an argument, Rounder returns unaltered value.
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
21.round_to(0) # => 21
|
89
|
+
21.round_to(0.0) # => 21.0
|
90
|
+
```
|
91
|
+
|
92
|
+
If negative step is provided, Rounder will use it absolute value
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
4.round_to(2) # => 4
|
96
|
+
4.round_to(-2) # => 4
|
97
|
+
```
|
98
|
+
|
99
|
+
RoundTo uses BigDecimal, so calculations are fairly precise
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
2.round_to(0.0000000006) # => 1.9999999998
|
103
|
+
```
|
104
|
+
|
105
|
+
## Development
|
106
|
+
|
107
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
108
|
+
|
109
|
+
## Contributing
|
110
|
+
|
111
|
+
[Bug Reports] and [Pull Requests] are welcome on [GitHub Project page].
|
112
|
+
|
113
|
+
[github project page]: https://github.com/yuriyalekseyev/rounder
|
114
|
+
[bug reports]: https://github.com/yuriyalekseyev/rounder/issues
|
115
|
+
[pull requests]: https://github.com/yuriyalekseyev/rounder/pulls
|
116
|
+
|
117
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
118
|
+
|
119
|
+
Please read the [CONTRIBUTING.md] for details on our code of conduct, and the process for submitting pull requests to us.
|
120
|
+
|
121
|
+
[contributing.md]: https://github.com/yuriyalekseyev/rounder/blob/master/CONTRIBUTING.md
|
122
|
+
|
123
|
+
## License
|
124
|
+
|
125
|
+
The gem is available as open source under the terms of the [MIT License].
|
126
|
+
|
127
|
+
[MIT License]: https://opensource.org/licenses/MIT
|
128
|
+
|
129
|
+
## Code of Conduct
|
130
|
+
|
131
|
+
Everyone interacting in the Rounder project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [Code of Conduct](https://github.com/yuriyalekseyev/rounder/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'round_to'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/rounder.rb
ADDED
data/lib/rounder/core.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'bigdecimal'
|
2
|
+
|
3
|
+
# Rounds any numeric value to any nearest multiple of the chosen step.
|
4
|
+
# Returns value of the same type as the input argument.
|
5
|
+
module Rounder
|
6
|
+
# Rounds down to a multiple of the chosen step.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
# 99.floor_to(10) # => 90
|
10
|
+
#
|
11
|
+
# @param step [Numeric] chosen step.
|
12
|
+
# @return [Numeric]
|
13
|
+
def floor_to(step)
|
14
|
+
basic_rounding(step) do |result, step_decimal|
|
15
|
+
result > self ? result - step_decimal : result
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# Rounds up to a multiple of the chosen step.
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# 101.ceil_to(10) # => 110
|
23
|
+
#
|
24
|
+
# @param step [Numeric] chosen step.
|
25
|
+
# @return [Numeric]
|
26
|
+
def ceil_to(step)
|
27
|
+
basic_rounding(step) do |result, step_decimal|
|
28
|
+
result < self ? result + step_decimal : result
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Rounds to the nearest multiple of the chosen step.
|
33
|
+
#
|
34
|
+
# @example
|
35
|
+
# 101.round_to(10) # => 100
|
36
|
+
#
|
37
|
+
# @param step [Numeric] chosen step.
|
38
|
+
# @return [Numeric]
|
39
|
+
def round_to(step)
|
40
|
+
basic_rounding(step)
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def basic_rounding(step)
|
46
|
+
check_argument_type(step)
|
47
|
+
return self if step.zero?
|
48
|
+
step_decimal = BigDecimal(step.abs.to_s)
|
49
|
+
result = step_decimal * (self / step_decimal).round
|
50
|
+
result = yield(result, step_decimal) if block_given?
|
51
|
+
step.class == Integer ? result.to_i : result.to_f
|
52
|
+
end
|
53
|
+
|
54
|
+
def check_argument_type(arg)
|
55
|
+
error_message = 'This method accepts only numeric values'
|
56
|
+
raise ArgumentError, error_message unless arg.is_a?(Numeric)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# The top-level number class.
|
61
|
+
class Numeric
|
62
|
+
include Rounder
|
63
|
+
end
|
data/rounder.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'rounder/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'rounder'
|
7
|
+
spec.version = Rounder::VERSION
|
8
|
+
spec.authors = ['Yuriy Alekseyev']
|
9
|
+
spec.email = ['dev.yuriy.a@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Better rounding in Ruby'
|
12
|
+
spec.description = 'Rounds any numeric value to any nearest multiple of the chosen step.'
|
13
|
+
spec.homepage = 'https://github.com/yuriyalekseyev/rounder'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.15', '>= 1.15.4'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
|
27
|
+
spec.required_ruby_version = '>= 2.0'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rounder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuriy Alekseyev
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.15.4
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.15'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.15.4
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '10.0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '10.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
61
|
+
description: Rounds any numeric value to any nearest multiple of the chosen step.
|
62
|
+
email:
|
63
|
+
- dev.yuriy.a@gmail.com
|
64
|
+
executables: []
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- ".gitignore"
|
69
|
+
- ".rspec"
|
70
|
+
- ".travis.yml"
|
71
|
+
- CODE_OF_CONDUCT.md
|
72
|
+
- CONTRIBUTING.md
|
73
|
+
- Gemfile
|
74
|
+
- Gemfile.lock
|
75
|
+
- LICENSE.txt
|
76
|
+
- README.md
|
77
|
+
- Rakefile
|
78
|
+
- bin/console
|
79
|
+
- bin/setup
|
80
|
+
- lib/rounder.rb
|
81
|
+
- lib/rounder/core.rb
|
82
|
+
- lib/rounder/version.rb
|
83
|
+
- rounder.gemspec
|
84
|
+
homepage: https://github.com/yuriyalekseyev/rounder
|
85
|
+
licenses:
|
86
|
+
- MIT
|
87
|
+
metadata: {}
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.0'
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 2.7.3
|
105
|
+
signing_key:
|
106
|
+
specification_version: 4
|
107
|
+
summary: Better rounding in Ruby
|
108
|
+
test_files: []
|