time_zone_converter 0.2.4 → 0.2.5
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 +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +2 -2
- data/lib/time_zone_converter.rb +3 -3
- data/lib/time_zone_converter/version.rb +1 -1
- data/time_zone_converter.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59fa9caf9d5a53eded39c75dae69c6c08a4adb79e3ef59b0887b6191ae1d22f9
|
4
|
+
data.tar.gz: 1d54dd85a1ede2c35e885f733fe459417d3798079d6885417d23396775d1155d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3d21b59fa75fea5425eab61b0449829e402381557c2c148664fd17deebb0337cd40ca05b5b51744db7b7d08eb35a0831b8afa6cb8bf4c9d9d43effb882ce42
|
7
|
+
data.tar.gz: 243a067f20940b11a8de4e5f216fde3e4e38daa8939bb947d34cdbc77d9a515eefa83de4268d1dccf1c47635210215da7e5a86c5d5b5bab402af330ca06b28fa
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
time_zone_converter (0.2.
|
4
|
+
time_zone_converter (0.2.5)
|
5
5
|
activesupport
|
6
6
|
nearest_time_zone
|
7
7
|
oj
|
@@ -10,12 +10,12 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (6.0.
|
13
|
+
activesupport (6.0.1)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 0.7, < 2)
|
16
16
|
minitest (~> 5.1)
|
17
17
|
tzinfo (~> 1.1)
|
18
|
-
zeitwerk (~> 2.
|
18
|
+
zeitwerk (~> 2.2)
|
19
19
|
andand (1.3.3)
|
20
20
|
benchmark-malloc (0.1.0)
|
21
21
|
benchmark-perf (0.5.0)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
i18n (1.7.0)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
30
|
kdtree (0.4)
|
31
|
-
minitest (5.
|
31
|
+
minitest (5.13.0)
|
32
32
|
multi_json (1.13.1)
|
33
33
|
nearest_time_zone (0.0.4)
|
34
34
|
andand
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
timecop (0.9.1)
|
61
61
|
tzinfo (1.2.5)
|
62
62
|
thread_safe (~> 0.1)
|
63
|
-
zeitwerk (2.2.
|
63
|
+
zeitwerk (2.2.1)
|
64
64
|
|
65
65
|
PLATFORMS
|
66
66
|
ruby
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# TimeZoneConverter
|
1
|
+
# TimeZoneConverter CLI
|
2
2
|
|
3
3
|

|
4
4
|
|
@@ -35,7 +35,7 @@ Output:
|
|
35
35
|
]
|
36
36
|
```
|
37
37
|
|
38
|
-
Note: Time
|
38
|
+
Note: Time ranges are also supported:
|
39
39
|
|
40
40
|
```
|
41
41
|
time_zone_converter ct Warszawa Bangkok '19:00-21:00'
|
data/lib/time_zone_converter.rb
CHANGED
@@ -56,12 +56,12 @@ module TimeZoneConverter
|
|
56
56
|
if time.is_a? Array
|
57
57
|
time.map { |t| t.in_time_zone(time_zone) }
|
58
58
|
else
|
59
|
-
time.in_time_zone(time_zone)
|
59
|
+
time.in_time_zone(time_zone)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
ISO_TIME = /\A(\d
|
64
|
-
ISO_TIME_RANGE = /\A(\d
|
63
|
+
ISO_TIME = /\A(\d?\d):(\d\d)\z/
|
64
|
+
ISO_TIME_RANGE = /\A(\d?\d):(\d\d)-(\d?\d):(\d\d)\z/
|
65
65
|
|
66
66
|
# Inspired by: https://github.com/rails/rails/blob/aeba121a83965d242ed6d7fd46e9c166079a3230/activemodel/lib/active_model/type/helpers/time_value.rb#L65
|
67
67
|
# @returns: Time object or an Array of Time objects
|
data/time_zone_converter.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Rafał Trojanowski"]
|
9
9
|
spec.email = ["rt.trojanowski@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = %q{CLI which calculates time for a
|
12
|
-
spec.description = %q{
|
11
|
+
spec.summary = %q{CLI which calculates time for a different time zone locations.}
|
12
|
+
spec.description = %q{CLI which calculates time for a different time zone locations.}
|
13
13
|
spec.homepage = "https://github.com/rafaltrojanowski/time_zone_converter"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_zone_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafał Trojanowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description:
|
167
|
+
description: CLI which calculates time for a different time zone locations.
|
168
168
|
email:
|
169
169
|
- rt.trojanowski@gmail.com
|
170
170
|
executables:
|
@@ -217,5 +217,5 @@ requirements: []
|
|
217
217
|
rubygems_version: 3.0.3
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
|
-
summary: CLI which calculates time for a
|
220
|
+
summary: CLI which calculates time for a different time zone locations.
|
221
221
|
test_files: []
|