sugar_refinery 1.0.0 → 1.0.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
- SHA1:
3
- metadata.gz: 67c2c0f14a0f111f938ef418f1ea14328c3ad8a5
4
- data.tar.gz: 711d19f2e8b7db76c28c8fe08fd14a52f4fe04c1
2
+ SHA256:
3
+ metadata.gz: c19c9537b567e7987e2fa2eb5018608bfb7e839bdab1635f8f9626eba7090f17
4
+ data.tar.gz: 3e95b748682d98a3e9fbcea6e3018cb467db1b1ccf5ec219c3fc5410bebc2c54
5
5
  SHA512:
6
- metadata.gz: de1a759dae8a9ae774fdacdcf6cd29aa1279f69ef123835e7ec6b2cccead07473efc6d29708d7510f2f970fa1d3d8f2952dd3f602e3f8089789c1a5ea443d53d
7
- data.tar.gz: b51b321dcf0377ee6b408f6dc73671ec53d04308098555bbfe5f3cf299c07fd3b2db269d2908c834ff83217fa1a9510fd500b75c46697b2f61b4e8f2b1c56e55
6
+ metadata.gz: a6d7f73d2cdd2ddcc0ee9859e9d9b288e90f5a393c8948196e64c5f6bd56ddbc8b9372a05734e5a48fd89c59ca9d20f3a516f76393b04a2f1dfc8f3b062572f1
7
+ data.tar.gz: 5ffea3a3d141469a09aa4a633851535c2f9302e5526132d111d9d5c5a4cc2942044a9dc611bb4c6b2eca4850e385916fb16c9db508aba78dcb84fce3f6f4d2f2
@@ -1,6 +1,11 @@
1
1
  # SUGAR REFINERY CHANGELOG
2
2
 
3
- ## 2016-01-02 | Sugar Refinery 1.0
3
+ ## 2021-01-07 | Sugar Refinery 1.0.1
4
+
5
+ * Relax Ruby version requirement to allow Ruby 3.0
6
+
7
+
8
+ ## 2016-01-03 | Sugar Refinery 1.0.0
4
9
 
5
10
  * turn zucker gem into sugar_refinery
6
11
  * move iterate into its own gem
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Ruby Sugar Refinery [![version](https://badge.fury.io/rb/sugar-refinery.svg)](http://badge.fury.io/rb/sugar-refinery) [![travis](https://travis-ci.org/janlelis/sugar-refinery.png?branch=master)](https://travis-ci.org/janlelis/sugar-refinery)
1
+ # Ruby Sugar Refinery [![version](https://badge.fury.io/rb/sugar_refinery.svg)](https://badge.fury.io/rb/sugar_refinery) [![[ci]](https://github.com/janlelis/sugar_refinery/workflows/Test/badge.svg)](https://github.com/janlelis/sugar_refinery/actions?query=workflow%3ATest)
2
2
 
3
- The Ruby Sugar Refinery is a collection of tiny [refinements](http://ruby-doc.org/core-2.3.0/doc/syntax/refinements_rdoc.html) (declarative local core extensions) for Ruby.
3
+ The Ruby Sugar Refinery is a collection of tiny [refinements](https://ruby-doc.org/core/doc/syntax/refinements_rdoc.html) (declarative local core extensions) for Ruby.
4
4
 
5
- ## Setup & Usage
5
+ ## Setup & usage
6
6
 
7
7
  Add to Gemfile:
8
8
 
@@ -20,23 +20,25 @@ using SugarRefinery::HashZip
20
20
  Hash.zip [1,2,3], [4,5,6] # => {1=>4, 2=>5, 3=>6}
21
21
  ```
22
22
 
23
- ## Included Refinements
23
+ ## List of included refinements
24
24
 
25
- [See the documentation!](http://janlelis.github.io/sugar-refinery)
25
+ Please see [the documentation](http://janlelis.github.io/sugar_refinery), [the code](https://github.com/janlelis/sugar_refinery/tree/master/lib/sugar_refinery) or [the specs](https://github.com/janlelis/sugar_refinery/tree/master/spec)!
26
26
 
27
- ## Zucker Gems
27
+ ## The Sugar Refinery was Zucker before
28
28
 
29
- Missing former functionality? It might have been extracted into a separate gem:
29
+ This collection of core extensions used to be called **zucker**.
30
30
 
31
- * [iterate](https://github.com/janlelis/iterate)
32
- * [instance_variable_from](https://github.com/janlelis/instance_variable_from)
33
- * [egonil](https://github.com/janlelis/egonil)
34
- * [debugging](https://github.com/janlelis/debugging)
35
- * [procstar](https://github.com/janlelis/procstar)
36
- * [ruby_info](https://github.com/janlelis/ruby_info)
37
- * [ruby_version](https://github.com/janlelis/ruby_version)
38
- * [ruby_engine](https://github.com/janlelis/ruby_engine)
31
+ Missing former functionality? It might have been extracted into a separate micro gem:
32
+
33
+ * [iterate](https://github.com/janlelis/iterate) | Control structure-like iteration
34
+ * [instance_variables_from](https://github.com/janlelis/instance_variables_from) | Auto-assign instance variables
35
+ * [egonil](https://github.com/janlelis/egonil) | Egocentric nil
36
+ * [debugging](https://github.com/janlelis/debugging) | Print debugging helpers
37
+ * [procstar](https://github.com/janlelis/procstar) | Beyond symbol2proc
38
+ * [ruby_info](https://github.com/janlelis/ruby_info) | Misc information about the Ruby environment
39
+ * [ruby_version](https://github.com/janlelis/ruby_version) | Smart Ruby version accessor
40
+ * [ruby_engine](https://github.com/janlelis/ruby_engine) | Smar Ruby engine accessor
39
41
 
40
42
  ## J-_-L
41
43
 
42
- Copyright (c) 2010-2016 [Jan Lelis](http://janlelis.com), released under the MIT license
44
+ Copyright (c) 2010-2016 [Jan Lelis](https://janlelis.com), released under the MIT license
@@ -465,7 +465,7 @@ Hash.zip [1,2,3], [4,5,6] # => {1=>4, 2=>5, 3=>6}</pre>
465
465
  Ruby Logo CC-BY-SA Yukihiro Matsumoto.
466
466
  </div>
467
467
 
468
- <a href="https://github.com/janlelis/sugar-refinery"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
468
+ <a href="https://github.com/janlelis/sugar_refinery"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
469
469
  </body>
470
470
  </html>
471
471
 
@@ -483,27 +483,27 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
483
483
 
484
484
  describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Array#stdev_sample</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
485
485
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should return the standard deviation of the sample</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
486
- list.stdev_sample.should be_close(<span style="color:#60E">1.2909944487358056</span>, <span style="color:#60E">1e-8</span>)
486
+ list.stdev_sample.should be_within(<span style="color:#60E">1e-8</span>).of(<span style="color:#60E">1.2909944487358056</span>)
487
487
  <span style="color:#080;font-weight:bold">end</span>
488
488
  <span style="color:#080;font-weight:bold">end</span>
489
489
 
490
490
  describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Array#stdev_population</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
491
491
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should return the standard deviation of the population</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
492
- list.stdev_population.should be_close(<span style="color:#60E">1.118033988749895</span>, <span style="color:#60E">1e-8</span>)
492
+ list.stdev_population.should be_within(<span style="color:#60E">1e-8</span>).of(<span style="color:#60E">1.118033988749895</span>)
493
493
  <span style="color:#080;font-weight:bold">end</span>
494
494
  <span style="color:#080;font-weight:bold">end</span>
495
495
 
496
496
  describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Array#stdev</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
497
497
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should default to population</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
498
- list.stdev.should be_close(list.stdev_population, <span style="color:#60E">1e-8</span>)
498
+ list.stdev.should be_within(<span style="color:#60E">1e-8</span>).of(list.stdev_population)
499
499
  <span style="color:#080;font-weight:bold">end</span>
500
500
 
501
501
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should delegate sample correctly</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
502
- list.stdev(<span style="color:#A60">:sample</span>).should be_close(list.stdev_sample, <span style="color:#60E">1e-8</span>)
502
+ list.stdev(<span style="color:#A60">:sample</span>).should be_within(<span style="color:#60E">1e-8</span>).of(list.stdev_sample)
503
503
  <span style="color:#080;font-weight:bold">end</span>
504
504
 
505
505
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should delegate population correctly</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
506
- list.stdev(<span style="color:#A60">:population</span>).should be_close(list.stdev_population, <span style="color:#60E">1e-8</span>)
506
+ list.stdev(<span style="color:#A60">:population</span>).should be_within(<span style="color:#60E">1e-8</span>).of(list.stdev_population)
507
507
  <span style="color:#080;font-weight:bold">end</span>
508
508
 
509
509
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should raise an error with any other key</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
@@ -514,7 +514,7 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
514
514
  describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Array#z_score</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
515
515
  it <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">should default to population</span><span style="color:#710">&quot;</span></span> <span style="color:#080;font-weight:bold">do</span>
516
516
  list.z_score.zip(list.z_score(<span style="color:#A60">:population</span>)).each <span style="color:#080;font-weight:bold">do</span> |value, actual|
517
- value.should be_close(actual, <span style="color:#60E">1e-8</span>)
517
+ value.should be_within(<span style="color:#60E">1e-8</span>).of(actual)
518
518
  <span style="color:#080;font-weight:bold">end</span>
519
519
  <span style="color:#080;font-weight:bold">end</span>
520
520
 
@@ -529,7 +529,7 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
529
529
  p list
530
530
 
531
531
  list.z_score(<span style="color:#A60">:sample</span>).zip(sample_z_score).each <span style="color:#080;font-weight:bold">do</span> |value, actual|
532
- value.should be_close(actual, <span style="color:#60E">1e-8</span>)
532
+ value.should be_within(<span style="color:#60E">1e-8</span>).of(actual)
533
533
  <span style="color:#080;font-weight:bold">end</span>
534
534
  <span style="color:#080;font-weight:bold">end</span>
535
535
 
@@ -542,7 +542,7 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
542
542
  ]
543
543
 
544
544
  list.z_score(<span style="color:#A60">:population</span>).zip(population_z_score).each <span style="color:#080;font-weight:bold">do</span> |value, actual|
545
- value.should be_close(actual, <span style="color:#60E">1e-8</span>)
545
+ value.should be_within(<span style="color:#60E">1e-8</span>).of(actual)
546
546
  <span style="color:#080;font-weight:bold">end</span>
547
547
  <span style="color:#080;font-weight:bold">end</span>
548
548
 
@@ -1514,7 +1514,12 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
1514
1514
  <div class="cubes">
1515
1515
  <pre class="scode"># SUGAR REFINERY CHANGELOG
1516
1516
 
1517
- ## 2016-01-02 | Sugar Refinery 1.0
1517
+ ## 2021-01-07 | Sugar Refinery 1.0.1
1518
+
1519
+ * Relax Ruby version requirement to allow Ruby 3.0
1520
+
1521
+
1522
+ ## 2016-01-03 | Sugar Refinery 1.0.0
1518
1523
 
1519
1524
  * turn zucker gem into sugar_refinery
1520
1525
  * move iterate into its own gem
@@ -1676,12 +1681,12 @@ describe <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color
1676
1681
 
1677
1682
  <div id="foot">
1678
1683
  <div id="smile"><a href="http://janlelis.com">J-_-L</a></div>
1679
- This is the Ruby Sugar Refinery 1.0.0 documentation (2016-01-03).
1684
+ This is the Ruby Sugar Refinery 1.0.1 documentation (2021-01-07).
1680
1685
  It is available at <a href="http://janlelis.github.io/sugar_refinery">janlelis.github.io/sugar_refinery</a>.
1681
1686
  Ruby Logo CC-BY-SA Yukihiro Matsumoto.
1682
1687
  </div>
1683
1688
 
1684
- <a href="https://github.com/janlelis/sugar-refinery"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
1689
+ <a href="https://github.com/janlelis/sugar_refinery"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
1685
1690
  </body>
1686
1691
  </html>
1687
1692
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SugarRefinery
2
- VERSION = '1.0.0'.freeze
4
+ VERSION = '1.0.1'
3
5
  end
@@ -12,27 +12,27 @@ describe "doing statistics on arrays" do
12
12
 
13
13
  describe "Array#stdev_sample" do
14
14
  it "should return the standard deviation of the sample" do
15
- list.stdev_sample.should be_close(1.2909944487358056, 1e-8)
15
+ list.stdev_sample.should be_within(1e-8).of(1.2909944487358056)
16
16
  end
17
17
  end
18
18
 
19
19
  describe "Array#stdev_population" do
20
20
  it "should return the standard deviation of the population" do
21
- list.stdev_population.should be_close(1.118033988749895, 1e-8)
21
+ list.stdev_population.should be_within(1e-8).of(1.118033988749895)
22
22
  end
23
23
  end
24
24
 
25
25
  describe "Array#stdev" do
26
26
  it "should default to population" do
27
- list.stdev.should be_close(list.stdev_population, 1e-8)
27
+ list.stdev.should be_within(1e-8).of(list.stdev_population)
28
28
  end
29
29
 
30
30
  it "should delegate sample correctly" do
31
- list.stdev(:sample).should be_close(list.stdev_sample, 1e-8)
31
+ list.stdev(:sample).should be_within(1e-8).of(list.stdev_sample)
32
32
  end
33
33
 
34
34
  it "should delegate population correctly" do
35
- list.stdev(:population).should be_close(list.stdev_population, 1e-8)
35
+ list.stdev(:population).should be_within(1e-8).of(list.stdev_population)
36
36
  end
37
37
 
38
38
  it "should raise an error with any other key" do
@@ -43,7 +43,7 @@ describe "doing statistics on arrays" do
43
43
  describe "Array#z_score" do
44
44
  it "should default to population" do
45
45
  list.z_score.zip(list.z_score(:population)).each do |value, actual|
46
- value.should be_close(actual, 1e-8)
46
+ value.should be_within(1e-8).of(actual)
47
47
  end
48
48
  end
49
49
 
@@ -58,7 +58,7 @@ describe "doing statistics on arrays" do
58
58
  p list
59
59
 
60
60
  list.z_score(:sample).zip(sample_z_score).each do |value, actual|
61
- value.should be_close(actual, 1e-8)
61
+ value.should be_within(1e-8).of(actual)
62
62
  end
63
63
  end
64
64
 
@@ -71,7 +71,7 @@ describe "doing statistics on arrays" do
71
71
  ]
72
72
 
73
73
  list.z_score(:population).zip(population_z_score).each do |value, actual|
74
- value.should be_close(actual, 1e-8)
74
+ value.should be_within(1e-8).of(actual)
75
75
  end
76
76
  end
77
77
 
@@ -5,15 +5,15 @@ Gem::Specification.new do |s|
5
5
  s.name = "sugar_refinery"
6
6
  s.version = SugarRefinery::VERSION
7
7
  s.authors = ['Jan Lelis']
8
- s.email = ['mail@janlelis.de']
8
+ s.email = ['hi@ruby.consulting']
9
9
  s.summary = "The Ruby Sugar Refinery is a collection of tiny refinements."
10
10
  s.description = "The Ruby Sugar Refinery is a collection of tiny refinements (declarative local core extensions)."
11
- s.homepage = "http://janlelis.github.io/sugar_refinery"
11
+ s.homepage = "https://janlelis.github.io/sugar_refinery"
12
12
  s.files = Dir.glob( %w[{lib,spec}/**/*.rb desc/**/*.yaml] ) + %w{Rakefile sugar_refinery.gemspec MIT-LICENSE.txt README.md CHANGELOG.md doc/create_documentation.rb doc/index.html}
13
13
  s.require_paths = ["lib"]
14
14
  s.license = 'MIT'
15
15
 
16
- s.required_ruby_version = '~> 2.0'
16
+ s.required_ruby_version = '>= 2.0'
17
17
  s.add_development_dependency 'rake', '~> 10.4'
18
18
  s.add_development_dependency 'rspec', '~> 2.99'
19
19
  s.add_development_dependency 'coderay', '~> 1.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugar_refinery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-03 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -55,7 +55,7 @@ dependencies:
55
55
  description: The Ruby Sugar Refinery is a collection of tiny refinements (declarative
56
56
  local core extensions).
57
57
  email:
58
- - mail@janlelis.de
58
+ - hi@ruby.consulting
59
59
  executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
@@ -111,7 +111,7 @@ files:
111
111
  - spec/spec_helper.rb
112
112
  - spec/string_op_spec.rb
113
113
  - sugar_refinery.gemspec
114
- homepage: http://janlelis.github.io/sugar_refinery
114
+ homepage: https://janlelis.github.io/sugar_refinery
115
115
  licenses:
116
116
  - MIT
117
117
  metadata: {}
@@ -121,7 +121,7 @@ require_paths:
121
121
  - lib
122
122
  required_ruby_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - "~>"
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '2.0'
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -130,8 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 2.5.1
133
+ rubygems_version: 3.2.4
135
134
  signing_key:
136
135
  specification_version: 4
137
136
  summary: The Ruby Sugar Refinery is a collection of tiny refinements.