human_size 1.1.1 → 1.1.2

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: 0a267646ca0dd82deb3b94c62fe520a29a18b86390948d45af9a7f7096c4f777
4
- data.tar.gz: 67539f3cc6fb619f2f8a44e18c639a693a5e7d72c0f869d278eeb01568640de7
3
+ metadata.gz: ecb82dfb4fd83acee0fb5663c0aaebfbd99ea2610eb6d7fe0534f6f580f70e26
4
+ data.tar.gz: b76621cfd5e13244bab24437b1b52bd61767ed21a4f837abc52edd77bd7fda3e
5
5
  SHA512:
6
- metadata.gz: 062b1e2e352a44fbf4f07b04b5d3454e2f375381b22439ac13e27ce03881d02b69f47f090115e96981dcf42abef73a7e47814ee59dae7e710d45c3038710aace
7
- data.tar.gz: 6585c72704f53e8a127b6aa208bad8dc81dede0a394fb60cc802684060471cf334a108d0c185b269191d915be3837543553ab2368ab79827aaab1e7f852b04fe
6
+ metadata.gz: f7f9981ba064756ad9c333fcf10e8383a7407858aa00565684c691fb87b4714f3c9eb4cf0173ff0288b81b9cce0a678963ce962af5052d725ef000ed72e908be
7
+ data.tar.gz: 60a51157cce2fea09258648ac2117395dc9a9b1bf9b1bad1c7ec64f179f63d918db7c3a53ad48d4403736026931a75623c8a7fcef386e4415fc73399d40cfb5e
data/.travis.yml CHANGED
@@ -1,23 +1,27 @@
1
- sudo: required
2
1
  matrix:
3
2
  include:
4
3
  - language: ruby
4
+ name: "Bundler (rvm 2.4.4 & bundler 1.17.3)"
5
5
  rvm: 2.4.4
6
6
  before_install:
7
7
  - gem install bundler -v 1.17.3
8
8
  - language: ruby
9
+ name: "Bundler (rvm 2.4.4 & bundler 2.0.1)"
9
10
  rvm: 2.4.4
10
11
  before_install:
11
12
  - gem install bundler -v 2.0.1
12
13
  - language: ruby
14
+ name: "Bundler (rvm 2.5.3 & bundler 2.0.1)"
13
15
  rvm: 2.5.3
14
16
  before_install:
15
17
  - gem install bundler -v 2.0.1
16
18
  - language: ruby
19
+ name: "Bundler (rvm 2.6.1 & bundler 2.0.1)"
17
20
  rvm: 2.6.1
18
21
  before_install:
19
22
  - gem install bundler -v 2.0.1
20
23
  - language: ruby
24
+ name: "Rubocop (rvm 2.4.4)"
21
25
  env: SKIP_INTERPRETER=true
22
26
  rvm: 2.4.4
23
27
  before_install:
@@ -27,6 +31,7 @@ matrix:
27
31
  script:
28
32
  - ./rubocop-travis/scan.sh
29
33
  - language: ruby
34
+ name: "Rubocop (rvm 2.5.3)"
30
35
  env: SKIP_INTERPRETER=true
31
36
  rvm: 2.5.3
32
37
  before_install:
@@ -36,6 +41,7 @@ matrix:
36
41
  script:
37
42
  - ./rubocop-travis/scan.sh
38
43
  - language: ruby
44
+ name: "Rubocop (rvm 2.6.1)"
39
45
  env: SKIP_INTERPRETER=true
40
46
  rvm: 2.6.1
41
47
  before_install:
@@ -45,6 +51,7 @@ matrix:
45
51
  script:
46
52
  - ./rubocop-travis/scan.sh
47
53
  - language: ruby
54
+ name: "Link Checker (rvm 2.6.1)"
48
55
  rvm: 2.6.1
49
56
  before_install:
50
57
  - mkdir travis
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.1.2 (June 28, 2019)
2
+
3
+ IMPROVEMENTS:
4
+
5
+ * Clean up tweaks based on updates to rubocop. ([@TGWolf][])
6
+
1
7
  ## 1.1.1 (March 13, 2019)
2
8
 
3
9
  IMPROVEMENTS:
data/example/example.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'human_size'
4
5
 
data/lib/human_size.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'human_size/version'
2
4
  require_relative 'human_size/overloads'
3
5
 
@@ -17,7 +19,7 @@ module HumanSize
17
19
  'BINARY' => ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'Pib', 'EiB', 'ZiB', 'YiB']
18
20
  }
19
21
 
20
- return 'unknown' if bytes < 0
22
+ return 'unknown' if bytes.negative?
21
23
  return '0.0 B' if bytes.zero?
22
24
 
23
25
  units = if a_kilobyte_is_1024_bytes
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # Overload the integer class
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HumanSize
2
- VERSION = '1.1.1'.freeze
4
+ VERSION = '1.1.2'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # rubocop:disable Metrics/BlockLength
2
4
 
3
5
  require 'human_size'
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/setup'
2
4
  require 'human_size'
3
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: human_size
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-13 00:00:00.000000000 Z
11
+ date: 2019-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler