dtg 3.0.1 → 3.0.2
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/Rakefile +1 -0
- data/lib/dtg/active_support/time_with_zone_ext.rb +1 -0
- data/lib/dtg/date_time_ext.rb +1 -19
- data/lib/dtg/railtie.rb +1 -0
- data/lib/dtg/time_ext.rb +1 -0
- data/lib/dtg/version.rb +2 -1
- data/lib/dtg/zones.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47fcb47b9cfc284a3b42dbcc6d24c0410aa118ecd2042927a03d257a603fd418
|
4
|
+
data.tar.gz: 74290a6d0acbe433ba776eb30a54276a3cff61e3d7c9bf940777d8b6278e0800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0559e9975d5cba18e10097ba63781ce6db455724d8c8d1b40f4c03811a27279c04aaef16a4e58e8545b34fe384410d5f02a3e81666ec9e7fec2c6b0edb8a1b0c'
|
7
|
+
data.tar.gz: f76fa8ab12623ddfe75a047705b8d3deae5999408eda1c0ef12cd29b5a0c3f81cec2f510b4bfe0d317b1787cdaab9a2ed8bc9c6bc1763b5c2465f9d3f0a0798c
|
data/Rakefile
CHANGED
data/lib/dtg/date_time_ext.rb
CHANGED
@@ -1,24 +1,6 @@
|
|
1
1
|
require 'dtg'
|
2
|
-
require_relative 'zones'
|
3
2
|
|
4
3
|
class DateTime
|
4
|
+
# Insert DTG Methods into this class
|
5
5
|
include Dtg
|
6
|
-
include Zones
|
7
|
-
|
8
|
-
def to_dtg(zone = :z)
|
9
|
-
convert(zone).format(zone)
|
10
|
-
end
|
11
|
-
|
12
|
-
def format(zone = :z)
|
13
|
-
key = zone.downcase.to_sym
|
14
|
-
raise "Error: #{zone} is not a valid zone" unless UTC_ZONES.key?(key)
|
15
|
-
dtg = "%d%H%M#{key.upcase.to_s} %b %y"
|
16
|
-
strftime(dtg)
|
17
|
-
end
|
18
|
-
|
19
|
-
def convert(zone = :z)
|
20
|
-
key = zone.downcase.to_sym
|
21
|
-
raise "Error: #{zone} is not a valid zone" unless UTC_ZONES.key?(key)
|
22
|
-
key == :j ? self.dup : self.in_time_zone(UTC_ZONES[key])
|
23
|
-
end
|
24
6
|
end
|
data/lib/dtg/railtie.rb
CHANGED
data/lib/dtg/time_ext.rb
CHANGED
data/lib/dtg/version.rb
CHANGED
data/lib/dtg/zones.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dtg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SolarisFlare
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 5.2.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: sqlite3
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|