time_duration_humanizer 0.1.3 → 0.1.4

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: d7ed4da9e5a159f1bffef3af39ad92ff00ba2d58
4
- data.tar.gz: 4d4f818658ea9d33f0feca93bd255292b22d5f4f
3
+ metadata.gz: 19ac28f2de41518c7bf1a98a77f4a069eae9b512
4
+ data.tar.gz: aa46bf9b380524b203ec199bb0ed95a3c7dd7ca5
5
5
  SHA512:
6
- metadata.gz: 7b5b256445406de2868b4bf3478b548f880e68bbbd47e86e3a48e244599bcc42e7ce22a0731c260c503b256c43a4c3f33970601951fe71e28d04c8a347489b12
7
- data.tar.gz: e747dca5f31c31cc03338be075cc213875d65048e9dafdd49f4780fecbf469b080b1237536346cc360372058452f98f050457f0936279fbf107a35c61ede1fed
6
+ metadata.gz: 9a18dbb9adc2030eba1c909de72a8e3a004c727ce7d827bca6941411b5b45f52463e65bad4426b4ed3d3e695353161c683ac90eb84ad4c51a8c3b4a9513d146b
7
+ data.tar.gz: 915788acf663a309290e18c7df021c446a56801ca5ac2b2346ad37399a4df3581a41ff2a0749306ba6ee83c3ff1b90743e8d5cdf7cb8a27cfba07fa65b3dff0a
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/time_duration_humanizer.svg)](https://badge.fury.io/rb/time_duration_humanizer)
4
4
 
5
- An extremely simple gem for converting seconds to human-readable format.
5
+ A Ruby gem for converting seconds into human-readable format.
6
6
 
7
7
  ## Installation
8
8
 
@@ -42,10 +42,10 @@ irb(main):006:0> TimeDurationHumanizer.humanize(62208000, { days_in_year: 360 })
42
42
  => "2 years"
43
43
  ```
44
44
 
45
- ## Options (seconds parameter)
45
+ ## Options (second parameter)
46
46
 
47
- * end_at_end - default `true`
48
- * days_in_year - default `365.25`
47
+ * and_at_end - default `true`
48
+ * days_in_year - default `1.year / 1.day` (365.25)
49
49
 
50
50
  ## Units (third parameter)
51
51
 
@@ -6,7 +6,7 @@ module TimeDurationHumanizer
6
6
  def self.humanize(seconds, options = {}, units = {})
7
7
  options = {
8
8
  and_at_end: true,
9
- days_in_year: 365.25
9
+ days_in_year: 1.year / 1.day
10
10
  }.merge!(options.symbolize_keys)
11
11
 
12
12
  units = {
@@ -1,3 +1,3 @@
1
1
  module TimeDurationHumanizer
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Nikolay Digaev"]
10
10
  spec.email = ["ffs.cmp@gmail.com"]
11
11
 
12
- spec.summary = %q{An extremely simple gem for converting seconds to human-readable format.}
13
- spec.description = %q{An extremely simple gem for converting seconds to human-readable format (12345 => "3 hours, 25 minutes and 45 seconds").}
12
+ spec.summary = %q{An extremely simple gem for converting seconds into human-readable format.}
13
+ spec.description = %q{An extremely simple gem for converting seconds into human-readable format (12345 => "3 hours, 25 minutes and 45 seconds").}
14
14
  spec.homepage = "https://github.com/digaev/time_duration_humanier"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_duration_humanizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolay Digaev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
- description: An extremely simple gem for converting seconds to human-readable format
55
+ description: An extremely simple gem for converting seconds into human-readable format
56
56
  (12345 => "3 hours, 25 minutes and 45 seconds").
57
57
  email:
58
58
  - ffs.cmp@gmail.com
@@ -90,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.4.5.1
93
+ rubygems_version: 2.4.8
94
94
  signing_key:
95
95
  specification_version: 4
96
- summary: An extremely simple gem for converting seconds to human-readable format.
96
+ summary: An extremely simple gem for converting seconds into human-readable format.
97
97
  test_files: []