fastlane-plugin-hours 0.3.2 → 1.0.0

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: deabd8f9f0c55eafed3aa0edd543282b31280ee0
4
- data.tar.gz: d58ffd44303a043cfbf437901dd2a3b601651858
3
+ metadata.gz: 594360f72381f7031c1196484850a73227b6d75f
4
+ data.tar.gz: 3014484d9e99e1c45264a1ee678c3c2311409bb4
5
5
  SHA512:
6
- metadata.gz: 8e060c08a58755c0ba06056f133e8fc4acfcfcf1b50a5086cabb2e7e7a6e70c26a8c5b083c553bcb25cb4a8c1bc9a78bb404835412366a213cb65b27dd6147e2
7
- data.tar.gz: cb0cfe4aea754a639777b156d105b8ed60b4615400075143711796ebc0f302a76f6ddc410e335636c28900ee119e78affa7c7c8f9c4f7f2b6d565d89a2e61740
6
+ metadata.gz: cc20ecff51b4a4fe1719cde2e75fd557b8972222d8636a6d27652508cd9a2fc71b06c1c8a61c370f37a902c2f5416f798272b4ec78e108536235e8baba89005e
7
+ data.tar.gz: 854184de6286d0f48a0df989e1dbdd8383df4fd2c1b48abac60362517e8d6b7911b2d7b36b94cdcb19c3ef09a38d9c3649f85b2356756b2bb48cd699710da907
@@ -27,16 +27,18 @@ module Fastlane
27
27
  end
28
28
  duration_minutes = (duration / 60.0).round
29
29
  if duration_minutes == 0
30
- UI.success "Total time saved #{duration.round} seconds till now 🎉"
30
+ UI.success "Total #{duration.round} seconds saved till now 🎉"
31
31
  elsif duration_minutes >= 60
32
- duration_hours = (duration_minutes / 60.0).round
33
- if duration_hours == 1
34
- UI.success "Total time saved #{duration_hours} hour till now 🎉"
32
+ # duration_hours = distance_of_time_in_words(duration) # (duration_minutes / 60.0).round
33
+ mm, ss = duration.divmod(60) #=> [4515, 21]
34
+ hh, mm = mm.divmod(60) #=> [75, 15]
35
+ if hh == 1
36
+ UI.success "Total #{hh} hour #{mm} minutes saved till now 🎉"
35
37
  else
36
- UI.success "Total time saved #{duration_hours} hours till now 🎉"
38
+ UI.success "Total #{hh} hours #{mm} minutes saved till now 🎉"
37
39
  end
38
40
  else
39
- UI.success "Total time saved #{duration_minutes} minutes till now 🎉"
41
+ UI.success "Total #{duration_minutes} minutes saved till now 🎉"
40
42
  end
41
43
 
42
44
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Hours
3
- VERSION = "0.3.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-hours
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rishabh Tayal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-02 00:00:00.000000000 Z
11
+ date: 2017-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry