multi_range 2.1.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f5131aeac614c26aaf827649d945657844d9275943b2dd7b1be8658439c22be
4
- data.tar.gz: 9c28e90964b54c7f8b9a0fd6bf2bce56879075d88f39ab6c329ef9b708a6fc74
3
+ metadata.gz: 2b5352f51a43f950f0900f8964dfb2f955aa2c23d4845d2535a1420bbb829905
4
+ data.tar.gz: 0cc8ee461ef7a33f0c18c596676e4b57102dc73ddb9f9c9f4c1ce00838e709bf
5
5
  SHA512:
6
- metadata.gz: 3b316d23ce448b02cddaea5965a8ca87162797a6242383b18b4fdb39bb67eb6e56cf511a639d1ab753caa09278ef452e9e840f8e0e47bf7e5768f8e6dd41f837
7
- data.tar.gz: f1f94bae043fde50aef3e057deed543cfd83f85515d689ee7b4b81bbdba3bfda7ef3e5bdca2242cfc82724c277bc246681e58b8cfb47864c523c2a380a9f259d
6
+ metadata.gz: 66d4a320e3b9d2461aa59f1052e39ff7984af7c22aefa202997c0dedb20fba7f2ea64fabc4f245d993ab23afb96772edf2452db0393fb5689b11cc14cf1316a8
7
+ data.tar.gz: 5b395dfa8e9dde8639fde7c83bcabe69de2b655a49e3148b933275c3eb8af590adf7af5f8335e841a9c6cab9c625a2e58a4d4224baff8909e3c78b9397e4c5d4
File without changes
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -1,38 +1,44 @@
1
- ## Change Log
2
-
3
- ### [v2.0.0](https://github.com/khiav223577/multi_range/compare/v1.3.0...v2.0.0) 2020/11/19
4
- - [#19](https://github.com/khiav223577/multi_range/pull/19) Implement intersection (@chrisnankervis)
5
- - [#20](https://github.com/khiav223577/multi_range/pull/20) Drop support for Ruby 1.8 and 1.9 (@khiav223577)
6
- - [#17](https://github.com/khiav223577/multi_range/pull/17) Refactoring - increase MAINTAINABILITY (@khiav223577)
7
-
8
- ### [v1.3.0](https://github.com/khiav223577/multi_range/compare/v1.2.0...v1.3.0) 2020/10/20
9
- - [#16](https://github.com/khiav223577/multi_range/pull/16) Implement contain_overlaps? method (@khiav223577)
10
-
11
- ### [v1.2.0](https://github.com/khiav223577/multi_range/compare/v1.1.0...v1.2.0) 2020/10/16
12
- - [#15](https://github.com/khiav223577/multi_range/pull/15) Add test cases to test union float ranges (@khiav223577)
13
- - [#14](https://github.com/khiav223577/multi_range/pull/14) Support float ranges (@khiav223577)
14
-
15
- ### [v1.1.0](https://github.com/khiav223577/multi_range/compare/v1.0.0...v1.1.0) 2020/10/15
16
- - [#13](https://github.com/khiav223577/multi_range/pull/13) Rename flatten => merge_overlaps (@khiav223577)
17
-
18
- ### [v1.0.0](https://github.com/khiav223577/multi_range/compare/v0.0.4...v1.0.0) 2020/10/15
19
- - [#12](https://github.com/khiav223577/multi_range/pull/12) Implement #overlaps? (@khiav223577)
20
- - [#11](https://github.com/khiav223577/multi_range/pull/11) Support difference other multi_range object (@khiav223577)
21
- - [#10](https://github.com/khiav223577/multi_range/pull/10) Add frozen_string_literal (@khiav223577)
22
- - [#9](https://github.com/khiav223577/multi_range/pull/9) Implement range union (@khiav223577)
23
- - [#8](https://github.com/khiav223577/multi_range/pull/8) Support initializing a MultiRange object with unsorted ranges (@khiav223577)
24
-
25
- ### [v0.0.4](https://github.com/khiav223577/multi_range/compare/v0.0.3...v0.0.4) 2020/03/26
26
- - [#7](https://github.com/khiav223577/multi_range/pull/7) Add flatten method (@khiav223577)
27
-
28
- ### [v0.0.3](https://github.com/khiav223577/multi_range/compare/v0.0.2...v0.0.3) 2020/03/02
29
- - [#6](https://github.com/khiav223577/multi_range/pull/6) freeze internal ranges variable (@khiav223577)
30
- - [#5](https://github.com/khiav223577/multi_range/pull/5) Add min, max, to_a method (@khiav223577)
31
-
32
- ### [v0.0.2](https://github.com/khiav223577/multi_range/compare/v0.0.1...v0.0.2) 2020/03/02
33
- - [#4](https://github.com/khiav223577/multi_range/pull/4) Add each, map, index_with methods (@khiav223577)
34
- - [#3](https://github.com/khiav223577/multi_range/pull/3) Support passing integer as range (@khiav223577)
35
-
36
- ### [v0.0.1](https://github.com/khiav223577/multi_range/compare/v0.0.1...v0.0.1) 2020/03/01
37
- - [#2](https://github.com/khiav223577/multi_range/pull/2) Support Ruby 1.8.7 (@khiav223577)
38
- - [#1](https://github.com/khiav223577/multi_range/pull/1) Implement MultiRange (@khiav223577)
1
+ ## Change Log
2
+
3
+ ### [v2.1.0](https://github.com/khiav223577/multi_range/compare/v2.0.0...v2.1.0) 2021/03/17
4
+ - [#24](https://github.com/khiav223577/multi_range/pull/24) Avoid empty sub ranges (@GerritSe)
5
+ - [#25](https://github.com/khiav223577/multi_range/pull/25) Do not publish code coverage for PRs from forks (@khiav223577)
6
+ - [#22](https://github.com/khiav223577/multi_range/pull/22) Migrating from Travis CI to GitHub Actions (@khiav223577)
7
+ - [#21](https://github.com/khiav223577/multi_range/pull/21) Fix: test files should not be included in coverage (@khiav223577)
8
+
9
+ ### [v2.0.0](https://github.com/khiav223577/multi_range/compare/v1.3.0...v2.0.0) 2020/11/19
10
+ - [#19](https://github.com/khiav223577/multi_range/pull/19) Implement intersection (@chrisnankervis)
11
+ - [#20](https://github.com/khiav223577/multi_range/pull/20) Drop support for Ruby 1.8 and 1.9 (@khiav223577)
12
+ - [#17](https://github.com/khiav223577/multi_range/pull/17) Refactoring - increase MAINTAINABILITY (@khiav223577)
13
+
14
+ ### [v1.3.0](https://github.com/khiav223577/multi_range/compare/v1.2.0...v1.3.0) 2020/10/20
15
+ - [#16](https://github.com/khiav223577/multi_range/pull/16) Implement contain_overlaps? method (@khiav223577)
16
+
17
+ ### [v1.2.0](https://github.com/khiav223577/multi_range/compare/v1.1.0...v1.2.0) 2020/10/16
18
+ - [#15](https://github.com/khiav223577/multi_range/pull/15) Add test cases to test union float ranges (@khiav223577)
19
+ - [#14](https://github.com/khiav223577/multi_range/pull/14) Support float ranges (@khiav223577)
20
+
21
+ ### [v1.1.0](https://github.com/khiav223577/multi_range/compare/v1.0.0...v1.1.0) 2020/10/15
22
+ - [#13](https://github.com/khiav223577/multi_range/pull/13) Rename flatten => merge_overlaps (@khiav223577)
23
+
24
+ ### [v1.0.0](https://github.com/khiav223577/multi_range/compare/v0.0.4...v1.0.0) 2020/10/15
25
+ - [#12](https://github.com/khiav223577/multi_range/pull/12) Implement #overlaps? (@khiav223577)
26
+ - [#11](https://github.com/khiav223577/multi_range/pull/11) Support difference other multi_range object (@khiav223577)
27
+ - [#10](https://github.com/khiav223577/multi_range/pull/10) Add frozen_string_literal (@khiav223577)
28
+ - [#9](https://github.com/khiav223577/multi_range/pull/9) Implement range union (@khiav223577)
29
+ - [#8](https://github.com/khiav223577/multi_range/pull/8) Support initializing a MultiRange object with unsorted ranges (@khiav223577)
30
+
31
+ ### [v0.0.4](https://github.com/khiav223577/multi_range/compare/v0.0.3...v0.0.4) 2020/03/26
32
+ - [#7](https://github.com/khiav223577/multi_range/pull/7) Add flatten method (@khiav223577)
33
+
34
+ ### [v0.0.3](https://github.com/khiav223577/multi_range/compare/v0.0.2...v0.0.3) 2020/03/02
35
+ - [#6](https://github.com/khiav223577/multi_range/pull/6) freeze internal ranges variable (@khiav223577)
36
+ - [#5](https://github.com/khiav223577/multi_range/pull/5) Add min, max, to_a method (@khiav223577)
37
+
38
+ ### [v0.0.2](https://github.com/khiav223577/multi_range/compare/v0.0.1...v0.0.2) 2020/03/02
39
+ - [#4](https://github.com/khiav223577/multi_range/pull/4) Add each, map, index_with methods (@khiav223577)
40
+ - [#3](https://github.com/khiav223577/multi_range/pull/3) Support passing integer as range (@khiav223577)
41
+
42
+ ### v0.0.1 2020/03/01
43
+ - [#2](https://github.com/khiav223577/multi_range/pull/2) Support Ruby 1.8.7 (@khiav223577)
44
+ - [#1](https://github.com/khiav223577/multi_range/pull/1) Implement MultiRange (@khiav223577)
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/bin/console CHANGED
File without changes
data/bin/setup CHANGED
File without changes
data/gemfiles/Gemfile CHANGED
File without changes
data/lib/multi_range.rb CHANGED
@@ -132,7 +132,7 @@ class MultiRange
132
132
  def sample
133
133
  range = RouletteWheelSelection.sample(@ranges.map{|s| [s, s.size] }.to_h)
134
134
  return nil if range == nil
135
- return rand(range.max - range.min) + range.min
135
+ return rand(range)
136
136
  end
137
137
 
138
138
  def size
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class MultiRange
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.1'
5
5
  end
data/multi_range.gemspec CHANGED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_range
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-17 00:00:00.000000000 Z
11
+ date: 2021-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 3.0.6
163
+ rubygems_version: 3.2.14
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Allow you to manipulate a group of ranges.