apportion 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0164723475a1fb9b94e2f42e8cdea11a7329618d
4
- data.tar.gz: bc55cb9674ec51022132a40d1192c574e95302e0
3
+ metadata.gz: 2e0c14b2d76b4ec061abf3b78aa62a22f5d3ae42
4
+ data.tar.gz: 0e72028038c8b4c094e23e5581d256dfcc4ff216
5
5
  SHA512:
6
- metadata.gz: 34533ff02d06f3b15f1ff0bcb8a878eeea4ea983e13cb160df4daecf745d777ecd80dae96bd59803c4e488a4da14097e8e01017e71a8dfc4cd38a82f7439967b
7
- data.tar.gz: 001cc71d1a2063588b764d86b825d7b2e1fd3f3120a9683138d30603ab0a8cc1664ed99062dfaf8721f542712724260d7afda8a62f90329728b6b5a7a7ee50e1
6
+ metadata.gz: 62d33343736ed7fc2574c25b0584e2124b3c54d8331537b5050c97025435b655c7d21def675f3bfdc32bfde288a8bf261fde92e58b0f6cfc8cd0a974ca64cea1
7
+ data.tar.gz: 773b48096dea707356a94992baa331bd0f1503b9686843cc10cf78f1aea52363adae1c42fd8bb1167a131c3e597f17e4241981fb412661d900a5686260943c16
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+
11
+ *.gem
@@ -0,0 +1,12 @@
1
+ ## Changelog
2
+
3
+ ### v0.0.2 (2016-02-01)
4
+
5
+ * bug fix
6
+ * prepend the module name to call methods in other modules (versus 'include')
7
+
8
+ ### v0.0.1 (2016-01-29)
9
+
10
+ * initial
11
+ * support equal proportions algorithm
12
+ * support options for :prior_portions and :required_minimum
@@ -4,8 +4,6 @@ require 'apportion/util'
4
4
 
5
5
  # Top level interface, or API, to distribute a quantity among recipients
6
6
  module Apportion
7
- include Apportion::Setup
8
- include Apportion::Util
9
7
  module_function
10
8
 
11
9
  # Distributes a quantity among recipients by dividing proportionally according to relative
@@ -22,9 +20,9 @@ module Apportion
22
20
  # # => {a: 3, b: 2, c: 2}
23
21
 
24
22
  def division(weights, size, options = {})
25
- portions = initial_portions(weights.keys, options)
26
- sum_portions = hash_values_sum(portions)
27
- validate(size, sum_portions)
23
+ portions = Setup.initial_portions(weights.keys, options)
24
+ sum_portions = Util.hash_values_sum(portions)
25
+ Setup.validate(size, sum_portions)
28
26
  next_step(weights, portions, sum_portions, size)
29
27
  end
30
28
 
@@ -1,3 +1,3 @@
1
1
  module Apportion
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apportion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Fleshman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -117,6 +117,7 @@ extra_rdoc_files: []
117
117
  files:
118
118
  - ".gitignore"
119
119
  - ".travis.yml"
120
+ - CHANGELOG.md
120
121
  - CODE_OF_CONDUCT.md
121
122
  - Gemfile
122
123
  - LICENSE.txt