one_inch_punch 0.6.1 → 0.6.3

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: 3eb60aa6b2384759a118ed88ece70238f64c98ca
4
- data.tar.gz: e6791a8972f450174259af5f4d7a57a778bbd8cc
3
+ metadata.gz: d716a3d8e97f70edd2a39cab9b7debf380e9ecfb
4
+ data.tar.gz: 149ec221fcf870c17cf8dbcd5a385ade97eacd69
5
5
  SHA512:
6
- metadata.gz: c710f6622ba2c98343d157c82224fdb2a9b54246ea24447098cef1c3d47082ef89fbd489d9fb5f9ce12da670c6d9b843f4597d2526ce4858517c143ba740cf94
7
- data.tar.gz: 8cdd78674570de88ae45622485fe621541c5b0ed07e4ba8e53e60a1c40ffab6eb2f12d8bbd6975ba5dbec6402b76d052462158e34bacbd78a3d12ab7a361fdac
6
+ metadata.gz: cdcc524dcd523ff1b2abab03c32e0d3d150bcdb129a687ff53d1939b727a3678efd0a774b3fe16814e0cb23332b9dc346ad527dfc13ab08b66a54fc31a77c5ef
7
+ data.tar.gz: 7e7a0dd62125f956cd065b195777cc90d7f9379cbcc2492f0cecf2ee44dc3d7b9b58632ac6abeae34d1917e3646193123c48c05f3caea854201e45fc1b5fa8b7
@@ -1,3 +1,13 @@
1
+ == 0.6.3 2019-03-01
2
+
3
+ * 1 tiny bugfix:
4
+ * fixing require broken in 0.6.2
5
+
6
+ == 0.6.2 2019-03-01
7
+
8
+ * 1 tiny change:
9
+ * extending Integer instead of Fixnum, because Fixnum is deprecated in Ruby 2.4
10
+
1
11
  == 0.6.1 2017-07-10
2
12
 
3
13
  * 1 tiny bugfix:
@@ -1 +1 @@
1
- require 'punch/core_ext/fixnum'
1
+ require 'punch/core_ext/integer'
@@ -1,11 +1,11 @@
1
- class Fixnum
1
+ class Integer
2
2
  def elapsed_time
3
3
  minutes, seconds = divmod(60)
4
4
  hours, minutes = minutes.divmod(60)
5
-
5
+
6
6
  seconds = '%02d' % seconds
7
7
  minutes = '%02d' % minutes
8
-
8
+
9
9
  time = "#{minutes}:#{seconds}"
10
10
  time = "#{hours}:#{time}" unless hours.zero?
11
11
  time
@@ -2,7 +2,7 @@ class Punch
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- TINY = 1
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,27 +1,27 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper.rb')
2
2
 
3
- describe Fixnum do
3
+ describe Integer do
4
4
  it 'should give an elapsed time' do
5
5
  50.should.respond_to(:elapsed_time)
6
6
  end
7
-
7
+
8
8
  describe 'giving an elapsed time' do
9
9
  it 'should convert the number as seconds to an HH:MM:SS format' do
10
10
  60174.elapsed_time.should == '16:42:54'
11
11
  end
12
-
12
+
13
13
  it 'should format seconds as two digits' do
14
14
  135182.elapsed_time.should == '37:33:02'
15
15
  end
16
-
16
+
17
17
  it 'should format minutes as two digits' do
18
18
  39900.elapsed_time.should == '11:05:00'
19
19
  end
20
-
20
+
21
21
  it 'should not format hours as two digits' do
22
22
  3900.elapsed_time.should == '1:05:00'
23
23
  end
24
-
24
+
25
25
  it 'should not includes hours if the time is less than an hour' do
26
26
  890.elapsed_time.should == '14:50'
27
27
  end
@@ -559,9 +559,9 @@ describe Punch, 'instance' do
559
559
  end
560
560
 
561
561
  @projects = {}
562
- @projects['parent'] = 'daddy'
563
- @projects['child'] = @projects['parent'] + '/sugar'
564
- @projects['kid'] = @projects['parent'] + '/object'
562
+ @projects['parent'] = 'part'
563
+ @projects['child'] = @projects['parent'] + '/kid'
564
+ @projects['kid'] = @projects['parent'] + '/other'
565
565
 
566
566
  @data = { @projects['parent'] => [], @projects['child'] => [], @projects['kid'] => [] }
567
567
  Punch.data = @data
@@ -393,8 +393,8 @@ describe Punch do
393
393
 
394
394
  describe 'handling a sub-project' do
395
395
  before do
396
- @projects['parent'] = 'daddy'
397
- @projects['child'] = @projects['parent'] + '/sugar'
396
+ @projects['parent'] = 'part'
397
+ @projects['child'] = @projects['parent'] + '/kid'
398
398
  end
399
399
 
400
400
  it "should return 'in' for a non-existent parent project if the sub-project is punched in" do
@@ -944,8 +944,8 @@ describe Punch do
944
944
  describe 'handling a sub-project' do
945
945
  before do
946
946
  @projects = {}
947
- @projects['parent'] = 'daddy'
948
- @projects['child'] = @projects['parent'] + '/sugar'
947
+ @projects['parent'] = 'part'
948
+ @projects['child'] = @projects['parent'] + '/kid'
949
949
  end
950
950
 
951
951
  it 'should actually punch out the sub-project when told to punch out the parent project' do
@@ -1269,8 +1269,8 @@ describe Punch do
1269
1269
  describe 'handling a sub-project' do
1270
1270
  before do
1271
1271
  @projects = {}
1272
- @projects['parent'] = 'daddy'
1273
- @projects['child'] = @projects['parent'] + '/sugar'
1272
+ @projects['parent'] = 'part'
1273
+ @projects['child'] = @projects['parent'] + '/kid'
1274
1274
  @data[@projects['parent']] = [ { 'in' => @now - 100, 'out' => @now - 50 } ]
1275
1275
  @data[@projects['child']] = [ { 'in' => @now - 20 } ]
1276
1276
  Punch.data = @data
@@ -1466,8 +1466,8 @@ describe Punch do
1466
1466
  describe 'handling a sub-project' do
1467
1467
  before do
1468
1468
  @projects = {}
1469
- @projects['parent'] = 'daddy'
1470
- @projects['child'] = @projects['parent'] + '/sugar'
1469
+ @projects['parent'] = 'part'
1470
+ @projects['child'] = @projects['parent'] + '/kid'
1471
1471
  @data[@projects['parent']] = [ { 'in' => @now - 100, 'out' => @now - 50 } ]
1472
1472
  @data[@projects['child']] = [ { 'in' => @now - 20, 'out' => @now - 10 } ]
1473
1473
  Punch.data = @data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: one_inch_punch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yossef Mendelssohn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon
@@ -52,10 +52,10 @@ files:
52
52
  - bin/punch
53
53
  - lib/punch.rb
54
54
  - lib/punch/core_ext.rb
55
- - lib/punch/core_ext/fixnum.rb
55
+ - lib/punch/core_ext/integer.rb
56
56
  - lib/punch/instance.rb
57
57
  - lib/punch/version.rb
58
- - spec/fixnum_spec.rb
58
+ - spec/integer_spec.rb
59
59
  - spec/punch_command_spec.rb
60
60
  - spec/punch_instance_spec.rb
61
61
  - spec/punch_spec.rb