subunit 0.2.6 → 0.2.7

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
  SHA1:
3
- metadata.gz: 1f64fbbcde90497a7b502324cd8a04c59633c069
4
- data.tar.gz: f31185d61bb1f973825936b9ad8173f7d28c7264
3
+ metadata.gz: 21744219dbd184038d789639756f77af54275d0b
4
+ data.tar.gz: d937e1febc4828ca5a7349d50e0a83b0429bfe30
5
5
  SHA512:
6
- metadata.gz: ae6d43d47333699f3c8fba103f0f870a2144542673efb1c1d3f085239467bf78b85b04372acda20432a0faaf4c0fa1b72c707c31915d6abaa7e9950efd91f6e5
7
- data.tar.gz: 99da3d8e1fd6082699a63aa8f202170da91b91491be306e802ab2d1983e856c9286662dd01b8a80584bcb07dc20c47d5a01c72372616dcbfeb324220d33f0a9f
6
+ metadata.gz: 389b80f48026c750b2ac235705bc37a83a663bd5f638743363214fd654d6ef56ce1b3e6c9c022fb075f79b7fee1fb0e28400f5b2c6264ea07ce9b6ff10d03eaf
7
+ data.tar.gz: 7cd1802d542f02530199757d88603ff784e1ce80ed7e13ad7b7ae9a4a3fb86080733ebbaa3f32e69933f6d0c6acd7ec1f6bd675feb3341ad630c400f65c0b662
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/subunit.rb CHANGED
@@ -10,9 +10,12 @@ class Subunit
10
10
  method((raw_units.class.to_s.downcase + '_units').to_sym).call(raw_units, raw_subunit)
11
11
  end
12
12
 
13
- def to_s()
13
+ def to_s(omit: [])
14
14
 
15
- list = @to_h.to_a
15
+ h = @to_h
16
+ omit.each {|x| h.delete x}
17
+
18
+ list = h.to_a
16
19
  n = list.find {|_,v| v > 0 }
17
20
  a = list[list.index(n)..-1].map {|x|"%d %s" % x.reverse}
18
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subunit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  jRLTmInXW6D2qCYhnTg1lnKahOHZwk3PSyvv3fUBYiwNQJBumSY95yvIoZpFjRNc
32
32
  UlPQMCJOB3GcUw==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-06-15 00:00:00.000000000 Z
34
+ date: 2017-08-24 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file