dtg 4.0.0 → 4.0.1

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: 9baca4fefe520ca79708b64acb9ff54caa9dc5f5e4757af1da08040afe1310cd
4
- data.tar.gz: 366d56c174427106189bfcbf316b1b366bdb47de0f7319a5fb7685d907e17cbb
3
+ metadata.gz: 053236b96b7b8fa1d2293f15ad07745e73dd7954f6a8eda620f8273058785318
4
+ data.tar.gz: c8b3dce94c5c006278f033c3ae2bc2bba4102b1741573ab3b8faf9dab6e5d55b
5
5
  SHA512:
6
- metadata.gz: 2d90ad0ef678fe647a554bb38ad1f1b4ccfe7acd4b4005855422259f1d4c5ae8690ff385c949109bf8f0480dbf37d8c5ffd4d647e897f9313f7f3886988e07b5
7
- data.tar.gz: c228294640713a51dcc3c1d5f63af0106643b29b38afe0e8e1c1c3cc07aa2f796caacfa4543077782cc4f738212b06792cf5cada51cc9cfd3ab22f1b92c62eaa
6
+ metadata.gz: 84167bd41ec8ce98d90792d90a920a02e30299099c22909e680716d49ab8244c2fb8fade731487c179a8cecd9beba6c831b4e83abbf6e85f880cfc4249bd196d
7
+ data.tar.gz: 50fd1d38fb4736af3a09b0c4f516f7c04d1e1d6a2c24536e56b9bc8533cb7d9b8f3d9262e35a8063f07c384f1049cc4a9d5598cf01fc52ac476103b82961c933
data/lib/dtg.rb CHANGED
@@ -6,9 +6,6 @@ require_relative "dtg/date_time_ext"
6
6
  require_relative "dtg/active_support/time_with_zone_ext"
7
7
 
8
8
  module Dtg
9
- # Time zone safety setting
10
- Time.zone ||= 'UTC'
11
-
12
9
  def self.dtg
13
10
  "DTG gem is active"
14
11
  end
@@ -1,4 +1,4 @@
1
1
  module Dtg
2
2
  # DTG version of gem
3
- VERSION = "4.0.0"
3
+ VERSION = "4.0.1"
4
4
  end
@@ -1,6 +1,11 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe ActiveSupport::TimeWithZone do
4
+ # Set Time Zone before tests
5
+ before do
6
+ Time.zone = "UTC"
7
+ end
8
+
4
9
  # ActiveSupport::TimeWithZone preferred method of instantiation is with Time.zone.now, not new
5
10
  let(:time) { Time.zone.now { include DateTimeGroup }}
6
11
 
@@ -1,6 +1,11 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe DateTime do
4
+ # Set Time Zone before tests
5
+ before do
6
+ Time.zone = "UTC"
7
+ end
8
+
4
9
  let(:time) { described_class.now { include DateTimeGroup } }
5
10
 
6
11
  describe "#to_dtg" do
@@ -1,6 +1,11 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe DateTimeGroup do
4
+ # Set Time Zone before tests
5
+ before do
6
+ Time.zone = "UTC"
7
+ end
8
+
4
9
  describe "#dtg" do
5
10
  context "when the object is a DateTime" do
6
11
  let(:dummy) { DateTime.new{ include described_class } }
@@ -1,6 +1,11 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Time do
4
+ # Set Time Zone before tests
5
+ before do
6
+ described_class.zone = "UTC"
7
+ end
8
+
4
9
  let(:time) { described_class.now { include DateTimeGroup } }
5
10
 
6
11
  describe "#to_dtg" do
@@ -1,15 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Dtg do
4
- it "Sets the Timezone to UTC if not already set" do
5
- expect(Time.zone).to eq(ActiveSupport::TimeZone.new("UTC"))
6
- end
7
-
8
- it "does not override the timezone if set" do
9
- Time.zone = "HST"
10
- expect(Time.zone).to eq(ActiveSupport::TimeZone.new("HST"))
11
- end
12
-
13
4
  describe ".dtg" do
14
5
  it "replies as active if gem is loaded" do
15
6
  expect(described_class.dtg).to eq("DTG gem is active")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtg
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SolarisFlare