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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23d56074244f86fd246714de4f7827abfce02be31de2bc93e659311b9e08404a
4
- data.tar.gz: d83417f20621befc87d12f8a26d165b655fc23192a05d3aa938ae81cf39cb816
3
+ metadata.gz: 47fcb47b9cfc284a3b42dbcc6d24c0410aa118ecd2042927a03d257a603fd418
4
+ data.tar.gz: 74290a6d0acbe433ba776eb30a54276a3cff61e3d7c9bf940777d8b6278e0800
5
5
  SHA512:
6
- metadata.gz: e11bf743407ad275537cfd943e02e5aa280179a7524f059274260d58a91b42f41f7706c4816d4e03f54eab6487732381fec7cf621bfff639e0f53cc27097af2b
7
- data.tar.gz: 97a53b9db182dfed337c9a996787934e9b6d634307717dae460ef2eb81117bef0a1e7024faa21b2ea48aecc4a7bc5f160f6b93df68a6b3d4feb20f5c56d30d02
6
+ metadata.gz: '0559e9975d5cba18e10097ba63781ce6db455724d8c8d1b40f4c03811a27279c04aaef16a4e58e8545b34fe384410d5f02a3e81666ec9e7fec2c6b0edb8a1b0c'
7
+ data.tar.gz: f76fa8ab12623ddfe75a047705b8d3deae5999408eda1c0ef12cd29b5a0c3f81cec2f510b4bfe0d317b1787cdaab9a2ed8bc9c6bc1763b5c2465f9d3f0a0798c
data/Rakefile CHANGED
@@ -16,6 +16,7 @@ end
16
16
 
17
17
  require 'bundler/gem_tasks'
18
18
 
19
+ # RSpec rake task to run rspec on default - needed by travis
19
20
  begin
20
21
  require 'rspec/core/rake_task'
21
22
  RSpec::Core::RakeTask.new(:spec)
@@ -1,5 +1,6 @@
1
1
  require 'dtg'
2
2
 
3
3
  class ActiveSupport::TimeWithZone
4
+ # Insert DTG Methods into this class
4
5
  include Dtg
5
6
  end
@@ -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
@@ -1,4 +1,5 @@
1
1
  module Dtg
2
+ # Used for linked to Rails for better integrations
2
3
  class Railtie < ::Rails::Railtie
3
4
  end
4
5
  end
@@ -1,5 +1,6 @@
1
1
  require 'dtg'
2
2
 
3
3
  class Time
4
+ # Insert DTG Methods into this class
4
5
  include Dtg
5
6
  end
@@ -1,3 +1,4 @@
1
1
  module Dtg
2
- VERSION = "3.0.1"
2
+ # DTG version of gem
3
+ VERSION = "3.0.2"
3
4
  end
@@ -1,4 +1,5 @@
1
1
  module Zones
2
+ # UTC time zones as DTG symbols for proper conversion
2
3
  UTC_ZONES = {
3
4
  # A: Alpha Time: UTC +01:00 (Paris, France)
4
5
  a: +1,
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.1
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-23 00:00:00.000000000 Z
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