Skip to content

Commit 746d7c7

Browse files
authored
Revert "[WIP] Fix backwards compatibility in date formatting"
1 parent 0bdc6aa commit 746d7c7

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

lib/jekyll-github-metadata/value.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def render
3434

3535
def to_liquid
3636
case render
37-
when nil, true, false, Hash, String, Numeric, Array, Time
37+
when nil, true, false, Hash, String, Numeric, Array
3838
value
3939
else
4040
to_json

spec/value_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
let(:nil_value_without_key) { described_class.new(nil) }
1212
let(:nil_value_with_key) { described_class.new("my_key", nil) }
1313
let(:key_and_value) { described_class.new("my_key2", proc { "leonard told me" }) }
14-
let(:time_value) { described_class.new(Time.utc(2025, 1, 29, 12, 0, 0)) }
1514

1615
it "takes in a value and stores it" do
1716
v = described_class.new("some_value")
@@ -56,16 +55,6 @@
5655
expect(hash_value.render).to eql("hello" => "world")
5756
end
5857

59-
it "does not modify a time value" do
60-
expect(time_value.render).to be_a(Time)
61-
expect(time_value.render).to eql(Time.utc(2025, 1, 29, 12, 0, 0))
62-
end
63-
64-
it "returns Time objects directly from to_liquid for date filter compatibility" do
65-
expect(time_value.to_liquid).to be_a(Time)
66-
expect(time_value.to_liquid).to eql(Time.utc(2025, 1, 29, 12, 0, 0))
67-
end
68-
6958
it "accepts a nil value with no key" do
7059
expect(nil_value_without_key.key).to eql("{anonymous}")
7160
expect(nil_value_without_key.render).to be_nil

0 commit comments

Comments
 (0)