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 +4 -4
- data/lib/dtg.rb +0 -3
- data/lib/dtg/version.rb +1 -1
- data/spec/lib/dtg/active_support/time_with_zone_ext_spec.rb +5 -0
- data/spec/lib/dtg/date_time_ext_spec.rb +5 -0
- data/spec/lib/dtg/date_time_group_spec.rb +5 -0
- data/spec/lib/dtg/time_ext_spec.rb +5 -0
- data/spec/lib/dtg_spec.rb +0 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 053236b96b7b8fa1d2293f15ad07745e73dd7954f6a8eda620f8273058785318
|
4
|
+
data.tar.gz: c8b3dce94c5c006278f033c3ae2bc2bba4102b1741573ab3b8faf9dab6e5d55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84167bd41ec8ce98d90792d90a920a02e30299099c22909e680716d49ab8244c2fb8fade731487c179a8cecd9beba6c831b4e83abbf6e85f880cfc4249bd196d
|
7
|
+
data.tar.gz: 50fd1d38fb4736af3a09b0c4f516f7c04d1e1d6a2c24536e56b9bc8533cb7d9b8f3d9262e35a8063f07c384f1049cc4a9d5598cf01fc52ac476103b82961c933
|
data/lib/dtg.rb
CHANGED
data/lib/dtg/version.rb
CHANGED
@@ -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
|
|
data/spec/lib/dtg_spec.rb
CHANGED
@@ -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")
|