fuck_facebook 0.5.3 → 0.5.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
  SHA256:
3
- metadata.gz: 328dfd9c415343629b2aeb3f83e6252fa2ee0c882be23f441442e0170781a0e0
4
- data.tar.gz: 13369d4a2a3bb32d672385cb47776cdfd37ecb8159c2314d78cefb52ae0376fd
3
+ metadata.gz: f39f95c1ab04f9becec05ea79cb6f07c90d93628ef94c121394a6cdffe195098
4
+ data.tar.gz: 80c4db15e83c546edac23505e9d277c3b92219aae9ba731cf4bcc2132681e8d6
5
5
  SHA512:
6
- metadata.gz: 111cd999cfa8dddbfbb72c36ace0dbed922b57a0ed653c3726541bba8f2a17f1bdfc4188e832a07cb6e0cf46938e52218e1973a9ab4b2dce92453d018e2fefee
7
- data.tar.gz: 44d2fa65bb1b48e4f2294cb314cdd63609135fd4b028e929937f4141064563acba59ec1db3552459d22c92e151d9c42b85941ebd1e423235e67d510880522283
6
+ metadata.gz: a9a9e910c17f7d70698e77a9c690168d52fc42898034a778673d823ec1e36a8d15e2d9c7106f59c6f525495ac850877af34810b9d1024a3f77f7cd6e95e4d3c3
7
+ data.tar.gz: 3100461e7973a50441f53145df781f6d8555cbe57f078cdd1991a48d25c2ca5af29d6bd3892581ccb2748000bc9b382fbfa164978bfa6e41b434945b75cba40f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuck_facebook (0.5.2)
4
+ fuck_facebook (0.5.3)
5
5
  activesupport (~> 6.1)
6
6
  highline (~> 2.0)
7
7
  mail (~> 2.7)
@@ -1,3 +1,3 @@
1
1
  module FuckFacebook
2
- VERSION = '0.5.3'.freeze
2
+ VERSION = '0.5.4'.freeze
3
3
  end
data/src/fb_duration.rb CHANGED
@@ -18,9 +18,9 @@ class FbDuration
18
18
  }.freeze
19
19
 
20
20
  # TODO: Fill in d w y extra time to add
21
- EXTRA_TIME_TO_ADD_TO_FIX_ROUNDING = {
21
+ ROUNDING_CORRECTION_TIMES = {
22
22
  'm' => 0,
23
- 'h' => 5.minutes,
23
+ 'h' => -5.minutes,
24
24
  'd' => 0,
25
25
  'w' => 0,
26
26
  'y' => 0
@@ -34,9 +34,9 @@ class FbDuration
34
34
  def self.parse(facebook_format_duration)
35
35
  number, duration_letter = facebook_format_duration.split
36
36
 
37
- extra_rounding_time = EXTRA_TIME_TO_ADD_TO_FIX_ROUNDING[duration_letter]
37
+ rounding_correction_times = ROUNDING_CORRECTION_TIMES[duration_letter]
38
38
 
39
- number.to_i.send(DURATION_LETTER_TO_METHOD[duration_letter]) + extra_rounding_time
39
+ number.to_i.send(DURATION_LETTER_TO_METHOD[duration_letter]) + rounding_correction_times
40
40
  end
41
41
 
42
42
  def self.time_to_beginning_of_duration_letter(time, facebook_format_duration)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuck_facebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keeyan Nejad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-26 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport