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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fuck_facebook/version.rb +1 -1
- data/src/fb_duration.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f39f95c1ab04f9becec05ea79cb6f07c90d93628ef94c121394a6cdffe195098
|
4
|
+
data.tar.gz: 80c4db15e83c546edac23505e9d277c3b92219aae9ba731cf4bcc2132681e8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a9e910c17f7d70698e77a9c690168d52fc42898034a778673d823ec1e36a8d15e2d9c7106f59c6f525495ac850877af34810b9d1024a3f77f7cd6e95e4d3c3
|
7
|
+
data.tar.gz: 3100461e7973a50441f53145df781f6d8555cbe57f078cdd1991a48d25c2ca5af29d6bd3892581ccb2748000bc9b382fbfa164978bfa6e41b434945b75cba40f
|
data/Gemfile.lock
CHANGED
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
|
-
|
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
|
-
|
37
|
+
rounding_correction_times = ROUNDING_CORRECTION_TIMES[duration_letter]
|
38
38
|
|
39
|
-
number.to_i.send(DURATION_LETTER_TO_METHOD[duration_letter]) +
|
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.
|
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-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|