chronic_duration 0.10.3 → 0.10.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: db9c9caba8412e38577177bed6d7a36e21a5ca86
4
- data.tar.gz: b0d3a2a4f52825ef58698c314d5e33ca3a2cb145
3
+ metadata.gz: 40a29997ddf4fe0636444f8e053a10c2137d55e5
4
+ data.tar.gz: cbb93992254d3a890b33ad01341bb2f74b8697b9
5
5
  SHA512:
6
- metadata.gz: 8b9ac709e3c106593f91f0272b48b3a593181e821b1207f05c157afe4cafbd14fda60dbe1e7a5f8d24ffd9f155f61cac9b29622d49a39c6936b4af41f2180f87
7
- data.tar.gz: e1e8bb348ca38af8cbe0c5f7f94cb5094b1839d3456b4da0f071612d5cf2ea620ffdc9b231e3558db5031db996c7ed13ceeab620671c84e5cec4195a7ff0155e
6
+ metadata.gz: 66b1da9426ab003d09237ee94b2bfc37e2ea0952ce19d9419f07670653fcb61b7eebf4c7f2df9d094669084360b282ac9ad81aa0a2697c36f1ede916f7922690
7
+ data.tar.gz: 4674fba51c9cd76b75f6c85d9fc15583cfb407483325ba56be3da89b59f564ff85cfd0b47abed097941e933c464bb93c413fd83ba8f3db8706d10434ace6f563
@@ -1,2 +1,4 @@
1
1
  rvm:
2
2
  - 1.9.3
3
+ - 2.0.0-p353
4
+ - 2.1.0
data/README.md CHANGED
@@ -32,6 +32,8 @@ The reverse can also be accomplished with the output method. So pass in seconds
32
32
  => 2 wks 1 day 1 hr
33
33
  >> ChronicDuration.output(1299600, :weeks => true, :units => 2)
34
34
  => 2 wks 1 day
35
+ >> ChronicDuration.output(1299600, :weeks => true, :units => 2, :joiner => ', ')
36
+ => 2 wks, 1 day
35
37
  >> ChronicDuration.output(1296000)
36
38
  => 15 days
37
39
 
@@ -65,7 +67,7 @@ Also looking for additional maintainers.
65
67
 
66
68
  ## Contributors
67
69
 
68
- errm,pdf, brianjlandau, jduff, olauzon, roboman, ianlevesque
70
+ errm,pdf, brianjlandau, jduff, olauzon, roboman, ianlevesque, bolandrm
69
71
 
70
72
  ## TODO
71
73
 
@@ -97,7 +97,7 @@ module ChronicDuration
97
97
  end
98
98
  end
99
99
 
100
- joiner = ' '
100
+ joiner = opts.fetch(:joiner) { ' ' }
101
101
  process = nil
102
102
 
103
103
  case opts[:format]
@@ -1,3 +1,3 @@
1
1
  module ChronicDuration
2
- VERSION = '0.10.3'
2
+ VERSION = '0.10.4'
3
3
  end
@@ -222,6 +222,10 @@ describe ChronicDuration do
222
222
  end
223
223
  end
224
224
 
225
+ it "uses user-specified joiner if provided" do
226
+ ChronicDuration.output(2 * 3600 + 20 * 60, joiner: ', ').should == '2 hrs, 20 mins'
227
+ end
228
+
225
229
  end
226
230
 
227
231
  describe ".filter_by_type" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_duration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - hpoydar